Skip to content

Restore empty link text for non-skill agent-host links#312571

Merged
roblourens merged 2 commits intomainfrom
roblou/agents/fix-read-tool-links-color-and-text
Apr 26, 2026
Merged

Restore empty link text for non-skill agent-host links#312571
roblourens merged 2 commits intomainfrom
roblou/agents/fix-read-tool-links-color-and-text

Conversation

@roblourens
Copy link
Copy Markdown
Member

#312557 changed agent-host link rewriting to preserve the original markdown label for all links, which made every read-tool link render as a plain blue markdown link instead of the rich inline anchor / file widget.

Only skill links (URIs whose basename is SKILL.md) need a non-empty label, so the skill pill can display the skill name instead of the always-identical SKILL.md basename. Restore the empty-label behavior for everything else so the chat renderer's inline anchor widget takes over again.

(Written by Copilot)

PR #312557 changed all agent-host link rewriting to preserve the
original markdown label, which made every read-tool link render as a
plain blue markdown link instead of the rich inline anchor / file
widget. Only skill links need a non-empty label (so the skill pill can
show the skill name); restore the empty-label behavior for everything
else.

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

Restores the empty-label markdown link rewriting behavior for most vscode-agent-host:// links so the chat renderer’s inline anchor/file widget can take over again, while still preserving non-empty labels for skill (SKILL.md) links.

Changes:

  • Update rewriteLinkTokenRaw to emit [](newHref) for non-skill agent-host links and preserve link text only for skill links.
  • Keep skill-link tagging behavior (vscodeLinkType=skill) while centralizing the skill check via isSkill.
  • Update stateToProgressAdapter unit tests to expect empty-label rewritten agent-host links.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts Adjust link rewriting to collapse most agent-host link labels to empty while preserving skill link labels.
src/vs/workbench/contrib/chat/test/browser/agentSessions/stateToProgressAdapter.test.ts Update expectations for rewritten markdown links to use empty labels.

Copilot's findings

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@roblourens roblourens marked this pull request as ready for review April 26, 2026 02:34
@roblourens roblourens enabled auto-merge (squash) April 26, 2026 02:34
@roblourens roblourens merged commit b35a44f into main Apr 26, 2026
26 checks passed
@roblourens roblourens deleted the roblou/agents/fix-read-tool-links-color-and-text branch April 26, 2026 04:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 26, 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.

3 participants