pi-mono/packages
robopipi[bot] 2af8a42f5f
fix(tui): detect Alacritty for OSC 8 hyperlinks without TERM_PROGRAM (#11777)
Hyperlink detection recognised Alacritty only through
`TERM_PROGRAM=alacritty`, and Alacritty never sets `TERM_PROGRAM`. So in
a default Alacritty setup, pi fell back to `hyperlinks: false` and
rendered Markdown links as `label (url)` instead of clickable OSC 8
links.

Alacritty does set two other variables, which this change now checks:
- `TERM=alacritty` when its terminfo entry is installed (otherwise
`TERM=xterm-256color`);
- `ALACRITTY_WINDOW_ID` for the shell on Unix and macOS. This covers the
common macOS case where the terminfo entry is missing.

The tmux and screen checks still run first, so behaviour inside
multiplexers is unchanged.

**Testing**
- Added a `detectCapabilities` test covering `TERM=alacritty` and
`TERM=xterm-256color` with `ALACRITTY_WINDOW_ID`. It fails without the
change and passes with it.
- `node --test test/*.test.ts` in `packages/tui`: 1121 passing tests.
- `npm run check` passes.
- Checked `detectCapabilities()` with clean environments:
- Before: `TERM=alacritty` and `ALACRITTY_WINDOW_ID=123` both gave
`hyperlinks: false`.
  - After: both give `hyperlinks: true`.
- Plain `xterm-256color` and tmux with `ALACRITTY_WINDOW_ID` still give
`false`.

Fixes #11767

Requested by @badlogic

Co-authored-by: triagent <triagent@localhost>
2026-11-04 09:26:27 +01:00
..
agent Anthropic message threads (#11545) 2026-11-03 14:07:57 +01:00
ai Anthropic message threads (#11545) 2026-11-03 14:07:57 +01:00
chord docs(chord): slice 9 spec, telemetry with spans across hosts 2026-11-04 07:46:53 +00:00
codemode Add [Unreleased] section for next cycle 2026-11-02 11:38:21 +01:00
coding-agent fix(coding-agent): find and ls limit edge cases (#11747) 2026-11-03 23:56:31 +01:00
durable feat(chord): Chord v2 is the package's root 2026-11-02 22:36:55 +00:00
env fix(env): kill what a process program left running when it exits 2026-11-03 14:17:21 +01:00
evals Release v1.5.0 2026-11-02 11:38:21 +01:00
mcp fix(mcp): recognize CR-only line endings in Streamable HTTP SSE (#11775) 2026-11-04 09:18:01 +01:00
schema fix(schema): apply a relative root $id only once when resolving references (#11726) 2026-11-03 23:14:11 +01:00
telemetry Add [Unreleased] section for next cycle 2026-11-02 11:38:21 +01:00
tui fix(tui): detect Alacritty for OSC 8 hyperlinks without TERM_PROGRAM (#11777) 2026-11-04 09:26:27 +01:00