Commit 6e1b053
committed
refactor(copilot): read the chat capability off its operation declaration
The raw chat handler restated copilot.use in both the assertion and the
refusal, so changing chatOperations.send's policy would leave the route
over- or under-gated and answering the wrong refusal code. Read the
declaration once instead, including its 'none' case, where a declarative
surface asserts nothing and so does this.1 parent ad317b5 commit 6e1b053
2 files changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
978 | 979 | | |
979 | 980 | | |
980 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
981 | 991 | | |
982 | 992 | | |
983 | 993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
1125 | 1126 | | |
1126 | 1127 | | |
1127 | 1128 | | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1128 | 1133 | | |
1129 | 1134 | | |
1130 | 1135 | | |
| |||
1140 | 1145 | | |
1141 | 1146 | | |
1142 | 1147 | | |
| 1148 | + | |
1143 | 1149 | | |
1144 | 1150 | | |
| 1151 | + | |
1145 | 1152 | | |
1146 | 1153 | | |
1147 | 1154 | | |
1148 | | - | |
| 1155 | + | |
1149 | 1156 | | |
1150 | 1157 | | |
1151 | 1158 | | |
1152 | 1159 | | |
1153 | | - | |
| 1160 | + | |
1154 | 1161 | | |
1155 | 1162 | | |
1156 | 1163 | | |
| |||
0 commit comments