Hide 'View Extension' hover action for core chat agents#311526
Merged
roblourens merged 2 commits intomainfrom Apr 20, 2026
Merged
Hide 'View Extension' hover action for core chat agents#311526roblourens merged 2 commits intomainfrom
roblourens merged 2 commits intomainfrom
Conversation
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>
Contributor
There was a problem hiding this comment.
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
isCoregating to the hover action list so core agents omit “View Extension”. - Update hover type imports to use
IHoverActionfor 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
Contributor
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>
benvillalobos
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.getChatAgentHoverOptionsnow returnsactionsas a lazy getter that checksagent.isCoreat 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 surroundingtemplatevariable is initialized.Fixes #311510
(Written by Copilot)