-
Notifications
You must be signed in to change notification settings - Fork 36.4k
agent sessions - show a link to open all sessions #279366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 "Show All Sessions" link at the bottom of the agent sessions control in the chat view pane. The link allows users to navigate to either the new or legacy agent sessions view depending on their configuration settings. This enhancement improves discoverability by providing a direct way to access the full sessions view from the chat pane.
Key changes:
- Added a clickable link component below the sessions viewer using the
Linkclass with a custom opener - Restructured CSS to nest both the sessions viewer and link container within a parent container
- Updated layout calculations to properly account for both the sessions viewer and link heights
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/media/chatViewPane.css | Restructured CSS to nest .agent-sessions-viewer and new .agent-sessions-link-container within .agent-sessions-container, replacing the old .chat-viewpane-sessions-container class |
| src/vs/workbench/contrib/chat/browser/chatViewPane.ts | Added Link component instantiation to create "Show All Sessions" link, imported required dependencies, updated layout logic to calculate proper heights for sessions control and link container |
| opener: () => { | ||
| // TODO@bpasero remove this check once settled | ||
| if (this.configurationService.getValue('chat.agentSessionsViewLocation') === 'single-view') { | ||
| this.commandService.executeCommand(AGENT_SESSIONS_VIEW_ID); | ||
| } else { | ||
| this.commandService.executeCommand(LEGACY_AGENT_SESSIONS_VIEW_ID); |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider making the opener callback async to be consistent with other usages in the codebase (e.g., searchMessage.ts), even though the Link class doesn't await the result:
opener: async () => {
// TODO@bpasero remove this check once settled
if (this.configurationService.getValue('chat.agentSessionsViewLocation') === 'single-view') {
await this.commandService.executeCommand(AGENT_SESSIONS_VIEW_ID);
} else {
await this.commandService.executeCommand(LEGACY_AGENT_SESSIONS_VIEW_ID);
}
}| opener: () => { | |
| // TODO@bpasero remove this check once settled | |
| if (this.configurationService.getValue('chat.agentSessionsViewLocation') === 'single-view') { | |
| this.commandService.executeCommand(AGENT_SESSIONS_VIEW_ID); | |
| } else { | |
| this.commandService.executeCommand(LEGACY_AGENT_SESSIONS_VIEW_ID); | |
| opener: async () => { | |
| // TODO@bpasero remove this check once settled | |
| if (this.configurationService.getValue('chat.agentSessionsViewLocation') === 'single-view') { | |
| await this.commandService.executeCommand(AGENT_SESSIONS_VIEW_ID); | |
| } else { | |
| await this.commandService.executeCommand(LEGACY_AGENT_SESSIONS_VIEW_ID); |
| import { Link } from '../../../../platform/opener/browser/link.js'; | ||
| import { localize } from '../../../../nls.js'; | ||
| import { ChatViewWelcomeController, IViewWelcomeDelegate } from './viewsWelcome/chatViewWelcomeController.js'; | ||
| import { AgentSessionsControl } from './agentSessions/agentSessionsControl.js'; | ||
| import { ICommandService } from '../../../../platform/commands/common/commands.js'; |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports should be grouped and ordered consistently. The newly added imports should be placed with their respective groups:
Link(line 43) should be with other platform imports (lines 13-26)localize(line 44) should be earlier, typically near the top with base importsICommandService(line 47) should be with other platform imports (lines 13-26)
Suggested order:
import { localize } from '../../../../nls.js';
// ... other base imports ...
import { ICommandService } from '../../../../platform/commands/common/commands.js';
// ... other platform imports ...
import { Link } from '../../../../platform/opener/browser/link.js';
No description provided.