mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
In regular TUI mode, user and assistant messages wrote OSC 133 (`A`/`B`/`C`) shell-integration markers straight to the terminal. Terminals that display OSC 7501 program status (Rex, iTerm2 3.7.5+) read `133;A` as a new shell prompt and drop the current status. As a result, the `working` indicator disappeared right after a run started and only `done` showed up at the end. Fullscreen mode was not affected because it already strips these markers before writing. ## Change - `TuiMainScreen.doRender()` (`packages/tui/src/tui-main-screen.ts`) now strips OSC 133 markers from the start of each rendered line before compositing and writing. It uses the same pattern as fullscreen (`OSC133_ZONE_PREFIX`). - The message components still produce the markers. Fullscreen uses them internally for prompt navigation and already strips them before writing, so its behavior is unchanged. - In regular mode, the terminal's own jump-to-prompt shortcuts no longer stop at pi messages (added in #1805). ## Testing - New test in `packages/tui/test/tui-render.test.ts`: no `ESC]133;` reaches the terminal across a full render and a differential render, with both BEL and ST terminators. It fails without the change and passes with it. - These pass: - `packages/tui` `npm test` - `test/user-message.test.ts` and `test/assistant-message.test.ts` in coding-agent - `npm run check` - I ran `pi -ne --tui-mode regular` with `PI_PROGRAM_STATUS=1` and a streaming test provider, capturing all terminal output with `script`. - Before: `7501 working`, then repeated `133;A`/`133;B`/`133;C`, then `7501 done`. - After: only `7501 idle` → `working` → `done`, and no OSC 133. Fixes #11519 Requested by @davidbrai Co-authored-by: triagent <triagent@localhost> |
||
|---|---|---|
| .. | ||
| fixtures | ||
| alt-screen-large-transcript-bench.ts | ||
| autocomplete-skill-slash.test.ts | ||
| autocomplete.test.ts | ||
| bug-regression-isimageline-startswith-bug.test.ts | ||
| chat-simple.ts | ||
| colors.test.ts | ||
| editor-history-keybindings.test.ts | ||
| editor.test.ts | ||
| exit-restore.test.ts | ||
| fuzzy.test.ts | ||
| image-test.ts | ||
| input.test.ts | ||
| key-tester.ts | ||
| keybindings.test.ts | ||
| keys.test.ts | ||
| latex.test.ts | ||
| layout.test.ts | ||
| markdown.test.ts | ||
| mouse-components.test.ts | ||
| native-clipboard-linux.test.ts | ||
| native-module-path.test.ts | ||
| native-platform.test.ts | ||
| overlay-non-capturing.test.ts | ||
| overlay-options.test.ts | ||
| overlay-short-content.test.ts | ||
| program-status.test.ts | ||
| regression-overlay-cjk-boundary.test.ts | ||
| regression-regional-indicator-width.test.ts | ||
| regression-sigwinch-kill-eacces.test.ts | ||
| regression-slice-by-column-ansi-order.test.ts | ||
| render-churn-bench.ts | ||
| select-list.test.ts | ||
| settings-list.test.ts | ||
| stdin-buffer.test.ts | ||
| tab-width.test.ts | ||
| terminal-colors.test.ts | ||
| terminal-image.test.ts | ||
| terminal.test.ts | ||
| test-themes.ts | ||
| truncate-to-width.test.ts | ||
| truncated-text.test.ts | ||
| tui-alt-screen.test.ts | ||
| tui-cell-size-input.test.ts | ||
| tui-overlay-style-leak.test.ts | ||
| tui-render.test.ts | ||
| tui-shrink.test.ts | ||
| viewport-overwrite-repro.ts | ||
| virtual-terminal.ts | ||
| visible-width.test.ts | ||
| wheel-scroll.test.ts | ||
| word-navigation.test.ts | ||
| wrap-ansi.test.ts | ||