* Add ChatSessionCustomizationsProvider proposed API
New types in chatSessionCustomizations.d.ts:
- ChatSessionCustomizationType enum (well-known group IDs)
- ChatSessionCustomizationStorageLocation enum
- ChatSessionCustomizationItem, ChatSessionCustomizationItemGroup
- ChatSessionCustomizationsProvider (provideCustomizations + resolveCustomizationDeletion)
New registration function in chatSessionsProvider.d.ts:
- chat.registerChatSessionCustomizationsProvider(chatSessionType, provider)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Implement ChatSessionCustomizationsProvider e2e plumbing
Protocol: DTOs and 5 new methods on MainThread/ExtHost shapes.
Ext host: registerChatSessionCustomizationsProvider, provideCustomizations,
resolveCustomizationDeletion proxy methods.
Type converters: ChatSessionCustomizations.fromItem/fromGroup.
Main thread: bridge with per-handle emitters, harness descriptor registration.
Service: IChatSessionCustomizationsProvider + registerCustomizationsProvider,
getCustomizations, resolveCustomizationDeletion on IChatSessionsService.
Harness: registerContributedHarness() on ICustomizationHarnessService,
derived observable merges built-in + contributed harnesses.
UI: AICustomizationListWidget reads from provider when extension harness
is active, falls back to IPromptsService for built-in harnesses.
Setting: chat.customizations.providedByExtensions.enabled (experimental).
Command registration: openNewChatSessionInPlace for all contributions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Unhardcode AgentSessionProviders to support extension-contributed session types
Widen type annotations from AgentSessionProviders enum to AgentSessionTarget
across session target picker, delegation picker, welcome view, and utility
functions. Add default cases to exhaustive switch statements. Fix
chatInputPart getActiveSessionType to fall back to getChatSessionType for
extension-contributed URIs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add joshbot extensionDevelopmentPath to Run and Compile Code - OSS task
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Wire provider group commands to create buttons in customization UI
When an extension-contributed harness is active, buildCreateActions()
reads commands from the provider's group data instead of the harness
descriptor. Commands flow through the full plumbing:
extension → protocol DTO → main thread → service → list widget
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add error handling to ext host customizations provider methods
Wrap provideCustomizations and resolveCustomizationDeletion in
try-catch to prevent extension errors from crashing the ext host.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Subscribe to onDidChangeCustomizations in list widget for live updates
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix group commands race condition, remove resolveCustomizationDeletion
Commands bug: _fetchItemsFromProvider no longer sets _currentGroupCommands
as a side effect. Commands are now extracted in loadItems() after the
section-guard check, eliminating races from computeItemCountForSection.
Deletion: removed resolveCustomizationDeletion from the full stack
(proposed API, protocol, ext host, main thread, service, mocks).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add NOTES.md with open design items for cross-harness customizations
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Update NOTES.md with pattern analysis and concrete context proposal
Analyzed TreeDataProvider, StorageSourceFilter, CompletionItemProvider,
and CodeActionProvider patterns. Proposed ChatSessionCustomizationsContext
parameter with discoveredItems for provider-as-curator model.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Simplify cross-harness approach: pull via chatPromptFiles API
No new API needed. Extensions use existing chat.customAgents,
chat.skills, chat.instructions arrays to discover global items
and merge them in provideCustomizations.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add swap file for VIM 9.1 configuration
* Remove swap file for VIM configuration
* Fix JoshBot task: inline arg into command string
Shell tasks with && in command don't work with separate args array.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix create buttons: call updateAddButton after loadItems
buildCreateActions reads _currentGroupCommands which is populated in
loadItems. Calling updateAddButton before loadItems meant commands
were always undefined for extension harnesses.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Guard extension customizations behind setting as a full feature gate
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix missing Hooks section, remove redundant config check
- Add 'hooks' case to sectionToCustomizationGroupIds
- Remove dead UseCustomizationsProvider check from widget (already
enforced at registration in mainThreadChatSessions)
- Remove unused IConfigurationService and ChatConfiguration imports
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Wire itemCommands to context menu for extension harness items
Extension-provided itemCommands now appear in the right-click context
menu on customization items when a non-built-in harness is active.
Commands receive the item id and uri as arguments.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add inSessions flag to Launch Component Explorer task
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix component fixtures: add IChatSessionsService mock
AICustomizationListWidget now depends on IChatSessionsService.
Add mock to both list widget and management editor fixtures.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refactor ChatSessionCustomizationItem: remove id property and update related code
* Remove JoshBot task from tasks.json
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Rename setting to chat.customizations.providerApi.enabled
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Replace hardcoded harness checks with hasCustomizationsProvider
Remove all CustomizationHarness.VSCode/CLI/Claude comparisons from
the list widget. Instead check chatSessionsService.hasCustomizationsProvider()
which works for any harness — built-in or extension-contributed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add TODO comments to proposed API for open design questions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove NOTES.md
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add TODO: Remove hardcoded providers from core
Mark all knownProvider/knownType if-else patterns that branch on
whether a session type is in the AgentSessionProviders enum.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
* sessions - separate user dir for `--sessions` runs
* Update tasks.json
---------
Co-authored-by: Benjamin Christopher Simmonds <44439583+benibenj@users.noreply.github.com>
Fixes#303361
Introduces \\\ variables that extract named capture groups
from a task problem matcher's endsPattern and make them available for
substitution in launch configurations and other variable-resolved contexts.
Changes:
- WatchingProblemCollector.tryFinish() extracts matches.groups from endsPattern
- IProblemCollectorEvent carries capturedVariables in BackgroundProcessingEnds
- TerminalTaskSystem registers captured variables via contributeVariable()
- VariableKind.TaskVar added to the enum
- Test added for taskVar variable resolution
- .vscode/launch.json updated to use \
- Migrates to use AHP types that are synced via `npx tsx scripts/sync-agent-host-protocol.ts`
- One big churn was migrating out of URIs as rich objects in the protocol.
We can't really shove our own `$mid`-type objects in there. I also explored doing a
generated translation layer but I had trouble getting one I was happy with.
- This tightens up some type safety in general and fixes some areas where vscode had
silently/sloppily diverged from the protocol types.
* agent host init
* Agent host: Copilot SDK integration with chat UI
* Agent host: direct MessagePort, logging, SDK wrapper, env fix
* Refactoring and cleanup
* Copilot-authored message: Agent-host tool rendering, protocol, and session fixes
Tool invocation rendering:
- Emit tool_start/tool_complete as ChatToolInvocation (not progressMessage)
- Shell tools (bash/powershell) render as terminal command blocks with
IChatTerminalToolInvocationData, output, and exit codes
- Non-shell tools render via invocationMessage/pastTenseMessage (markdown)
- Filter out report_intent (hidden internal tool)
Agent-agnostic protocol:
- IPC events carry display-ready fields (displayName, invocationMessage,
pastTenseMessage, toolInput, toolOutput, toolKind, language)
- All Copilot CLI-specific logic in copilotToolDisplay.ts with typed
interfaces for known tools (CopilotToolName enum, parameter types)
- Renderer never references specific SDK tool names
Session fixes:
- Resumed sessions show tool invocations in history (getSessionMessages
now returns tool events alongside messages)
- Fixed 'already has a pending request' on resumed sessions by
conditionally providing interruptActiveResponseCallback
- Fixed event filtering for resumed sessions (sessionId override in
_trackSession)
Documentation:
- Split parity.md into design.md (decisions) and backlog.md (tasks)
- Updated architecture.md, sessions.md with cross-references
- Added maintenance notes to all docs
* Copilot-authored message: Model picker, session class, DI and test cleanup
* Cleanups
* stuff
* add diagram
* Add claude agent
* Clean up
* Copy some build script changes from #295817
* Simplify
* Update docs
* Register agent-host via chatSessions contribution API, reduce peripheral diff
* Cleanup
* Don't ship stuff in stable
* Dynamic agent discovery via listAgents() IPC
Replace hardcoded per-provider contributions with a single
AgentHostContribution that discovers available agents from the
agent host process at startup. Each IAgent backend now exposes
an IAgentDescriptor with display metadata and auth requirements.
- Add IAgentDescriptor interface and listAgents() to IPC contract
- CopilotAgent/ClaudeAgent return descriptors via getDescriptor()
- Single AgentHostContribution discovers + registers dynamically
- Remove agentHostConstants.ts (no more hardcoded session types)
- AgentHostSessionListController/LMProvider take params instead
- Rename AgentSessionProviders.AgentHost -> AgentHostCopilot
- Update architecture.md, sessions.md, backlog.md
(Written by Copilot)
* Fix review findings: proxy, disposal, filtering, tests
- Add listAgents() forwarding to AgentHostServiceClient
- Guard async discovery against disposal race
- Add provider field to IAgentModelInfo for per-provider filtering
- Filter models and sessions by provider in LM provider and list
controller
- Update tests for new dynamic API and agent-host-copilot scheme
(Written by Copilot)
* Use DI for AgentHostLanguageModelProvider
(Written by Copilot)
* Strip @img/sharp native binaries from builds
sharp is a transitive dependency of the Claude Agent SDK used for
image processing. Its native .node binaries cause dpkg-shlibdeps
errors during Debian packaging due to $ORIGIN RPATH references.
Strip all @img/sharp-* platform packages since the agent host
doesn't need image processing at runtime.
(Written by Copilot)
* Strip Claude SDK vendored ripgrep binaries
The Claude Agent SDK bundles ripgrep binaries for all platforms
under vendor/ripgrep/. Wrong-architecture binaries cause macOS
Mach-O verification to fail. Strip them entirely via .moduleignore
(VS Code has its own ripgrep) and add to verify-macho skip list.
(Written by Copilot)
* Add tests for AgentSession, AgentService dispatcher, and workbench agent host components
(Written by Copilot)
* Add trace logging, IPC output channel, tool permissions, and attachment context
- Add Agent Host IPC output channel (only registered at trace log level) that
logs all IPC method calls, results, and progress events with full JSON payloads
- Add trace-level logging in AgentService dispatcher for all method calls
- Add trace-level logging in session handler for all progress events and session
resolution
- Wire up onPermissionRequest handler on CopilotClient.createSession and
resumeSession to auto-approve tool permission requests
- Add IAgentAttachment type to IPC contract and thread attachments from chat
variables (file, directory, selection) through sendMessage to the Copilot SDK
(Written by Copilot)
* Add tests for attachment context conversion and threading
(Written by Copilot)
* Add gap analysis docs for Copilot and Claude SDK implementations
(Written by Copilot)
* Sanitize env vars for Copilot CLI subprocess
Strip VSCODE_*, ELECTRON_* (except ELECTRON_RUN_AS_NODE), NODE_OPTIONS, and
other debug-related env vars that can interfere with the Node.js process the
SDK spawns. Matches the env sanitization from the extension implementation.
Also set useStdio and autoStart for proper CLI communication.
(Written by Copilot)
* Add error, usage, and title_changed event types to IPC contract
Add IAgentErrorEvent, IAgentUsageEvent, and IAgentTitleChangedEvent to the
progress event union. Wire up session.error and assistant.usage events from
the Copilot SDK to fire as IPC events instead of only logging. Handle error
events in the renderer session handler by rendering the error message. Usage
and title_changed events are logged at trace level.
(Written by Copilot)
* Add abortSession IPC method for proper cancellation
Add abortSession(session) to the IPC contract, implemented across AgentService,
CopilotAgent (calls session.abort()), ClaudeAgent (no-op, uses AbortController),
and the renderer proxy. Wire up cancellation in the session handler to call
abortSession before finishing, so the SDK actually stops processing.
(Written by Copilot)
* Address reviewer feedback: error finishes request, Claude abort, tests
- Error events now call finish() so the request doesn't hang if the SDK
doesn't send idle after an error
- ClaudeAgent.abortSession calls ClaudeSession.abort() which signals the
AbortController and creates a new one for future turns
- Add test: cancellation calls abortSession on the agent host service
- Add test: error event renders message and finishes the request
- Remove stale TODO in interruptActiveResponseCallback
- Use timeout() helper instead of raw setTimeout in test
- Update gap docs to reflect completed work
(Written by Copilot)
* Add permission request IPC round-trip (Written by Copilot)
* Remove Claude agent from agent-host process
Strip the Claude Agent SDK integration from the agent-host utility process
to focus on the Copilot SDK path.
- Delete src/vs/platform/agent/node/claude/ (claudeAgent, claudeSession, claudeToolDisplay)
- Remove @anthropic-ai/claude-agent-sdk from package.json
- Remove AgentHostClaude enum member and all switch cases
- Remove Claude command registration in electron-browser chat.contribution
- Clean up build scripts (.moduleignore, verify-macho, gulpfile.vscode)
- Narrow AgentProvider type to just 'copilot'
- Update tests and documentation
(Written by Copilot)
* Wire up permission confirmation UI with ChatToolInvocation (Written by Copilot)
* Fix reviewer feedback: safe permission serialization, deny on abort/dispose (Written by Copilot)
* Forward reasoning events as thinking blocks (Written by Copilot)
* Pass workspace folder as workingDirectory to Copilot SDK (Written by Copilot)
* Store and pass workingDirectory on session resume, update gap docs (Written by Copilot)
* Fix permission rendering, session-scoped permissions, and test gaps (Written by Copilot)
* Auto-approve read permissions inside workspace folder (Written by Copilot)
* Move read auto-approve into CopilotAgent where permission policy belongs (Written by Copilot)
* Update gap docs (Written by Copilot)
* Use log language for IPC output channel, add trace prefix (Written by Copilot)
* Add tool rendering gaps to docs (Written by Copilot)
* Stringify URIs in IPC output channel for readability (Written by Copilot)
* Fix IPC output channel: use log languageId with non-log channel for proper append + syntax highlighting (Written by Copilot)
* Fix build errors: add URI import, fix test mock types (Written by Copilot)
* Don't localize agent host provider strings (Written by Copilot)
* Remove claude-agent-sdk from eslint allowed imports (Written by Copilot)
* fix test
* initial thoughts
* Rename folder to agentHost
* Fix paths
* Fixes
* Fixes for copilot
* Fix moduleignore
* first working protocol version
align more closely with protocol
json rpc and some gaps
* cleanup
* Fix copilot pty.node packaging
* Fix test
* prebuild packaging
* Agenthost server fixes
* Update monaco.d.ts
* Update docs
* Fixes
* Build fix
* Fix build issues
* reduce duplication in side effecting code
* fix model switching not working
* reduce mock duplication
* Build fixes
* Copy vscode's node.pty
* And ripgrep
* And thsi
* Ripgrep goes to non-SDK
* Skip copy for stable build
* Remove outdated script
* Build fixes for asar
* fix
* Add some logging
* Fix for windows
* Fix
* Logs
* build: add glob diagnostic for copyCopilotNativeDeps
* build: check both node_modules/ and .asar.unpacked/ for source binaries
* Fix
* Remove excalidraw
---------
Co-authored-by: Connor Peet <connor@peet.io>
Co-authored-by: Connor Peet <copeet@microsoft.com>
* chat: make sendChatRequest extensionIdentifier parameter optional
Makes the 'from' parameter optional (ExtensionIdentifier | undefined) in the
sendChatRequest method chain across ILanguageModelsService, RPC protocol, and
implementations. This allows internal VS Code calls to pass undefined instead
of instantiating invalid ExtensionIdentifier('core') identifiers.
- Updates ILanguageModelsService.sendChatRequest signature
- Updates ILanguageModelChatProvider.sendChatRequest signature
- Updates ExtHostLanguageModelsShape protocol
- Updates ExtHostLanguageModels \ implementation
- Removes new ExtensionIdentifier('core') from 5 internal callers
- Passes undefined as requestInitiator when from is absent
- Bumps vscode.proposed.chatProvider API version to 5
- Updates test mocks to accept optional from parameter
Refs https://github.com/microsoft/vscode/issues/290436
(Commit message generated by Copilot)
* keep api as old version for now
* Update src/vs/workbench/contrib/mcp/common/mcpSamplingService.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Updated @vscode/component-explorer to version 0.1.1-16 and @vscode/component-explorer-cli to version 0.1.1-12 in package.json and package-lock.json.
- Added new test fixtures for chat question carousel, code action list, find widget, inline completions extras, rename widget, and suggest widget.
- Implemented rendering logic for new fixtures to enhance testing capabilities for various components.