Repository navigation
sessions: session chat styles itself, whatever window shows it (no behavior change) - #347609
Merged
Sandeep Somavarapu (sandy081) merged 2 commits intoNov 11, 2026
Merged
Conversation
The session chat took its look from the Agents window: its rules were keyed on the Agents window's workbench, and some of its behaviour on the window being the Agents window. Shown elsewhere, such as in the chat part of an editor window, it looked and behaved differently. - The chat view's root has `.sessions-chat`. Every rule of the chat that was keyed on `.agent-sessions-workbench` also matches under that root, with the same specificity; the window-keyed selectors stay, so the Agents window and its chat windows are unchanged. - An editor part that shows the chat surface paints it, and lets its content and editors show it through, whatever window it is in. - The chat widget knows it shows a session chat (`chatInSessionsChat`, renderer option `isSessionsChat`), and behaves as in the Agents window wherever it is: deferred notifications, agent completions, the session target picker, subagent links and labels, user identity, archiving after delegation and the agent-leader parse. - The options of a chat window's main part move to the workbench, for other chat parts to share. - Fixtures show the same chat in a chat window and in an editor window, in dark, light and high contrast themes: they render identically. No behaviour changes in the Agents window, where the chat is only ever a session chat. Co-authored-by: Copilot <[email protected]>
Ladislau Szomoru (lszomoru)
previously approved these changes
Nov 11, 2026
Contributor
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new context-service lookup violates the repository’s constructor-injection rule and needs a compliant approach that preserves per-widget scope.
1 open issue
What changed in this PR
This PR makes session-chat styling component-scoped rather than dependent on the hosting window, while aiming to preserve existing Agents-window and chat-window behavior.
Changes:
- Adds
.sessions-chatstyling variants and a shared editor-part chat surface. - Propagates session-chat behavior through widget context and renderer options.
- Moves the chat-window options helper into the workbench layer and updates tests and fixtures.
| File | Description |
|---|---|
src/vs/workbench/test/browser/componentFixtures/sessions/chatCompositeBar.fixture.ts |
Adds the session-chat marker to the fixture. |
src/vs/workbench/contrib/sessions/browser/parts/chatView.ts |
Marks the shared chat root with .sessions-chat. |
src/vs/workbench/contrib/sessions/browser/media/chatBackground.css |
Defines the editor-part chat surface. |
src/vs/workbench/contrib/sessions/browser/chat/media/chatWidget.css |
Adds component-scoped composer styles. |
src/vs/workbench/contrib/sessions/browser/chat/media/chatView.css |
Adds component-scoped transcript and input styles. |
src/vs/workbench/contrib/sessions/browser/chat/media/chatInput.css |
Adds component-scoped input layout rules. |
src/vs/workbench/contrib/chatWindow/browser/chatWindow.ts |
Receives the shared main-part options helper. |
src/vs/workbench/contrib/chat/test/browser/widget/input/chatInputNotificationWidget.test.ts |
Covers notification eligibility outside the Agents window. |
src/vs/workbench/contrib/chat/common/actions/chatContextKeys.ts |
Defines the widget-scoped session-chat context key. |
src/vs/workbench/contrib/chat/browser/widget/media/chat.css |
Excludes session chats from timestamp padding. |
src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.ts |
Recognizes session-chat context in the picker. |
src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts |
Applies completion restrictions to session-chat widgets. |
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts |
Extends deferred-notification eligibility to session chats. |
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts |
Publishes and propagates session-chat behavior. |
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts |
Uses session-chat behavior for identity and subagent navigation. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css |
Adds component-scoped plan-review styling. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentOpenChat.ts |
Skips the editor-specific action provider for session chats. |
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.ts |
Adapts the fallback subagent action to session-chat context. |
src/vs/workbench/contrib/chat/browser/promptTimeline/media/promptTimeline.css |
Adds component-scoped timeline styling. |
src/vs/workbench/contrib/chat/browser/chat.ts |
Adds the session-chat renderer option. |
src/vs/sessions/test/browser/sessionView.test.ts |
Updates test markup with the component marker. |
src/vs/sessions/test/browser/sessionActivityBar.test.ts |
Updates test markup with the component marker. |
src/vs/sessions/contrib/chatWindow/test/browser/sessionsChatWindowProvider.test.ts |
Imports the relocated options helper. |
src/vs/sessions/contrib/chatWindow/browser/sessionsChatWindowProvider.ts |
Uses the workbench-owned options helper. |
src/vs/sessions/contrib/chat/test/browser/chatView.test.ts |
Aligns chat-view test markup with the component root. |
src/vs/sessions/contrib/chat/test/browser/chatView.fixture.ts |
Adds chat-window and editor-window visual fixtures. |
src/vs/sessions/contrib/chat/test/browser/chatInput.fixture.ts |
Adds component-scoped wrappers to input fixtures. |
Review effort: Balanced
Co-authored-by: Copilot <[email protected]>
Ladislau Szomoru (lszomoru)
approved these changes
Nov 11, 2026
Sandeep Somavarapu (sandy081)
deleted the
sandy081/agents/session-chat-component
branch
November 11, 2026 13:50
Sandeep Somavarapu (sandy081)
added a commit
that referenced
this pull request
Nov 11, 2026
Resolves the import conflict in sessionsChatWindowProvider.ts: #347609 moved getChatWindowMainPartOptions into chatWindow.ts, and this branch imports IChatWindowNewChatFolder from it; the provider imports both. Co-authored-by: Copilot <[email protected]>
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.

The session chat's look now comes from the component, not the window it is shown in. There is no behavior change for today's Agents window or chat windows.
Changes
AbstractChatView's root carries.sessions-chat. The CSS re-key is additive: every.agent-sessions-workbench …selector is kept, with a.sessions-chat …variant of equal specificity (chatView.css,chatWidget.css,chatInput.css,promptTimeline.css,chatPlanReview.css).chat.css's timestamp rule also skips.sessions-chatvia:where..part.editor.sessions-chat-surfacepaints--vscode-agentsPanel-background, with its content and editors transparent. The chat window's more specific rule still wins in chat windows.getChatWindowMainPartOptionsmoves fromvs/sessionsto the workbenchchatWindow.ts(a pure move).ChatContextKeys.inSessionsChatand a renderer optionisSessionsChat. On main the widget flag is only true in the Agents window.AssistantResponseInChatWindow/AssistantResponseInEditorWindow, pixel-identical in 4 themes.For contrib/chat code owners
These sites now read "Agents window OR session-chat widget" (the widget flag is only true in the Agents window today, so behavior is unchanged):
chatInputPart: deferred notificationschatInputCompletions: 2 siteschatWidget:archiveLocalParentSessionand the agent-leader parsesessionTargetPickerchatListRenderer: 6 siteschatSubagentContentPartchatSubagentOpenChatValidation
pnpm run build-fast --client-onlythenpnpm run typecheck-client: passed (0 errors)../scripts/test.shonsessions/contrib/chat/test/browser/chatView.test.ts,chatInputNotificationWidget.test.tsandsessionsChatWindowProvider.test.ts: 246 passing.sessions/andchat/fixtures vs main shows 8 added and 19 changed, allanimatedand flaky on main too. Every Agents-window and chat-window fixture is identical to main.How to test: open the Agents window and a chat window; both should look exactly as before.