Skip to content

feat: file:line clickability everywhere — stack traces, tool errors, sandbox denials #323

@Hmbown

Description

@Hmbown

Problem

Tool error output, stack traces, and sandbox denial messages frequently include path/to/file.rs:42:7 references. Today these are plain text — the user has to copy, paste into another terminal, open in their editor manually.

Proposed solution

Parse path:line[:col] patterns in transcript output and render them as openable links. On Ctrl+Click (or O while the cursor is on the line), invoke an editor command:

$EDITOR  → matches the `+line` convention if vim/nvim/emacs
code -g <file>:<line>
idea --line <line> <file>
windsurf --goto <file>:<line>
cursor --goto <file>:<line>

Picked from a config:

[tui.editor]
open_command = "code -g {file}:{line}"

with auto-detection if unset (probe $VISUAL, $EDITOR, code, cursor, idea in that order).

Where this fires

Acceptance criteria

  • Pattern matches: <path>:<line>, <path>:<line>:<col>, at <path>:<line> (Rust panic format).
  • Click / hotkey invokes the configured editor.
  • Auto-detection works in a clean install with no config.
  • Privacy: paths still route through display_path for screenshot-likely surfaces.
  • Visual: rendered as a colored span (cyan?) so users know it's clickable.

Related

  • crates/tui/src/utils.rs:display_path — privacy invariant.
  • The existing transcript renderer in crates/tui/src/tui/views/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions