Skip to content

sessions: hide changes and workspace pills in quick chat session header - #324764

Merged
sandy081 merged 1 commit into
mainfrom
agents/hide-diff-stats-in-chat-header
Jul 7, 2026
Merged

sessions: hide changes and workspace pills in quick chat session header#324764
sandy081 merged 1 commit into
mainfrom
agents/hide-diff-stats-in-chat-header

Conversation

@sandy081

@sandy081 sandy081 commented Jul 7, 2026

Copy link
Copy Markdown
Member

What

In the Agents window, quick chat sessions no longer show the changes diff-stats pill or the workspace folder pill in the session header.

Why

Quick chats are workspace-less by design, so a workspace folder (Files) pill and a diff-stats (Changes) pill in their header are not meaningful.

How

Both pills are menu actions contributed into Menus.SessionHeaderMeta and gated by when clauses. Added IsQuickChatSessionContext.negate() to each:

  • Changes diff-stats pillViewAllChangesAction: when is now ContextKeyExpr.and(SessionHasChangesContext, IsQuickChatSessionContext.negate()).
  • Workspace folder pillOpenFilesViewAction: when is now ContextKeyExpr.and(SessionHasWorkspaceContext, IsQuickChatSessionContext.negate()).

IsQuickChatSessionContext is already bound per-session (scoped to each session view's context service, sourced from the session's isQuickChat tag), so the pills hide correctly for quick chats even when multiple session views are visible, and remain visible for workspace-bound sessions.

Notes for reviewers

  • No behavioral change for workspace-bound sessions.
  • ESLint passes on both changed files; the pre-commit hygiene hook passed.

Quick chat sessions are workspace-less, so the diff-stats (Changes) pill and
the workspace folder (Files) pill no longer make sense in their session header.
Gate both header meta actions on IsQuickChatSessionContext.negate() so they are
hidden for quick chats while remaining visible for workspace-bound sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 7, 2026 14:39
@sandy081 sandy081 self-assigned this Jul 7, 2026
@sandy081
sandy081 enabled auto-merge (squash) July 7, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Agents window session-header “meta” actions so that quick chat sessions no longer display the Changes (diff-stats) pill or the Files (workspace folder) pill, aligning the UI with the “workspace-less by design” model for quick chats.

Changes:

  • Gate the Files header pill behind SessionHasWorkspaceContext && !IsQuickChatSessionContext.
  • Gate the Changes header pill behind SessionHasChangesContext && !IsQuickChatSessionContext.
Show a summary per file
File Description
src/vs/sessions/contrib/files/browser/workspaceFolderActions.ts Updates the SessionHeaderMeta menu when clause for the Files pill to hide it in quick chat sessions.
src/vs/sessions/contrib/changes/browser/changesActions.ts Updates the SessionHeaderMeta menu when clause for the Changes pill to hide it in quick chat sessions.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Low

@sandy081
sandy081 merged commit 9ec3f79 into main Jul 7, 2026
30 checks passed
@sandy081
sandy081 deleted the agents/hide-diff-stats-in-chat-header branch July 7, 2026 14:53
@vs-code-engineering vs-code-engineering Bot added this to the 1.129.0 milestone Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants