agent sessions - have a toolbar in chat view for recent sessions#280088
agent sessions - have a toolbar in chat view for recent sessions#280088
Conversation
There was a problem hiding this comment.
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.ChatRecentSessionsToolbarfor 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,openAgentSessionsViewfrom 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 { |
There was a problem hiding this comment.
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);
}| run(accessor: ServicesAccessor, session: IAgentSession): void { | |
| run(accessor: ServicesAccessor): void { |
| constructor() { | ||
| super({ | ||
| id: 'agentSessions.showAll', | ||
| title: localize('showAllSessions', "Show All Agent Sessions"), |
There was a problem hiding this comment.
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"),| title: localize('showAllSessions', "Show All Agent Sessions"), | |
| title: localize2('showAllSessions', "Show All Agent Sessions"), |
No description provided.