Skip to content

Support explicit [\symbolName\](path/to/file.py) symbol links and deprecate optimistic backtick matching #313533

Open

Description

Summary

The chat response renderer currently supports "optimistic" symbol linkification: when the model outputs `symbolName`, the Copilot extension searches the workspace for a symbol with that name and—if found—emits a ChatResponseAnchorPart that renders as a pill widget. This approach is prone to false positives (linking to wrong files, unrelated variables, etc.) which degrades user trust in the links feature.

We want to shift to a more precise model: the model explicitly outputs [`symbolName`](path/to/symbol/file.py) and VS Code renders that as a proper inline anchor (pill) widget rather than a plain hyperlink.

Problem with the current approach

  • The workspace symbol search triggered by bare `symbolName` can match completely unrelated symbols — e.g., a local variable named list gets linked when the model meant the abstract concept of a list.
  • False-positive links erode user trust; users stop clicking or stop reading the linked pills altogether.
  • The optimistic matching is a workaround for models that don't reliably output full path links. With model improvements and prompting, this workaround is no longer necessary and is actively harmful.

VS Code should render myFunction as a clickable pill widget (same as today's InlineAnchorWidget) pointing to src/utils/helpers.py, rather than a plain blue hyperlink.

References

  • chatInlineAnchorWidget.ts — renderFileWidgets, InlineAnchorWidget
  • annotations.ts — annotateSpecialMarkdownContent, contentRefUrl
  • chatMarkdownDecorationsRenderer.ts — walkTreeAndAnnotateReferenceLinks

Activity

  1. added this to the Backlog milestone on Apr 30, 2026
  2. added
    staleIssues that have not been triaged in an appropriate amount of time
    on May 7, 2026
  3. jinyu2022 commented on Aug 2, 2026

    @jinyu2022

    There should be an option to turn off this stupid matching.

  4. jinyu2022 commented on Oct 5, 2026

    @jinyu2022

    Is there still no plan to fix this issue? It still exists in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

staleIssues that have not been triaged in an appropriate amount of timetriage-needed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions