Skip to content

Commit 884c708

Browse files
committed
feat(tui): make pi-tui the default renderer
pi-tui reached parity and then some — copy mode, image paste, history search, ghost suggestions, dynamic title, and a differential renderer that doesn't flicker or churn on long transcripts. It's now the default; CODEBASE_REACT_TUI=1 falls back to legacy ink during the deprecation window.
1 parent 5cc1f64 commit 884c708

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,21 @@ SEARXNG_URL self-hosted SearXNG instance
9696
### Behavior toggles
9797
```
9898
CODEBASE_FRESH=1 skip auto-resume of prior session (same as --new)
99+
CODEBASE_REACT_TUI=1 legacy ink renderer (pi-tui is the default)
99100
CODEBASE_NO_SUGGESTIONS=1 disable ghost-text prompt suggestions
101+
CODEBASE_NO_NOTIFY=1 silence the turn-completion bell + OS notification
100102
CODEBASE_DEBUG=1 verbose stderr logging
101103
CODEBASE_DEBUG_INPUT=1 log every keystroke to ~/.codebase/logs/input.log
102104
NO_HYPERLINK=1 disable OSC 8 clickable file paths
103105
```
104106

107+
The default UI is **pi-tui** (differential renderer): Ctrl-O copy-mode
108+
(clean OSC-52 copy of code/`present_copy` boxes), Ctrl-V image paste,
109+
Ctrl-R history search, ghost suggestions, dynamic terminal title. New
110+
slash commands: `/effort <off…xhigh>` (reasoning level), `/permissions`
111+
(view/edit allow-deny rules), `/resume` (multi-session picker),
112+
`/export`, `/doctor`, `/skills`, `/agents`.
113+
105114
### Unrestricted mode (trust-the-developer escape hatches)
106115

107116
By default the agent has three soft guards. Each one has an opt-out

src/cli.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,17 @@ if (argv[0] === "--version" || argv[0] === "-v") {
119119
// back to the login wizard. A network failure here is silent — the
120120
// wizard path catches it downstream.
121121
await ensureFreshCredentials();
122-
if (process.env.CODEBASE_PI_TUI === "1") {
123-
// Opt-in pi-tui render path — differential renderer, no React.
124-
// During the migration this is feature-gated; the ink path stays
125-
// default until parity is verified.
122+
// pi-tui (differential renderer, no React) is the default. It has the
123+
// full feature set plus click-free copy mode, dynamic title, and
124+
// smoother streaming on long transcripts. CODEBASE_REACT_TUI=1 falls
125+
// back to the legacy ink path during the deprecation window.
126+
if (process.env.CODEBASE_REACT_TUI !== "1") {
126127
const { runPiTuiApp } = await import("./ui-pi/runtime.js");
127128
installTerminalRestoreHandlers();
128129
await runPiTuiApp();
129130
process.exit(0);
130131
}
131-
// Default ink/React path. Disable ink's default ctrl-c handling — ink
132+
// Legacy ink/React path. Disable ink's default ctrl-c handling — ink
132133
// unmounts on ctrl-c but doesn't exit the process — leaves the user
133134
// staring at a frozen terminal. We handle ctrl-c ourselves.
134135
const instance = render(<App />, { exitOnCtrlC: false });

src/ui-pi/runtime.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { App } from "./app.js";
44
import { FirstRunWizard } from "./first-run-wizard.js";
55

66
/**
7-
* Entry point for the pi-tui render path (CODEBASE_PI_TUI=1). Mirrors
7+
* Entry point for the pi-tui render path (the default; CODEBASE_REACT_TUI=1
8+
* falls back to legacy ink). Mirrors
89
* `render(<App />)` from cli.tsx's ink path but constructs a pi-tui
910
* TUI with our root `App` Container instead. Returns when the App
1011
* resolves its exit promise.

0 commit comments

Comments
 (0)