Skip to content

fix(chat session picker): add action bar actions and improve dropdown handling#310064

Draft
DonJayamanne wants to merge 2 commits intomainfrom
don/prime-crow
Draft

fix(chat session picker): add action bar actions and improve dropdown handling#310064
DonJayamanne wants to merge 2 commits intomainfrom
don/prime-crow

Conversation

@DonJayamanne
Copy link
Copy Markdown
Contributor

@DonJayamanne DonJayamanne commented Apr 15, 2026

Before
No separator before the command

Screenshot 2026-04-15 at 13 57 29

After
Screenshot 2026-04-15 at 13 56 42

Copilot AI review requested due to automatic review settings April 15, 2026 03:57
@DonJayamanne DonJayamanne self-assigned this Apr 15, 2026
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the chat session picker dropdown to support a dedicated action bar section and separates command actions from the main option list.

Changes:

  • Adds an actionBarActionProvider to supply actions shown in the dropdown action bar.
  • Refactors command actions into a new getDropdownActionBarActions() method, returning early from getDropdownActions().
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.ts Adds action bar actions provider and moves command actions out of the main dropdown list

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 3

Comment on lines +123 to +127
// if locked, show the current option only
const currentOption = this.delegate.getCurrentOption();
if (currentOption?.locked) {
return [];
}
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The comment says 'if locked, show the current option only' but the implementation returns no action-bar actions. Please update the comment to reflect the actual behavior (e.g., that action-bar actions are hidden/disabled when locked) to avoid misleading future maintenance.

Copilot uses AI. Check for mistakes.
tooltip: command.tooltip ?? command.title,
label: command.title,
run: () => {
this.commandService.executeCommand(command.command, ...args);
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

Consider returning the executeCommand(...) result from run. This allows callers/UI plumbing to observe completion/failures (and chain/await the promise) instead of always treating the action as synchronous.

Suggested change
this.commandService.executeCommand(command.command, ...args);
return this.commandService.executeCommand(command.command, ...args);

Copilot uses AI. Check for mistakes.
Comment on lines +137 to 142
for (const command of (group.commands ?? [])) {
const args = command.arguments ? [...command.arguments] : [];
const sessionResource = this.delegate.getSessionResource();
if (sessionResource) {
args.unshift(sessionResource);
}
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

this.delegate.getSessionResource() is called once per command. If it’s stable for the duration of this method, compute it once before the loop and reuse it to avoid repeated calls (minor, but simplifies the loop and avoids potential extra work).

See below for a potential fix:

		const sessionResource = this.delegate.getSessionResource();

		// Add commands at the end in a separate section (only if there are options)
		for (const command of (group.commands ?? [])) {
			const args = command.arguments ? [...command.arguments] : [];

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2026

Screenshot Changes

Base: 34e3a2bf Current: 327d3be5

Changed (1)

agentSessionsViewer/NeedsInput/Dark
Before After
before after

blocks-ci screenshots changed

Replace the contents of test/componentFixtures/blocks-ci-screenshots.md with:

Updated blocks-ci-screenshots.md
<!-- auto-generated by CI — do not edit manually -->

#### editor/codeEditor/CodeEditor/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/cb32a3e854b5734fe5aaca2318f2e0a42ee821b05ea97883ea42c5ba95edb3c3)

#### editor/codeEditor/CodeEditor/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/42624fbba5e0db7f32c224b5eb9c5dd3b08245697ae2e7d2a88be0d7c287129b)

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.

2 participants