feat(tui): detect Warp terminal and enable Kitty image protocol (#5841)

Warp supports the Kitty graphics protocol and OSC 8 hyperlinks,
but pi's terminal-image capability detection did not recognize it.
Add detection via TERM_PROGRAM=WarpTerminal, WARP_SESSION_ID,
and WARP_TERMINAL_SESSION_UUID so images render inline without
requiring the TERM_PROGRAM=kitty workaround.

Fixes #5827
This commit is contained in:
Diego de Oliveira
2026-06-18 05:45:51 -03:00
committed by GitHub
parent 51f7523587
commit 7a14325b24
3 changed files with 50 additions and 1 deletions

View File

@@ -92,6 +92,11 @@ export function detectCapabilities(tmuxForwardsHyperlink: () => boolean = probeT
return { images: "kitty", trueColor: true, hyperlinks: true };
}
// Warp supports the Kitty graphics protocol and OSC 8 hyperlinks.
if (termProgram === "warpterminal" || process.env.WARP_SESSION_ID || process.env.WARP_TERMINAL_SESSION_UUID) {
return { images: "kitty", trueColor: true, hyperlinks: true };
}
if (process.env.ITERM_SESSION_ID || termProgram === "iterm.app") {
return { images: "iterm2", trueColor: true, hyperlinks: true };
}