feat(cli): add an in-app transcript viewer for long TUI sessions
#2,997 创建于 2026年8月14日
仓库指标
- 星标
- (1 个星标)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
Problem
The TUI currently renders the full transcript into the terminal buffer and relies on native terminal scrollback. That works for ordinary sessions, but after a long session (for example, around 100 turns) the earliest turns may no longer be reachable when the terminal scrollback limit is smaller than the rendered transcript.
Desktop transcript virtualization in #2975 addresses React/Electron rendering cost. It does not change the CLI TUI, which has a separate renderer and interaction model.
Desired outcome
Provide a read-only in-app transcript viewer for the TUI that:
- opens on the latest part of the current transcript;
- scrolls one line with Up/Down;
- scrolls one page with Page Up/Page Down;
- jumps to the beginning or end with Home/End;
- closes with q or Escape;
- preserves the existing double-Escape rewind flow for editing an earlier turn.
The viewer should consume the existing CLI transcript projection. It should not introduce another session-history or Runtime authority.
Alternatives or workarounds
Today users can increase terminal scrollback or use terminal/trackpad scrolling. That is terminal-dependent and cannot recover lines already discarded by the terminal.
A full-screen alternate-buffer redesign would solve a broader problem, but is a much larger behavioral change. A focused viewer behind a slash command is a smaller first step and avoids stealing editor keybindings during normal input.
Scope
This is a user-visible CLI feature. While the repository is feature-frozen, implementation PRs should remain Draft until maintainers decide whether and when to take it.