Skip to content
This repository was archived by the owner on Sep 23, 2026. It is now read-only.
This repository was archived by the owner on Sep 23, 2026. It is now read-only.

Clickable symbol / line references in Kimi Code chat panel #2440

Description

@ElPrg

Summary

Currently, the Kimi Code chat panel renders inline-code file paths (e.g. tools/example_module.py) as clickable links that open the corresponding file. However, it does not support clicking on a function/method name to jump to its definition or declaration line. This makes it harder to navigate large agent responses that reference many symbols.

Current behavior

  • tools/example_module.py → click opens the file. ✅
  • build_pipeline() or build_pipeline() at line 52 → click does nothing / is not a link. ❌
  • Markdown links such as [build_pipeline()](tools/example_module.py#L52) open the file but do not scroll to line 52. ❌

Desired behavior

When the agent mentions a symbol, the user should be able to click it and VS Code should navigate directly to the symbol's definition (or at least to the correct file + line). For example:

  • build_pipeline() in chat → opens tools/example_module.py at line 52.
  • DataProcessor.transform() → opens the class file at the method definition (line 31).

Prior art / reference

  • Continue.dev already implements this in its chat panel: it uses VS Code's symbol provider (DocumentSymbolProvider) to resolve a function name to a location and creates a clickable link that jumps to the exact line.
  • VS Code webviews support postMessage to the extension, which can then execute vscode.commands.executeCommand('vscode.open', Uri, { selection: ... }) or revealTextDocument with a Range.

Suggested implementation approaches

  1. Symbol-provider based (preferred)
    When rendering inline-code that looks like an identifier (def foo(), class Bar, foo()), ask the extension host to resolve the symbol via vscode.executeDocumentSymbolProvider or vscode.executeWorkspaceSymbolProvider, then generate a vscode:// or command-backed link that opens the resolved Range.

  2. Explicit markdown link support
    Allow the agent (or post-processor) to emit markdown links in the form [funcName](path/to/file.py#L123). Parse the #L123 fragment on the extension side and open the file with the corresponding line selected.

  3. Hybrid
    Use approach (2) as a lightweight fallback when approach (1) cannot resolve the symbol unambiguously.

Why this matters

  • Agent responses often enumerate multiple functions / classes (e.g. code review, refactoring plans, trace analysis).
  • Clicking each symbol saves the user from manually searching (Ctrl+T / Ctrl+Shift+F) and reduces context-switching.
  • Competing tools already provide this; adding it improves parity and daily usability.

Environment (where the limitation was observed)

  • OS: Windows 10
  • VS Code: latest stable
  • Extension: moonshot-ai.kimi-code
  • Agent: Kimi Code CLI via VS Code extension chat panel

Summary

Currently, the Kimi Code chat panel renders inline-code file paths (e.g. tools/example_module.py) as clickable links that open the corresponding file. However, it does not support clicking on a function/method name to jump to its definition or declaration line. This makes it harder to navigate large agent responses that reference many symbols.

Current behavior

  • tools/example_module.py → click opens the file. ✅
  • build_pipeline() or build_pipeline() at line 52 → click does nothing / is not a link. ❌
  • Markdown links such as [build_pipeline()](tools/example_module.py#L52) open the file but do not scroll to line 52. ❌

Desired behavior

When the agent mentions a symbol, the user should be able to click it and VS Code should navigate directly to the symbol's definition (or at least to the correct file + line). For example:

  • build_pipeline() in chat → opens tools/example_module.py at line 52.
  • DataProcessor.transform() → opens the class file at the method definition (line 31).

Prior art / reference

  • Continue.dev already implements this in its chat panel: it uses VS Code's symbol provider (DocumentSymbolProvider) to resolve a function name to a location and creates a clickable link that jumps to the exact line.
  • VS Code webviews support postMessage to the extension, which can then execute vscode.commands.executeCommand('vscode.open', Uri, { selection: ... }) or revealTextDocument with a Range.

Suggested implementation approaches

  1. Symbol-provider based (preferred)
    When rendering inline-code that looks like an identifier (def foo(), class Bar, foo()), ask the extension host to resolve the symbol via vscode.executeDocumentSymbolProvider or vscode.executeWorkspaceSymbolProvider, then generate a vscode:// or command-backed link that opens the resolved Range.

  2. Explicit markdown link support
    Allow the agent (or post-processor) to emit markdown links in the form [funcName](path/to/file.py#L123). Parse the #L123 fragment on the extension side and open the file with the corresponding line selected.

  3. Hybrid
    Use approach (2) as a lightweight fallback when approach (1) cannot resolve the symbol unambiguously.

Why this matters

  • Agent responses often enumerate multiple functions / classes (e.g. code review, refactoring plans, trace analysis).
  • Clicking each symbol saves the user from manually searching (Ctrl+T / Ctrl+Shift+F) and reduces context-switching.
  • Competing tools already provide this; adding it improves parity and daily usability.

Environment (where the limitation was observed)

  • OS: Windows 10
  • VS Code: latest stable
  • Extension: moonshot-ai.kimi-code
  • Agent: Kimi Code CLI via VS Code extension chat panel

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions