* feat: make stream a caller-controlled passthrough in Messages API
Allow callers to set stream: false via requestOptions instead of
hardcoding stream: true. Add non-streaming response handler for the
Anthropic Messages API that parses single JSON responses.
- createMessagesRequestBody: stream: true → options.requestOptions?.stream ?? true
- preparePostOptions: stream: true as default before spread (callers can override)
- processResponseFromMessagesEndpoint: auto-detect via Content-Type header
- processNonStreamingResponseFromMessagesEndpoint: new handler for JSON responses
with tool call support in finishedCb delta, defensive parsing, cache-token
consistency warning, unknown block type logging
- Remove stale 'stream not respected' comment from fetch.ts
- Remove stream: false from agentIntent.ts inline summarization
- 10 new tests for non-streaming handler
* fix: add telemetry parity for non-streaming path and bump cache salt
* regenerate simulation cache for review-inline tests
* Regenerate simulation cache after rebase
* Temporarily disable multifile-edit-claude variant (#315940)
claude-3.5-sonnet returns model_not_supported from the endpoint, breaking
simulation cache regen. Re-enable when the test is updated to use a
currently-supported Claude model.
* Fix terminal strict-mode crash on empty suggestions + update baseline
- terminal.stest.ts: guard strict-mode `ok()` predicate so when the model
returns no code block, the test fails cleanly with the existing message
instead of crashing with 'Cannot read properties of undefined (reading match)'.
Also drop the stale commented-out debug block.
- baseline.json: refresh scores (68.01 -> 68.69) and drop the 14 entries for
the disabled multifile-edit-claude variant (see #315940).
- Remove now-orphaned multifile-edit-claude-panel.json outcome file.
* Apply CI-observed score improvements for cpp inline scenarios
CI on Linux scores 4 cpp InlineChatIntent scenarios higher than my local
macOS run does (likely platform-specific line-ending/whitespace normalization
in the cpp grader). Update baseline.json to match the Linux scores:
- edit-InlineChatIntent [inline] [cpp] - edit for cpp: 5 -> 9
- edit-InlineChatIntent [inline] [cpp] - edit for macro: 0 -> 2
- generate-InlineChatIntent [inline] [cpp] - cpp code generation: 3 -> 10
- generate-InlineChatIntent [inline] [cpp] - templated code gen: 0 -> 10
Overall score: 68.69 -> 68.86.
* Populate cpp diagnostic cache via Docker for cross-platform parity
The earlier rebase cache regen produced new LLM responses for the cpp
inline tests but failed to populate the clang diagnostic provider cache
for those new inputs, because clang detection on macOS is broken (Apple
clang prints '-v' output to stderr, but findIfInstalled only checks
stdout) and Docker wasn't running. As a result the cpp diagnostic cache
was missing entries for the new LLM responses, and CI re-ran clang live
on each platform with diverging results:
- Linux CI: clang available, scored highest (9, 2, 10, 10)
- Windows CI: no clang, errored out (5, 0, 10, 10 with worsening)
- macOS: Apple clang misdetected as missing, Docker off, errored
This commit:
1. Bumps CLANG_DIAGNOSTICS_PROVIDER_CACHE_SALT 5 -> 6 to invalidate
any contaminated entries.
2. Adds two new cache layers populated by running cpp tests via Docker
(using the mcr.microsoft.com/devcontainers/cpp image, same Linux
clang as CI). All 14 cpp scenarios now produce deterministic,
platform-independent diagnostic results when read from cache.
Verified with --require-cache: all cpp scenarios pass without invoking
clang/docker at runtime.
* tools: add binary file support with hexdump display
Adds support for reading and displaying binary files in the read file tool
with a hexdump-formatted view. This enables better handling of binary content
in the IDE context without attempting to interpret them as text.
- Adds hexdump utility to format binary data in a readable hex/ASCII view
- Extends readFileTool to detect binary files and provide formatted output
- Adds binaryFileHexdump prompt component for displaying binary content
- Integrates binary file variable support in file variable display
- Updates test fixtures with binary file handling scenarios
Fixes https://github.com/microsoft/vscode/issues/284178
Fixes https://github.com/microsoft/vscode/issues/299973
(Commit message generated by Copilot)
* pr comments
* baseline update
* baseline update
* Remove `@workspace` chat participant
For https://github.com/microsoft/vscode/issues/292972
Removes the `@workspace` chat participant since this is now an outdated (and confusing) way to use code search. For now we'll keep the commands but I've moved them under the default agent instead
* Updating tests too and fixing some references
* Always use `github.copilot.editingSessionEditor`, enable slash-command based on v2-config
This makes all requests go to the `InlineChatIntent` and it decides (based on the v2-config) if it uses the "old world" for making inline chat requests happen
* re-run tests
* remove references to old setting `github.copilot.chat.advanced.inlineChat2`
* play with `InlineChatIntent`
* wip
* move things, better/simpler prompt
* cleanup, renames, stuff
* more wip
* done after tool call
* edit and generate stest for new InlineChatIntent
* use codebook for diagnostics
* inline chat fixing stests
* stest run
* remove old Inline2 tests
* remove slash commands for v2, remove the editCodeIntent path for v2
* 💄
* 💄
* Don't use `diagnosticsTimeout` when with inline chat because the new diagnostics will never be read but slow down the result
* fix compile error
* stest run
* update baseline
* prevent some JSON errors from empty output
* unfresh baseline.json
* use `MockGithubAvailableEmbeddingTypesService` in stests
* back to hamfisted skipping of stests
* send telemetry from inline chat intent
* tweak some stests
* Update model response guidelines in agent prompts
- Modified the response instructions in `agentPrompt.tsx` to clarify when to state the model name.
- Enhanced the `CopilotIdentityRules` class in `copilotIdentity.tsx` to include model name responses.
| File | Changes |
|----------------------------------|-------------------------------------------------------------------------|
| `agentPrompt.tsx` | Updated guidance on stating model name when asked. |
| `copilotIdentity.tsx` | Added model name response instructions in identity rules. |
* Update guidance on model name disclosure in agent prompts
- Revised instruction to clarify that the model name should not be volunteered unless explicitly asked by the user.
| File | Changes Made |
|----------------------------------------|--------------------------------------------------|
| src/extension/prompts/node/agent/agentPrompt.tsx | Updated reminder text regarding model name disclosure. |
* Update agent prompts to include model disclosure
- Added instruction to state the model being used when asked about it in multiple agent prompt snapshots.
| File Path | Changes Made |
|---------------------------------------------------------------------------|------------------------------------------------------------------------------|
| src/extension/prompts/node/agent/test/__snapshots__/agentPrompt.spec.tsx.snap | Updated responses to include model disclosure when asked about the model. |
* Add SQLite cache file for simulation layer
This commit introduces a new SQLite cache file for the simulation layer to enhance data retrieval efficiency.
| File | Changes |
|----------------------------------------------------------------------|-------------------------------|
| test/simulation/cache/layers/2171978e-88a1-4218-afac-dc1fe7ecc095.sqlite | New file created with versioning info |
* Add SQLite cache file for simulation layer
This commit introduces a new SQLite cache file to enhance the simulation layer's performance.
| File | Changes |
|----------------------------------------------------------------------|------------------------|
| test/simulation/cache/layers/94afd615-5805-4860-a1ba-3f9ebbf7b9a4.sqlite | New file added 📁 |
* remove bad cache layers
* npm run simulate
* update baseline
---------
Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
* stub out new participant for replay
* add debugger to step through replay file
* parse and debug json replay
* make edits from the replay
* create absolute path
* update for the latest json format
* show tool calls with tool call renderer
* use singleton object for response queue
* cleanup
* formatting
* baseline update
* baseline update again
* just disable tool from normal agent calls
* reverting stest changes
* nes: clean up enforcing minimum response delay and cancellation handling (#746)
* nes: do not enforce minimum response delay for NES in 2 cases (#748)
* nes: clean up enforcing minimum response delay and cancellation handling
* nes: do not enforce minimum response delay for NES in 2 cases
1. for NES that's a subsequent edit (ie non-first edit in a set of multiple edits that come from a single model request)
2. for NES that was cached and is returned again after rebasing on user edits
* Move to latest completion core (#749)
* update baseline
* use existing util
---------
Co-authored-by: Ulugbek Abdullaev <ulugbekna@gmail.com>
Co-authored-by: Dirk Bäumer <dirkb@microsoft.com>
* prompts: avoid wrapping file attachments in code fences
We previously included attached files like this
```
<attachment id="test.js" filePath="/home/jola/test.js">
\```javascript
bar
asd (
\```
</attachment>
```
Which, very reasonably, caused the model to get confused and think that
the file actually contained those backticks. This change removes that
so that it's just
```
<attachment id="test.js" filePath="/home/jola/test.js">
bar
asd (
</attachment>
```
Refs https://github.com/microsoft/vscode/issues/260772#issuecomment-3176793591
Busted all the caches with associated baseline noise.
* fixup
* use enum for model
* add small proxy endpoint and use when needed
* extend endpoint to reduce duplication and imply dependance
* use experiment service
* rename small -> short
* fix model name
* fix type
* separate endpoint impls for upcoming header changes
* remove extra spaces
* Update baseline
* Full update
* Update
---------
Co-authored-by: Vritant Bhardwaj <vrtoku@gmail.com>
Co-authored-by: Vritant Bhardwaj <vrbhardw@microsoft.com>
* Use lineNumberStyle for FileVariable
* vitest
* update test files with no baseline...
* Update baseline scores for toolCalling tests to reflect recent changes
* tests
* Update baseline
---------
Co-authored-by: Ulugbek Abdullaev <ulugbekna@gmail.com>
* remove unused language fields and clean up project setup info
* fix: add missing punctuation in instructions for clarity
* Update cache
* Remove cache layer file that requires signed commit
* Update cache