Skip to content

Test: File path and line number linkification #279734

@vijayupadya

Description

@vijayupadya

Refs: #276767

Complexity: 3

Create Issue


Background

This sprint, file path linkification link generation is moved upstream to the model so it emits canonical, machine‑parsable Markdown links reducing reliance on heuristic fallback and enabling precise line anchors. Linkification falls back to current component if model does not handle it.

This also ensure consistent behavior across all model families (OpenAI/GPT‑5, Anthropic/Claude, etc.) while eliminating duplicated prompt text.
Links with line numbers are generated for single line and multi line range references for all models.

Below is example of how line number linkified references show up:

Image

Test Steps:

Try below on different models (OpenAI, Anthropic, Gemini)

  1. Large code base
    On large codebase like VSCode try prompts that will generate filepath and line numbers and verify file path and line numbers are correctly linkified and files do open correctly with cursor pointing to referenced line number.

E.g.

  • Give me locations of where function getDefaultAgent is called
  • Explain chatservice.ts
  • List key config files
  1. Multi workspace
    Open a multi workspace folder and ask for files that will trigger search on files with same names across workspace.
    e.g. in typescript workspaces, ask for showing where dev dependency on react is defined (this should refer package.json from multiple workspace and correctly linkify it)

  2. Do exploratory testing, and validate the file paths and line numbers are correctly linkified. Try it out on languages apart from typescript (e.g. Python).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions