Skip to content

chat windows: chat windows of the Agents window on parts, with drag and drop between parts - #345683

Merged
Sandeep Somavarapu (sandy081) merged 172 commits into
mainfrom
agents/chat-windows-on-parts
Nov 4, 2026
Merged

Sandeep Somavarapu (sandy081) merged 172 commits into
mainfrom
agents/chat-windows-on-parts

Conversation

@sandy081

@sandy081 Sandeep Somavarapu (sandy081) commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Chat windows of the Agents window, built on parts (Block 2 of the chat windows parts design), with drag and drop between their parts (Block 3, reviewed as #345685 and merged into this branch). Based on main, which has the parts foundation (#345663). It supersedes #344666 (F1) at the parity gate, and carries the sessions half of #345076 and the wallpaper half of #345561.

Regular VS Code is unchanged: nothing registers a chat window provider, the contribution loads only in the Agents window, and the new part-grid commands need IsSessionsWindowContext plus editorPartInPartGrid. The exceptions are a few generic fixes listed under "Review round 2" (multi-diff widget disposal, editor parts created with services, the group finder's locked-group fallback) and the screen reader announcement of editors moved between parts of a window.

What changes

  • Chat windows live in vs/workbench/contrib/chatWindow.
    • IChatWindowService opens a chat in a window of its own, with a chat part beside a main part. Both are ContentParts on the window's PartGrid.
    • IChatWindowProvider supplies the content, chrome, look and move-back facets. There are no chat window kinds.
    • The window covers layout modes, per-chat sizes and layouts, restore after reload, Move to Main Window, and moving the chat editor out of its window (Q9).
  • The Agents window is the only provider (vs/sessions).
    • 'sessions.chat' is a view editor over SessionView. It brings its own title, and input-only works through its size constraints.
    • The provider supplies the title row and strip, the cards and wallpaper, and the per-window session keys.
    • The entry points are behind sessions.chatWindows.enabled.
  • Generic per-window keys: layoutMode, splitLayout, terminalsVisible and terminalsPosition. They are bound per window and unset elsewhere. There are no chat-window-only keys, flags or parameters.
  • Terminals: they open in a part-grid cell, and the terminal position moves that cell. Terminal links open in the window's main part.
  • Changes editor: it is the same in every window. Each changeset operation is registered once and acts on the invoking editor's session. The changed-files list comes from Changes editor: changed files list, opt-in by its host #345658 (merged in main); chat windows turn it on.
  • Platform API restored: INativeHostService.handleTitleDoubleClick (removed in 402f07b as unused). A double-click on the empty space of a tab row at the top edge of a chat window (which shares the title bar) now does what a title-bar double-click does: macOS follows AppleActionOnDoubleClick (zoom / minimize / none), Windows and Linux maximize or restore. The double-click reaches the renderer there, so it is routed in the renderer instead of opening an untitled editor. Generic, in native.ts, nativeHostMainService, IBaseWindow/BaseWindow; please review.
  • Generic part grid markers: next to the top-edge markers, PART_GRID_RIGHT_EDGE_CLASS (cells) and PART_GRID_TOP_RIGHT_GROUP_CLASS (the group at the top right). In Side by Side on Windows/Linux, the top-right tab row keeps the room of the window controls that float above it.
  • Base fix found here: GridView.maximumWidth returned the maximum height; fixed with the parts foundation (workbench: parts foundation for chat windows (several parts per window, ContentPart, views as editors, part grid) #345663, in main).
  • Drag and drop between parts (from chat windows: drag and drop between parts #345685, DESIGN §6 D1–D5), each gesture with a command and an announcement:
    • Editors and the chat drag between parts and split a part at its edges (D1, D2). Move Editor to Part…
    • A part drags by the grabber on its card, or by the empty title space of a group not at the top edge, with the other cards reflowing (D3). Move Part Left/Right/Up/Down
    • An editor dropped on a window edge goes into a new part there (D4). Move Editor into New Part Left/Right/Above/Below
    • A chat dragged out of the windows opens in a chat window at the drop point (D5), behind sessions.chatWindows.enabled.

Notes for reviewers

  • Title-bar double-click (INativeHostService.handleTitleDoubleClick, restored): a double-click on the empty space of a tab row at the top edge of a chat window is routed to the title bar's action only when it reaches the renderer. Where the OS takes that space as the window's caption (Chromium's drag region: the native caption on Windows and Linux, the drag area on macOS), the OS handles the double-click itself (maximize/restore, or zoom/minimize per AppleActionOnDoubleClick) and the page never sees the event, so only one of them acts on every platform. With the native title bar the routing is off, as the tab rows are not at the window's top then.

  • Side-panel key and terminals: workbench.action.agentToggleSidePanel is now in the terminal's skip-shell list, so its key toggles the side panel (or a chat window's editor) instead of being sent to the shell, also in the main window's terminals, like the other Agents layout keys there.

  • Unarchive with an argument: the Unarchive action acts on the session its argument names (the Changes toolbar of a chat window names that window's session). Without an argument it acts on the active session, as before. An argument that names no shown session does nothing, rather than unarchiving the active session.

  • Session actions from a chat window: a session resource given to an action resolves to the session of the focused chat window when that window shows it, before the main window's wrapper of the same session. Extension commands of the Changes toolbar keep receiving the resource.

  • Closing a chat window closes its editors as any editor window does (parity with build 491817). Clean editors close with the window; editors that need confirming, such as dirty ones, move to the main Agents window, still dirty and without a prompt. This is ContentPart.close(), the same two steps as VS Code's auxiliary editor windows and as the editor area of 491817's chat window (OwnedEditorPart.close()); only Move to Main Window carries every editor over. A test pins it (contentPart.test.ts). Carrying every editor, or prompting, would be a product change and is left as a follow-up.

  • The main window's "Files" tab giving way to a file after a chat window closes is the docked Files placeholder (EmptyFileEditorInput) leaving while a real file editor is open, as it always does; no editor of the main window closes.

Review round 2

Fixes from the review of this PR, QA's live checks and PR 3's analysis, one commit each, with tests:

Commit Fix Test
47e266a Review comment (CannotClose): the main part's visibility key was bound on the window, so every part of a chat window inherited it, and a Changes editor in the terminals part or a created part could not close while the main Agents window's editor area was hidden. The window's context now says its parts show; only the window's main part follows its layout mode. chatWindowContextKeys.test.ts
dce7715 "Index out of bounds" in ChatGroupsView: a layout of the window while the chat grid added or removed a group (such as a terminal opening from the strip) read the grid mid-change. It now waits and lays out once after the change. chatGroupsView.test.ts (reproduces the error without the fix)
f53d204 The session title showed twice in a chat window's top row: a session view the chat moved from still put its header there. Only the view that shows the chat does now. sessionChatViewEditor.test.ts
2263565 Quick Open in Chat Only with focus in the terminals opened the file behind the chat. The terminals' group is locked, and the group finder's locked-group fallback took the chat's group without the hand-off to the main part that the active group gets. The fallback hands off too, so the editor opens in the main part directly. viewEditor.test.ts (typed and resource opens with ACTIVE_GROUP)
a4a7d4f "InstantiationService has been disposed" when a part closed with its last editor: (1) the multi-diff widget disposed the items it renders before its scroll view, which then rendered once more while disposing, creating templates; the scroll view now disposes first. (2) A part created with services wrote its instantiation service into the caller's collection, which a chat window shares between its parts and itself, so what the window created later got that part's, disposed with it; each part now has a collection of its own. Also, a Changes editor that a tab moves away from no longer lets go of what the input resolved while the editor it moved to shows it ("Canceled"). sessionChangesEditor.test.ts (real multi-diff), chatWindowPartFactory.test.ts
cf65b77 Closing a chat window is all or nothing: an editor beside the chat that could not move to the main window kept the chat part open after the main part had closed. Editors beside the chat move into the main part first; while one cannot, nothing closes. chatWindow.test.ts
1f61139 Test only: closing a part closes its clean editors and merges only those that need confirming (the parity note above). contentPart.test.ts
dbadd15 (PR 3) Each layout mode arranges the parts from its own arrangement, so a part a mode hid or the user moved doesn't come back squeezed. chatWindowGrid.test.ts
6f96aeb (PR 3) A closing window stops arranging its parts as it goes away ("The part grid has no cell 'chat'"). chatWindowGrid.test.ts
e109b15 Review overview (CSS guidelines): the title bar marks its groups of actions that show none (such as the Create Pull Request bar without changes) with a class, in place of a :has() selector. titlebarPart.test.ts
12eb1e7 CI (macOS Electron-Unit): the hold of a chat's model as it moves into a chat window counted its polls to time out, which a window with throttled timers (in the background, or the macOS runner) makes fewer, so it held far past its timeout. It now ends at a deadline. chatWindowOpening.test.ts (a poll interval longer than the timeout)
d9b31b0 Follow-up review N1: closing a window that showed only its chat, with an editor beside the chat, moved that editor into the main part, which showed it: the remembered layout and the default of new chat windows became Side by Side. An editor opening in the main part changes nothing while the window closes, and the editors that moved go back beside the chat when the window stays open. chatWindow.test.ts (mode, remembered layout and defaults unchanged; a movable and an immovable editor)
5a73eed Follow-up review N3: the Changes toolbar of a chat window gives its own actions the session itself, so a first click in a window without focus acts on its session; extension actions keep getting the session's resource, as the API gives it. changesActionsBar.test.ts
2c99a31 Follow-up review N4: a terminal created for a chat window that closed meanwhile, as an editor at a column that may be another group's, goes into the background of the panel, as the window's terminals do as they hide. chatWindowTerminals.test.ts
5713fb2 Follow-up review N5: the Changes editor looks for the same input in other groups (strictEquals), not an equal one. n/a (option)
48b5574 Follow-up review N2 (PR 3): a layout mode change keeps the parts and the focus when nothing moved. chatWindowGrid.test.ts

QA live checks on Code OSS builds of this branch with these fixes: check 4 (10ff307e41c) and check 5 (0b89c09a0b7, all of the above but the last commit) logged zero console errors. In check 5 the review-comment fix, O3 (Quick Open), O4, O6, E1 (closing the Changes editor in a created part) and U21 passed; the close behaviour it reported is the parity note above.

Review round 3 (user testing)

Fixes and changes from the user's testing on Insider and implement-it builds, QA's live checks, PR 3's work and review round 4, one commit each, with tests. New generic surface, all workbench-internal (no editor-service API change):

  • EditorInputCapabilities.ProvidesTitle, declared through an optional providesTitle on a view editor descriptor: a group that holds such an editor hands groupless opens off to the main part of its window, also while another tab is active there.
  • IEditorGroupViewOptions.showHeaderFor(editor), next to reserveHeaderSpace: whether the enabled group header shows for the active editor.
  • ViewEditorPane keeps a view alive, out of the DOM, while its editor stays in the group behind another tab, and tells it through the new optional IViewEditorView.setVisible.
Commit Fix Test
c5db7b8 U26: the Changes editor in a chat window lacked Word Wrap, Diff View and Files View & Position in its "..." menu: the workbench items are gated on the multi-diff editor id. The Changes header offers its own Files View & Position submenu, reusing the multi-diff commands. changesViewActions.test.ts
be0ace2 U27 (test only): a Changes editor keeps what its input resolved while another group shows the input. sessionChangesEditor.test.ts
fdf42ab Terminals part (first decision): non-terminal editors that land there go to the window's main part. Superseded by 9d6c33a below; the chat's own editor still goes back to the chat part. chatWindowTerminals.test.ts
1f6f276 U28: a PR link opened from a chat window opened in the chat's group. The integrated browser's preferred group hands off from a self-titled editor as the group finder does, and never splits a part of locked groups other than its window's main part. browserViewWorkbenchService.test.ts
4148cea U29: the docked Files tab had no close action in a chat window; it closes there like the Changes tab, and stays docked in the main window. editor.contribution.test.ts
2f1cfb6 U22: in macOS full screen a chat window kept the traffic-light spacer: its full-screen state was trusted only when the window covered its screen, which it doesn't below a camera notch or on an external display. The title bar follows the host's full-screen state and asks the host again to correct a stale one. titlebarPart.test.ts
fab6904 U30 (test only): a view editor moving between groups and parts leaves exactly one live view. viewEditor.test.ts
5c59129 Review L1: a browser open handed to the window's main part avoids a locked group there too. browserViewWorkbenchService.test.ts
79b034b Review L2: the chat dropped on the Terminals part goes back to the chat part. chatWindowTerminals.test.ts
f17e5ff Review L3: the full-screen re-check waits for the end of a resize and ignores an answer after dispose. titlebarPart.test.ts
4f18c0d U32: a task run from a chat window's Run menu opened its terminal in the main window's panel; the agent-host task runner shows it in the chat window's terminals again (lost in the port from F1). agentHostSessionTaskRunner.test.ts, chatWindowTerminals.test.ts
4ce3671 U33: Cmd+J in a chat window opened the main window's panel when a window terminal sat in another group: it moved through moveToTerminalView, which shows and focuses the panel. It now moves between editor groups directly. chatWindowTerminals.test.ts
ab6242c U33: a session terminal taken from the main window's panel no longer lets its panel group focus a sibling there, and takes the focus only once it shows in the chat window. chatWindowTerminals.test.ts
9d6c33a Terminals part (user decision B): other editors, such as the Changes editor, stay in the Terminals part beside the terminals. chatWindowTerminals.test.ts
3e56d38 Terminals part B: its groups show the Agents header row with its menus for a non-terminal editor, and none for a terminal (showHeaderFor). editorHeaderControl.test.ts, chatWindow.test.ts
bb247d5 U35: a terminal moved into another part of the window came back on Cmd+J ×2. Cmd+J hides and shows only the Terminals part's terminals. chatWindowTerminals.test.ts
5478aaa U38: an editor split beside the chat in the chat part had the generic tab row; the chat part's groups look as the main part's. viewEditor.test.ts
d85fd41 U37 (generic): a view lives on beside other tabs; ProvidesTitle hand-off for a group that holds the chat. viewEditor.test.ts
a8aa291 U37: editors as tabs beside the chat: the chat tab shows the chat's title, no close action while tabs are beside it; the title row shows the session meanwhile; layouts that show the chat reveal it; tabs persist and restore with the chat first; the all-or-nothing close carries them. chatWindow.test.ts, chatWindowMoveEditors.test.ts, sessionsChatWindowProvider.test.ts
f22ee20 Review round 4 L2/L3: a task terminal goes to a chat window only when it was run from it, and a terminal another chat window shows stays there. chatWindowTerminals.test.ts
7151d89 Review round 4 M1/M2/L1: Cmd+W closes the window also with focus in the chat; focusing the window or its session reveals the chat tab; a hidden chat view hides. chatWindowEditorArea.test.ts, chatWindow.test.ts, viewEditor.test.ts
a1abcd0 … 2f14e42 (PR 3) The grabber of a part over webviews and sashes, and its card lift: U23, U34 and their follow-ups. partGrid.test.ts
0d8f5b4, 6177504 (PR 3) The chat showing only its input grows to show its conversation when dragged taller, and does not move. chatWindowGrid.test.ts
6012d89 (PR 3) A resize starts on any pointer, survives a lost release, and announces what it showed. chatWindowGrid.test.ts
6318749 (PR 3) An editor dropped where the last move showed a new part goes there. partGrid.test.ts
d307c3f (PR 3) Every part put somewhere takes an even share of where it goes. partGrid.test.ts
c36f932 (PR 3) U37: an editor dropped on the centre of the chat joins its group as a tab. viewEditor.test.ts / drop target tests
21cd4a7 (PR 3) L5: the grid does not look for the pointer over a webview while its window has no focus. partGrid.test.ts

| 09f6a4c | QA final check: closing a window with a tab beside the chat logged "The part grid has no cell 'main'": the grid re-arranged mid-close. It stops arranging from the start of the close and resumes on a veto. With tabs beside it, the chat no longer leads, so the title row shows and the tab row sits below it, not under the traffic lights. | chatWindowGrid.test.ts, chatWindow.test.ts |
| 8df7be3 | (PR 3) U36 live follow-up: a drop gets the size its preview shows (even split in the editor drop target, water-filling even share in the part grid), within the least sizes of what makes room. | editorDropTarget.test.ts, chatWindowGrid.test.ts |
| c4f5f7d | User review comment: the title bar's helper that marks groups showing no actions is no longer exported just for tests; the test goes through a real title bar hosting a session header. | titlebarPart.test.ts |
| b2e3604 | User review comment: the global isEditorPartOfEditorVisible helper is gone. DockedEditorInput takes the editor groups and layout services and adds CannotClose itself while the part showing it is hidden; it moves to sessions/browser as it needs the layout service. | editor.contribution.test.ts, workbench.test.ts |
| a253987 | Full review M1 + L1: Move to Main Window and moving the chat into another window carry the tabs beside the chat and the editors of created parts, not only the main part's; closing checks up front that every editor can move, so a veto leaves every editor in place. | chatWindowMoveEditors.test.ts, chatWindow.test.ts |
| 5720c49 | Full review L3 + L4: a dead check in SessionsService.setActive and two misplaced doc comments. | n/a |
| 14fe978 | (PR 3) Full review L2: a dragged card whose drop fails still ends its drag. | partGrid.test.ts |

Fresh full end-to-end review: MERGE; its M1/L1–L4 fixed here.

QA live checks on Code OSS builds of this branch:

  • Check 6: U24, U25 (2), the Terminals part and U26, U29, U28 and the smoke checks passed; zero console errors.
  • Checks 7–9: U25 (1) root cause (capture on press) fixed and passed; U23 needed an on-screen check and the compact edge drop a real drag, both confirmed by the user.
  • Final check (tree = 21cd4a7): U37 tabs, keep-alive (draft and scroll) and the Cmd+W close passed; U38 passed; U36 top edge passed; Cmd+J and the Changes editor in the Terminals part passed. The issues it found (the close re-arrange error, the chat's tab row under the traffic lights, U36 left-edge and window-edge sizes) are fixed in 09f6a4c and 8df7be3, with tests.

Verified by the user on their build: U22, U23, U24, U25, U26, U27, U29, U30, U31, U32, U33, U35, the Terminals part, compact density and the compact chat.

Note: closing a chat window does not carry its clean editors to the main window, as in 491817; carrying every editor is a follow-up PR.

Commit map

Commit SHAs in this table are from before the rebases; the subjects are unchanged. #345658 is merged in main, so its commits are no longer carried here. The drag-and-drop commits (Block 3) are listed in #345685, and the second review round above.

Design item Commits
moved here from #345663 (review L2: only this PR consumes them) Chat window: layout model and stacked input-only rules in the workbench · chat: a chat input can lay its editor out one line tall · editor: the Add Tab entries act on the group of their tabs bar · chat: links in chat markdown open with the opener of the renderer's scope · sessions: the chat composite bar and the card frames follow a chat surface outside the Sessions part
carry I3 #345076 (sessions half) 9bcb21d · d364eea · f72c74e
carry CS #345561 (wallpaper half) 7c8a2e5
P9 chat window feature (workbench) cca01ee keys, seam and state · c7f4ed5 layout commands · 92db540 restore · 0e766a0 service and window · ca14feb on the part grid · 5a06a59 outer insets · 7045fe9 editors move in first · 9586b09 chat editor moved out (Q9) · ddfd1b1 close after the editor closed
P10 Agents provider 53f2f4a chrome hosts · ecb2b42 title row, strip, size · 0fcb898 'sessions.chat' view editor · 09d97f3 content and look · 5d41df0 provider · b7bb77f entry points · 57c2e32 banners and feedback · 3ddad69 header released on move · 9cedc88 Run / Open in Editor rule · 2be7fc2 scroll position kept
P11 terminals in a part a6ec799 · d1d1ea4 · c00c45b
P12 Changes identical 9228f57 (on #345658, merged in main)
test fix-ups 568b3c1 · c288be2 · ebe5d9b
look, earlier iterations (superseded by the next row) 2276be0 · 23c6d87 · d7f96d9
look: one title at a time (title bar part cell or the chat view's own title), constant tab-row height, main window's padding, frames, gaps, strip b228567 · 36ab323 · 7bfe203 · 97b4cb1 · fe30d76 · 499a9bb · e37117e
parity and QA fixes b7247f4 no zombie window on reload · cfc192b Terminal Position menus · 4fed2a6 WebGL renderer on another window (core terminal: needs terminal owner review) · 4597c8b Layout menu disables hiding the part that shows alone · 884f706 first open with no editors → Chat Only · c6cc1a7 sizes kept across mode round trips and part moves · 82d3793 split pinned over QA sequence (test) · d89c09a Side by Side never restores the side part at its minimum · 3eff031 terminals keep the user's height in every mode · 671f2f5 no title created while a chat view disposes · 15ae483 split and terminals restored after a restart · 103d569 exact card sizes after a density round trip · 9598e1f terminals keep the user's height when the chat changes size with the mode · 0873647 only sizes the user gives the parts are remembered (sash drags) · ef49a3b title bar app-region test in headless browsers · e39ac8b strip entries act on their own window at the first click · cc052a8 a canvas opened from a chat window opens there · fa25001 a pill's dropdown shows in the pill's window · 1b48a8a sizes stored by earlier builds are not read · d98431e no agent feedback overlay on the chat of a chat window · a424b5c opening a chat in a window keeps the main window's side pane (+ test typing fix) · 7b50c46 title rows give up the traffic-light inset in full screen · a0b76e8 a chat window shows the canvases of its own chat · 4022acf the Changes file list in chat windows (re-synced #345658) · b393dcb tab rows at the top of a chat window move the window · Developer: Reset Chat Window Layout · a layout command moves the chat back into the chat part first · Changes header-row actions in chat windows (re-synced #345658 25ec082) · the chat merged into another part still closes or moves the window · U14 double-click on a top-edge tab row = title-bar double-click (restores handleTitleDoubleClick) · U16 a chat window's canvases stay presentable while another window has focus · U17 full-screen traffic-light inset below a camera notch · U17 window controls room on the top-right tab row (Windows/Linux) · main's newer tests: session scope, chat resource and layout service stubs · review round: skill buttons and Changes toolbar act on the window's chat · window focus activates passively (no cancelled restore/open, canvas kept) · chat window terminals use the window's session, survive close-during-create, no double take · editor windows unchanged (editor part visibility, title bar session keys, New Chat) · full-screen safety net · window unload during open · close order · links reveal if opened · window-scoped Toggle Conversation / Move to Main Window · toggle announcement · U18 the suggest widget of a chat input shows in the chat's window · U19 View: Toggle Side Panel toggles the editor of a chat window with any key bound to it (the separate Cmd+Alt+B command is gone) · U18b the session state indicator follows the window the chat is in · no Move Terminal into Panel in a window with layout modes · confetti hit area on a surface outside the Sessions part (test) · #345658 67d0f3b re-synced
code review and QA fixes b160e13 window-scoped actions use the window's session · 574df84 no New Session button · b5d4f75 no lock action on the terminals part · 8846abb editors + terminals kept when the chat moves to another window · 98fc6f8 no second Changes tab · 4aad9cc main window title untouched · dba8daf active title bar per window · 585d54a Close Editor Area test

Parity checklist (DESIGN §4, so far)

Live checks used my Code OSS build with an isolated profile. Baseline rows against 491817 are pending.

Row Result
L1 four layouts ✅ live
L2 toggle rules ✅ unit
L3 sizes, L4 per-chat memory ✅ unit; live pending
L5 input-only snap / forced ⏳ the input-only view works; snap and drag tests are not carried yet
L6 Layout menu and buttons ✅ unit; each menu keeps its own hide/show state (deviation)
T1 title row ✅ live; alignment of the title row with the tab row is not ported yet
T2 strip ✅ live
T3 no tab bar on the chat ✅ live
T4 cards and wallpaper ✅ live; pixel baseline pending
T5 outer insets ✅ live, the main window's padding per density (intended difference vs 491817, which has none); grippers ⏳
E1 / E3 ✅ live
E2 tabs setting ✅ unit
E4 Changes ✅ unit; live ⏳
E5 / E6 ✅ unit
X1–X5 terminals ✅ unit; live ⏳
O1 / O2 / O3 ✅ live
O4 ✅ unit
R1 restore ✅ unit; live ⏳
F1x focus ✅ unit
C1 Cmd+W ✅ live
Run / Open in Editor ➖ intended difference (user decision): main's rule in every Agents window, with no workspace check

Known gaps:

  • PartGrid has no per-cell layout priority, no per-cell minimum and no sized move. Keeping the terminals' height on resize is emulated.
  • Task terminals don't show in the chat window yet.

How to test

Turn on sessions.chatWindows.enabled in the Agents window, then use Open Chat in New Window. With Playwright, stub document.hasFocus = () => false in the windows that aren't in front: CDP focus emulation makes every window look focused.

Validation on 21cd4a7, then on 8df7be3 and on 14fe978 (the head: full pnpm run build-fast passed, pnpm run typecheck-client exit code 0, 511 test files 11753 passing, 40 pending, 0 failing, eslint passed; on 8df7be3: pnpm run build-fast passed, pnpm run typecheck-client exit code 0, ./scripts/test.sh --run on 73 files of the editor parts, part grid and drop targets, editor services and view editors, and the workbench and sessions chatWindow tests: 1008 passing, 12 pending, 0 failing; eslint passed; 09f6a4c also ran the sessions terminal tests, 406 passing) (this round, on top of 48b5574):

  • pnpm run build-fast: passed
  • pnpm run typecheck-client: passed (exit code 0)
  • ./scripts/test.sh --reporter dot --run <511 test files>, all tests under src/vs/sessions/**/test (browser and electron-browser), src/vs/workbench/contrib/chatWindow/test, src/vs/workbench/test/browser/parts (part grid, editor parts, editor header, drop targets), src/vs/workbench/services/editor/test (editor services, view editors), src/vs/workbench/contrib/multiDiffEditor/test, src/vs/workbench/contrib/terminal/test/browser and src/vs/workbench/contrib/browserView/test: 11747 passing, 40 pending, 0 failing
  • pnpm run eslint on the 52 changed TypeScript files of the round: passed

Earlier validation on e109b15 (and on 48b5574: pnpm run build-fast --client-only passed; pnpm run typecheck-client exit code 0; ./scripts/test.sh --run on the sessions and workbench chatWindow, sessions changes and terminal, partGrid and editor services tests, 909 passing, 0 failing; eslint on the changed files passed):

  • pnpm run build-fast --client-only: passed
  • pnpm run typecheck-client: passed (exit code 0)
  • ./scripts/test.sh --reporter dot --run <410 test files>, all tests under src/vs/sessions/**/test, src/vs/workbench/test/browser, src/vs/workbench/services/editor/test, src/vs/workbench/contrib/chatWindow/test, src/vs/workbench/contrib/multiDiffEditor/test, src/vs/editor/test/browser/widget and src/vs/platform/instantiation/test (including partGrid, chatWindowGrid, contentPart, sessionChangesEditor and the multi-diff widget): 10165 passing, 38 pending, 0 failing
  • pnpm run eslint on the 22 changed TypeScript files of the review round and pnpm run stylelint on the changed CSS: passed

@sandy081 Sandeep Somavarapu (sandy081) added this to the 1.146.0 milestone Nov 2, 2026
@sandy081
Sandeep Somavarapu (sandy081) force-pushed the agents/workbench-parts-foundation branch from ad60290 to cc7c548 Compare November 3, 2026 02:13
@sandy081
Sandeep Somavarapu (sandy081) force-pushed the agents/chat-windows-on-parts branch 3 times, most recently from b75e29c to e9e3144 Compare November 3, 2026 17:42
@sandy081
Sandeep Somavarapu (sandy081) force-pushed the agents/workbench-parts-foundation branch from cc7c548 to 66da652 Compare November 3, 2026 22:17
@sandy081
Sandeep Somavarapu (sandy081) force-pushed the agents/chat-windows-on-parts branch 2 times, most recently from 1cb0ff3 to fe508d4 Compare November 4, 2026 00:18
@sandy081
Sandeep Somavarapu (sandy081) force-pushed the agents/workbench-parts-foundation branch from 66da652 to 3ecd7cb Compare November 4, 2026 00:55
Base automatically changed from agents/workbench-parts-foundation to main November 4, 2026 01:08
Copilot AI balanced review requested due to automatic review settings November 4, 2026 01:41
@sandy081
Sandeep Somavarapu (sandy081) marked this pull request as ready for review November 4, 2026 01:41
@vs-code-engineering

vs-code-engineering Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Ulugbek Abdullaev (@ulugbekna)

Matched files:

  • src/vs/sessions/contrib/canvases/electron-browser/sessionCanvasService.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/pinnedCanvasActions.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasService.test.ts
  • src/vs/sessions/contrib/canvases/test/electron-browser/sessionCanvasWorkingSet.test.ts

Kyle Cutler (@kycutler)

Matched files:

  • src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts
  • src/vs/workbench/contrib/browserView/electron-browser/overlayManager.ts
  • src/vs/workbench/contrib/browserView/electron-browser/webContentsViewHost.ts
  • src/vs/workbench/contrib/browserView/test/electron-browser/browserViewWorkbenchService.test.ts

Joaquín Ruales (@jruales)

Matched files:

  • src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts
  • src/vs/workbench/contrib/browserView/electron-browser/overlayManager.ts
  • src/vs/workbench/contrib/browserView/electron-browser/webContentsViewHost.ts
  • src/vs/workbench/contrib/browserView/test/electron-browser/browserViewWorkbenchService.test.ts

Anthony Kim (@anthonykim1)

Matched files:

  • src/vs/workbench/contrib/terminal/browser/terminalActions.ts
  • src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
  • src/vs/workbench/contrib/terminal/browser/terminalMenus.ts
  • src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.ts
  • src/vs/workbench/contrib/terminal/common/terminal.ts
  • src/vs/workbench/contrib/terminal/test/browser/xterm/xtermTerminal.test.ts
  • src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkOpeners.ts
  • src/vs/workbench/contrib/terminalContrib/links/test/browser/terminalLinkOpeners.test.ts

Move two pure models of a chat window to src/vs/workbench/contrib/chatWindow/common,
with their tests, renamed to chat window names:
- chatWindowLayout.ts, from the session grid layout model of I2 (#345075): the layout
  modes (Chat only, Editor only, Stacked, Side by Side), the grid topology per mode and
  terminal position, the activity bar column, the tab order, and when a layout change
  needs a rebuild.
- chatWindowInputOnly.ts, from the stacked input-only rules of I4 (#345077): when the
  chat in Stacked collapses to its input, while dragging, on resize and when the window
  forces it.

Behaviour and test assertions are unchanged. Nothing uses them yet.

Co-authored-by: Copilot <[email protected]>
ChatInputPart.setSingleLine lays the input editor out exactly one line tall, whatever its content or minimum lines, for
the input-only chat of a chat window. Moved here from #345663, whose only consumer this is.

Co-authored-by: Copilot <[email protected]>
The Add Tab control runs its entries with the group of the tabs bar, so that they act on that group rather than on the
active one, such as in a chat window whose window does not have focus yet. Moved here from #345663, whose only consumer
this is.

Co-authored-by: Copilot <[email protected]>
…cope

The chat markdown renderer opens links with the opener service of its scope, such as of the window that shows the chat,
rather than the global one. Moved here from #345663, whose only consumer this is.

Co-authored-by: Copilot <[email protected]>
…rface outside the Sessions part

The header's background and the frame ownership of a card apply to a chat surface as to the Sessions part, and the
tests of the Sessions part mark it as a chat surface, as the part's chat background now does. Moved here from #345663,
whose only consumer this is.

Co-authored-by: Copilot <[email protected]>
The Agents window can only show a session in the Sessions part grid of its
main window. Add window sessions: ISessionsService.showSessionInWindow shows
one chat of a session outside the grid, in a session view registered with
ISessionsPartService.registerWindowSessionView. A chat shown that way leaves
the tabs of its session in the grid, and the session leaves the grid when that
chat was its only one; closeSession stops showing it.

Active session rule: a session shown in another window becomes active while
that window has focus, unless it is shown passively; the main window's layout
follows its own session. The sessions list, layout controllers, Changes, the
terminal and the agent host provider follow mainWindowActiveSession, which is
the active session while no other window shows a session. The agent host
provider treats sessions shown in other windows as shown, for chat config and
loading.

Nothing shows a session in another window yet, so behavior does not change. A
test covers that the main window follows the active session without other
windows.

Ported from agents/sessions-window-sessions 94f6c11, 5ec09ac,
664d4e7 and 4a10fdb1bb8, e08ab865cad.

Co-authored-by: Copilot <[email protected]>
The title bar's Changes, pull request and review actions, the Changes view and
editor, and the Agent Merge context keys always act on the active session, so
they cannot serve a session that is shown but not active. Make them take a
session:

- Actions resolve their session from an explicit argument (by resource,
  against the sessions shown in the grid and in other windows), else from the
  main window's active session.
- ISessionScope gives a view or editor its session; the Changes view, summary,
  picker, changeset selection, editor, resolver and review actions read their
  changes through IChangesViewService.getSessionChanges(session).
- Session action context keys are bound per context key service, so a title bar
  hosted for a non-active session gets its own scoped keys; their observables
  only react to the keys they read.

Without an argument and without other windows every action still targets the
active session, so behavior does not change.

Squashed from agents/session-scoped-titlebar-actions (94b140f, 4000cd2,
46bf53f, 376161c, 1702616, 49ae8b2, 0be0e13, 258419b,
6b76d9d, 15b99a7, 42e61c7, 9e5e58f, a26d679, 0515ba5,
31e44e5, f575613), with 993cf42, 2f33993 and 65c2e7c for
the main window's session.

A Changes editor shows the changes of the chat its source names, from that chat
only: whichever chat or session is active and whichever window has focus, so
that two editors of two chats of a session, in one window or not, each show
their own (ISessionChangesEditorOptions.chatResource,
getChangesEditorChanges). The main window's editor, which names no chat, shows
the chat the main window shows for its session, as its active session or a
session of its grid, never the session another window shows or has focus, as on
main; once the main window does not show its session, such as when the editor
moves into the window a chat of its session opens in, the chat that window shows. Fix Checks sends its prompt to the widget of the chat its session shows.

Co-authored-by: Copilot <[email protected]>
… an input-only chat view

A session view only works inside the Sessions part: it always shows the session
header and the Session Activity Bar, and its chat input always takes the main
window's options. Session views, chat groups and chat views now take
ISessionViewHostOptions, so a host outside the Sessions part can hide the
session header and the Session Activity Bar and configure the chat input
(placeholder, minimum lines, status pills). SessionView exposes its primary chat
view, and Sessions part styles also apply under
.sessions-window-host.

The chat view gains an input-only mode: it shows only the input, with the latest
message and the progress or outcome of its response above it, and switches back
to the conversation when the chat waits for input that only the conversation
can show. Waiting for input, failing and cancelation are announced once to screen
readers, and nothing is read from the chat until input-only is enabled. While
input-only, the input editor is laid out exactly one line tall
(ChatInputPart.setSingleLine, from the workbench parts foundation).

The Sessions part passes no host options and nothing enables input-only mode,
so behavior does not change.

Ported from agents/sessions-window-sessions c0685f5, 10fb235,
5de12de, adapted to the Session Activity Bar taking its own column.

Carried for the chat windows on parts without the two input-only context keys
(sessions.chatViewInputOnlyEnabled, sessions.chatViewInputOnly), which nothing read,
and without ChatInputPart.setSingleLine, which the workbench parts foundation
carries.

Co-authored-by: Copilot <[email protected]>
…ks all of them first

Move to Main Window and moving the chat into another window serialized only
the editors of the main part: tabs beside the chat in the chat part and the
editors of parts created for drops were lost. Both now take them, before
the window closes; reopening passes the chat part and the created parts as
restoring does. Closing a window checks first that every editor of its main
part and chat part can move to the main window, so that a veto leaves
every editor in place.

Co-authored-by: Copilot <[email protected]>
Review L2: a drop that threw as the card settled, from a timer, left the layer over the window, the drag's window
listeners and its settling phase, so that Escape and a release did nothing and no other drag started. The drag now
always cleans up and ends, also when the drop fails, which is reported.

Co-authored-by: Copilot <[email protected]>
@bryanchen-d

Copy link
Copy Markdown
Collaborator

Sandeep Somavarapu (@sandy081) FYI, no action needed. The new Part Grid test the grabber of a part stays shown as the pointer goes to it from the title row above… failed every time in the full def 111 Linux x64 Electron unit run after this merged (main CI 492826, 492831, 492843, 492860, 492882 and the 17:00 insider). PR CI stayed green because it runs that file in a separate worker window.

The cause is the real Xvfb mouse cursor. Once an earlier suite has activated the shared test window, Chromium sends a trusted pointerover to whatever sits under the parked cursor after a layout change, which here is the main card, during the test's 150 ms quiet wait.

#346048 (merged) guards the suite with a window capture listener that drops trusted pointer events, so the tests' synthetic events still drive the real code. If you add more pointer-driven tests to this file, they are covered by the same setup. Longer term, moving the cursor off the window between test files in the harness would let us remove the guard.

Co-authored with Copilot

Logan Ramos (lramos15) added a commit that referenced this pull request Nov 6, 2026
* ci: remove the macOS jobs from the pull request checks

Over two weeks of pull request runs, almost every pull request with a
test failure on a commit that never passed later also failed on Linux,
Windows or Compile & Hygiene. The failures that only macOS caught were
WebKit-only test fixes, flakes and setup failures, except for two
product bugs: timing races that the timing of the macOS runners exposed
rather than macOS-specific code, which now have regression tests that
run on the other platforms (#345028, #345683). Meanwhile, macOS / Remote
is the slowest job of a pull request, and the macOS jobs regularly wait
for a runner.

The Azure product build keeps running the full macOS test suite on main
(build/azure-pipelines/darwin/steps/product-build-darwin-test.yml: unit,
WebKit browser unit, integration, smoke and remote tests), so macOS
regressions are still caught after merge.

pr.yml no longer runs the macOS jobs (pr-darwin-test.yml, which this
removes, and chat-lib - Test (macOS)), and PR Gate, the only check that
branch protection requires, no longer needs them. This also removes what
only served those jobs: the electron-tests output of Detect Changes, the
macOS job of pr-node-modules.yml that warmed their caches, the macOS
workspace image and its restore code, which no job used, and the time
that the smoke test shards reserved for the macOS proxy runs. The manual
chat-lib-package.yml still runs on macOS, where test-chat-lib now
installs the dependencies instead of restoring a cache that no job
saves anymore.

Co-authored-by: Copilot <[email protected]>

* ci: comment out the macOS jobs instead of removing them

So that the macOS jobs can run again later, pr.yml now comments them
out instead of removing them, and pr-darwin-test.yml stays. Their
wiring is commented out with them: the electron-tests output of Detect
Changes, their entries in the needs of PR Gate, and the macOS jobs of
pr-node-modules.yml and pr-workspace-images.yml with the macOS entries
of .github/actions/detect-missing-caches. What only those jobs use is
back as it is on main: the time that the smoke test shards reserve for
the macOS proxy runs, the macOS restore of the workspace images, the
macOS cache of test-chat-lib, and the entries of pr-darwin-test.yml in
CODEOWNERS and in the configuration of ripple. The tests keep checking
pr-darwin-test.yml, and the comment on the macos-tests job lists what to
uncomment to run the macOS jobs again.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Bryan Chen (bryanchen-d) added a commit that referenced this pull request Nov 10, 2026
…Linux Electron

Under Xvfb, the real pointer stays over the test window once a suite activates it, so :hover applies to whatever a later suite renders there. That caused the sticky request bubble (#344806) and Part Grid (#345683) main CI breaks. The hover detector now resets by sending mouseLeave to the page, and detector resets may be async.

Co-authored-by: Copilot <[email protected]>
Bryan Chen (bryanchen-d) added a commit that referenced this pull request Nov 10, 2026
…Linux Electron

Under Xvfb, the real pointer stays over the test window once a suite activates it, so :hover applies to whatever a later suite renders there. That caused the sticky request bubble (#344806) and Part Grid (#345683) main CI breaks. The hover detector now resets by sending mouseLeave to the page, and detector resets may be async.

Co-authored-by: Copilot <[email protected]>
Bryan Chen (bryanchen-d) added a commit that referenced this pull request Nov 11, 2026
…Linux Electron (#346645)

* test: move the pointer off the window after every top-level suite on Linux Electron

Under Xvfb, the real pointer stays over the test window once a suite activates it, so :hover applies to whatever a later suite renders there. That caused the sticky request bubble (#344806) and Part Grid (#345683) main CI breaks. The hover detector now resets by sending mouseLeave to the page, and detector resets may be async.

Co-authored-by: Copilot <[email protected]>

* test: cover asynchronous and failing isolation detector resets

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Alejandro Daniel Di Stefano (Drako01) added a commit to Drako01/armotusitio-ide that referenced this pull request Nov 11, 2026
* Sessions: a hidden subagent chat no longer keeps a session's grid slot (#346342)

Sessions: a hidden subagent chat does not keep a session's grid slot

When a session's only visible chat moved into a chat window, hideChatFromGrid
checked the session's open chats to decide whether it was the only chat the
grid showed. Open chats include subagent (tool-origin) chats that are not
shown as tabs, so the session kept its pane, showing the new-chat composer.
Check the chats shown as tabs instead; subagent chats still open on demand.

When the session's slot leaves the grid, remove only that slot and keep its
chats shown in panes of their own, as closing the session does. Removing the
slot used to dispose those detached panes too. This was already the case for
a session with just a main chat and a detached chat; a hidden subagent chat
only masked it by keeping the slot. If the slot was active, the session's
detached pane becomes active instead of the new-session composer.

Co-authored-by: Copilot <[email protected]>

* terminal: allow auto local echo for remote agent host terminals (#346392)

Agent host terminals use a custom pty, so they have no remote authority. Thus the `auto` value of
`terminal.integrated.localEchoEnabled` did not enable typeahead for them, also when the agent host
is on a different machine.

- Adds `IShellLaunchConfig.isRemotePty` to mark a custom pty that runs on a different machine.
- Sets `isRemotePty` for agent host terminals when the connection kind is not `Local`.
- Makes the typeahead contribution treat a terminal with `isRemotePty` as remote.
- Makes `terminal.integrated.localEchoEnabled` experiment-controlled. The default stays `off`.
- Logs the experiment trigger when a remote terminal starts and the user did not set the value.

(Commit message generated by Copilot)

Co-authored-by: Copilot <[email protected]>

* Document that experiment pull requests describe only the code change (#346393)

Pull requests, commits and issues that ship, change, graduate or remove an experiment describe only the code change, without the experiment's rollout or results, even without numbers. The Public Content guidance and the experiments skill gave "the experiment showed no regression" and a primary-metric sentence as examples of acceptable public conclusions, which invited exactly those sentences. The conclusion example for other internal data is now "the error is common on Windows".

🤖 Authored with GitHub Copilot on behalf of @alexdima.

Co-authored-by: Copilot <[email protected]>

* build: install the built-in extensions with their own pnpm workspace (#346370)

* extensions: declare the packages that the extensions use from the root workspace

The built-in extensions import some packages that only the repository root's
package.json declares: Node.js finds them by walking up to <repo>/node_modules.
Each extension now declares what it uses, with the root's version ranges, so
that the extensions no longer depend on the root workspace's manifest:

- mocha and @types/mocha in the 16 extensions whose tests use them, and
  @types/mocha in microsoft-authentication
- sinon and @types/sinon in the 7 extensions whose tests use them
- glob in the css and html language server test runners
- util in emmet (its browser bundle includes the polyfill)
- path-browserify (the alias of the browser builds) and minimatch (the
  theme-seti update script) in extensions/package.json
- @types/vscode-notebook-renderer in ipynb, @types/node in markdown-math

The lockfile only gains the importer entries: every declaration resolves to a
version that is already locked.

Co-authored-by: Copilot <[email protected]>

* build: install the built-in extensions with their own pnpm workspace

The built-in extensions (every project under extensions/ except Copilot, which
stays a separate install root) move from the root workspace to a new install
root in extensions/, with its own pnpm-workspace.yaml and pnpm-lock.yaml. The
product build bundles the extensions, so the layout of their node_modules
doesn't ship; this lets the extensions change their node_modules layout (for
example to pnpm's isolated layout) independently of the root workspace.

- The lockfile entries were moved without resolving anything again: the 39
  importers and the 663 snapshots they use (193 shared with the root, which
  keeps 1537). Every package entry is the same as in the root lockfile.
  extensions/package.json declares tslib and zod, the peers that the root
  project provided (applicationinsights and @vscode/hubrpc), so they resolve
  to the same versions; zenuml's optional playwright-core peer is no longer
  linked.
- extensions/pnpm-workspace.yaml has the root's settings, with the overrides,
  allowBuilds and minimumReleaseAgeExclude entries that apply to the
  extensions (removed from the root where they only applied there), and
  hoistWorkspacePackages: false, so that the extensions aren't linked into
  extensions/node_modules by their names (emmet, gulp, npm, git, ...).
- extensions/.pnpmfile.mjs builds native modules for Electron, from the
  `nativeBuild` field of the root package.json.
- build/npm/dirs.ts, postinstall, the node_modules cache key, the workspace
  image inputs and the license scanner (extensions/node_modules, including its
  nested node_modules, and the extensions lockfile) know the new root.

Co-authored-by: Copilot <[email protected]>

* build: update the grammar updater, lint and Dependabot paths for the extensions workspace

Review feedback on the extensions install root:

- The update-grammar scripts of 33 extensions ran the grammar updater from
  ../../node_modules, which no longer has it: it is a dependency of
  extensions/package.json, so it is installed in extensions/node_modules.
- A change to extensions/pnpm-lock.yaml now lints the extensions that are
  linted with type information, like a change to the root pnpm-lock.yaml
  (kept, because the root workspace's TypeScript and typescript-eslint run that
  lint).
- Dependabot updates @vscode/markdown-editor in the extensions workspace
  (/extensions), which now has markdown-language-features and its lockfile.

Co-authored-by: Copilot <[email protected]>

* extensions: declare zod in mermaid-markdown-features instead of extensions/package.json

mermaid-markdown-features uses @vscode/web-editors, whose @vscode/hubrpc
dependency has zod as a peer. The root workspace's project used to provide it;
mermaid-markdown-features now declares it (4.4.3, like markdown-language-features),
instead of extensions/package.json. The lockfile resolves the same: only the
importer entry moves.

Co-authored-by: Copilot <[email protected]>

* extensions: declare tslib in the extensions that need it instead of extensions/package.json

@vscode/extension-telemetry uses @microsoft/applicationinsights-* 3.3.4, which
has tslib as a peer. The root workspace's project used to provide it. The nine
extensions that use @vscode/extension-telemetry (git, github,
github-authentication, html-language-features, json-language-features,
markdown-language-features, merge-conflict, microsoft-authentication,
typescript-language-features) now declare it instead of
extensions/package.json. The lockfile resolves the same: only the importer
entries move.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* Sessions: dispose the Inbox's new-session composer before its scoped services (#346359)

* sessions: dispose the Inbox's new-session composer before its scoped services

The Inbox added the services of its new-session composer's scope to the
same store as the composer, and before it. As the Inbox went away, those
services were disposed first. The composer's prompt options then cleared
its input as it went away, so its chat widget parsed the input with a
disposed instantiation service and threw "InstantiationService has been
disposed". The services of the composer's scope are now kept in a store
disposed after the composer, as a session view does for its children.

Known pattern, not changed here because nothing uses those services while
it is disposed: a scope is still registered before what it creates in
- the Inbox's question carousel and its chat exchange list,
- SharedChatInputComposer's chat widget, after its widget services,
- ChatView's chat widget, after its scoped instantiation service.

Co-authored-by: Copilot <[email protected]>

* sessions: dispose a canvas's content before the services of its scope

Closing the Inbox still logged "InstantiationService has been disposed":
the window canvas service added the services of a canvas's scope to its
store before the canvas it created with them, so closing the Inbox
disposed its child instantiation service first. Disposing an
instantiation service disposes its children, so the services of the
Inbox's new-session composer were gone before the Inbox disposed it,
and the composer's prompt options, clearing its input as they went
away, made its chat widget create with a disposed service. The canvas
service now keeps the services of a canvas's scope in a store disposed
after the canvas.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* agent Host: keep migrated local agent sessions in the root they were working in (multi-root workspaces) (#346381)

* agent Host: keep moved Local chats in the root they were working in (multi-root workspaces

* Feedback updates

* [Perf] chat: avoid cloud sandbox discovery scan loops (Written by Copilot)

Keep recorded-history retrieval out of cloud sandbox inventory discovery and retain unresolved task IDs for incremental retries after completed enumeration.

Co-authored-by: Copilot <[email protected]>

* agentHost: ask for consent when Copilot extensions request permissions (#346395)

* agentHost: ask for consent when Copilot extensions request permissions

The Copilot runtime asks for consent when an extension declares privileged capabilities, such as
hooks. This request has no tool call, so the agent host rejected it without asking the user, and
extensions such as grove-agent-monitor did not load.

- Handles `extension-permission-access` requests before the missing-`toolCallId` check. The check
  stays for all other permission kinds.
- Holds a request until a turn is ready to show it, then shows a confirmation in that turn:
  Allow Once, Always Allow, Not Now and Never. Only disposal of the session ends the wait. Allow
  All approves the request, and Autopilot declines it.
- Adds the host setting `extensionPermissionApprovals`. Always Allow and Never are kept there for
  each extension name and set of capabilities, so a request for more capabilities asks again. The
  runtime does not keep approvals when a session resumes.
- Moves the MCP skill confirmation into a shared helper, `_confirmEphemerally`. The helper keeps
  the Always Allow and Never decisions, and keeps the turn open until the user answers.
- Emits the confirmation as a trusted root-turn action, so that it is not dropped after an abort
  before the next SDK turn starts.

Fixes https://github.com/microsoft/vscode-internalbacklog/issues/10615

(Commit message generated by Copilot)

Co-authored-by: Copilot <[email protected]>

* agentHost: show extension consent in steering and provider-initiated turns

- Marks steering turns and provider-initiated turns as ready for permission prompts. These turns
  do not run the turn preparation, so a waiting extension consent request was not shown until a
  later normal send.
- Adds a test for a provider-initiated turn.

(Commit message generated by Copilot)

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* agentHost: let the Search Tools toggle control tool search (#346375)

Remove the chat.agentHost.copilot.toolSearch.enabled and
chat.agentHost.copilot.toolSearch.deferThreshold settings, and the matching
toolSearchEnabled/toolSearchDeferThreshold Agent Host root config keys.

Copilot sessions now enable tool search only when the model supports it and
the client forwards its toolSearch tool, which users control with the Search
Tools toggle in Chat Customizations. Turning it off loads every tool up front.
The defer threshold is fixed at 1, the previous default.

Co-authored-by: Copilot <[email protected]>

* agentHost: admit configured MCP installs before sending values, and neutralize prompt links

Recheck the runtime client, policy session, expiry and disposal after claiming a configuration request and before values or secrets reach mcp.prepareInstall, since prompts can stay open across an authentication change. Split '](' in untrusted plan text so Quick Input cannot turn it into a command link.

Co-authored-by: Copilot <[email protected]>

* [Perf] sessions: index automation badge session lookups (#346405)

* [Perf] sessions: index automation badge session lookups

Avoid rescanning the session catalog for every automation run while preserving URI identity and first-match behavior.

Fixes #346329

Co-authored-by: Copilot <[email protected]>

* signing commit

---------

Co-authored-by: Copilot <[email protected]>

* agentHost: drop unrecognized restricted events (#346400)

* agentHost: drop restricted SDK copies from standard telemetry

Discard restricted notifications in both general and compaction forwarding rather than publishing duplicate metrics and restricted properties through publicLog. Preserve the separate restricted router and cover the standard-only forwarding contract in regression tests.

Co-authored-by: Copilot <[email protected]>

* agentHost: align restricted fallback routing coverage

Update the host-level routing regression to require restricted fallback events to be dropped while dedicated routes and standard forwarding remain covered.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* Update CODENOTIFY for canvases (#339679)

* Update contributions in CODENOTIFY

Added @jruales to the contributions for canvases.

* Expand Canvas code notifications

Co-authored-by: Copilot App <[email protected]>

* Exclude Inbox Canvas integration from notifications

Co-authored-by: Copilot App <[email protected]>

* Limit Canvas notifications to contributed folders

Co-authored-by: Copilot App <[email protected]>

* Add Ulugbek to Canvas folder notifications

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: Copilot App <[email protected]>

* agentHost: keep removal wording, validate secrets in the prompt, and fake timers in an expiry test

Unfinished removals report removal wording again instead of installation reasons. The secret prompt applies the host's NUL and size checks so an oversized secret is caught while it can still be edited. The client-admission expiry test runs on virtual time so setup can't expire the plan early.

Co-authored-by: Copilot <[email protected]>

* agentHost: install local MCP packages from Browse with non-secret values

Browse/Feed MCP servers that only offer a local package (for example Playwright MCP) failed because the runtime's owned install flow is remote-only. The host now configures them itself, reusing the MCP Gallery path: it verifies the card against the plan's digest, builds the command with the existing manifest parser and writes it with mcp.config.add after review. Packages that need environment or argument values get a configuration request; the client prompts and reviews by command, and the host places each value exactly where the runtime's plan declares it. Packages that need secrets still fail closed until the runtime can store them.

Co-authored-by: Copilot <[email protected]>

* agentHost: configure local MCP packages with values from Gallery cards too

Local package installs are written by the host, so they don't need a session-bound plan. Allow MCP Gallery cards whose package needs non-secret values to use the same configuration request as Browse/Feed entries.

Co-authored-by: Copilot <[email protected]>

* agentHost: configure MCP Gallery remotes with non-secret values in the host

The runtime refuses values for unbound direct-card plans (github/copilot-agent-runtime#26495), so MCP Gallery remotes that need header or URL values could not be installed. The host now writes them itself, like Gallery packages: it verifies the card against the plan's digest, matches the plan's remote choice, substitutes the submitted values literally and writes the result with mcp.config.add. Remotes that need secrets still fail closed.

Co-authored-by: Copilot <[email protected]>

* agentHost: support repeated arguments for host-written MCP packages

Local packages are configured by the host, so a repeatable runtime or package argument can be written once per value. The workbench collects such a value one entry at a time in the same step (empty finishes, Back removes the last entry), and the host places each submitted entry in order. Runtime-owned installs and Gallery remotes still refuse repeated values, since the runtime accepts one value per key and a header or URL slot holds one value.

Co-authored-by: Copilot <[email protected]>

* agentHost: address review feedback on host-written MCP installs

Write to the reviewed configuration key, keep the policy-session binding for input-free catalog packages, ignore fixed header variables when matching card remotes, require values that sit inside templates, parse substituted URLs fully, keep SSE remotes as SSE, show a package's environment and full command in the review, clear a repeated value removed with Back, and make the command or endpoint preview available to screen readers.

Co-authored-by: Copilot <[email protected]>

* chat: allow dragging inline attachment pills (#346424)

Move individual attachment pills within their source chat input using a pill-only preview anchored at its bottom-left corner. Preserve attachment metadata, undo/redo, and existing open and remove interactions.

Reset surrounding drop tracking when internal drags finish so subsequent external file drops retain their feedback. Add regression tests and accessibility guidance.

Co-authored-by: Copilot <[email protected]>

* chat: preserve slash references through editing and draft sync (#346420)

* chat: preserve slash references through editing and draft sync

Keep accepted skill and command references intact across input edits, sent messages,
restored history, and shared drafts.

- Parse accepted completions as structured references, including the first request
  after the composer changes.
- Keep attachment updates from replacing reference ranges before edits are tracked.
- Batch atomic reference cleanup so other references keep their correct ranges.
- Preserve inline references and metadata when drafts move between windows.
- Ignore parser-created attachment changes so sent drafts do not return.
- Protect unsent local edits and deliberate model choices during remote clears.
- Add regression tests for editing, history, queued requests, and two-window sync.

(Commit message generated by Copilot)

Co-authored-by: Copilot <[email protected]>

* chat: normalize shared draft references before comparison

Keep remote draft clears independent of view-only reference changes.

- Normalize optional reference fields and reference order before comparison.
- Ignore parser-added attachment ranges without losing backing payloads.
- Keep multiline mentions as ordinary attachments to avoid invalid dynamic ranges.
- Test remote clears before debounce and protect real unsent edits.

(Commit message generated by Copilot)

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* ci: comment out the macOS jobs of the pull request checks (#346383)

* ci: remove the macOS jobs from the pull request checks

Over two weeks of pull request runs, almost every pull request with a
test failure on a commit that never passed later also failed on Linux,
Windows or Compile & Hygiene. The failures that only macOS caught were
WebKit-only test fixes, flakes and setup failures, except for two
product bugs: timing races that the timing of the macOS runners exposed
rather than macOS-specific code, which now have regression tests that
run on the other platforms (#345028, #345683). Meanwhile, macOS / Remote
is the slowest job of a pull request, and the macOS jobs regularly wait
for a runner.

The Azure product build keeps running the full macOS test suite on main
(build/azure-pipelines/darwin/steps/product-build-darwin-test.yml: unit,
WebKit browser unit, integration, smoke and remote tests), so macOS
regressions are still caught after merge.

pr.yml no longer runs the macOS jobs (pr-darwin-test.yml, which this
removes, and chat-lib - Test (macOS)), and PR Gate, the only check that
branch protection requires, no longer needs them. This also removes what
only served those jobs: the electron-tests output of Detect Changes, the
macOS job of pr-node-modules.yml that warmed their caches, the macOS
workspace image and its restore code, which no job used, and the time
that the smoke test shards reserved for the macOS proxy runs. The manual
chat-lib-package.yml still runs on macOS, where test-chat-lib now
installs the dependencies instead of restoring a cache that no job
saves anymore.

Co-authored-by: Copilot <[email protected]>

* ci: comment out the macOS jobs instead of removing them

So that the macOS jobs can run again later, pr.yml now comments them
out instead of removing them, and pr-darwin-test.yml stays. Their
wiring is commented out with them: the electron-tests output of Detect
Changes, their entries in the needs of PR Gate, and the macOS jobs of
pr-node-modules.yml and pr-workspace-images.yml with the macOS entries
of .github/actions/detect-missing-caches. What only those jobs use is
back as it is on main: the time that the smoke test shards reserve for
the macOS proxy runs, the macOS restore of the workspace images, the
macOS cache of test-chat-lib, and the entries of pr-darwin-test.yml in
CODEOWNERS and in the configuration of ripple. The tests keep checking
pr-darwin-test.yml, and the comment on the macos-tests job lists what to
uncomment to run the macOS jobs again.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* chat: enable Agent Host symbol attachments (Written by Copilot)

Restore editor-side symbol suggestions in Agent Host chat and forward accepted symbols through file-selection attachment handling, including current buffer text for unsaved files.

Co-authored-by: Copilot <[email protected]>

* Copilot CLI: only use the local development shim in builds from source (#346426)

Co-authored-by: Copilot <[email protected]>

* chat: explain cloud sandbox discovery decisions (Written by Copilot)

Add bounded inventory decision, progress, coalescing and feed lifecycle diagnostics through existing telemetry controls. Include focused coverage and count typed feed transport failures without inventing requests for authentication or local validation failures.

Co-authored-by: Copilot <[email protected]>

* agentHost: share local MC credentials (#346416) (Written by Copilot)

Use the host's shared GitHub and Copilot credentials consistently for live Mission Control requests and restored background work when local credentials are enabled. Preserve remote caller admission, client-credential mode, independent MCP authentication, and credential snapshot lifetimes.

Avoid repeated global sign-in for missing session sponsorship. Preserve manual repository sign-in for token challenges and direct unsponsored sessions toward resuming or reconnecting.

Co-authored-by: Copilot <[email protected]>

* agentHost: bump Copilot SDK to 1.0.29-preview.9 (#346409)

* agentHost: bump Copilot SDK to 1.0.29-preview.9 (Written by Copilot)

Bundle runtime 1.0.106-10 for desktop and remote. Refresh reviewed runtime prompt and permission/automation recordings, and retain strict assertions for the new BYOK message shape and unsupported managed effort behavior.

Co-authored-by: Copilot <[email protected]>

* Merge origin/main for SDK validation (Written by Copilot)

Integrate upstream workspace and Agent Host changes so the SDK draft can merge and run CI.

Co-authored-by: Copilot <[email protected]>

# Conflicts:
#	pnpm-lock.yaml

* agentHost: keep SDK lock entries portable (Written by Copilot)

Remove environment-specific proxy tarball URLs while preserving the exact SDK versions and SHA512 integrity pins. Let pnpm verify and resolve artifacts through the configured registry in CI and Product builds.

Co-authored-by: Copilot <[email protected]>

* test: put back the page scroll position after every top-level unit test suite (#346317)

Unit tests share one page per runner or worker. 14 test files leave it scrolled
(mostly by 60px, by focusing an input appended below the fold), and later
suites that measure page coordinates then fail depending on which files a
worker ran before them: TabbedModelPicker comparison alignment and Artifact
Integration Presentation in PR CI, and #345859 before. The scroll detector
already snapshots the position around every top-level suite; restore it after
the check, so the finding is still reported and later suites start unscrolled.

Co-authored-by: Copilot <[email protected]>

* build: stop processes that hold Windows test log files before publishing them (#346337)

Publish Log Files failed twice (492717, 493303) because files under .build\logs were still open after the tests, while the kill step, which matches executables under the test folder, found no holder or killed only the server and the files stayed locked. Both runs had a git.exe left over that no green run has. Find the holders by file with the Restart Manager, log them, and stop those that the build user started.

Co-authored-by: Copilot <[email protected]>

* editor: fix duplicate editors when moving a group to another window (#346425)

editor: close source group editors synchronously on cross-part moveGroup

Co-authored-by: Copilot <[email protected]>

* agentHost: preserve standard response correlation when restricted events arrive first (#346441)

agentHost: drop restricted fallback events before consuming correlation

Preserve the owning turn for the standard response when a restricted copy arrives first. Cover user- and agent-initiated success and error responses through the host routing boundary.

Co-authored-by: Copilot <[email protected]>

* agentHost: fall back to persisted history on missing worktree or MCP config errors and preserve adopted metadata (#346440)

* agentHost: fall back to persisted history on missing worktree or MCP config errors and preserve adopted metadata

* test fix

* Chat links open in the chat window they were clicked in (#346450)

* Agents: open chat links clicked in a chat window in that window

A chat or session link activated by the user in a chat window opens as a new tab in the group of the chat it was clicked in, or beside it when opened to the side. A chat another chat window shows is revealed there; a chat the main window shows moves into this window. Clicks in the main window and opens that are not user gestures are unchanged.

Co-authored-by: Copilot <[email protected]>

* Agents: gate chat-window link redirect on the chat windows setting

Co-authored-by: Copilot <[email protected]>

* Agents: resolve the clicked chat of a link before awaiting its chat id

The chat a link was activated in is now read when the link is opened, so a focus change while the link resolves does not move where it opens.

Co-authored-by: Copilot <[email protected]>

* Don't move focus into the main window when a grid chat moves into a chat window

Hiding a chat from the grid removed it with focus, so the next active session
or composer in the main window took OS focus away from the chat window.

Co-authored-by: Copilot <[email protected]>

* Don't move focus when seeding the empty grid's background draft

Seeding a folder or no-workspace draft after the last grid chat leaves for a chat window now passes preserveFocus through openNewSession/openQuickChat, so the main window no longer takes OS focus. User-initiated New Session still focuses.

Co-authored-by: Copilot <[email protected]>

* Keep the main window from taking focus while another window holds it

Revert the seed-only preserveFocus plumbing: seeding the empty grid's draft focuses as before, but the main window now skips moving focus while another window of the app is the active one. The skipped focus is applied once when the main window becomes active again and its focused element went away.

Co-authored-by: Copilot <[email protected]>

* Open links from a chat window in the main window when the chat window would end the chat

A chat that is archived or gone is ended by a chat window, which left a blank tab. The opener now uses the same predicate as the window provider and takes the main-window path for such targets.

Co-authored-by: Copilot <[email protected]>

* Share one chat window end condition, including the main chat fallback, between the window and links

A still-loading session whose archived main chat is not listed yet was redirected into a chat window, which ended it at once. The end condition now resolves the chat as the window does and is used by both.

Co-authored-by: Copilot <[email protected]>

* chatWindow: store and restore chats in the order of their tabs

A chat opened as a tab of a chat that is not the last sits beside it, so the order they joined in differs from the tabs. Store the chats in tab order, and restore each behind the one restored before it in its group.

Co-authored-by: Copilot <[email protected]>

* chatWindow: keep the remembered layout with the chat it was recorded for when tabs are reordered

A window stores its chats in tab order, so a tab moved before the chat the window opened for made a restore look up another chat's layout and sizes. Store that chat as the layout chat and restore with it.

Co-authored-by: Copilot <[email protected]>

* sessions: refocus the main window's session when focus did not move while it was skipped

Co-authored-by: Copilot <[email protected]>

* sessions: don't leak a replacement element in the focus guard test

Co-authored-by: Copilot <[email protected]>

* sessions: skip main window focus only when the removed session was active

Moving an inactive session into a chat window does not change the active pane, so it no longer queues a refocus that would move the sidebar focus into the active session.

Co-authored-by: Copilot <[email protected]>

* chatWindow: add exactChat to open the given chat instead of its session's shown chat

A resource that names a session resolved to the chat the grid shows for it, so a session link moved a peer chat. exactChat resolves it to the session's own main chat.

Co-authored-by: Copilot <[email protected]>

* sessions: link opener opens the exact chat and falls back when the window cannot resolve it

A session link opens its main chat in the chat window, never a peer shown in the grid. When the chat window cannot resolve the chat, such as while its session loads, the link opens in the main window as before.

Co-authored-by: Copilot <[email protected]>

* sessions: only queue the main window refocus when moving a chat out changes the active pane

A detached child of the same session that stays active is not removed, so no focus was skipped.

Co-authored-by: Copilot <[email protected]>

* chatWindow: do not share a pending open between exact and default resolution of one chat

Key the in-flight open by resolution mode as well as the resource, so an exact link open is not served by a pending generic open.

Co-authored-by: Copilot <[email protected]>

* chatWindow: run chat window opens one after the other

A generic and an exact open of one chat shared no pending open once keyed by resolution mode, and both could pass the lookup of the window that shows the chat before either published its window. Opens now run through one queue, so the second finds and reveals the window the first opened.

Co-authored-by: Copilot <[email protected]>

* chatWindow: serialize opens per resolved chat instead of globally

Resolve each request independently, then run the lookup and creation of a window one after the other only for the same resolved chat, so a slow open does not hold back a reveal of another chat.

Co-authored-by: Copilot <[email protected]>

* chatWindow: serialize opens per requested chat

Run every route of open() one after the other for the same requested chat, so a concurrent open of that chat in another mode sees the window the earlier one published. Opens of different chats do not wait for each other.

Co-authored-by: Copilot <[email protected]>

* chatWindow: do not leave a timer behind in the ready-chat test

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* agentHost: escape the command preview marker for hygiene

Co-authored-by: Copilot <[email protected]>

* agentHost: bump Copilot SDK to 1.0.29-preview.10 (#346448)

* agentHost: bump Copilot SDK to 1.0.29-preview.10 (Written by Copilot)

Keep the desktop and remote SDK pins aligned with bundled runtime 1.0.106-11.

Co-authored-by: Copilot <[email protected]>

* agentHost: fix SDK registry URLs (Written by Copilot)

Let pnpm resolve the SDK from the configured registry rather than recording local mirror tarball URLs that fail CI supply-chain verification. Preserve all package integrity hashes and dependency pins.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* build: keep node_modules under src out of out-build (#346460)

Since #345794 made src/vs/sessions/test/e2e a root workspace member, the root install puts its Playwright dependencies in src/vs/sessions/test/e2e/node_modules. The transpile copied those 576 files into out-build, and the Windows compilation artifact's Guardian AntiMalware scan went from ~6 to ~58 min.

Co-authored-by: Copilot <[email protected]>

* build: install the extensions root next to the other native roots (#346468)

Since the built-in extensions have their own install root (#346370), the
postinstall installed it after build and remote, one root at a time. Its
install takes about 15 seconds, almost all of it compiling @parcel/watcher,
which the root workspace's install used to build for both, so a clean install
became about 10-15 seconds slower.

The extensions root now installs next to the build -> remote ->
extensions/copilot chain, which stays sequential. Its native modules build for
Electron, whose headers the preinstall has already installed, so they don't
download them. The postinstall waits for every install before it reports a
failure.

Co-authored-by: Copilot <[email protected]>

* sessions: move the reusable Sessions code to vs/workbench/contrib/sessions (no behavior change) (#346421)

* sessions: decouple the Sessions part and host layout from the session services

- Move the session view contract (`ISessionView`) into sessionsPartService.ts,
  so the part service and the session command target no longer import the
  SessionView implementation; move the workspace selection option and result
  types to common/workspaceSelection.ts.
- Introduce `ISessionsHostLayoutService` (host presentation, explicit editor
  reveal, editor auto-visibility suppression), implemented by the Agents
  workbench next to `IAgentWorkbenchLayoutService` (both resolve to the same
  object), and move callers that need only those members to it, or to
  `IWorkbenchLayoutService` when they need only the base layout members.
- Tests stub the new service next to the layout service they already stub.

No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: split context keys and menus into shared and Agents-window parts

Context keys and menu IDs used only by the Agents window shell (title bar,
part titles, account and Go menus, custom views, Automations, the docked
desktop editor part's tabs bar, empty editors, window canvases, onboarding,
aquarium and mobile chrome) move to `common/agentsWindowContextKeys.ts` and
`browser/agentsWindowMenus.ts` (`AgentsWindowMenus`, `SessionCanvasMenuGroup`).
`common/contextkeys.ts` and `browser/menus.ts` keep the keys and menus of the
session model, Sessions part, composer, sessions list and Changes editor
(including the editor header row menus the Changes editor contributes to), and
import nothing from the shell files.

Generated by a script; every MenuId and RawContextKey is constructed once,
with the same id and localized description as before. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: register the session changes stats cache from the Agents window entry point

The cache's module registered its singleton at module level. The
registration moves to sessionsServices.registration.ts, imported by
sessions.common.main.ts right before the session services, so the module
can later be shared without registering anything when it is imported.
Same id, implementation and instantiation type. No behavior change.

Co-authored-by: Copilot <[email protected]>

* eslint, build: prepare vs/workbench/contrib/sessions for the shared sessions code

- Layer rules for vs/workbench/contrib/sessions (workbench rules, never
  vs/sessions) and its providers (may also import sibling providers;
  nothing else in vs/workbench may import them).
- vs/sessions may import both.
- The _meta guard and the IAgentSessionsService restriction cover the
  new folder like vs/sessions, including the Copilot provider exception.
- Translations: strings under vs/workbench/contrib/sessions stay in the
  vscode-sessions project (getResource rule and resources entry, with a
  test).
- LAYERS.md documents the shared folder.

No code moves yet; the folder is empty.

Co-authored-by: Copilot <[email protected]>

* sessions: move the session domain model to vs/workbench/contrib/sessions/common (pure move)

git mv of the provider-neutral session model and common contracts:
session, sessionsProvider, sessionsManagement, sessionContextKeys,
sessionChangesStatsCache, sessionPickerVisibility, sessionComparison,
agentHostSessionsProvider, agentHostSessionWorkspace, sessionApplication,
sessionCommands, sessionConfig, workspaceSelection and the shared context
keys, with their tests and testSessionBuilder.

Generated by the move codemod: only relative module specifiers change,
plus the component fixtures' eslint-disable lines for imports that now
target vs/workbench. The workbench agent-host customization service and
its test no longer import vs/sessions.

Co-authored-by: Copilot <[email protected]>

* sessions: split the custom view and window canvas service contracts from their implementations

ICustomViewService and ICustomViewOpenRequest move next to the custom view
descriptor types in customView.ts; IWindowCanvasService and its canvas,
descriptor, presentation and open request types move to windowCanvas.ts.
The implementations and their registrations stay where they are. The
session services depend only on the contracts, so they can move without
the Agents window implementations.

Generated by a script; importers updated. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: register the session services from the Agents window entry point

The session services, session hosts, chat host opener, list model, groups,
comparison, section order, agent host filter, list presentation,
repository picker, open telemetry, providers registry, recent workspaces
and Agents agent-host customization service registered themselves at
module level. Their registrations move to sessionsServices.registration.ts,
which sessions.common.main.ts imports in place of the modules, so these
modules can be shared without registering anything when imported.

Same ids, implementations and instantiation types (SessionsService and
SessionsManagementService stay Eager, in the same relative order). The
registration module imports the workbench agent-host customization module,
whose default registration therefore still precedes the Agents override.

Generated by a script. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the session services to vs/workbench/contrib/sessions (pure move)

git mv of the sessions registry, management and view services, the session
hosts, chat host opener and command target, their helpers (navigation, grid
state, recency, groups, list model, section order, comparison, open
telemetry, recent workspaces, worktree trust, GitHub repository resolver,
scoped context keys, clone repository, closed item history, session
reference) and the support services (agent host filter, Agents agent-host
customization service, chat background, list presentation, repository
picker, the session view, part and host layout contracts, and the custom
view and window canvas contracts), with their unit tests.

Generated by the move codemod: only relative module specifiers change.
The modules register nothing; sessionsServices.registration.ts in
vs/sessions registers them.

Co-authored-by: Copilot <[email protected]>

* sessions: register the new session composer service from the chat contribution

The composer service's module registered its singleton at module level.
The registration moves to chat.contribution.ts, next to the other session
chat services, so the module can be shared without registering anything.
Same id, implementation and instantiation type. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: move provider-neutral shared pieces to vs/workbench/contrib/sessions (pure move)

git mv of the non-UI code the session providers need:
- the GitHub service layer (service, API client, pull request icon cache
  and status, models and fetchers) and the common GitHub types, utils,
  references and lifecycle settings;
- the shared session menu IDs (Menus);
- the new session types, composer service and picker telemetry, the
  automation model configuration, the Open in VS Code helpers, the phone
  layout helper and the client artifact runtime;
- common contracts: dev container agent host service, session links,
  categories, changes, changes view service, pull request creation,
  worktree suggestion and the chat constants;
with their tests.

Generated by the move codemod: only relative module specifiers change.

Co-authored-by: Copilot <[email protected]>

* sessions: stub ISessionsHostLayoutService in the remaining tests

Tests that main added after the host layout contract was introduced build
the Changes editor or the sessions accessibility help without stubbing it.
They now stub it next to the layout service they already stub, as the
Agents workbench provides both. Tests only.

Co-authored-by: Copilot <[email protected]>

* sessions: move the remote agent host command IDs to their own module

RemoteAgentHostCommandIds moves from remoteAgentHostActions.ts, which
registers the actions, to remoteAgentHostCommandIds.ts, so the mission
control contribution and the connection diagnostics can use the IDs
without importing the action registrations. Same IDs. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: register the session provider services and contributions from vs/sessions

The provider modules that move to vs/workbench next registered at module
level. Their registrations move to vs/sessions modules that the entry
points (or the provider contributions) import at the same positions:
- agentHostPolicyContinuationPresenter.contribution.ts: the policy
  continuation presenter;
- agentHostSkillButtons.contribution.ts: the "is agent host session"
  context key contribution and the skill buttons, which
  agentHostSkillButtons.ts now exports (AGENT_HOST_SKILL_BUTTONS,
  registerAgentHostSkillButton);
- connectionDiagnostics.contribution.ts: the connection diagnostics service;
- devContainerAgentHostService.contribution.ts: the dev container agent
  host service (desktop only, as before);
- missionControlAgentHost.contribution.ts: the mission control contribution
  and its Manage menu entry.
Tests that read these registrations import the registration modules.
Same ids, implementations, phases and menu entries. No behavior change.

Co-authored-by: Copilot <[email protected]>

* eslint: keep non-provider Agents window code from importing the shared providers

Only provider contributions (vs/sessions/contrib/providers/*) and the
entry points may import vs/workbench/contrib/sessions/providers/*, as for
the providers under vs/sessions today: the core, services and non-provider
contributions keep needing an explicit exception.

Co-authored-by: Copilot <[email protected]>

* sessions: move the session providers to vs/workbench/contrib/sessions/providers (pure move)

git mv of the agentHost, copilotChatSessions and remoteAgentHost provider
implementations, their electron-browser pieces, styles, specifications,
the agent host session sandbox, the remote agent host command IDs and This
Computer section, and the tests that do not drive Agents window
registrations, to vs/workbench/contrib/sessions/providers/<name>/.

Registrations, actions, menus and provider UI that still depends on Agents
window parts stay in vs/sessions/contrib/providers/<name>/.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files (lint allowlists, docs) change.

Co-authored-by: Copilot <[email protected]>

* sessions: give the session UI the host layout's optional side-pane capability

ISessionsHostLayoutService gets an optional `sidePane` (isEditorPaneVisible,
hideSidePane) that hosts with a docked side pane provide. The Agents
workbench provides it (it is the side pane), so the Sessions part, the
session activity bar and the chat input toolbar now use it and plain
IWorkbenchLayoutService instead of IAgentWorkbenchLayoutService, and can
move without the Agents window workbench.

Tests stub the host layout service from the Agents layout service they
already stub (stubSessionsHostLayout), as the Agents workbench provides
both. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: split the contracts the session UI uses from their Agents window implementations

Refactor in place, no moves, so the session UI can depend on contracts only:
- agentFeedback.ts: IAgentFeedbackService with its event, option, context
  and navigation types and AGENT_FEEDBACK_NEW_SESSION_RESOURCE (from
  agentFeedbackService.ts and agentFeedbackEditorUtils.ts). Importers of
  the feedback model types import them from agentFeedbackModel.ts instead
  of the service's re-export.
- aquarium.ts: IAquariumService and IMountedToggleHandle.
- codeReview.ts: ICodeReviewService, its pull request review state, comment
  and suggestion types.
- fixCIChecks.ts: the CI check grouping, labels, required-check count and
  Fix CI prompt helpers and the Reveal CI Checks command ID.
- customizationItems.ts: the customization item configuration and counts.
The implementations, actions and registrations stay where they are.

Generated by a script; importers updated. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: keep the New Session title bar entry out of the shared action

NewChatInSessionsWindowAction no longer declares its Agents title bar menu
entry. appendNewSessionTitleBarMenuItem in vs/sessions adds that entry
(same command, title, category, group, order and when clause), and
chat.contribution calls it right after registering the action. The
Sessions workbench fixture helper does the same so its title bar is
unchanged, and the title bar test reads the registered entry. The action
now depends only on workbench code. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: extract registrations from the Changes view and empty state

The Changes action view items contribution (it also registers into the
Agents title bar menu), the list/tree mode, versions picker, diff stats and
Reveal CI Checks action registrations, and the empty state's Open Files and
Search in Files menu items move to changesView.contribution.ts, imported by
changes.contribution right after the Changes view. The action classes, the
versions picker id and the picker label helper become named exports. The
Changes fixture imports the registration module. changesView.ts and
changesEmptyState.ts no longer register anything. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: hide the side pane from the sessions view through the host layout

The sessions view hides the docked side pane through the host layout's
side-pane capability and uses plain IWorkbenchLayoutService for part
visibility, instead of IAgentWorkbenchLayoutService, so it can move without
the Agents window workbench. The Agents workbench provides both, so the
behavior is unchanged.

Co-authored-by: Copilot <[email protected]>

* sessions: extract registrations from session UI modules that move

Moves the module-level registrations out of the session UI modules that
move to vs/workbench/contrib/sessions next, so the moved modules register
nothing and the editor window loads nothing new:

- The new chat voice and chat input toolbar debug services, the #session
  reference command and the prompt template placeholder keybinding now
  register in chat.contribution.
- The MCP server count service registers in customizationsToolbar.contribution.
- The Session Activity Bar activity service and CustomViewService register
  in new registration modules imported at the same entry-point positions.
- The agent host config picker actions and contribution, the mobile chat
  input picker and presenter, and the open-subagent contribution register in
  new contribution modules imported where the UI modules were.

Anonymous Action2 classes become named exports. No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: extract agent host agent picker registrations

Moves the agent picker shortcut, action and contribution registrations
into agentHostAgentPicker.contribution.ts, imported where the picker module
was, so the picker UI can move to vs/workbench/contrib/sessions without
registering anything. The anonymous action becomes the exported
AgentHostAgentPickerAction, and the shortcut's command id, context and
handler become exports. Same ids, when clauses and keybindings. No
behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: register the session action context keys contribution from vs/sessions

The contribution that binds the main window's session action context keys
on the global context key service moves to
sessionActionContextKeys.contribution.ts, imported by changes.contribution
in place of the module. The CI check context keys and their binder move
to fixCIChecks.ts. sessionActionContextKeys.ts keeps the binder registry
that providers and actions in vs/sessions fill, and registers nothing.
No behavior change.

Co-authored-by: Copilot <[email protected]>

* sessions: move session UI prep modules to vs/workbench/contrib/sessions (pure move)

git mv of the session UI building blocks the Sessions part, session view,
composer, sessions list and Changes editor build on: the session part and
host contracts, the agent feedback, aquarium, code review and Fix CI check
contracts, the customization items, the chat view base and chat surface,
the session activity bar and its activity service, the session header and
read-only banner, drop targets, empty states and the docked editor inputs.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the Sessions part and session view to vs/workbench/contrib/sessions (pure move)

git mv of the Sessions part, the session view and its chat groups, chat
group and composite bar, chat view and session and chat headers, grid
layout, remote connection banner and the chat editor content.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the session composer to vs/workbench/contrib/sessions (pure move)

git mv of the session composer: the new session and new chat widgets,
the chat view implementation, chat input toolbar and pickers, workspace,
branch, isolation and model pickers, comparison selection, input banners,
worktree suggestions and their styles and tests.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the sessions list to vs/workbench/contrib/sessions (pure move)

git mv of the sessions list, its view, view actions helpers, hovers and
presentation, with their tests.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the provider composer UI to vs/workbench/contrib/sessions (pure move)

git mv of the provider composer UI: the agent host agent, mode, config,
permission and approval pickers and the open-subagent view item.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the Changes editor to vs/workbench/contrib/sessions (pure move)

git mv of the Changes editor and its input, the Changes view and file
list, the Changes service and view service, checks widget and model,
Create Pull Request widget, multi-diff source resolver and empty state.
The Changes view container and its registrations stay in vs/sessions.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the New Session action to vs/workbench/contrib/sessions (pure move)

git mv of the New Session action. Its Agents title bar entry and
registration stay in vs/sessions.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: move the diff editor options service and empty file editor input to vs/workbench/contrib/sessions (pure move)

git mv of the diff editor options service with its test, and the empty
file editor input.

Generated by the move codemod: only relative module specifiers and exact
path mentions of the moved files change.

Co-authored-by: Copilot <[email protected]>

* sessions: update links and lint allowlist paths to the moved files

Markdown links in the Sessions specifications and in the agent host and
inbox telemetry instructions, and the bracket-notation allowlist entries,
pointed at files that moved to vs/workbench/contrib/sessions. They now
point at the new locations. Text only.

Co-authored-by: Copilot <[email protected]>

* CODENOTIFY: notify for the shared sessions model, services and provider specifications

The session model and services moved to vs/workbench/contrib/sessions
(common/** and the browser services) and the provider specifications to
vs/workbench/contrib/sessions/providers/*; the same owners are notified as
for their previous locations.

Co-authored-by: Copilot <[email protected]>

* eslint: forbid vs/sessions imports from workbench contributions

Removes the 'vs/sessions/~' allowance from the 'src/vs/workbench/contrib/*/~'
import rule, so no workbench contribution can import the Agents window. No
production file needs it any more.

Component fixtures render Agents window UI and get their own test-only
target, 'src/vs/workbench/test/browser/componentFixtures/**', which allows
vs/sessions and the session providers on top of what the workbench test
target allows. It precedes 'src/vs/workbench/~' because the first matching
target wins. The per-line eslint-disable directives the fixtures used for
these imports are removed. Fixtures stay where they are, so fixture ids and
screenshot keys do not change.

Co-authored-by: Copilot <[email protected]>

* sessions: anchor shared composer input styles by specificity

The shared composer's fallback rule tied chat.css on specificity and won
only because its stylesheet loaded later. After the move into
vs/workbench, the unit-test harness (which loads every stylesheet in path
order) put chat.css ahead of it. Add .interactive-session so the rule wins
without depending on stylesheet order. In the app it already won, and the
live computed padding and margin of the input part are unchanged.

Co-authored-by: Copilot <[email protected]>

* sessions: declare the shared session UI's onboarding descriptors from the Agents window

The compare agents spotlight, worktree suggestion tour and session archive
tour declared their onboarding descriptors at module scope, so any window
that imported them would register them. Export a register*Descriptor()
function for each and call them from the Agents window's chat contribution,
which is where they were first evaluated. The descriptors and their
registration order are unchanged.

Co-authored-by: Copilot <[email protected]>

* sessions: give component fixtures the session host layout service

The shared session UI now depends on ISessionsHostLayoutService, which has an
id of its own; on main these classes used IAgentWorkbenchLayoutService, which
shares IWorkbenchLayoutService's id that fixtures already define. Fixtures
that do not define the host layout now get it resolved to their workbench
layout service on first use, with that service as the docked side pane, as
the Agents workbench does.

Co-authored-by: Copilot <[email protected]>

* sessions: let the sessions grid fixtures resolve the side pane like the workbench

The sessions grid fixture stubbed ISessionsHostLayoutService with its Agents
layout mock, which has no sidePane, so the Sessions part sized its card as if
the side pane were hidden and the side-pane gap assertions failed. Leave the
service to the shared fixture default, which resolves it to that same layout
with the layout as the docked side pane, as the Agents workbench does.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* sessions: Enable chat windows by default in Insiders (#346489)

sessions: enable chat windows by default outside stable

Turn `sessions.chatWindows.enabled` on by default in Insiders, tag it as preview and let experiments control it.

Co-authored-by: Copilot <[email protected]>

* sessions: show the active chat as the session view by default (#346389)

Default sessions.showChatTabs to single, so the Agents window shows a session's active chat as the session view instead of a tab per chat. The setting keeps its ExP auto mode, and explicit user settings still win. Show Chat Tabs in the session overflow menu still switches between Single and Multiple.

Related: microsoft/vscode-internalbacklog#9807

🤖 Authored with GitHub Copilot on behalf of @alexdima.

Co-authored-by: Copilot <[email protected]>

* chat: Confirm agent edits to Dev Container configurations (#346493)

Edits to .devcontainer.json, .devcontainer/devcontainer.json and .devcontainer/<name>/devcontainer.json were auto-approved by default. These configurations can run initializeCommand on the host, and set mounts and run arguments, whenever the container starts. The Agents window starts and resumes Dev Containers itself, and its agent can run inside the container with the workspace mounted from the host, so a silent edit could reach the host.

Add the configurations to the always-checked edit patterns of the Agent Host and the Copilot extension, so the edit prompt cannot be turned off by edit auto-approve patterns.

Co-authored-by: Copilot <[email protected]>

* Fix pet stuck in hacky sack game mode (#346471)

Agent Host changes for agents/fix-pet-stuck-in-hacky-sack-game

* ci: list the Linux workspace image jobs before the Windows ones (#346472)

Moves the linux-packages job after the linux job, so that the run of the Code OSS (workspace images) workflow shows both Linux jobs first, followed by the two Windows jobs.

Co-authored-by: Copilot <[email protected]>

* agentHost: handle backing-session ownership, disallowed UNC hosts, and invalid workspace.yaml during legacy migration (#346459)

* agentHost: handle backing-session ownership, disallowed UNC hosts, and invalid workspace.yaml during legacy migration

* fix: surface current recovered-chat preparation failures

Exercise subscription-driven preparation with invalid workspace metadata, successful repair, and a subsequent preparation error. Preserve read-only history while reporting the current failure.

Co-authored-by: Copilot <[email protected]>

* Skip no-op preparation for unrestricted recovered-history providers

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>

* agentHost: release a held session soon after its chat closes (#346288)

* agentHost: release a held session soon after its chat closes

The runtime marks a Copilot session as in use while VS Code has it loaded,
from creation or from the first turn after resuming it, until VS Code quits.
The Copilot CLI then asks before resuming the session, even after its chat
was closed in VS Code. Release such a session about 10 seconds after no
window observes it; reopening it restores it from disk.

Co-authored-by: Copilot <[email protected]>

* agentHost: keep a due idle release after a failed attempt, and count provider-initiated turns

A release that disconnects the live session and then fails left the provider no longer holding the session, so the retry dropped the due release and the session stayed loaded. Cancel a due release only when a client observes the session again or a turn starts. A resumed session is also held in use once a turn started through the SDK runs in it.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants