Repository navigation
Open
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
When the agent edits a file, the TUI renders ← Edit <file> with the patch below it. Today that title is plain text. I'd like the file name to be clickable so it opens in my editor, with the diff/patch available there — so I can jump straight from the transcript to the changed code without copy-pasting paths.
Current behavior
The Edit/Write/ApplyPatch titles are rendered by BlockTool in packages/tui/src/routes/session/index.tsx with no click handler:
- Edit:
:2409—← Edit <path> - Write:
:2115—# Wrote <path> - ApplyPatch:
:2484—← Patched <relativePath>/# Created/# Moved/# Deleted
BlockTool already supports onClick, hover highlight, and onMouseUp (:1994-2044); only the Shell tool uses onClick today (:2081). openEditor in packages/tui/src/editor.ts:26 only opens a temporary markdown transcript (used by /export), not an arbitrary workspace file.
Proposed behavior
- Clicking the file name (ideally just the file name, not the whole block) opens that file in
$VISUAL/$EDITOR, falling back to the OS default application. - Keep existing block click behavior intact (e.g. Shell expand/collapse).
Deletefiles stay non-clickable;Movedopens the destination path.- If no editor is available or opening fails, show a toast instead of doing nothing silently.
Implementation sketch
- Add an
openFile(path, opts)helper inpackages/tui/src/editor.tsthat spawns the editor directly on the real workspace file, mirroring the existingopenEditorsuspend/restore lifecycle, with a platform-default fallback. - Add an optional
onTitleClick/ render-prop toBlockTooland wire it inEdit,Write, andApplyPatch. - Update
packages/tui/test/util/tool-display.test.ts/renderer.test.tsand add editor tests forVISUALprecedence and path resolution.
Related
- Prior PR feat(tui): make file tool titles clickable #30404 "feat(tui): make file tool titles clickable" — same scope, auto-closed by the stale-cleanup bot, not rejected on technical grounds.
- [FEATURE]: Make local file paths clickable in terminal output #19005 — Make local file paths clickable in terminal output.
- Desktop: make file paths in chat clickable (open in editor / reveal in Finder) #37891 — Desktop: make file paths in chat clickable (open in editor / reveal in Finder).
- TUI: markdown links paint as
label (url)instead of label-only OSC 8 #45001, tui: Ctrl+click does not open Markdown links when mouse capture is active #44442 — TUI hyperlink / OSC 8 handling.
Metadata
Metadata
Assignees
Labels
No labels
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the detailed request, @kirin-xiao! To restate it: you'd like the file name in the TUI's
Edit/Write/ApplyPatchtool blocks to be clickable. Clicking it would open the file in$VISUAL/$EDITOR(or the OS default app), with a toast if that fails and Shell's expand/collapse left as it is.This can't be built as a plugin right now, because TUI plugins can't hook into how tool blocks are drawn in the transcript. Maintainers will consider it.
Related issues: