* Add archived state management and worktree sharing for chat sessions
- Introduced `archived` property in `ChatSessionMetadataFile` to track archived sessions.
- Updated `IChatSessionMetadataStore` interface to include methods for setting and getting archived state.
- Implemented logic in `ChatSessionMetadataStore` and `MockChatSessionMetadataStore` to handle archived sessions.
- Added `getBlockingSiblingSessionsForFolder` utility to identify sessions that share worktrees.
- Modified CLI chat session commands to respect archived state during session deletion and worktree cleanup.
- Updated tests to cover new functionality and ensure proper behavior of session management.
* Add worktree sharing edge-case unit tests
Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Introduces dedicated endpoint resolver classes (CopilotUtilitySmallChatEndpoint,
CopilotUtilityChatEndpoint) in place of the ModelAliasRegistry indirection, and
republishes the resolved utility endpoints under their new family ids
('copilot-utility-small', 'copilot-utility') as LanguageModelChatInformation
entries so that workbench callers using selectLanguageModels({ vendor: 'copilot',
id: 'copilot-utility-small' }) keep working.
- Renames the internal family identifiers everywhere they're consumed:
callers, tests, and workbench code in src/vs/workbench/contrib/chat/.
- Drops src/platform/endpoint/common/modelAliasRegistry.ts.
- CopilotUtilitySmallChatEndpoint.resolve tries a small primary model and
falls back to a second small model if the primary is unavailable.
- CopilotUtilityChatEndpoint.resolve returns the API-marked default base
model (is_chat_fallback === true), preserving existing behavior.
- Updates _copilotBaseModel field and 'copilot-base' literal in
ModelMetadataFetcher to _copilotUtilityModel / 'copilot-utility'.
No user-facing behavior change. The setting-driven 'disabled'/'default'/BYOK
selector support will be layered on top in a follow-up.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
remove comment
remove code smell
remove more code smell
* 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.
Strip Copilot Memory (CAPI) feature entirely
Removes the CAPI-backed Copilot Memory that synced repository-scoped facts
to GitHub. The local file-based MemoryTool with user/session/repo scopes
remains as the sole memory mechanism.
- Delete AgentMemoryService and its test.
- Remove the github.copilot.chat.copilotMemory.enabled setting and its NLS string.
- Remove ConfigKey.CopilotMemoryEnabled.
- Strip all CAPI gating in memoryTool.tsx, memoryContextPrompt.tsx, tools.ts.
- Drop _dispatchRepoCAPI / _repoCreate / _sendRepoTelemetry.
- /memories/repo/ now always routes to local storage.
- Update memoryTool.spec.tsx: remove mock CAPI services and CAPI-only tests.
- Update simulationExtHostToolsService.ts for the new ToolsContribution arity.
* fix(nes-datagen): discard xtab-275 oracle edits outside edit window
The NES model can only edit lines inside the prompt's <|code_to_edit|>
window [K, N). formatAsEditWindowOnly was expanding the window to cover
stray oracle edits, so the assistant text spilled out of the window and
duplicated surrounding context when applied.
Instead, keep edits in order and drop the first edit that isn't fully
contained in [K, N) along with every later edit (later offsets assume
earlier edits were applied). Add unit tests covering both the spillover
repro and the all-in-window control case.
* refactor(nes-datagen): extract filterEditsInsideEditWindow helper
Pull the line-containment filter out of formatAsEditWindowOnly into a
reusable helper, plus a small getEditLineRange utility to dedupe the
offset->line conversion. No behavior change.
* refactor(nes-datagen): route xtab-275 dropped-edit warnings through pipeline logger
Replace the console.warn in formatAsEditWindowOnly with a structured
return shape ({ assistant, droppedCount }) and a ResponseLogger threaded
through generateResponse / generateAllResponses. The pipeline now logs
dropped edits via its existing log callback (so warnings are visible to
dataset curators and captured by the e2e test logs), and surfaces the
count on IGeneratedResponse.droppedEditCount.
* fix(nes-datagen): correct netLineChange math for full-line deletions
splitLines("L6\n") returns ['L6', ''] (length 2), so deleting a single
terminated line was counted as -2 lines instead of -1. Compute the delta
by counting newlines in the old segment vs. the new text, which gives
the correct line-count delta for any combination of insertions,
deletions, or replacements without the trailing-empty quirk.
* test(nes-datagen): cover line-changing and boundary-straddling oracle edits
Add cases for in-window inserts that grow the slice, in-window deletes
that shrink it, edits that straddle the window boundary (must be
discarded), and the all-edits-outside fallback (assistant equals the
original window slice with droppedCount equal to all edits).
* fix(nes-datagen): filter oracle edits independently against edit window
Oracle edits come from StringEdit.compose().replacements upstream
(processor.ts) and applyEditsToContent applies them all to the original
doc by sorting offset-descending — so each edit's offsets are
independent. The earlier drop-and-truncate rule (which discarded every
edit after the first out-of-window one) was over-conservative and threw
away in-window edits that were perfectly applicable.
Filter each edit on its own merits and update the test that relied on
the truncate behavior to assert independent filtering instead.
* feat(nes-datagen): surface dropped-edit count in pipeline summary
Sum droppedEditCount across all generated responses and append it to
the [4/5] log line when nonzero, so dataset curators running the
pipeline can see at a glance how many oracle edits were discarded as
out-of-window. Silent omission was the original bug; making it visible
in the summary closes the feedback loop.
* Make xtab modelConfiguration an advanced setting
Move InlineEditsXtabProviderModelConfiguration from TeamInternal to Advanced. Renames the key from chat.advanced.inlineEdits.xtabProvider.modelConfiguration to chat.inlineEdits.xtabProvider.modelConfiguration with a migration for backward compatibility, and exposes it via package.json. Experiments continue using the separate modelConfigurationString setting.
* Fix localModelConfig type to allow null
* Use fully-qualified key in simulation help text
This prevents this annoying warning from getting printed all the time
```
[watch-copilot ] [watch:esbuild ] (node:12319) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///Users/matb/projects/vscode/extensions/copilot/.esbuild.ts is not specified and it doesn't parse as CommonJS.
[watch-copilot ] [watch:esbuild ] Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
[watch-copilot ] [watch:esbuild ] To eliminate this warning, add "type": "module" to /Users/matb/projects/vscode/extensions/copilot/package.json.
[watch-copilot ] [watch:esbuild ] (Use `node --trace-warnings ...` to show where the warning was created)
```
Co-authored-by: Copilot <copilot@github.com>
Fixes#312210
This is using the old search endpoint. We'll start switching over the new one once it's ready
Co-authored-by: Copilot <copilot@github.com>
Starts working through some basic repo wide eslint rules for the copilot extension. Stuff like missing semicolons and missing readonly modifiers for disposables
* refactor: remove getSessionIdForWorkspaceFolder method and update clearWorkspaceChanges to handle both session IDs and folder URIs
* Address comments