Skip to content

Hide 'View Extension' hover action for core chat agents#311526

Merged
roblourens merged 2 commits intomainfrom
roblou/agents/remove-view-extension-vscode-agent
Apr 20, 2026
Merged

Hide 'View Extension' hover action for core chat agents#311526
roblourens merged 2 commits intomainfrom
roblou/agents/remove-view-extension-vscode-agent

Conversation

@roblourens
Copy link
Copy Markdown
Member

@roblourens roblourens commented Apr 20, 2026

Core agents (e.g. the agent host) register with a placeholder extension id (vscode.agent-host) and have no real extension to view. The "View Extension" hover action on the response title shouldn't appear for these agents.

getChatAgentHoverOptions now returns actions as a lazy getter that checks agent.isCore at hover-show time rather than at construction time. This both hides the action for core agents and avoids a TDZ issue — some callers (e.g. chatListRenderer) construct these options before the surrounding template variable is initialized.

Fixes #311510

(Written by Copilot)

Core agents (e.g. the agent host) register with a placeholder
extension id and have no real extension to view. Skip adding the
'View Extension' hover action when the agent has isCore: true.

Fixes #311510

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 22:37
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

Adjusts chat agent hover behavior so the “View Extension” action is not shown for core chat agents (eg agent host) that don’t correspond to a real extension, avoiding the “no extension” experience described in #311510.

Changes:

  • Add isCore gating to the hover action list so core agents omit “View Extension”.
  • Update hover type imports to use IHoverAction for action construction.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.ts Conditionally builds hover actions to skip “View Extension” for core agents.

Copilot's findings

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

Comment thread src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

Screenshot Changes

Base: 641cbea2 Current: c3d9babf

Changed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/McpBrowseMode/Light
Before After
before after
editor/inlineCompletions/other/JumpToHint/Dark
Before After
before after

@roblourens roblourens marked this pull request as draft April 20, 2026 22:44
Some callers construct the hover options before the surrounding
template variable is initialized, so resolving the agent eagerly
hits a TDZ. Make 'actions' a lazy getter so the agent is only
read when the hover is actually shown.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens roblourens marked this pull request as ready for review April 20, 2026 23:28
@roblourens roblourens enabled auto-merge (squash) April 20, 2026 23:28
@roblourens roblourens merged commit 4e3f7dc into main Apr 20, 2026
26 checks passed
@roblourens roblourens deleted the roblou/agents/remove-view-extension-vscode-agent branch April 20, 2026 23:30
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 20, 2026
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.

AHP: View Extension button in hovering tip of the agent icon shows "no extension"

3 participants