Repository navigation
sessions: shared session layout buttons and stacked input-only rules - #345077
Closed
Sandeep Somavarapu (sandy081) wants to merge 1 commit into
Closed
Sandeep Somavarapu (sandy081) wants to merge 1 commit into
Sandeep Somavarapu (sandy081) wants to merge 1 commit into
Conversation
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/sessions-layout-shared
branch
from
October 29, 2026 22:09
4b5b0f3 to
319b748
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/sessions-layout-model
branch
from
October 29, 2026 22:09
be756ca to
564442a
Compare
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/sessions-layout-model
branch
from
November 2, 2026 08:36
564442a to
b3db3b4
Compare
Infrastructure shared by the main window and chat windows, with no user-visible change: - `browser/sessionLayoutButtons.ts`: the promotable buttons of a Layout menu (Show Chat, Show Editor and the arrangement), their shared promotion state, and the context menu of a toolbar that shows them. Nothing registers layout buttons yet, so no menu shows them. - the Session Activity Bar gives its toolbar that context menu, which only acts on registered layout buttons and otherwise leaves the toolbar's own context menu. - `common/stackedChatInputOnly.ts`: pure rules for when a stacked chat shows only its input, also while its sash is being dragged. Co-authored-by: Copilot <[email protected]>
Sandeep Somavarapu (sandy081)
force-pushed
the
agents/sessions-layout-shared
branch
from
November 2, 2026 08:57
319b748 to
83c36ea
Compare
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 3, 2026
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]>
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 3, 2026
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]>
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 3, 2026
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]>
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 4, 2026
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]>
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 4, 2026
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]>
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 4, 2026
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]>
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 4, 2026
…nd drop between parts (#345683) * Chat window: layout model and stacked input-only rules in the workbench 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]> * chat: a chat input can lay its editor out one line tall 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]> * editor: the Add Tab entries act on the group of their tabs bar 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]> * chat: links in chat markdown open with the opener of the renderer's scope 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]> * sessions: the chat composite bar and the card frames follow a chat surface 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]> * sessions: show sessions outside the Sessions part grid 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 94f6c110d69, 5ec09ac3f48, 664d4e717db and 4a10fdb1bb8, e08ab865cad. Co-authored-by: Copilot <[email protected]> * sessions: let session actions act on a given session 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 (94b140fb23d, 4000cd23529, 46bf53f9e44, 376161c28b5, 170261683c6, 49ae8b2654e, 0be0e134bef, 258419ba130, 6b76d9d947c, 15b99a7f6e4, 42e61c7cd4d, 9e5e58f7a75, a26d679dd55, 0515ba584b9, 31e44e57cca, f575613f549), with 993cf42ec96, 2f339933667 and 65c2e7c69c1 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]> * sessions: let session views be hosted outside the Sessions part, with 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 c0685f56d02, 10fb2354aa6, 5de12de1983, 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]> * sessions: share the chat background surface beyond the Sessions part The Sessions part painted the chat background itself, so nothing else could show a chat with the Agents wallpaper behind it. - SessionsChatSurface paints the chat background behind an element and follows the background service; the codicon confetti, its announcement and its telemetry move with it. The Sessions part uses it. - The rules that let the background show through chat surfaces, lift a surface's `.content` above the background, give its editors the panel background and place the confetti target match `:is(.part.sessionspart, .sessions-chat-surface)`, keeping the weight of the `.part.sessionspart` rules they override. The sticky scroll replica finds the background through the surface. No visual change. The wallpaper half of 3825a51e90b (#345561). Its card surface half (`.agents-card-surface`, `--agents-card-frame-owner`) belongs to the part-grid look of the workbench parts foundation. Co-authored-by: Copilot <[email protected]> * chat windows: generic window layout keys, the chat window service seam and window state The first piece of chat windows in the workbench (P9): - `layoutMode` and `splitLayout`: generic per-window context keys, next to the panel keys, for how a window shows its chat and its editor parts. They are bound in a window's own context and unset elsewhere, so that the Layout menu's entries stay extensible and keybindings can test the mode. `bindWindowLayoutContext` binds them to a window's state. - `IChatWindowService` and `IChatWindowProvider`: a chat window shows a chat in its chat part beside its main part. The provider supplies the content (the chat's editor, title and scoped services), the chrome (title row and strip), the look (gap, cards, chat background) and where a chat goes back to. There are no chat window kinds. - `ChatWindowState`: the layout rules of chat windows (Stacked / Side by Side / Editor Only / Chat Only, the next split arrangement, input-only, terminal position), what chat windows were last left as, and what is remembered per chat. It reads the keys chat windows of the Agents window stored them under. - the opening helpers (one opening per chat at a time, clean up on failure) and the serialization of a main part's editors for restore. The layout model (`chatWindowLayout.ts`) gains the split layout type and guards for stored values. Nothing registers a provider or the service yet, so nothing changes. Co-authored-by: Copilot <[email protected]> * chat windows: layout commands on the generic window layout keys The layout commands of chat windows (P9), in the workbench: Show Chat Only, Show Editor Only, Show Chat and Editor Stacked / Side by Side, Show Chat, Show Editor, Stacked and Toggle Chat Conversation, with the rules chat windows of the Agents window have (the last part shown cannot be hidden; Stacked changes the arrangement while both show, else only how both show next). Changing the layout is announced to screen readers. - Their checked state reads the generic `layoutMode` and `splitLayout` keys. - They apply where a window has layout modes (`layoutMode` is set), in the Agents window (`IsSessionsWindowContext`) while AI features are enabled. - They act on the chat window that has focus (`IChatWindowService.activeWindow`) instead of on a window handle passed by the toolbar that runs them. The Agents window loads the contribution; regular VS Code does not. The menus and buttons that show these commands come with the Agents provider. Co-authored-by: Copilot <[email protected]> * chat windows: restore the chat windows open when the window last closed The restore rules of chat windows of the Agents window (P9), driven by the chat window provider: - the chat windows open when the window last closed open again, without focus, with the editors of their main part and their terminals, once the provider registers and while it restores (`restoreEnabled`), such as while chat windows are enabled and AI features are not hidden; - until then, and while restoring is pending, the stored ones are kept; - a chat that is gone is not restored (`canRestore`), and a removed chat is forgotten at once, before the next save (`onDidRemoveChats`). The storage key and format are those chat windows of the Agents window always used. Their entries named the session, and its chat only when it was not the main one; the provider resolves a session to its main chat, so the windows open before chat windows were built on parts open again. Co-authored-by: Copilot <[email protected]> * chat windows: the chat window service and its window, on content parts `ChatWindowService` opens a chat window for a chat through the registered provider (P9): - one window per chat: opening a chat that shows, also as the chat the provider resolves it to, reveals its window; one opening per chat at a time; a failed opening takes down what it set up; - the window is an auxiliary window with its own context, scoped to its document body, where the generic `layoutMode`/`splitLayout` keys and `mainEditorAreaVisible` are bound; - two content parts: the main part, created first so it is the window's main part, starting with the editors moved from the main window or restored, and the chat part, showing the chat's editor from the provider. Both take the window's context and the provider's services; - Move to Main Window closes the window and hands the chat and the editors of its main part to the provider; - the stored chat windows are restored once the provider registers. `ChatWindow` follows today's rules: its main part shows when an editor opens in it and the window shows only its chat once its last editor closes (not for a move, nor while it closes or unloads); closing the chat's editor, the end of its chat, or closing it closes the window, the chat part first so the chat's editor does not move to the main window; a main part editor that cannot move keeps the window open; focus goes to the chat while it shows, else the main part. `ChatWindowPartsLayout` places the two parts per layout mode from the chat window layout model until the window part grid of the workbench takes over. The service registers in the Agents window only; without a provider nothing opens. Co-authored-by: Copilot <[email protected]> * sessions: chrome hosts for windows of their own The sessions chrome that a chat window shows outside its chat, carried from the chat windows work without its chat-window keys and handles: - the session header can show in a host outside its session view, such as the title bar of its window (SessionView.setHeaderHost, headerShown), as the window's top row; the title bar hosts it in place of its title, with the header's actions last at its right (getSessionHeaderHost, getSessionHeaderActionsHost, setHostsSessionHeader), and can show a fixed title or height; - the Session Activity Bar can show in a host outside its chat, such as a column of its own (registerSessionActivityBarExternalHost), also while its chat is hidden (partVisible on the chat groups); - the items of a submenu flyout run with the context of their entry; - the title bars of other windows show the Layout menu of their window (Menus.TitleBarWindowLayout), whose buttons the user shows and hides with the toolbar's own hide/show state, in place of the promoted-button keys; it is empty in windows without layout modes; - in a window with layout modes (the generic `layoutMode` key is set), a checked entry of the strip's side panel group hides the window's editor parts, in place of the main window's side panel; - the title bar of an editor window reads no session's keys. Co-authored-by: Copilot <[email protected]> * chat windows: the provider's title row and strip, and the chat's size, in the window The chrome facet now reaches the window: a provider renders its title row and its strip into elements of the window that the window places, with an instantiation service that has the window's services (its content's, and the window's context), and tells the room they take (`size`). The interim placement of the parts lays them out with the chat window layout model: - the title row is above the chat while the main part is beside it (Side by Side), else across the window; - the strip is a column of its own at the right while the chat is below the main part or hidden (Stacked, Editor Only), as the layout model's column placement says; - the chat part's maximum height bounds it, such as a chat that shows only its input, and the main part takes the rest; parts share the room as the chat windows did, the main part wider and taller than the chat, in whole pixels. Interim: the window part grid replaces this placement. Co-authored-by: Copilot <[email protected]> * sessions: the chat of a session as a view editor Registers the view editor `sessions.chat`, which the chat part of a chat window shows: a session view of the window's session, configured as the chat windows showed their chat (its session header, its Session Activity Bar and its pills, the default input placeholder). It brings its own title, so its group shows no tabs. Whoever opens its editor gives it what it shows (registerSessionChatViewHost): the window session, the chat window, and where the session header shows (the window's title row). - the view's size constraints are the chat's: 280 by 120 at least, and, while the window stacks the chat below its main part and the chat shows only its input, at most its input's height, which its part and the window respect (input only, carried from the chat window's input-only controller onto the view's constraints); - the chat follows the window's input-only state, and what the user chooses in the chat is kept for the window, but not the conversation the chat shows while its input cannot show what it needs; - its view is hidden while the window shows only its main part; - the active editor its menus read is the one of the window's main part, as the main window's chat reads the one of its editor area, so that the Session Activity Bar's entries show checked. Co-authored-by: Copilot <[email protected]> * chat windows: bind the window's content, and the look of its main part What the Agents provider needs of the window, kept generic: - `IChatWindowContent.bind(window, instantiationService)`: called once the window's services exist, before its parts show anything, such as to show the session of the window and bind its keys on the window's context; - the look facet's options of the main part: part options that override the user's settings there (`mainPartOptions`, enforced live) and the options of its groups (`mainPartGroupViewOptions`), such as the menus and modern tabs of the main window's editor area; - a content part takes the options of its groups at creation (`groupViewOptions`, an ordinary option any part can use); - a chat window is an auxiliary window: its context sets `isAuxiliaryWindow`, so that what applies to the main window only, such as its panel and side panel toggles, does not apply there. Carries the chat window's test for moving the main window's editors into a chat window. Co-authored-by: Copilot <[email protected]> * sessions: the Agents provider of chat windows Registers the provider of chat windows for the Agents window (SessionsChatWindowProvider), on the chat window seam of the workbench: - content: a session or a chat resolves to the chat the window shows (the one asked for, else the one the session shows in the grid, else its main chat), shown as the `sessions.chat` view editor; once the window exists the session shows in it as a window session (showSessionInWindow), with its loaded chat model held across the move (ChatModelHold); the window acts on that session (ISessionScope) and binds its keys on the window's context (session keys, including sessionHasWorkspace and isQuickChatSession, hasWorktreeAndRepository, isAgentHostSession); the session view registers as the window's session view, which focuses its window and its chat; a focused window activates its session; the title is the chat's, or the session's; the window ends when its chat is deleted or archived, follows a replaced session, and stops showing its session as it closes; - chrome: the title bar as the window's title row, which shows the session header in place of the chat's title, with its actions centered above the Session Activity Bar's column (only with a custom title bar); and the column the Session Activity Bar shows in while the chat is below the main part or hidden; - look: the gap between cards per density (none in compact), cards, the chat background behind the chat (SessionsChatSurface), and the main part as the main window's editor area: its menus and modern tabs, `showTabs: none` as one tab, no group sizing on a double click; - move to the main window: the chat or session opens there again with the window's editors once the main window is laid out for it; - restore: after the main window restored, a chat restores while its session loads within 30s and the chat is not gone; only while `sessions.chatWindows.enabled` is on and AI features show; the chats of removed sessions are forgotten. The editor parts of other windows show whether the main window's editor part shows or not. Co-authored-by: Copilot <[email protected]> * sessions: entry points of chat windows, behind sessions.chatWindows.enabled Registers `sessions.chatWindows.enabled` (experimental, off by default), which gates the entry points only: - Open in New Window on a session (sessions list, session header) and on a chat of the sessions list, and Open Chat in New Window (Command Palette); the chat takes the main window's editors along only while the main window shows that chat; - Move to Main Window in the session header of a chat window and the Command Palette; - the accessibility help of the Agents chat describes chat windows while the setting is on. In windows with layout modes (the generic `layoutMode` key is set), without chat-window keys: - the Layout menu (Show Chat, Show Editor, Stacked, checked on the generic keys) and the buttons of its actions, in the title bar, or in the Session Activity Bar while the strip shows the layout actions; the user shows and hides the buttons with the toolbar's own hide/show state, Show Editor showing by default, in place of the promoted-button keys; - the Changes, Files and Browser entries of the Session Activity Bar and of Add Tab open in the main part of the window that has focus, checked while it shows them; Changes and Files need a session with a workspace; - an empty main part has one close button, which shows only the chat; the main window's Close Editor Area stays out of these windows; - Run and Open in VS Code show in the title bar of a window that shows a session with a workspace, as in the main window. Co-authored-by: Copilot <[email protected]> * sessions: banners and agent feedback show the session of their window Carried from the chat windows work, on the session scope a chat window gives its parts: - the pull request and agent comment banners above a chat's input read the session of their window (ISessionScope): a chat window's own session, and in the main window its session (mainWindowActiveSession), which is the active session whenever no chat window has focus; - agent feedback in the editors of a part other than the main one, such as a chat window's main part, belongs to the session of that part's window whichever session is active; not for floating editor windows, which have the main window's session scope. Co-authored-by: Copilot <[email protected]> * chat windows: on the part grid A chat window lays out its cells on the workbench's part grid instead of the interim placement: - `ChatWindowGrid` arranges the title row, the chat part, the main part and the strip for the layout mode, as chat windows always did: side by side and chat only with the title row above the chat's column and the main part running to the top of the window; stacked and editor only with the title row across the window and the strip in a column of its own at the right. The part a mode hides stays in the grid; the grid hides a part with no editors. - The parts open with the shares they always had (the main part wider and taller than the chat); the title row and the strip are as large as their chrome says. Sashes let the user size the parts, and the sizes are kept per arrangement, so that a mode shows with the sizes it had, and per chat across reloads (the chat sizes storage chat windows always used). - The look facet's `className` replaces `cards`: the Agents provider styles the cards of the grid (`--part-grid-card-*`) as the main window's, with the main part's card on the editor background and none in compact density; the gap is the floating-panel gap, 0 in compact density. Co-authored-by: Copilot <[email protected]> * chat windows: the part that holds a window's terminals A chat window gets a part that holds its terminals, in its part grid, and the generic per-window keys that describe it: - `terminalsVisible` and `terminalsPosition` (workbench/common/contextkeys.ts, next to `layoutMode` and `splitLayout`): whether the window shows the part that holds its terminals, and where that part sits ('underChat', 'underEditor', 'fullWidth'). They are bound on the window's own context by the window shell, and unset in windows without such a part. - `IChatWindow.getOrCreateTerminalsPart()` creates the part the first time, as a cell of the window's part grid at the terminal position: below the chat, below the main part, or across the bottom of the window; across the bottom of the chat and the main part while stacked (the strip runs past it), and below the strip in editor only. Like every part, it hides while it has no editors; `terminalsVisible` follows the cell. What it shows is what the feature that shows terminals opens in it. - `IChatWindow.setTerminalPosition()` moves the part's cell in the grid (`PartGrid.moveCell`), keeping its height; changing the layout mode rebuilds the grid with the part where the topology puts it. - The terminals keep their height as the window is resized: the other parts take what it grows or shrinks by. Tall terminals give way first in an arrangement they did not show in yet, so that the chat and the main part keep their heights. The terminals' sizes are remembered per arrangement and across them, with the window's other sizes. - `IChatWindow.onWillClose` fires as the window closes (once its chat and main parts closed) or as its window unloads, before the part that holds its terminals closes, so that terminals can leave the window still running. - The part takes the look's main part options (tabs as in the main part). - Restoring: a window stores whether it showed its terminals, and opening it with `showTerminals` creates the part for the terminals feature to fill. Co-authored-by: Copilot <[email protected]> * sessions: terminals in chat windows, in the part that holds them The sessions terminals open the terminal of a chat window's session into the part of the window that holds its terminals (ChatWindowTerminals, created by ChatWindowTerminalsContribution), rather than through a terminal host that the window calls: - Shown, a window shows the terminals it showed, else a terminal of its session that no other chat window shows, else a new one in the session's working directory. The terminal is created at the view column of the window's part, directly in the window, so that nothing flashes in the main window, and is not moved again. - The panel leaves a terminal to the chat window while it shows there (SessionsTerminalContribution.setShownInChatWindow): it is neither made visible nor the panel's active terminal for the session. - Hidden, the window's terminals go back to the background of the panel, still running, so that the part that holds them is empty and hides; focus in them stays in the window. Closing their last terminal hides the part too, and a move does not: both are the part grid's rule for a part without editors. As the window closes (`IChatWindow.onWillClose`) its terminals are released the same way, back to their session. - New Terminal or Split in the part makes the new terminal the window's; a terminal opened in the window's main part moves to the part that holds the terminals; a terminal handed to a window, such as the terminal of a task, shows beside the others. - A window restored with its terminals shows them again: the window creates the part that holds them as it opens, and the terminals fill it. - A file opened from a terminal opens in the main part of the window it is opened from (TerminalLocalFileLinkOpener): when the active group is in another part of its window than the window's main part, such as the part that holds a chat window's terminals, the file goes to the window's main part. Elsewhere, including the modal editor part, nothing changes. - `IChatWindow.terminalsPart` is an `IContentPart`, which has its element. Co-authored-by: Copilot <[email protected]> * sessions: the terminal commands of chat windows The commands of a chat window's terminals, in the Agents window, while AI features are enabled and in a window with layout modes, on generic keys only (`IsSessionsWindowContext`, `chat.enabled`, `layoutMode`, `terminalsVisible`, `terminalsPosition`, `activeEditor`): - Toggle Terminal in Chat Window (workbench.action.chatWindow.toggleTerminal) with the panel and terminal keys (Cmd+J, Ctrl+`), above the main window's rules for them wherever the focus is in the chat window, and never sent to the shell (terminal skip-list). Checked by `terminalsVisible`. It is the Terminal entry of the Session Activity Bar of a chat window. - The Terminal entry of Add Tab (workbench.action.chatWindow.addTerminal): adds a terminal to the terminals that show one, else shows them. - Terminal Position (Full Width, Under Editor, Under Chat) in the More Actions of the terminals and in the context menu of their tabs, recognized by the active editor of the group, a terminal; checked by `terminalsPosition`; unavailable while Stacked. - Toggle Editor in Chat Window (workbench.action.chatWindow.toggleEditorByKey) with the side panel key (Cmd+Alt+B): hides the main part, leaving the chat, and shows it again as it showed with the chat; also skipped by the shell. The commands act on the window of the editor group they are invoked from, such as the terminals' title, else on the chat window that has focus (`resolveChatWindow`). The terminals of chat windows are a service of the Agents window (IChatWindowTerminalsService), which the commands use and a contribution creates at startup, so that restored windows show their terminals again. Co-authored-by: Copilot <[email protected]> * sessions: the Changes editor is the same in every window The Changes editor of a chat window, which shows in the window's main part, now offers what the main window's offers and acts on the session of its window: - Its actions are in the "…" of its tab row in every window. Its title actions read MainEditorAreaVisibleContext as each part binds it (the main window for its editor area, a chat window for its main part) in place of excluding auxiliary windows; the Create Pull Request bar shows by the existing per-window keys (IsSessionsWindowContext, !CustomViewVisible, DesktopLayout, SessionIsCreated). - Each changeset operation is registered once, with the command ids of the main window, while any scope shows it. Two generic per-scope keys, sessions.changesetOperations and sessions.changesetOperationsEnabled, bound through registerSessionActionContextKeyBinder for every scope that shows a session's Changes, decide where it shows and whether it is enabled. Its run resolves the session from the Changes editor it is invoked from: the file toolbar passes { session, editor }, the title passes its editor context. Open File, Expand/Collapse Unchanged Regions, Mark as Viewed and Collapse/Expand All Diffs act on that editor too. - The chat window's provider binds the keys of the session it shows, and of its changes, on the window's context with bindSessionScopeContextKeys, as the main window binds those of its own session; no chat window contribution or key is involved. - A Changes tab is closable while the part that shows it is visible: the main window's editor area for its part, MainEditorAreaVisibleContext of the part otherwise. - Opening the Changes editor of a chat with a changeset selection finds the session of the window that shows that chat (findSessionByChatOrResource). Carried from #344666 (CW2 version), without its ChatWindowChangesetActionsContribution and chat window keys. Co-authored-by: Copilot <[email protected]> * chat windows: type fixes in tests of terminals and Changes The tests of chat window terminals, of the Changes editor input and of the Agent Merge actions typecheck: an explicit type for a self-referencing parts list, the changeset operations the session observables now carry, and a generic invokeFunction in a test stub. Co-authored-by: Copilot <[email protected]> * chat windows: the part fakes of grid tests can be shown and hidden The part grid now tells a content part whether it shows (IContentPart.setVisible); the fake parts of the chat window grid tests take it. Co-authored-by: Copilot <[email protected]> * chat windows: keep the main window's outer insets to the window edges The cards of a chat window ran to the edges of its window (feedback on 491817); the main Agents window keeps a gap between its cards and the window edges. The look facet gains `outerInsets`, which the window's grid keeps to the edges of the window, also as it changes its arrangement; its cells share what is inside them. The Agents provider keeps the floating-panel gap to the right, bottom and left edges, none in compact density, and none at the top, where the title row is, as the main window's title bar is. Co-authored-by: Copilot <[email protected]> * chat windows: the main window's editors move in before the chat leaves the main window Open in New Window did not bring the editors the main window showed for the chat: binding the window's content shows the chat's session in the chat window, which takes it out of the main window together with the editors the main window showed for it, before they moved. They now move into the window's main part first, as chat windows always did. Co-authored-by: Copilot <[email protected]> * sessions: the session header leaves its window's title row with its chat view A chat moved between groups showed the session header twice in the title row of its window: the view editor creates a new view for the chat where it moves to, and the old view's header stayed in the title row after the view went away. A session chat view now takes its header out of the host it shows in when it is disposed. Co-authored-by: Copilot <[email protected]> * sessions: Run and Open in Editor follow the main window's rule in every Agents window The title bar's Run and Open in Editor showed in a chat window only while its session had a workspace and was not a quick chat (SessionTitleBarActionsShownContext). They now follow the main window's rule everywhere (user decision): no workspace check. Their expressions keep the main window's `!isAuxiliaryWindow` and add the generic `layoutMode` window key, set in windows with layout modes, so that they show in the main window and in chat windows, and not in editor windows, which have no session. No key exists that is true exactly in windows with a session, and none is added. SessionTitleBarActionsShownContext is removed. Intended difference from 491817: Run and Open in Editor show in a chat window also for a session without a workspace or a quick chat, as in the main window. Co-authored-by: Copilot <[email protected]> * sessions: a chat keeps where it is scrolled to when its editor moves When the chat editor of a chat window moves, such as to another group, the view editor creates a view for it where it moves to, which shows the chat as it was last saved; the old view saved it only when disposed, after the new one loaded. The session chat view now saves what its chat shows when its pane asks, before the editor leaves it (IViewEditorView.saveViewState): chat views can save their view state (AbstractChatView.saveViewState), which the sessions chat view does as it does when disposed. The input's draft lives on the chat's model, which both views share. Co-authored-by: Copilot <[email protected]> * chat windows: a chat editor moved out of its window takes the chat out of it A chat's editor moved into another window, such as dragged into the main window's editor area or moved into a new window, stayed there as a plain view editor, and its chat window only followed the groups its chat part had when it opened. The chat window now follows the chat's editor in every group of its chat part, also those added later, such as when the part splits, and closes when it closes there. When the editor moves out of the window, the editor closes where it moved to and the chat follows the user decision: into the main window, it moves to the main window as Move to Main Window does; into another window, it shows in a chat window of its own again. Co-authored-by: Copilot <[email protected]> * chat windows: close the window once the chat's editor closed Cmd+W in the chat of a chat window closes the chat's editor, which closes the window. The window closed its parts while the chat part's group was still closing the editor, so the editor close continued on a closed part: an error notification showed in the main window and the extension host received editor tabs without an active group. The window now closes once the editor closed. Co-authored-by: Copilot <[email protected]> * sessions: chat window tests follow the Run rule and the strip's Terminal entry The editor area test expected Run and Open in VS Code in chat windows only for sessions with a workspace; they follow the main window's rule in every chat window now. The contribution test picked the strip's layout entries by a prefix that the Terminal entry of the strip also has. Co-authored-by: Copilot <[email protected]> * chatWindow: title row and chat are one card side by side and in chat only Side by side and in chat only, the title row is the header of the chat's card, in the chat's cell of the grid, as in today's chat window: no card edge between the title and the chat. Stacked and in editor only, it stays a row of its own across the window. Co-authored-by: Copilot <[email protected]> * sessions: chat window title row as tall as the main part's row of tabs The title row takes the height of the row of tabs of the window's main part, its card's frame included, in every layout: while the main part does not show, the height it last showed. Co-authored-by: Copilot <[email protected]> * sessions: chat window title row across the window with the chats as tabs With the chats of the session as tabs, which replace the session header, the title row of a chat window is a row across the window, as the main window's title bar is, side by side and in chat only too; with a single chat it is the header of the chat's card again. The title row says so with the generic headsChat of a chrome element. Co-authored-by: Copilot <[email protected]> * chat windows: one title row at a time, the window's across the top or the chat view's own, as tall as the row of tabs A chat window has two places for its title, and shows one at a time. The title bar part is a row across the top of the window, which shows and hides as a cell of its grid: stacked, in editor only, and with the chats of the session as tabs. With a single chat, side by side and in chat only, the chat view shows its own title row at the top of the chat's card instead, one surface with the chat. Both are as tall as the row of tabs of an editor part, from the first frame and in every layout, rather than measured from the main part. The classes of the window go on its own element, as those of the container of an auxiliary window follow the main window's, and the window lays out again once its styles have loaded. This replaces the title row in the chat's cell and the measured height of the previous commits. Co-authored-by: Copilot <[email protected]> * sessions: chat windows look as they did The chat view is styled as the session views of the Agents window are (sessions-window-host). The cards draw the frames of the parts in them, the chat's card is the chat's surface, and the group of the part that holds the chat draws no frame of its own. The cards keep no gap to the edges of the window. The native title bar of a chat window shows its layout actions, and windows with layout modes show no Always on Top. Co-authored-by: Copilot <[email protected]> * chat windows: frames, gaps, strip and title rows as before The main part shows without editors, as it did. The title row of the window keeps no gap to the cards below it. The chat view's own title reaches over the gap beside the chat's card, so that its actions are where they were. The groups of the main part draw their frames, and the session view the chat's, but while the chat shows its own title row, which the chat's card frames with it. The strip's column holds the gap beside it. Co-authored-by: Copilot <[email protected]> * editor: no Lock Group or Close Group in the empty groups of windows with layout modes An empty group of an auxiliary window offers to lock or close it, which closes an editor window: a window with layout modes, such as a chat window, shows more than its editors, and its empty groups offer neither, as before. Co-authored-by: Copilot <[email protected]> * chat windows: close with the workbench, such as as it reloads A chat window closes as the workbench shuts down, after the windows to restore were saved, as editor windows do: reloading left the window open beside the one that restored. Co-authored-by: Copilot <[email protected]> * chat windows: the main window's padding, the window controls in the title row The cards keep the gaps of the main window's to the edges of the window, but at its top, where the title row is, as the user asked, rather than none as before: the chat leaves its frame to the session view in its card, or, while it shows its own title row, frames both, so that the frames are where the main window's are. The chat's own title row reaches to the edges of the window, under its window controls, and only the title row that shows places them: one laid out without height while it is hidden moved them to the top edge of the window. Its negative top margin no longer moves the chat with it. Co-authored-by: Copilot <[email protected]> * sessions: Terminal Position in the menus of the terminals of a chat window The menus of an editor group read the id of its active editor pane, which for a terminal is the terminal editor's, not the id of its input: Terminal Position never showed. Co-authored-by: Copilot <[email protected]> * sessions: the terminals of a chat window line up with its other cards The groups of the terminals draw their frames with connected tabs, as the main part's do: their card leaves its frame to them, so that it is as wide as the cards beside it. Co-authored-by: Copilot <[email protected]> * terminal: recreate the WebGL renderer once a terminal shows in another window The canvas of the WebGL renderer loses its context in another window than the one it was created in, without the renderer falling back: a terminal that moved to an auxiliary window, such as one restored into a chat window, showed a lost canvas. Attaching the terminal to a container in another window recreates the renderer there. Co-authored-by: Copilot <[email protected]> * sessions: the terminals of a chat window framed as the main window's panel The terminals' card draws its frame at its edges, as the main window's panel does, rather than the groups of the terminals inside it: their frame was missing at the edges of the window and doubled at its sides. Co-authored-by: Copilot <[email protected]> * sessions: disable hiding the part that shows alone in the chat window Layout menu The Layout menu entries are menu items of their own, which don't carry the preconditions of the actions: Show Chat stayed enabled in Chat Only and Show Editor in Editor Only. Give them the same preconditions, as 491817 does. Co-authored-by: Copilot <[email protected]> * sessions: window-scoped actions act on the chat window's session A chat window's session became the active session only once focus moved into its session view, so its title row actions (Open in VS Code, the Run dropdown) and its tab entries acted on the main window's session. Its session now becomes the active session as its window gains focus, without moving focus, and those actions take the session from the window's own session scope. Co-authored-by: Copilot <[email protected]> * sessions: no New Session title bar button in chat windows The button stands in for the main window's sessions list while it is hidden, and a chat window inherited the main window's sideBarVisible key, so it showed in a chat window's title too. It now shows in the main window only. Co-authored-by: Copilot <[email protected]> * chat windows: no lock action in the title of the part that holds the terminals Terminal groups lock as terminals open in them, which keeps other editors out of the part that holds a chat window's terminals, but its title then offered Unlock Group, which the main window's panel does not. A generic editor group view option, hideLockActions, hides the lock and unlock actions of the groups of a part; the terminals part uses it. Co-authored-by: Copilot <[email protected]> * chat windows: keep the editors and terminals of a chat window whose chat moved to another window As the chat's editor moved out of a chat window into another window than the main window, the window closed and the chat opened in a new chat window without the editors of its main part and its terminals. They now show there again. Co-authored-by: Copilot <[email protected]> * sessions: no second Changes tab in a chat window A Changes editor that moved into a chat window with its chat, or that a restart restored, is the Changes editor of the session rather than of the chat, so the Changes entry did not find it and opened another. It now activates any Changes tab of the window's session. Co-authored-by: Copilot <[email protected]> * sessions: a chat window no longer sets the title of the main window The title bar of a chat window set the document title of the window it was in, and the title row of the chat view is created before it is in its window, so it set the main window's title to the chat's, where it stayed. The title of a window is now its owner's: the chat window service sets it for its window. Co-authored-by: Copilot <[email protected]> * sessions: a title bar looks active while the window it is in is active A title bar took the window to follow for its active look as it was created, so the title row of a chat view, created before it is in its chat window, followed the main window: it looked inactive in a focused chat window. It now follows the window it is in as the active window changes. Co-authored-by: Copilot <[email protected]> * chat windows: pin closing the editor area with the terminals under the editor Close Editor Area shows only the chat. With the terminals under the editor they stay, across the window and as tall, rather than going away with the main part, and go back under the editor as it shows again. Co-authored-by: Copilot <[email protected]> * chat windows: the first open of a chat with no editor to bring along shows only the chat As 491817 does: a chat that shows in a chat window for the first time, with no editor in its main part, opens in Chat Only rather than with an empty main part, without changing what is remembered, so that a mode the user chooses for the chat shows again. Also pins that an editor dropped beside the chat, which splits the chat part and empties the main part, changes no mode. Co-authored-by: Copilot <[email protected]> * chat windows: keep the sizes of the parts across mode round trips and part moves - The terminals moved between arrangements take their height once the cells beside them show: resized while the main part was still hidden, it took a share of their height as it showed (200 -> 270 after Chat Only and back). - Sizes are remembered for an arrangement only while the part grid still shows it as the window arranged it: after a part moved, such as with Move Part, the chat across the window was remembered as its width side by side, and the main part came back at its minimum. Co-authored-by: Copilot <[email protected]> * chat windows: pin the widths of the chat and the main part over QA's second split sequence Terminal position walk, terminals hidden and shown, Chat Only and back, a resize and a change of density keep the chat at the width the user gave it. Co-authored-by: Copilot <[email protected]> * chat windows: Side by Side never comes back with the side part at its minimum Chat Only and Side by Side share an arrangement, but in Chat Only the chat takes the room of the hidden side part: its full width, saved as the window saved its state, was remembered for Side by Side, and the side part came back at its minimum. - Sizes are remembered per arrangement and per part it hides, and before every change of mode, so that the split the user had is saved before a part move. - A remembered size that leaves the other parts less than their minimum, such as one stored by earlier builds, gives way to the default share. Co-authored-by: Copilot <[email protected]> * chat windows: the terminals keep the height the user gave them in every mode The terminals drifted taller across mode round trips (199 -> 286 -> 232 -> 265): - the title row took no room as soon as it hid, before the grid arranged the mode, and its room went to the terminals, which was then remembered; - the height remembered per arrangement won over the one the user last gave; - a rebuilt grid gave the room of a hidden title row to the terminals. The title row now shows and hides only with the grid, the user's last height applies in every mode, and the terminals take it once the cells show or hide. Co-authored-by: Copilot <[email protected]> * sessions: a chat view that disposes creates no title row Closing a chat window logged 'InstantiationService has been disposed': as the view disposed, its window changed, and the derived of its own title row ran again, creating a title bar part with the services the view had disposed. Co-authored-by: Copilot <[email protected]> * chat windows: the split and the terminals come back as they were after a restart A restored chat window shows without its terminals until they are restored: the arrangement without them had no sizes remembered, so the chat and the main part took their default shares, and the terminals, which join empty, showed at a size of their own. The sizes of the chat and the main part are also remembered for the arrangement without the terminals, and the terminals take their height when their first terminal shows. Pins QA's second INFO-2 walk through every mode. Co-authored-by: Copilot <[email protected]> * chat windows: a change of density restores the exact gaps and insets of the cards - The gap was not followed: read behind the grid, which did not exist yet as it was first read, so a change of density changed it only once the grid rebuilt. - The cards read the frames their insets leave room for as the gap changes, maybe before the styles of the new density apply: the grid lays out again on the next frame, so that a density round trip gives the cards their exact size back (QA: 476/714 -> 475/713 after compact and back). Co-authored-by: Copilot <[email protected]> * chat windows: the terminals keep the user's height when the chat changes size with the mode QA (Beta): terminals sized 199, then Stacked 286, Side by Side 286, Editor Only 72. While stacked the chat shows only its input, as tall as it exactly, and its size changes before the grid arranges the new mode: the row of the old mode was squeezed, the terminals took the room, and that was remembered as the height the user gave them; then, taller than their share, they gave way in Editor Only. - What shows is remembered as soon as what arranges it changes, before anything reacts to the change. - The main part takes the rest of a column or a row, not the chat, which may be only as tall as its input. Co-authored-by: Copilot <[email protected]> * sessions: read the app region of the title bar only where the browser computes it The browser runner of the Insider build failed the test of a click on a hosted session header: a headless browser may not compute -webkit-app-region, as Electron does. What a click reaches is still checked everywhere. Co-authored-by: Copilot <[email protected]> * chat windows: remember only the sizes the user gives the parts The window remembered the sizes its cells showed with as the mode changed, as it saved its state, or as it went: sizes the grid had forced, such as the least width of a chat part that holds an editor, or the terminals as a mode showed, came back as the user's (QA: terminals dragged to 199 came back 286, then 72; a forced 502/688 split stayed after the editor left the chat part). - Sizes are remembered only when the user drags or resets a sash: of the cells it changed, the terminals' height for every mode, the chat's and the main part's for the arrangement. - The terminals take the height the user last gave them, else their share of the window, in every mode. Co-authored-by: Copilot <[email protected]> * chat windows: the strip's entries act on the window they are in, at the first click The Session Activity Bar ran its entries without naming its window, so the chat window commands they run, such as Terminal, the tabs and the layout, acted on the window that has focus. A click in a chat window that does not have focus yet runs before it does: the first click acted on no window, or another, and only the second one on the window. In a window with layout modes the strip now runs its entries with the window it is in, and those commands act on the window named. Co-authored-by: Copilot <[email protected]> * sessions: a canvas opened from a chat window opens in that window While the active group was outside the main window, a canvas opened in the main part of the main window, as for a canvas opened from an auxiliary window. Opened from a chat window, which shows its own editors, it now opens in the main part of that chat window: in the group that has it already, else in the active group. Co-authored-by: Copilot <[email protected]> * chat pills: the dropdown of a pill shows in the window of the pill The dropdown of a pill, such as the References or Pull Requests pill of a chat, showed in the window that had focus. For a pill of a chat window that is not focused yet, that was another window: an entry picked there acted from that window, so a pull request opened in the main window. It now shows in the window of the pill. Co-authored-by: Copilot <[email protected]> * chat windows: sizes stored by earlier builds are not read Earlier builds stored the sizes the parts showed with, including those the window forced them to, such as terminals squeezed to 123: they came back as the user's. The sizes the user gives the parts are now stored under a key of their own, and those of the old key are removed, so that the parts take their defaults once. Co-authored-by: Copilot <[email protected]> * sessions: no agent feedback overlay on the chat of a chat window The navigation of the session's feedback (1/4) showed over the chat input of a chat window: in a window that shows a session of its own, every resource maps to that session, also that of the chat, a view shown as an editor. An editor that shows no file, such as a view, has no feedback overlay, as the chat of the main window has none. Co-authored-by: Copilot <[email protected]> * sessions: opening a chat in a window keeps the main window's side pane The editors of the main window moving to the chat window emptied its editor part, which the Agents layout took for the user closing them, and closed the side pane: it stayed closed for every session the main window showed next, until the chat window closed. While they move, the editor part's automatic visibility is suppressed, as it is when the main window switches sessions. Co-authored-by: Copilot <[email protected]> * sessions: type the editor part of the side pane test of chat windows Co-authored-by: Copilot <[email protected]> * sessions: a title row of a chat window gives up the traffic-light inset in full screen A title bar followed the full screen state of the window it was created in: the title rows of a chat window, created before they are in it, followed the main window, and kept the room of the traffic lights while the chat window was in full screen. It now follows the window it is in, as it moves there and as it is laid out. Co-authored-by: Copilot <[email protected]> * canvases: a chat window shows the canvases of its own chat Opening a canvas in a chat window failed: a canvas editor, and moving a canvas, accepted only groups of the main window. A canvas context service may now present canvases of an owner in groups outside the main window, and keep them presented outside the main window's working sets; the Agents one does so for a chat window and the chat it shows. Other windows keep the main-window-only rule. Co-authored-by: Copilot <[email protected]> * sessions: the Changes editor of a chat window shows the changed files list The changed files list of the Changes editor shows where its host enables it: a chat window enables it on its context, which all its parts inherit, so its Changes editor shows the list wherever it shows; the main window does not. Co-authored-by: Copilot <[email protected]> * chat windows: the tab rows at the top of a chat window move the window In a chat window, the empty space of the tab row of a part at the top of the window moves the window, as the window's title row does: its tabs, actions and other controls keep their clicks and drags, and while something is dragged the row takes the drop. The part grid marks the cells at its top edge, and the groups at the top of their parts there, as the parts move, split, show and hide. Co-authored-by: Copilot <[email protected]> * chat windows: Developer: Reset Chat Window Layout Lays out the chat window it runs in as it first opens: it forgets the layout and sizes remembered for its chat, the sizes the user gave its parts and the parts moved in it, and shows only the chat while its main part has no editors, else the chat and the editor side by side at their default shares. Other chat windows and the main window keep theirs. Co-authored-by: Copilot <[email protected]> * chat windows: Reset Chat Window Layout also puts the terminals across the window Where the terminals of a chat window show is part of its layout: the reset shows them across the window, as chat windows do until the user chooses, without changing where those of other chat windows show. Co-authored-by: Copilot <[email protected]> * chat windows: a layout command moves the chat back into the chat part first A chat dropped onto the middle of another part of its window shows as a tab of that part, and its chat part hides as empty. A layout command shows the parts of the window as the chat part showing the chat: it moves the chat's editor back into the chat part first, so that the chat never hides with the part it is in. The main part showing as an editor opens in it moves nothing. Co-authored-by: Copilot <[email protected]> * sessions: the Changes editor of a chat window shows its actions in the header row too The main part of a chat window takes the header row's secondary menu of the main window's editor area, where the Changes editor shows Run Code Review, its More Actions and Toggle Files, as the main window does. Co-authored-by: Copilot <[email protected]> * chat windows: the chat's editor merged into another part still closes or moves the window out Co-authored-by: Copilot <[email protected]> * fixup! chat windows: the tab rows at the top of a chat window move the window A double-click on the empty space of a tab row at the top edge of a chat window does what one on the title bar does (restores INativeHostService.handleTitleDoubleClick) instead of opening an untitled editor. Co-authored-by: Copilot <[email protected]> * fixup! canvases: a chat window shows the canvases of its own chat The owner of a canvas a chat window shows is visible and has a context whichever window has focus; the main window's canvases follow the main window's session rather than the focused window's. Co-authored-by: Copilot <[email protected]> * integration: stub the session scope, chat resource and layout service in main's newer tests Co-authored-by: Copilot <[email protected]> * fixup! sessions: a title row of a chat window gives up the traffic-light inset in full screen An auxiliary window in full screen below the camera notch of its display is less tall than its screen: it counts as full screen while it spans the width of its screen. Co-authored-by: Copilot <[email protected]> * fixup! chat windows: the main window's padding, the window controls in the title row The tab row at the top right of a chat window keeps the room of the window controls that float above it beside the chat's own title (Windows, Linux), by new generic part grid markers for the right edge. Co-authored-by: Copilot <[email protected]> * fixup! sessions: the terminal commands of chat windows The side panel's command toggles the editor of the chat window it runs in, whatever key the user binds to it, instead of a separate command with a copy of its default key. Co-authored-by: Copilot <[email protected]> * fixup! sessions: the chat of a session as a view editor The suggest widget of a chat input shows in the window of the chat. A chat can render before it is attached, such as the chat of a chat window, whose view editor creates its view before attaching it. Its input's overflow widgets element then went into the main window's container, so the completions of /, @ and # showed in the main window instead of the chat window. The element now moves into the container of the window that the chat lays out in. Co-authored-by: Copilot <[email protected]> * fixup! sessions: the terminal commands of chat windows Type the context of the side panel's keybinding test. Co-authored-by: Copilot <[email protected]> * fixup! sessions: the chat of a session as a view editor The session state indicator of a chat updates as the window that the chat shows in loses focus, rather than the window it rendered in, which for the chat of a chat window is the main window. Co-authored-by: Copilot <[email protected]> * fixup! sessions: the terminal commands of chat windows A terminal in a window with layout modes, such as a chat window, does not offer to move into the panel, which is the main window's: the window keeps its terminals in a part of its own. Co-authored-by: Copilot…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Infrastructure, no user-visible change. Stacked on the session grid layout model (I2).
Moves out of chat windows (#344666) what the main window and chat windows will share:
src/vs/sessions/browser/sessionLayoutButtons.ts(+media/sessionLayoutButtons.css):ISessionLayoutButtonsService), with its context keys;registerLayoutButtons, to register the buttons for a window kind;src/vs/sessions/common/stackedChatInputOnly.ts: pure rules for when a stacked chat shows only its input, including while its sash is dragged (with hysteresis), after a resize and on restore.How to test
No UI change: the Session Activity Bar and its context menu behave as before.
Validation (alone on main ae15303 + #345075)
npm run typecheck-client: passed at every commitnpm run build-fast -- --client-only: passed./scripts/test.sh --runGlob "vs/sessions/**/*.test.js": 9757 passing./scripts/test.sh --runGlob "vs/workbench/test/**/*.test.js": 767 passing./scripts/test.sh --runGlob "vs/workbench/services/**/*.test.js": 2880 passing