Commit 4e2b89c
committed
Detect VS Code agent via VSCODE_AGENT, remove COPILOT_MODEL heuristic
VS Code 1.121+ sets VSCODE_AGENT for agent-initiated terminal commands.
Detect it as `vscode-agent` in the User-Agent header.
The previous COPILOT_MODEL heuristic reported `copilot-vscode` but
COPILOT_MODEL is set by Copilot CLI BYOK users, not specifically by
VS Code. The BYOK collapse logic (drop copilot-vscode when COPILOT_CLI
is also set) is removed alongside the heuristic; VSCODE_AGENT can
legitimately stack with COPILOT_CLI, which now correctly reports
`multiple`.
See: https://code.visualstudio.com/updates/v1_1211 parent 311d530 commit 4e2b89c
3 files changed
Lines changed: 24 additions & 31 deletions
File tree
- databricks-sdk-java/src
- main/java/com/databricks/sdk/core
- test/java/com/databricks/sdk/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | 270 | | |
273 | 271 | | |
274 | 272 | | |
| |||
277 | 275 | | |
278 | 276 | | |
279 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| |||
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | 314 | | |
321 | 315 | | |
322 | 316 | | |
| |||
Lines changed: 19 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
245 | 258 | | |
246 | 259 | | |
247 | 260 | | |
248 | 261 | | |
249 | 262 | | |
250 | 263 | | |
251 | | - | |
| 264 | + | |
252 | 265 | | |
253 | 266 | | |
254 | 267 | | |
| |||
415 | 428 | | |
416 | 429 | | |
417 | 430 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
436 | 434 | | |
437 | 435 | | |
438 | 436 | | |
| 437 | + | |
439 | 438 | | |
440 | | - | |
441 | | - | |
442 | 439 | | |
443 | 440 | | |
444 | 441 | | |
| |||
0 commit comments