Commit Graph

155636 Commits

Author SHA1 Message Date
Matt Bierner fe56e84ba7 Merge pull request #312228 from mjbvz/dev/mjbvz/boring-python
Add basic github lexical search
2026-04-23 15:08:53 -07:00
Tyler James Leonhardt 8e8f5d8c69 When in the Agents app, return all sessions (#312229)
and make sure that git stuff is gated behind workspace trust.

Co-authored-by: Copilot <copilot@github.com>
2026-04-23 22:05:16 +00:00
Matt Bierner f67a993578 Update snapshots 2026-04-23 14:45:42 -07:00
Megan Rogge 17813fd47a don't truncate question (#312220) 2026-04-23 14:42:37 -07:00
Kyle Cutler 853d2d9a4f Refactor browser creation flow, add ownership model (#312166)
* Refactor browser creation flow, add ownership model

Co-authored-by: Copilot <copilot@github.com>

* Opening in background

Co-authored-by: Copilot <copilot@github.com>

* feedback

Co-authored-by: Copilot <copilot@github.com>

* simplify

Co-authored-by: Copilot <copilot@github.com>

* fix

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-23 14:42:08 -07:00
Logan Ramos c059845dca Improve hover rendering (#312223)
* Improve hover rendering

* Fix comment
2026-04-23 21:41:48 +00:00
Megan Rogge 471bb0acba fix: cancel CTS synchronously in OutputMonitor constructor to prevent disposable leak (#312211)
fix disposable leak
2026-04-23 21:35:11 +00:00
Martin Aeschlimann 5f818f4ca4 use CustomizationHarnessService to get and resolve slash command (#312176)
* use CustomizationHarnessService to get and resolve slash command

* Update src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.ts

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

* Update src/vs/workbench/contrib/chat/test/common/customizationHarnessService.test.ts

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

* Update src/vs/workbench/contrib/chat/common/customizationHarnessService.ts

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23 14:31:08 -07:00
Matt Bierner 74fca4377e Merge pull request #311606 from microsoft/dev/mjbvz/advisory-swallow
Use main eslint config for copilot extension too
2026-04-23 14:29:25 -07:00
Matt Bierner 669a8d3e54 Include line number 2026-04-23 14:24:02 -07:00
Megan Rogge 6c8f319b32 wrap bash compound commands in bash -c before nohup (#312202)
fix issue with nohup
2026-04-23 21:19:53 +00:00
Matt Bierner cf82f857de Add basic github lexical search
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>
2026-04-23 14:16:49 -07:00
Osvaldo Ortega dcc7279e0d Agents web: improve connection stability and terminal reconnection (#312189)
* sessions: improve connection stability and terminal reconnection

- WebSocketClientTransport: fail-fast on send to dead socket with
  force-close and _closeFired guard to prevent double onClose events
- AgentHostPty: add reconnect() method with 10s hydration timeout
  and buffer clear before snapshot replay
- AgentHostTerminalService: add reconnectTerminals() scoped by
  oldClientId, track active ptys with dispose cleanup
- RemoteAgentHostContribution: trigger terminal reconnection on
  clientId change during reconnect
- Telemetry: add socket/close, socket/sendDropped,
  socket/visibilityResumed, terminal/recovery events
- Fix isMeasurement on boolean fields in existing telemetry

* Update src/vs/sessions/common/sessionsTelemetry.ts

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

* address review: gate terminal reconnect on clientId change, add reconnect tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23 13:58:31 -07:00
Peng Lyu 89eb050e83 Merge pull request #312209 from microsoft/rebornix/average-leech
Update integration id for cli.
2026-04-23 13:55:08 -07:00
Josh Spicer 208150fac0 fix: prevent endless rAF loop in layout when widget is hidden (#312183)
* fix: prevent endless rAF loop in layout when widget is hidden

The layout methods in mcpListWidget, pluginListWidget, and
aiCustomizationListWidget would defer to requestAnimationFrame when
searchAndButtonContainer.offsetHeight was 0, assuming the browser
hadn't reflowed yet. When the widget is created while permanently
hidden (e.g. in component explorer or when the view isn't visible),
offsetHeight stays 0 forever, causing an infinite rAF loop.

Add a _layoutDeferred flag so the deferral happens at most once. If
offsetHeight is still 0 after the retry, proceed with zero heights
instead of  the next real layout call when the widgetlooping
becomes visible will compute correct dimensions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: keep layout retry guard across deferred layout

Keep _layoutDeferred set while the deferred layout call runs so
a second offsetHeight === 0 measurement cannot schedule another
requestAnimationFrame. This makes the retry truly one-shot in all
three AI customization list widgets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 13:25:40 -07:00
Peng Lyu aca128644d Update integration id for cli. 2026-04-23 12:55:31 -07:00
Ladislau Szomoru d67820df03 Agents - fix dev tools warning (#312206) 2026-04-23 19:53:14 +00:00
Connor Peet ad4cb84f92 Merge pull request #312198 from microsoft/connor4312/ah-fix-actions
sessions: fix missing remote toggle for local agent host, duplicate permissions setting
2026-04-23 12:47:20 -07:00
Don Jayamanne 9ae42a50d8 fix(config): enable session controller by default in CLI settings (#312197)
* fix(config): enable session controller by default in CLI settings

* eol
2026-04-23 21:34:45 +02:00
Sandeep Somavarapu 6516a20d43 add tests (#312200)
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 19:25:28 +00:00
Connor Peet f7d03d515b fix: remove unused AgentSessionProviders import
The import was declared but never used in the file, causing a TS6133 compilation error.
2026-04-23 12:03:01 -07:00
Megan Rogge d50009c281 Mandate space after colon for prompt regex to prevent false positives (#312180)
fixes #312148
2026-04-23 15:02:05 -04:00
Connor Peet f3b2321e2c sessions: fix missing remote toggle for local agent host, duplicate permissions setting 2026-04-23 11:56:48 -07:00
Connor Peet a46152f2a0 plugins: deduplicate canonical command ID when skill name matches plugin name (#312196)
When a plugin's skill name matches the plugin name, the canonical command
ID was producing a redundant format like `plugin-name:plugin-name`. This
change collapses that to just `plugin-name` so users can invoke
`/plugin-name` instead of `/plugin-name:plugin-name`.

- Adds a check in getCanonicalPluginCommandId to return just the prefix
  when it equals the normalized command name

(Commit message generated by Copilot)
2026-04-23 18:56:31 +00:00
Don Jayamanne ca67f6613f chat: improve model matching logic by ensuring at least two models are loaded (#312188)
* chat: improve model matching logic by ensuring at least two models are loaded

Co-authored-by: Copilot <copilot@github.com>

* fix(chat): enhance model loading checks to prevent inaccurate matching

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-23 18:51:27 +00:00
Raymond Zhao 72409b7d2d fix: do not create GH releases for Copilot (#312192) 2026-04-23 18:44:55 +00:00
Andrew Chan 1acbb74717 aux window - fix setTimeout leak (#311824) 2026-04-23 18:40:09 +00:00
Connor Peet 144f8946bc Merge pull request #312015 from microsoft/connor4312/ah-session-settings-2
agentHost: rationalize settings a bit
2026-04-23 11:33:07 -07:00
Connor Peet 4b06c090af Merge pull request #312172 from microsoft/connor4312/local-ah-terminal
agentHost: don't use a AH terminal by default for local connections
2026-04-23 11:22:36 -07:00
Lee Murray 2cc65cb64b Merge pull request #312111 from microsoft/mrleemurray/open-in-agents
Add 'Open in Agents' action and titlebar widget enhancements
2026-04-23 19:19:47 +01:00
Paul 7734175f84 Fix invalid json files detected for claude hook paths (#312016) 2026-04-23 11:15:59 -07:00
Rob Lourens 6f35a19326 agent host: skip permission for write_/read_/stop_/list_ shell helpers (#312075)
* agent host: skip permission for write_/read_/stop_/list_ shell helpers

The Copilot SDK's built-in shell helpers (write_bash, read_bash,
stop_bash, list_bash and the powershell equivalents) never call
permissions. only the primary bash/powershell tool does. Whenrequest
the agent host re-registers them as external tools (via
overridesBuiltInTool: true), they were getting routed through the
generic permission flow and surfacing a meaningless dialog.

Mark all four secondary shell helpers with skipPermission: true so the
SDK auto-approves them, mirroring upstream Copilot CLI/extension
behavior.

Also drops write_/read_ shell tools from the 'terminal' tool kind: they
send arbitrary text to a running program (a 'y', a password, REPL
input,  not a fresh shell  so syntax-highlighting themcommand etc.)
as a terminal block was misleading.

Includes a real-SDK regression test that fails if the skipPermission
flag is removed, plus unit-test coverage for the secondary-tool display
paths.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* address Copilot review comments

- Use first line of command for write_* display messages (newline safety)
- Approval loop: only swallow timeout errors; propagate other failures
 'bash_shutdown' in test comment
- Assert write_bash was actually invoked (non-vacuousness check)

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 11:13:57 -07:00
Lee Murray d75dc0e522 Agents: Improve session item styling (#312165)
style: update session item styling for improved layout and appearance

Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
2026-04-23 10:31:19 -07:00
Sandeep Somavarapu 659d444a95 Agents: fix sessions workspace picker (#312136)
* Agents: fix sessions workspace picker

- Filter copilot worktrees (folders starting with 'copilot-') from VS Code recents
- Preserve VS Code recents order instead of sorting alphabetically
- Fix overflow with description + group title in inline-description mode
- Fix submenu chevron alignment using flex layout without negative margins
- Cap picker width at 600px (matching quick pick) with stable fixed-width layout
  that skips DOM measurement to prevent width fluctuating with window height
- Add 30px bottom gap so picker doesn't grow flush to window edge
- Add scrollbar clearance: row width calc(100% - 10px) keeps content clear
  of the 10px overlay scrollbar track
- Fix group title / toolbar spacing in inline-description mode
- Document entry ordering in _buildItems()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix _isCopilotWorktree: use basename() to handle trailing slashes

Manual path.lastIndexOf('/') returns empty string when the URI path
has a trailing slash, causing the filter to miss those folders.
Use the existing basename() helper from resources.ts which handles
all URI path edge cases correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Limit VS Code recents to top 10 entries

Only show the 10 most recent folders from VS Code history in the
workspace picker to keep the list focused and manageable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR feedback: rename maxWidth to fixedWidth, fix spaceAbove gap

- Rename maxWidth option to fixedWidth to accurately reflect its
  behavior (fixed width, not a cap on measured width)
- Fix spaceAbove calculation: remove bottomGap from spaceAbove since
  the 30px gap is only needed at the bottom of the viewport
- _isCopilotWorktree already uses basename() from a prior commit

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Limit to top 10 provider-supported VS Code recents

Move the cap from _loadVSCodeRecentFolders (before provider resolution)
into _getVSCodeRecentWorkspaces (after provider filtering), so unsupported
folders don't consume slots in the limit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Also slice at load time to avoid iterating all recents

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix scrollbar spacing: use item-level margins instead of row width reduction

Replace width: calc(100% - 10px) on rows with margin-right: 10px on
the toolbar, submenu chevron, and group-title (when no actions follow).
This avoids shrinking the row itself which caused code action list
screenshot regressions, while still providing scrollbar clearance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 17:26:21 +00:00
Henning Dieterichs 6e870f3eea Adds ObservableResolvedPromise 2026-04-23 19:18:17 +02:00
Henning Dieterichs bc0bd8896f Fixes multi diff flickering 2026-04-23 19:18:17 +02:00
mrleemurray 6e9ba04ab3 Update OpenInAgentsVisibility to refine AI features visibility logic based on user signals and workspace trust
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 18:13:02 +01:00
mrleemurray cb149cf916 Enhance OpenInAgents visibility logic to include chat sentiment context for AI features
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 18:11:18 +01:00
Connor Peet 831512a731 chat: don't auto-send queued prompts when confirmation is pending (#312167)
- Prevents queued prompts from being automatically sent when the response
  contains a confirmation that hasn't been acted on yet
- Adds a check for unresolved confirmation parts in the response before
  processing pending requests

Fixes https://github.com/microsoft/vscode/issues/306522

(Commit message generated by Copilot)
2026-04-23 17:04:14 +00:00
Connor Peet 36d37fe753 sessions: fix workspace picker and session options resetting on new chat widget (#312072)
* sessions: fix workspace picker and session options resetting on new chat widget

* comments
2026-04-23 16:59:33 +00:00
Connor Peet b6e9f6e830 agentHost: don't use a AH terminal by default for local connections
Downside is that it's not shared with clients by default. But in exchange it uses the richer shell features we have through VS Code. Probably worth it?
2026-04-23 09:47:17 -07:00
Osvaldo Ortega 6aaf3c6b3d sessions: Add mobile-compatible PWA layout for agent sessions (#309344)
* sessions: add mobile-compatible PWA layout for agent sessions

Introduce a responsive mobile layout for the agent sessions window,
enabling a native app-like experience when accessed via mobile browsers
or installed as a PWA. The implementation uses mobile Part subclasses,
a MobileTopBar chrome component, CSS overrides, and when-clause gating
to progressively enhance the desktop sessions workbench for phone
viewports.

Key changes:

Layout policy & viewport detection:
- SessionsLayoutPolicy with observable viewport classification
  (phone <640px, tablet 640-1024, desktop >1024)
- Context keys: ViewportClassContext, IsMobileLayoutContext,
  KeyboardVisibleContext
- Runtime viewport class change detection in layout()

Mobile chrome components:
- MobileTopBar: hamburger + session title + new session (+)
- MobileNavigationStack: history.pushState integration for Android
  back button
- Sidebar drawer overlay with backdrop dismiss

Mobile Part subclasses:
- MobileChatBarPart, MobileSidebarPart, MobileAuxiliaryBarPart,
  MobilePanelPart override layout()/updateStyles() only
- AgenticPaneCompositePartService conditionally instantiates
  mobile vs desktop Parts

View gating:
- Desktop-only views hidden on mobile via IsMobileLayoutContext:
  Changes, Files, Logs, Terminal, Code Review, Open in VS Code
- Customization toolbar hidden via CSS on phone

CSS & PWA:
- Edge-to-edge chat (no card chrome on phone)
- Safe area insets, touch targets (44px min), overscroll containment
- PWA manifest with standalone display mode
- viewport-fit=cover meta tag
- Dynamic theme-color meta created programmatically

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove out-of-scope changes from mobile PR

Remove agentHost WebSocket implementation, webHostDiscovery contribution,
welcome/walkthrough OAuth flow changes, PWA manifest updates, and lock
file noise — none of these are related to mobile layout components for
the agents workbench.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Restore agentHost browser files incorrectly deleted

These files exist in main and were not introduced by this PR.
They were mistakenly removed during out-of-scope cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Remove unrelated changes and PWA support from mobile PR

- Revert copilot package-lock.json to main (unrelated npm artifact)
- Revert agentHost remoteAgentHostProtocolClient.ts (diffs field not mobile-related)
- Revert agentHost sessionTransport.ts (protocol cleanup not mobile-related)
- Remove theme-color meta element creation and dynamic updates (PWA)
- Remove apple-touch-startup-image link injection (PWA)
- Remove PWA & Viewport section from MOBILE.md
- Keep viewport-fit=cover as it is needed for safe-area-inset CSS on mobile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix mobile chat welcome page CSS selectors to match actual DOM classes

The mobile phone-layout CSS targeted non-existent class names
(chat-full-welcome*) instead of the actual DOM classes used by
newChatViewPane.ts and newChatInput.ts. This caused the welcome
page to render without the Copilot logo, centering, or
bottom-pinned input on phone viewports.

Also fixes the logo SVG path and adds dark/light theme support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review comments: titlebar visibility, CSS docs, inline styles

- Fix isVisible(TITLEBAR_PART) to return false on phone layout where the
  grid titlebar is hidden and replaced by MobileTopBar
- Fix computeContainerOffset() to use MobileTopBar height on phone layout
  so overlays (quick picks, hovers) are positioned correctly
- Add CSS comment block documenting the .mobile-layout vs .phone-layout
  class hierarchy and when to use each
- Add code comment in MobileAuxiliaryBarPart explaining why inline style
  clearing is needed (parent sets them via JS, CSS can't override)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address council review: fix mobile Part runtime transitions and disposal hygiene

- Mobile Parts now dispatch at runtime (isPhoneLayout): phone uses mobile
  layout math, tablet/desktop delegates to super. Fixes 35px chat overlap
  after phone→landscape rotation across the 640px breakpoint.
- Workbench calls updateStyles() on pane composite parts after viewport
  class transitions so card-chrome inline styles re-apply/clear correctly.
- MobileNavigationStack: replace _suppressNextPop boolean with pending
  counter to handle concurrent popSilently calls and rapid back taps.
- Drop redundant Part.prototype.layout.call in mobile Part overrides
  (AbstractPaneCompositePart.layout already cascades to Part.layout).
- Virtual keyboard detection: use mainWindow.innerHeight as baseline
  instead of captured initialViewportHeight; threshold 150→100.
- Sidebar drawer backdrop: managed via DisposableStore with
  addDisposableListener for its click handler.
- MobileTopBar: switch raw addEventListener to addDisposableListener;
  register element removal before parent.prepend so exceptions still
  clean up.
- Remove redundant matchMedia orientation listener; the window resize
  listener already handles orientation changes.

* Use head.getElementsByTagName instead of querySelector for viewport meta

* Scope mobile layout to phone only (remove .mobile-layout class)

* Fix desktop/tablet regressions: keep auxiliaryBar visible and use original sizes

* Gate phone layout on mobile OS (iOS/Android) instead of width alone

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 16:34:28 +00:00
Rob Lourens 5aaa5bed3a sessions: fix chat history picker not opening selected session (#312158)
* sessions: route session opens through ISessionsManagementService

The chat history picker (workbench.action.chat.history) showed sessions but
clicking one didn't open it in the Agents window. The default session opener
calls IChatWidgetService.openSession with ChatViewPaneTarget, which opens the
ChatViewId view -- but in the Agents window that view is gated by a when
clause on IsNewChatSessionContext / IsNewChatInSessionContext, so it stayed
hidden.

Register a SessionsOpenerParticipant that routes opens through
ISessionsManagementService.openSession, which updates the active session/chat
context keys so the right view becomes visible and loads the session.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* agentSessions: exclude completed sessions from history picker

The chat history picker now hides sessions in the Completed state so the
list focuses on sessions that are still active or need attention.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-23 16:29:18 +00:00
mrleemurray 94c27ad40e Update OpenInAgentsProductQualityContext comment to clarify visibility restrictions for stable builds
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 17:17:34 +01:00
mrleemurray ddf19034b3 Enhance OpenInAgents visibility logic to include product quality context and improve AI features handling
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 17:13:59 +01:00
dependabot[bot] 8bcec198e1 Bump fast-xml-parser from 5.5.7 to 5.7.1 in /extensions/copilot (#312023)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.5.7 to 5.7.1.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.5.7...v5.7.1)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.7.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
2026-04-23 16:10:36 +00:00
Ladislau Szomoru d820bee913 Agents - adjust auxiliarybar/editor default size (#312149) 2026-04-23 17:46:12 +02:00
Sandeep Somavarapu eab5eccc85 SSO between Apps in Windows (#312144)
* Agents: share keybindings, prompts and mcp from VS Code app

* feedback

* get shared secret from shared storage

Co-authored-by: Copilot <copilot@github.com>

* fix using key

Co-authored-by: Copilot <copilot@github.com>

* listen event changes

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-23 17:45:42 +02:00
Connor Peet 19d4617ad0 chat: allow reading vscode-chat-response-resource resources in chat (#312143)
Closes #312042
2026-04-23 17:45:16 +02:00
Johannes Rieken d8ad65fa67 Merge pull request #312133 from microsoft/joh/inline-chat-cleanup-hover-input-widget
inlineChat: remove hover renderMode experiment and InlineChatInputWidget
2026-04-23 17:44:55 +02:00