Commit Graph

148425 Commits

Author SHA1 Message Date
Robo
f8fd37feb6 chore: bump electron@39.8.2 (#302204) 2026-03-17 07:54:12 +00:00
Robo
555f6469c6 ci: fix universal build for fs-copyfile usage in git extension (#302332) 2026-03-17 07:45:44 +01:00
Josh Spicer
2a5a1757fd build(next): include sessions built-in skills in desktop resources (#302297)
Enhance AI Customization: Add support for plugin skills in data source
2026-03-16 19:06:19 -07:00
Anthony Kim
262ba6d42f Update conpty to 1.25 (#301398)
* Update conpty to 1.25

* see if changes fix 1.2.0-beta11 defering conptyNative.connect()

* Revert "see if changes fix 1.2.0-beta11 defering conptyNative.connect()"

This reverts commit c5d9064efa.

* Reapply "see if changes fix 1.2.0-beta11 defering conptyNative.connect()"

This reverts commit ded49adb14.
2026-03-16 18:27:00 -07:00
Josh Spicer
a43982e99d Make MCP Add Server button match plugins + button (#302270)
Refactor add button in McpListWidget for improved hover functionality and UI consistency
2026-03-16 16:08:57 -07:00
Rob Lourens
98f15b55ea Implement agentHost process (#296627)
* 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>
2026-03-16 15:33:31 -07:00
Rob Lourens
6c6fc09511 Merge pull request #302267 from microsoft/roblou/bored-bonobo
Revive LanguageModelDataPart properly
2026-03-16 14:20:56 -07:00
Copilot
2177a62b8f Debug: Support presentation.hidden in platform-specific launch config sections (#300237)
* Initial plan

* Debug: Support hiding on a specific platform via presentation in platform-specific sections

Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>

* Cleanup

* Fix test

* Fix test

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: roblourens <323878+roblourens@users.noreply.github.com>
Co-authored-by: Rob Lourens <roblourens@gmail.com>
2026-03-16 21:19:42 +00:00
Dmitriy Vasyura
9cd8b2531a Update UI bug fixes (#302263)
Moved Update button to its own group in title bar to avoid bumping command center.
Disabled actionable state notifications in favor of animation effect on the Update button itself.
Do not use title bar UI when title bar is hidden.
Do not persist transient update state properties to avoid duplication notifications.
Clear overwriting state when we reach idle.
2026-03-16 14:16:53 -07:00
Copilot
7fb8d54647 Cancel active request when archiving a chat session (#302162)
* Initial plan

* Cancel active chat request when archiving a session

Co-authored-by: bpasero <900690+bpasero@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bpasero <900690+bpasero@users.noreply.github.com>
2026-03-16 21:09:50 +00:00
Rob Lourens
064bcb1268 Revive LanguageModelDataPart properly
Fix #302266
2026-03-16 14:06:48 -07:00
Justin Chen
056aa6339c don't escape markdown in terminal headers (#302221) 2026-03-16 19:54:40 +01:00
Bryan Chen
7265a61de0 Merge pull request #301906 from microsoft/brchen/fix-copy-on-selection-override
fix: clear copy-on-selection override before re-setting to prevent double-set error
2026-03-16 11:36:47 -07:00
Robo
6c3a461a8b chore: add logs to track network process lifetime (#302197) 2026-03-16 11:11:59 -07:00
Lee Murray
9dcb3770d7 Increase opacity of inactive titlebar elements for improved visibility (#302192)
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-03-16 11:11:27 -07:00
Justin Chen
606a534003 fix bypass approvals skipping "copy changes" confirmation widget (#302184)
fix bypass approvals skipping  confirmation widget
2026-03-16 11:11:03 -07:00
Lee Murray
35c088b92c Update color settings in 2026 Dark theme for improved visibility (#302147)
* Update color settings in 2026 Dark theme for improved visibility

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Regenerate the colorizer tests

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-16 11:10:29 -07:00
Lee Murray
6647d4f726 Update menu styles and improve sticky scroll appearance (#302172)
* fix: update menu styles and improve sticky scroll appearance

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-17 02:56:28 +09:00
Matt Bierner
9cca0f1e82 Merge pull request #300903 from mjbvz/dev/mjbvz/early-narwhal
Add slight clairification to ChatParticipant in content provider API
2026-03-16 10:04:10 -07:00
Lee Murray
c6aa4ab9c6 Update button colors in 2026 Dark theme for better visibility (#302165)
fix: update button colors in 2026 Dark theme for better visibility

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-03-16 18:02:25 +01:00
Bryan Chen
a8c7283de7 Merge pull request #301899 from microsoft/brchen/fix-gutter-indicator-rect-error
fix: clamp widthUntilLineNumberEnd to prevent negative Rect width
2026-03-16 09:45:31 -07:00
Bryan Chen
083bf702a9 Merge pull request #301896 from microsoft/brchen/fix-inline-anchor-listener-leak
Fix listener leak in chat inline anchor widgets
2026-03-16 09:44:47 -07:00
Benjamin Pasero
5971d29792 sessions - disable "folder" option and only allow "worktree" (#302146) 2026-03-16 09:42:51 -07:00
Justin Chen
5aa319e1f8 Revert "only show bypass approvals for worktree CLI" (#302114)
Revert "only show `bypass approvals` for worktree CLI (#301911)"

This reverts commit 6da8508c16.
2026-03-16 15:05:07 +00:00
Lee Murray
11a2e60f4f Update theme names and migrate legacy settings (#302085)
* update theme names & make experimental themes new default

* feat: migrate legacy theme settings and update notification handling

* test: add unit tests for migrateThemeSettingsId function

* feat: add command to try new default themes and update notification message

* feat: refactor tryNewDefaultThemes command to use Action2 class

* feat: update theme names to remove 'Default' prefix and improve theme selection logic

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Regenerated all 126 baseline files (108 regular + 18 tree-sitter) by running the colorize integration tests.

---------

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-16 14:58:23 +00:00
Robo
c3eb7f8453 chore: bump electron@39.8.1 (#302053)
* chore: bump electron@39.8.1

* chore: update node.js build

* chore: bump distro

* chore: bump .nvmrc
2026-03-16 14:51:48 +00:00
Benjamin Pasero
a2b5c067af Modal editor can be resized out of screen (fix #302076) (#302105) 2026-03-16 14:44:30 +00:00
Benjamin Pasero
63187c787b "A session is in progress. Are you sure you want to close the window?" keeps appearing. (fix #300919) (#302094) 2026-03-16 15:26:18 +01:00
Benjamin Pasero
a720ababad [Unhandled Error] [935a] potential listener LEAK detected, having 7391 listeners already. MOST frequent listener (7217... (fix #302016) (#302088)
* [Unhandled Error] [935a] potential listener LEAK detected, having 7391 listeners already. MOST frequent listener (7217... (fix #302016)

* cover it up

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-16 15:25:56 +01:00
Benjamin Pasero
576a66c339 Sessions: progress bar when session loads goes through the previous content (fix #301672) (#302067) 2026-03-16 23:25:37 +09:00
Benjamin Pasero
dbc28762a4 sessions - stop marking as read when opening another (fix microsoft/vscode-internalbacklog#6976) (#302061) 2026-03-16 15:24:08 +01:00
Ladislau Szomoru
c3b9417517 Git - second attempt to adopt the @vscode/fs-copyfile package (#301443)
* Reapply "Git - adopt the new package to use copy-on-write for the worktree include files (#299583)" (#300448)

This reverts commit c56c7bc071.

* Attempt to fix tests

* Fix build

* build: copy node_modules into extension bundle

* Regenerate lock file

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2026-03-16 14:14:06 +00:00
João Moreno
95e71c6873 fix: enhance release approval condition to include main and release branches (#302057)
Co-authored-by: Copilot <copilot@github.com>
2026-03-16 11:50:35 +00:00
João Moreno
4bf76cd10b feat: add job to trigger insider builds for release branches (#302047)
Co-authored-by: Copilot <copilot@github.com>
2026-03-16 12:20:40 +01:00
Robo
50334e7e1d chore: revert compiled assets for macos 26 icon support (#302029) 2026-03-16 11:59:06 +01:00
Benjamin Christopher Simmonds
f67edda9f5 Merge pull request #302018 from microsoft/benibenj/hungry-thrush
should not reveal task details in terminal
2026-03-16 11:23:37 +01:00
BeniBenj
ac554a5b8a should not reveal task details in terminal 2026-03-16 10:52:47 +01:00
João Moreno
a7b8934257 feat: automatically build release branches (#301991)
Co-authored-by: Copilot <copilot@github.com>
2026-03-16 10:11:06 +01:00
Johannes Rieken
97af18c54e update version to 1.113 (#301958)
update version
2026-03-16 09:38:13 +01:00
Benjamin Christopher Simmonds
66e171a1bd Fix options being overridden by view options update in abstract tree (#300746)
fix options being overridden by view options update in abstract tree
2026-03-16 09:19:40 +01:00
dileepyavan
00d6a0897d Fixing rgpath for terminal sandboxing (#301948)
* Add experiment mode to terminal sandbox

* Updating regex to extract file name

* migrating to sandbox manager from srt

* updating the regex for picking folder paths

* updating the regex for picking folder paths

* correcting the code layers

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* refactor

* refactor

* changes

* changes

* refactor

* refactor

* fixing tests

* fixing tests

* fixing tests

* test cases fix

* default settings

* updating rgPath

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-16 05:38:58 +00:00
Justin Chen
6da8508c16 only show bypass approvals for worktree CLI (#301911)
* try to isolate permissions picker with worktree cli

* fix worktree states

* make sure worktree is always bypass for sessions window
2026-03-15 21:25:08 -07:00
Justin Chen
f6a5243fca fix confirmation issue with thinking headers + fix padding (#301904)
* fix confirmation issue + fix padding

* address some comments
2026-03-15 21:24:58 -07:00
Bryan Chen
2a1f3269eb fix: clear copy-on-selection override before re-setting to prevent double-set error
Fixes #301201 - The find widget's onBeforeSearch and _onFocusTrackerFocus both
call overrideCopyOnSelection(false) which throws if the override is already set.
Clear the MutableDisposable before calling overrideCopyOnSelection to ensure the
previous override is disposed first.
2026-03-15 16:50:00 -07:00
Bryan Chen
af43aaf1bb fix: clamp widthUntilLineNumberEnd to prevent negative Rect width
When pillRect.width < idealIconAreaWidth (22px) and lineNumbersWidth is 0,
the expression pillRect.width - idealIconAreaWidth produces a negative value.
Math.min then selects this negative widthUntilLineNumberEnd, which causes
pillRect.withWidth(negative) to create a Rect where left > right, throwing
'Invalid arguments: Horizontally offset by N'.

Wrap the computation in Math.max(0, ...) so widthUntilLineNumberEnd is
clamped to 0 when the pill is too narrow.

Fixes microsoft/vscode#301197
2026-03-15 14:53:47 -07:00
Bryan Chen
34a3958798 Fix listener leak in chat inline anchor widgets
Move per-widget configurationService.onDidChangeConfiguration listener
to a single listener on the ChatListWidget container. Each
InlineAnchorWidget previously registered its own listener to toggle a
link-style CSS class, causing a listener leak warning when 175+ widgets
existed in a session.

The fix uses a parent container class (chat-inline-references-link-style)
toggled by a single listener, with CSS descendant selectors to style all
child widgets.

Fixes #301185
2026-03-15 14:25:27 -07:00
dileepyavan
af557544ae [Terminal_Sandboxing] Enable default trusted domains and updates to sandbox config (#301852)
* default settings

* code refactor
2026-03-15 19:48:06 +00:00
Matt Bierner
407dacdf36 Merge pull request #301740 from mjbvz/dev/mjbvz/purring-guan
Reapply  #301598 with fixes
2026-03-14 20:07:35 -07:00
Rob Lourens
4ce266de42 fix: only set hook hint flag when actually showing the hint (#301755)
The disabled Claude Code hooks notification was tracked with a
workspace-scoped storage flag that was always set on the first
sendRequest call, even when hasDisabledClaudeHooks was false.

In the setup agent flow, the user's request is processed by SetupAgent
(which calls sendRequestInternal) before the extension is ready. This
caused the flag to be set before the real request was resent via
chatService.resendRequest. By the time the real request ran, the flag
was already true so the hint was silently skipped.

Fix: move the storage write inside the hasDisabledClaudeHooks check so
the flag is only set when the hint is actually shown.

Fixes microsoft/vscode#295079

Co-authored-by: not-roblourens <78992265+not-roblourens@users.noreply.github.com>
2026-03-14 17:27:20 -07:00
Simon Siefke
dd8fdb7dec fix: memory leak in MainThreadWorkspace (#283450)
* fix: memory leak in MainThreadWorkspace

* fix merge

* simplify event registration
2026-03-14 22:20:57 +00:00