Skip to content

v1.0.18 — Truthful Ctrl+O and Claude Code touches

Choose a tag to compare

@QuangThai QuangThai released this 11 Oct 08:52
· 23 commits to main since this release

Truthful Ctrl+O, and three more Claude Code touches

Ctrl+O now appears only where expanding shows something new, and it stays readable on a narrow terminal. The claude-code preset gains a token count on the working row, Claude Code's edit sentences, and a prompt after an interrupted turn. /reload no longer leaves the transcript half-themed.

● Edit(src/auth.ts)
  ⎿  Updated src/auth.ts with 1 addition and 1 removal
     +1 −1 · 0.2s
● Grep(row in src)
  ⎿  12 matches in 1 file · Ctrl+O to expand
⣾ Working... (14s · ↓ 1.2k tokens · Escape to interrupt)

Added

  • theme.workingTokens: the working row counts the run's output tokens, Working... (14s · ↓ 1.2k tokens · Escape to interrupt). Streamed text is estimated at about four characters a token until each message reports its real usage.
  • tools.editSummary: inline file changes read like Claude Code's. An edit opens with Updated src/auth.ts with 1 addition and 1 removal above the existing +1 −1 · 0.2s row and diff; a write names its file, Wrote 3 lines to notes/todo.txt · 0.2s. Narrow rows shorten the sentence to Updated src/auth.ts and leave the write's path out rather than cut the run time.
  • messages.interruptHint: an interrupted turn keeps Pi's notice and adds · What should the agent do instead?, both for an answer (Operation aborted) and for a tool run (Error: This operation was aborted, which is how Pi reports Esc during a tool).
  • The claude-code preset turns all three on. They are off by default, so other presets render exactly as before, and each only adds to what was shown.

Fixed

  • Ctrl+O no longer promises lines it cannot show. A diff (edit, quick edit, git diff) offered it when only unchanged context was folded, and expanding repainted the same rows; an expanded diff now shows all the context it has room for, so Ctrl+O and a click reveal the folded lines. Inline grep offered it when every match was already shown, and compaction, skill, and branch blocks when their body was empty or a single line that fits.
  • Diffs read Pi's ... row (unchanged lines its edit diff leaves out) as a gap instead of a numbered line (10 ...), and split diffs number the new side correctly after a skipped run, after a change that opens the diff, and across the hunks of a git diff.
  • Boxed grep results and grep commands run through bash offer Ctrl+O on their … 7 more matches row.
  • On a narrow terminal the hint is no longer cut to Ctrl+O t…: a row that cannot fit Ctrl+O to expand shows the bare key (· Ctrl+O) and shortens its own text first, in every chrome.
  • An expanded grep (the tool and grep/rg through bash) shows up to tools.maxExpandedLines rows instead of stopping at 24; collapsed previews keep their six-row cap.
  • Inline chrome: grep, rg, ls, and find run through bash read like the Grep, List, and Find tools, and git and gh cards hang under the ⎿ gutter. A git diff no longer opens a second ⎿ halfway down its block, and an empty one no longer repeats no changes.
  • git diff and git status render their cards on Windows with core.autocrlf on; Git's LF will be replaced by CRLF warnings made the parser fall back to raw text. Other warnings still fall back as before.
  • /reload left the transcript half-themed: the reloaded copy found the previous copy's core patches still installed and fell back to Pi's native rendering while the retired copy kept rendering. The reloaded copy now takes the patches over, and widgets.hide changes apply on /reload.

How it stays contained

  • Everything is presentation. The token counter only reads Pi's message events, the interrupt hint only changes the rendered notice row (the session and what the model sees are untouched), and the /reload fix only hands the theme's own core patches from the old copy to the new one.
  • Property tests now fail on a Ctrl+O hint that adds nothing, on a block that expands with no hint, and on a second result gutter under one inline block, across boxed, light, and inline chrome at 80 and 36 columns.

Verification

  • CI: this repository has no configured GitHub Actions workflows, check-runs, or commit-status contexts for the release commit. The local release gates below all passed.
  • npm ci and npm run check: typecheck, 376 unit/integration/golden tests (64 more than 1.0.17), dependency boundaries, production build, and package smoke.
  • npm run test:e2e:readonly-tools: 25/25 packed-package CLI/RPC cases on Pi 0.99.1 with pi-hashline-edit-pro 4.5.1 (ripgrep supplied on PATH).
  • npm publish --dry-run: the expected 7-file npm artifact (147.3 kB packed).
  • Real TUI runs on Pi 1.1.0 with a deterministic local provider and an isolated agent directory, on the claude-code and claude presets at 110 and 40 columns: token counts, edit and write sentences, the interrupt prompt for answers and tool runs, Ctrl+O and click expansion of diffs and grep, hints kept at 40 columns, inline bash grep/ls/find and git status/diff panels with one gutter, a git repository with core.autocrlf, and /reload keeping the themed transcript.

Tested on Windows x64 with Node 24.11.1. Linux/macOS runs were not part of this verification.

Install / update

Published on npm. The registry latest tag, gitHead (release commit), tarball shasum, a clean install whose bundle matches the release build byte for byte, and a real Pi 1.1.0 TUI run of the installed package on the claude-code preset have been verified.

pi install npm:@nguyenquangthai/pi-omp-theme@1.0.18
# For an existing unpinned installation:
pi update npm:@nguyenquangthai/pi-omp-theme