agent sessions - support more actions from context menu#278787
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for displaying more actions in the context menu for agent sessions by introducing a new context key to differentiate between the "combined" session viewer and traditional session viewers. The combined viewer shows all available actions, while the traditional viewer continues to exclude inline actions.
Key changes:
- Introduced
isCombinedSessionViewercontext key to distinguish viewer types - Modified agent sessions view to use
getFlatActionBarActions()to show all menu actions - Updated rename action visibility to exclude it from the combined session viewer
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| chatContextKeys.ts | Adds new isCombinedSessionViewer context key with TODO noting future retirement |
| sessionsViewPane.ts | Code formatting improvement (added line break) |
| agentSessionsView.ts | Imports getFlatActionBarActions, sets combined viewer context, and shows all actions in context menu |
| chatSessionActions.ts | Updates rename action to only show in non-combined viewers |
|
|
||
| export const sessionType = new RawContextKey<string>('chatSessionType', '', { type: 'string', description: localize('chatSessionType', "The type of the current chat session item.") }); | ||
| export const isArchivedItem = new RawContextKey<boolean>('chatIsArchivedItem', false, { type: 'boolean', description: localize('chatIsArchivedItem', "True when the chat session item is archived.") }); | ||
| export const isCombinedSessionViewer = new RawContextKey<boolean>('chatIsCombinedSessionViewer', false, { type: 'boolean', description: localize('chatIsCombinedSessionViewer', "True when the chat session viewer uses the new combined style.") }); // TODO@bpasero eventually retire this context key |
There was a problem hiding this comment.
The TODO comment should include more context about when or under what conditions this context key should be retired. Consider adding a brief explanation of what needs to happen first (e.g., 'TODO@bpasero retire this context key once all viewers use the combined style' or 'TODO@bpasero retire this context key when the legacy session viewer is removed').
| export const isCombinedSessionViewer = new RawContextKey<boolean>('chatIsCombinedSessionViewer', false, { type: 'boolean', description: localize('chatIsCombinedSessionViewer', "True when the chat session viewer uses the new combined style.") }); // TODO@bpasero eventually retire this context key | |
| export const isCombinedSessionViewer = new RawContextKey<boolean>('chatIsCombinedSessionViewer', false, { type: 'boolean', description: localize('chatIsCombinedSessionViewer', "True when the chat session viewer uses the new combined style.") }); // TODO@bpasero retire this context key once all chat session viewers use the combined style and the legacy session viewer is removed |
No description provided.