-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Summary
Add clickable hyperlink support in TUI chat view using OSC 8 terminal escape sequences. URLs in model responses, file paths in tool output, and issue/PR references would become clickable.
Background
OSC 8 is widely supported by modern terminals: iTerm2, WezTerm, Kitty, Ghostty, Windows Terminal, GNOME Terminal. The escape sequence format is \033]8;;URL\033\\visible text\033]8;;\033\\.
Ratatui does not yet have native OSC 8 support (ratatui/ratatui#1227, status: Design Needed), so implementation would require either raw escape sequence output via crossterm or the osc8 crate.
Use Cases
- URLs in model responses — http/https links become clickable
- File paths in tool output — open in editor via
file://scheme - GitHub references —
#123links to issue/PR URL
Implementation Notes
- Detect URLs in rendered text spans using regex
- Wrap matched spans with OSC 8 open/close sequences before writing to terminal
- Graceful degradation: terminals without OSC 8 support simply ignore the sequences
- Consider feature-gating if the
osc8crate adds weight
References
Reactions are currently unavailable