Skip to content

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Nov 25, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 25, 2025 14:18
@bpasero bpasero enabled auto-merge (squash) November 25, 2025 14:18
@bpasero bpasero self-assigned this Nov 25, 2025
@vs-code-engineering vs-code-engineering bot added this to the November 2025 milestone Nov 25, 2025
Copilot finished reviewing on behalf of bpasero November 25, 2025 14:22
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 "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 Link class 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

Comment on lines +264 to +269
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);
Copy link

Copilot AI Nov 25, 2025

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);
	}
}
Suggested change
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);

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +47
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';
Copy link

Copilot AI Nov 25, 2025

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 imports
  • ICommandService (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';

Copilot uses AI. Check for mistakes.
ulugbekna
ulugbekna previously approved these changes Nov 25, 2025
@bpasero bpasero merged commit 6ea77b3 into main Nov 25, 2025
29 checks passed
@bpasero bpasero deleted the ben/melted-kangaroo branch November 25, 2025 15:15
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