Skip to content

agent sessions - have a toolbar in chat view for recent sessions#280088

Merged
bpasero merged 2 commits intomainfrom
ben/rival-shark
Nov 29, 2025
Merged

agent sessions - have a toolbar in chat view for recent sessions#280088
bpasero merged 2 commits intomainfrom
ben/rival-shark

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Nov 29, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 29, 2025 18:59
@bpasero bpasero enabled auto-merge (squash) November 29, 2025 18:59
@bpasero bpasero self-assigned this Nov 29, 2025
Copy link
Contributor

Copilot AI left a comment

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 adds a toolbar to the Recent Sessions section in the Chat View, replacing the previous "Show all sessions" link with an icon-based toolbar button. The toolbar appears on hover, providing a cleaner UI while maintaining quick access to view all agent sessions.

Key Changes

  • Added a new MenuId.ChatRecentSessionsToolbar for the toolbar in the recent sessions section
  • Replaced the text link to "Show all sessions" with a hover-activated toolbar containing an icon button
  • Removed unused imports (Link, openAgentSessionsView from chatViewPane.ts)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/vs/workbench/contrib/chat/browser/media/chatViewPane.css Updated styles to support toolbar layout with flexbox, hide toolbar by default and show on hover, removed styles for the old link container
src/vs/workbench/contrib/chat/browser/chatViewPane.ts Replaced Link component with MenuWorkbenchToolBar, removed unused imports and link container element
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts Added new "Show All Agent Sessions" action for the toolbar, re-exported openAgentSessionsView
src/vs/platform/actions/common/actions.ts Added ChatRecentSessionsToolbar MenuId for the new toolbar

}
});
}
run(accessor: ServicesAccessor, session: IAgentSession): void {
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

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

The session parameter is unused in this method. Since this action is registered for MenuId.ChatRecentSessionsToolbar (a toolbar for the sessions container), it won't receive a session as context. Remove the unused parameter.

run(accessor: ServicesAccessor): void {
    openAgentSessionsView(accessor);
}
Suggested change
run(accessor: ServicesAccessor, session: IAgentSession): void {
run(accessor: ServicesAccessor): void {

Copilot uses AI. Check for mistakes.
constructor() {
super({
id: 'agentSessions.showAll',
title: localize('showAllSessions', "Show All Agent Sessions"),
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

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

Use localize2 instead of localize for consistency with other Action2 registrations in this file (see lines 32, 54, 220, 239). The localize2 function returns both the localized string and the key, which is preferred for Action2 titles.

title: localize2('showAllSessions', "Show All Agent Sessions"),
Suggested change
title: localize('showAllSessions', "Show All Agent Sessions"),
title: localize2('showAllSessions', "Show All Agent Sessions"),

Copilot uses AI. Check for mistakes.
@bpasero bpasero merged commit 62b141e into main Nov 29, 2025
28 checks passed
@bpasero bpasero deleted the ben/rival-shark branch November 29, 2025 19:20
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants