pi-open-tui 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ ## [0.4.3] - 2026-11-05
4
+
5
+ ### New Features
6
+
7
+ - Let extensions contribute text to either main footer row through the public `open-tui:footer:*` events, with placement, width priorities, lifecycle cleanup, and a separate visibility setting.
8
+ - Add opt-in compact rows for extension, MCP, and replacement tools through `toolView.extensionTools`, with generic summaries and native rendering on expansion.
9
+ - Add search-specific compact summaries for recognized `@ff-labs/pi-fff` installations, including page match counts, matching file totals, and pagination and fallback hints.
10
+ - Allow selected tools, such as `edit`, to keep their native rendering in compact mode through `toolView.exclude`.
11
+
12
+ ### Breaking Changes
13
+
14
+ - Require Pi 1.5.0 or later.
15
+
16
+ ### Changed
17
+
18
+ - Group `/open-tui` settings into sections in English and Simplified Chinese, with non-selectable headings and scrolling that includes heading rows.
19
+ - Keep feature introductions and usage examples in both READMEs, and move complete configuration and implementation details into bilingual reference documents in `docs/`.
20
+
21
+ ### Fixed
22
+
23
+ - Show code-block Copy labels as soon as streaming ends, without requiring a terminal resize, and hide them when streaming resumes.
24
+ - Preserve each Copy button's code and click region across Markdown block reuse, repeated identical blocks, and mixed cached and new blocks; restore source tabs using the current block occurrence.
25
+ - Cancel pending Copy clicks when buttons are disabled, and suppress clipboard notifications from cleaned-up installations.
26
+ - Make changed-word highlighting for short edit-preview lines independent of scheduling delays, while keeping matching limits for larger diffs.
27
+
28
+ ## [0.4.2] - 2026-11-03
29
+
30
+ ### Changed
31
+
32
+ - Cache completed compact tool rows and Copy button labels so scrolling reuses rendered lines instead of rebuilding them.
33
+
34
+ ### Fixed
35
+
36
+ - Cancel an in-progress Copy click when rendering moves, removes, or changes its Copy target, so a stale press cannot copy different content.
37
+
38
+ ## [0.4.1] - 2026-11-02
39
+
40
+ ### New Features
41
+
42
+ - Add clickable Copy buttons to fenced code blocks and user messages in fullscreen mode, configurable through `/open-tui`.
43
+ - Add syntax-highlighted previews for successful edits and writes in compact tool view, limited to 16 rows with a hint to expand longer output.
44
+
45
+ ### Changed
46
+
47
+ - Preserve compatible editors installed by other extensions, including runtime replacements, while applying open-tui framing and retaining their input behavior.
48
+ - Refine compact tool status indicators with dimmed completed rows, animated running dots, and clearer error and truncation summaries.
49
+
50
+ ### Fixed
51
+
52
+ - Include tool-reported usage, compaction and branch summaries, and cache warming in footer token and cost totals; show the cache-hit percentage for the latest assistant response.
53
+ - Respect `PI_CODING_AGENT_DIR` for settings storage and warn when settings cannot be saved.
54
+ - Improve Scala project detection and Git status handling for renamed-then-deleted files.
package/README.md CHANGED
@@ -4,28 +4,28 @@
4
4
 
5
5
  **English** | [简体中文](./README.zh-CN.md)
6
6
 
7
- A polished terminal interface for the [Pi](https://pi.dev) coding agent. It brings the strongest ideas from pi-haiku, pi-claude-code-tui, and pi-zentui into one configurable extension.
7
+ A polished terminal interface for the [Pi](https://pi.dev) coding agent.
8
8
 
9
9
  ![pi-open-tui preview](https://raw.githubusercontent.com/OldSuns/pi-open-tui/main/assets/preview_dashboard_1.png)
10
10
 
11
- Live terminal screenshot with Pi 1.4.0.
12
-
13
11
  ## Highlights
14
12
 
15
13
  - **Pi header** with model, thinking level, working directory, and useful slash-command hints
16
- - **Responsive footer** with Git state, detected runtime, context usage, token counts, cost, and extension status
17
- - **Framed editor** with block, bar, and underline cursor styles; it preserves compatible editors installed by other extensions
18
- - **Project awareness** for 50+ runtimes and detailed Git states, including ahead/behind, staged, modified, untracked, stashed, and detached HEAD
19
- - **Turn telemetry** for TPS, time to first token (TTFT), duration, stalls, tokens, and list-price rate
20
- - **Thinking peek**: an inline ticker replaces Pi's hidden `Thinking...` label with the tail of the model's reasoning while it works
21
- - **Interactive settings** through `/open-tui`, available in English and Simplified Chinese
14
+ - **Responsive footer** with Git state, detected runtime, context usage, tokens, cost, and extension status
15
+ - **Framed editor** with block, bar, and underline cursors, preserving compatible editors from other extensions
16
+ - **Project awareness** for 50+ runtimes and detailed Git state, including ahead/behind, staged, modified, untracked, stash, and detached HEAD
17
+ - **Turn telemetry** with generation speed, time to first token, duration, stalls, tokens, and cost rate
18
+ - **Thinking peek** with a live preview of hidden reasoning while the model works
19
+ - **Compact tool view** with edit/write previews and optional support for extension and MCP tools
20
+ - **Fullscreen Copy buttons** for code blocks and user messages
21
+ - **Interactive settings** in English and Simplified Chinese through `/open-tui`
22
22
 
23
23
  ## Requirements
24
24
 
25
- - Pi 1.2.0 or later
25
+ - Pi 1.5.0 or later
26
26
  - Node.js 22.19.0 or later (Pi's minimum)
27
27
  - A terminal with UTF-8 and color support
28
- - A [Nerd Font](https://www.nerdfonts.com/font-downloads) for the full icon set (optional; portable Unicode icons are built in)
28
+ - A [Nerd Font](https://www.nerdfonts.com/font-downloads) for the full icon set (optional; Unicode and ASCII modes are available)
29
29
 
30
30
  ## Install
31
31
 
@@ -43,132 +43,64 @@ pi -e npm:pi-open-tui
43
43
 
44
44
  ## Font and icons
45
45
 
46
- Download any patched font from the official [Nerd Fonts downloads page](https://www.nerdfonts.com/font-downloads) or [latest GitHub release](https://github.com/ryanoasis/nerd-fonts/releases/latest). Install it, select that font in your terminal profile, and restart the terminal.
47
-
48
- The default `auto` mode checks the terminal environment, not the installed font file. It uses Nerd Font icons in interactive UTF-8 TTYs, including terminals running through a runner or subshell. If icons appear as boxes or incorrect symbols, open `/open-tui` and choose one of these modes under **Appearance**:
49
-
50
- - `nerd`: force Nerd Font icons after configuring a Nerd Font in the terminal
51
- - `unicode`: portable Unicode icons (folder, branch, laptop, bulb, plug, hourglass, ...) that render without a patched font; emoji glyphs use the terminal's emoji fallback
52
- - `ascii`: use plain-text icons with no patched font required
53
- - `auto`: use Nerd Font icons in interactive UTF-8 TTYs; use portable Unicode icons for SSH sessions (the client terminal controls the font and usually has no Nerd Font); use ASCII for non-interactive output, `TERM=dumb`, or an explicitly non-UTF-8 locale
46
+ For the full icon set, install a [Nerd Font](https://www.nerdfonts.com/font-downloads), select it in your terminal profile, and restart the terminal. Installing the font in the OS alone is not enough for apps such as VS Code or Windows Terminal.
54
47
 
55
- If the font is installed but `auto` still selects ASCII, choose `nerd` explicitly. In VS Code, Windows Terminal, and similar apps, configure the font in the terminal profile rather than only installing it in the operating system. If your SSH client terminal does ship a Nerd Font and you want the full icon set over SSH, set the mode to `nerd` explicitly.
48
+ In `/open-tui`, **Appearance → Icons** offers `auto`, `nerd`, `unicode`, and `ascii`. The default `auto` mode checks the terminal environment, not the installed font. If icons appear as boxes, choose `unicode`; if your terminal has a Nerd Font, you can force `nerd`, including over SSH.
56
49
 
57
- If wide Nerd Font icons visually consume the gap before their labels (for example in Kitty), enable `footerSegments.nerdIconSpacing` (**Footer → Extra space after Nerd icons** in `/open-tui`). The footer then reserves an extra blank cell after Nerd Font icons, including runtime icons, and includes it in regular and inline footer width calculations. Unicode/ASCII icons and compact Git status flags are unchanged. In Kitty, `narrow_symbols U+E000-U+F8FF 1` in `kitty.conf` is an alternative.
50
+ See [icon detection and spacing](./docs/configuration.md#icons) for automatic selection rules and the Kitty spacing option.
58
51
 
59
52
  ## Configuration
60
53
 
61
- Run `/open-tui` to open the settings dialog. It provides **General**, **Appearance**, **Footer**, and **Telemetry** tabs and adapts to the terminal size. Settings are stored in `open-tui.json` inside Pi's agent directory, which defaults to `~/.pi/agent`; `PI_CODING_AGENT_DIR` overrides that directory. If saving fails, a warning explains that the change applies only to the current session.
62
-
63
- Example configuration:
64
-
65
- ```json
66
- {
67
- "enabled": true,
68
- "header": true,
69
- "inlineFooter": false,
70
- "copyButtons": true,
71
- "settingsLanguage": "en",
72
- "cursorStyle": "block",
73
- "icons": {
74
- "mode": "auto"
75
- },
76
- "footerSegments": {
77
- "cwd": true,
78
- "hostname": false,
79
- "sessionName": false,
80
- "gitBranch": true,
81
- "gitStatus": true,
82
- "gitCommit": false,
83
- "runtime": true,
84
- "context": true,
85
- "tokens": true,
86
- "cost": true,
87
- "liveTps": true,
88
- "extensionStatuses": true,
89
- "capitalizeProviderName": true,
90
- "nerdIconSpacing": false
91
- },
92
- "telemetry": {
93
- "enabled": true,
94
- "tps": true,
95
- "ttft": true,
96
- "duration": true,
97
- "tokens": true,
98
- "stalls": true,
99
- "cost": true
100
- },
101
- "thinkingPeek": {
102
- "lines": 1
103
- },
104
- "toolView": {
105
- "mode": "native"
106
- }
107
- }
108
- ```
54
+ Run `/open-tui` to open the settings dialog. Its **General**, **Appearance**, **Footer**, and **Telemetry** tabs are available in English and Simplified Chinese and adapt to the terminal size. Use Tab/Shift+Tab or ←/→ to switch tabs, ↑/↓ to move, Enter/Space to change a value, and Esc/q to close.
109
55
 
110
- Key options:
56
+ Settings are stored in `open-tui.json` inside Pi's agent directory (default: `~/.pi/agent`; overridden by `PI_CODING_AGENT_DIR`). If saving fails, a warning explains that the change applies only to the current session.
111
57
 
112
- | Option | Values | Notes |
58
+ | Setting | Where to find it | Default |
113
59
  | --- | --- | --- |
114
- | `settingsLanguage` | `en`, `zh` | Changes the `/open-tui` interface language |
115
- | `header` | `true`, `false` | Overrides Pi's header with the open-tui header; set it to `false` to leave the header slot to Pi or another extension |
116
- | `inlineFooter` | `true`, `false` | Moves the two main Footer rows into the editor's top and bottom borders; defaults to `false`. Extension status rows remain below the editor |
117
- | `copyButtons` | `true`, `false` | Frames code blocks and shows a clickable `[Copy]` label on code blocks and user messages in fullscreen mode; defaults to `true`. See [Copy buttons](#copy-buttons) |
118
- | `cursorStyle` | `block`, `bar`, `underline` | `bar` and `underline` require terminal cursor-shape support |
119
- | `icons.mode` | `auto`, `nerd`, `unicode`, `ascii` | Controls footer and telemetry icons |
120
- | `footerSegments` | Boolean flags | Shows or hides individual footer data |
121
- | `footerSegments.capitalizeProviderName` | Boolean | Capitalizes the first character of the provider name in the footer; set it to `false` to keep the provider's original casing |
122
- | `footerSegments.nerdIconSpacing` | Boolean | Adds an extra blank cell after Nerd Font icons in the footer; defaults to `false` |
123
- | `telemetry` | Boolean flags | Enables telemetry and its individual measurements |
124
- | `thinkingPeek.lines` | `0`, `1`, `2` | Off, one-line, or two-line hidden thinking preview |
125
- | `toolView.mode` | `native`, `compact` | Pi's native cards (default) or compact call/summary rows with successful edit/write previews. Applies to rows created after the change |
126
-
127
- `sessionName` appears only when the session has a name. `hostname` shows the short host name (first label of the machine's host name, e.g. `mba` from `mba.example.com`) with a server icon. In detached HEAD state, `gitBranch` shows `HEAD` with the short commit hash; `gitCommit` appends the tag pointing at that commit and only takes effect while `gitBranch` is on. Disabling `extensionStatuses` hides the entire extension status line, including MCP status. Each status keeps the colours its extension applied with `ctx.ui.theme.fg()`. A status without colours renders in the muted theme colour.
60
+ | Header and settings language | General → Interface | Header on, English |
61
+ | Thinking peek | General → Messages & tools | 1 line |
62
+ | Copy buttons | General → Messages & tools | On, fullscreen only |
63
+ | Tool view | General → Messages & tools | Native |
64
+ | Footer in editor border | General → Footer | Off |
65
+ | Icons and cursor style | Appearance | Auto icons, block cursor |
66
+ | Footer fields and telemetry measurements | Footer / Telemetry | Individually configurable |
128
67
 
129
- Footer token and cost totals include assistant responses, tool-reported usage, compaction and branch summaries, and cache warming. The cache-hit percentage describes the most recent assistant response, not the cumulative session.
68
+ Selecting **Tool view: Compact** reveals **Compact extension tools** as a child setting. Switching back to Native hides it and retains its value. The [configuration reference](./docs/configuration.md#english) contains the complete JSON defaults, every option, and tool exclusions.
130
69
 
131
- When the first Footer row is too narrow, the runtime and context bar are hidden first, then Git, the session name, and the host name and timer. The CWD stays longest, shortened to its folder name.
70
+ ## Header, footer, and editor
132
71
 
133
- With `inlineFooter` enabled, the two normal Footer rows are rendered inside the editor frame to save vertical space. The top border places the Git branch on the left and CWD first in the right-hand group; the session title appears on the left too when `sessionName` is enabled. The Header and extension status rows remain separate; narrow terminals truncate lower-priority Footer data first, keeping the right-hand statistics and the border corner.
72
+ The header provides model and project context with command hints. The two main footer rows keep location, Git state, runtime, a working/done timer, context usage, model details, tokens, and cost visible as space allows. Fields can be toggled individually; the layout shortens or hides lower-priority information in narrow terminals.
134
73
 
135
- open-tui frames existing editors that retain Pi’s native editor layout and its cursor, mouse, and padding APIs, including `CustomEditor` extensions. It decorates the same instance, preserving ghost text, key handling, completion, and submit callbacks. Editor extensions using the current `ctx.ui.setEditorComponent()` API can register before or after `pi-open-tui`; runtime replacements, including those made from shortcut callbacks with a fresh UI context, are framed too. Replacements are decorated when Pi mounts them, without calling the extension's factory again; temporary dialogs are left alone. Before decorating, open-tui renders the editor once at the terminal width to check for recognizable native top and bottom borders. Each framed render also checks its actual output; layouts without those borders are rendered again at the full requested width without frame mouse offsets, and framing resumes when native borders return. Editors without those capabilities or borders, or whose layout probe throws, remain unchanged, with the footer displayed separately even when `inlineFooter` is enabled. Disabling open-tui removes its decoration, restores the registration methods, and keeps the latest editor factory, including wrappers registered after open-tui.
74
+ Footer token and cost totals include assistant responses, tool-reported usage, compaction and branch summaries, and cache warming. The cache-hit percentage describes the latest assistant response. Other extensions can use separate status rows or [contribute text directly to the main footer](./docs/footer-segments.md).
136
75
 
137
- This ordering guarantee applies to editor registration, not header or footer replacements. Extensions that bypass the current registration API by calling a previously saved setter or replacing the API methods themselves are outside this guarantee.
76
+ Enable **Footer in editor border** to move the two main rows into the editor's top and bottom borders. Extension status rows remain below the editor. Compatible editors keep their input behavior, completion, and ghost text; editors that cannot be framed retain a separate footer. See [editor compatibility and layout](./docs/implementation.md#editor-and-layout) for the integration boundaries.
138
77
 
139
78
  ## Turn telemetry
140
79
 
141
- After each complete agent run, pi-open-tui shows one transient result. Tool-call turns are combined into that result:
80
+ After each complete agent run, pi-open-tui shows one transient result, combining its assistant turns:
142
81
 
143
82
  ```text
144
83
  > TPS 42.5 tok/s | ~ TTFT 1.2s | + 29.7s | ↑ 567 | ↓ 1.2k | ! stall 1x / 4.3s | $ $3.60/M
145
84
  ```
146
85
 
147
- TPS is calculated from all provider-reported assistant output tokens divided by the total generation time across the run. Timing starts at `turn_start` and ends at the assistant `message_end`, so it includes TTFT, hidden reasoning, buffering, and stalls; tool execution between turns is excluded. Runs without output tokens or measurable generation time show `TPS —`.
86
+ TPS measures provider-reported output tokens over generation time, including waiting and stalls but excluding tool execution between turns. The working timer also shows an estimated live speed such as `~54 tok/s` during streaming. The `$ / M` field is the effective rate per million tokens for the run; the footer shows cumulative session cost.
148
87
 
149
- While a response streams, the working timer also shows the current estimated speed, for example `working 12.3s · ~54 tok/s`. The `~` marks it as an estimate: it is the rate over the last 2 seconds of streamed text, thinking, and tool-call arguments, estimated at about 4 characters per token for Latin text and code and 1 token per CJK character. It drops toward zero during stalls and stays dimmed at its last value during tool execution and between messages. It is controlled by **Footer → Live TPS** (`footerSegments.liveTps`), independently of the telemetry notification. It disappears when the run ends; the exact TPS above is the authoritative value.
150
-
151
- The `$ / M` value is the model's list-price rate from `usage.cost.total`, not the cumulative session cost shown in the footer. Every telemetry field can be toggled from the **Telemetry** tab.
88
+ Toggle notification fields under **Telemetry → Measurements**, or live speed under **Footer → Runtime → Live TPS**. See [measurement definitions](./docs/implementation.md#usage-and-telemetry) for formulas, timing boundaries, and cache accounting.
152
89
 
153
90
  ## Thinking peek
154
91
 
155
- When Pi's **Hide thinking** setting is enabled, pi-open-tui shows a compact ticker in the native hidden thinking block's `Thinking...` position. The `/open-tui` setting offers three modes: **Off**, **1 line**, and **2 lines**.
156
-
157
- - while the model is reasoning, the current thinking tail streams by with a spinner (`~ think ⠋ …`);
158
- - when the answer starts, it settles on a check mark (`~ think ✓`);
159
- - in 2-line mode, the previous and latest thinking lines share the same text indentation; if the latest line overflows, both rows follow its newest tail as tokens arrive instead of retaining the previous line;
160
- - after the task settles, the native `Thinking...` label is restored.
92
+ With Pi's **Hide thinking** enabled, pi-open-tui replaces the hidden block's `Thinking...` label with the latest reasoning tail while the model works:
161
93
 
162
94
  ```text
163
95
  ~ think ⠋ previous thought
164
96
  latest thought
165
97
  ```
166
98
 
167
- The ticker appears only once the model actually streams reasoning, so non-reasoning models never show it. Pi's own Hide thinking toggle controls visibility; changing it takes effect immediately. Each row is truncated by *visible* width, so CJK-wide thinking text cannot overflow. Configure it from **General → Thinking peek** in `/open-tui`, or via `thinkingPeek.lines` in `open-tui.json`.
99
+ Choose **Off**, **1 line**, or **2 lines** under **General → Messages & tools → Thinking peek**. The ticker appears only when the model streams reasoning, settles on a check mark when the answer begins, and returns to Pi's native label after the task settles. It follows Pi's Hide thinking toggle immediately and clips text to fit the available width.
168
100
 
169
101
  ## Tool view
170
102
 
171
- **Native** remains the default. With **General → Tool view** set to **Compact** (`toolView.mode: "compact"`), Pi's built-in tools (`read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`) render as one call line and one summary line, with previews for successful edits and writes:
103
+ **Native** remains the default. Select **General → Messages & tools → Tool view → Compact** to display Pi's built-in tools (`read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, `ls`) as call and summary rows:
172
104
 
173
105
  ```text
174
106
  ● Read(extensions/open-tui/footer.ts:1-120)
@@ -179,18 +111,17 @@ The ticker appears only once the model actually streams reasoning, so non-reason
179
111
  └ Done · 131 lines · 6.4s
180
112
  ```
181
113
 
182
- - Successful calls have dim call/summary text and a green dot. Pending dots are dim; running dots alternate between accent and dim once per second. Errors keep the red dot and summary. Failed shell summaries retain the last output line; while running, shell commands show the newest 3 output lines and elapsed time.
183
- - Successful `edit` previews parse Pi's actual diff and syntax-highlight old and new code separately. Removed/added rows have red/green background bands ending two columns before the terminal's right edge. Stronger changed-word backgrounds apply only to paired adjacent removed/added lines sharing at least 30% non-whitespace content; exceeding the matching budget falls back to whole-line highlighting. Without a valid diff, the summary stays.
184
- - Successful `write` previews show syntax-highlighted content with line numbers and no `+` signs on the normal, neutral terminal background. New files and overwrites look the same; no old-file diff is shown. Partial results and errors get no success previews.
185
- - Preview bodies show at most 16 rows; longer bodies show the first 16 plus a hidden-row count and `Ctrl+O` hint. Edit context and ellipsis rows count toward these limits. In compact mode only, long lines truncate horizontally with `…` instead of wrapping.
186
- - Clicking a row expands only that row into Pi's native card, and `Ctrl+O` expands all rows. Native expanded rendering, including full output, diffs, and truncation notices, is unchanged. Calls remain separate, with no grouping or extra configuration.
187
- - Only the display changes. Tools, arguments, results, and what the model sees are untouched. Only tools confirmed by Pi as built-in are wrapped; third-party and MCP tools, including replacements with built-in names, keep their own rendering.
188
- - Compact summaries flag truncated output, including grep's long-line truncation. Bracketed output and failure messages are preserved rather than mistaken for tool notices.
189
- - The mode is chosen when Pi creates a row, so switching it affects new rows; `/reload` or a new session applies it to the whole transcript.
114
+ - Successful `edit` and `write` calls show syntax-highlighted previews of up to 16 rows, with a hint to expand longer output.
115
+ - Running shell calls show recent output and elapsed time; errors retain their error summary.
116
+ - Click a row to expand its native card, or use `Ctrl+O` to expand all rows. Tools, arguments, results, and model-visible content are unchanged.
117
+ - Enable **Compact extension tools** to include extension and MCP tools. Use `toolView.exclude` in the config file for tools that should keep native rendering. Recognized `@ff-labs/pi-fff` tools receive search-specific summaries.
118
+ - Changing the mode affects newly created rows. Use `/reload` or a new session to apply it to the whole transcript.
119
+
120
+ See [tool rendering details](./docs/implementation.md#tool-rendering) for preview rules, extension summaries, and renderer compatibility.
190
121
 
191
122
  ## Copy buttons
192
123
 
193
- In fullscreen mode (Pi's `tuiMode: "fullscreen"`), every fenced code block is drawn in a rounded frame with its language and an always-visible `[Copy]` label in the top border, and every user message gets a `[Copy]` label too. Click it to put the source text on the clipboard; Pi flashes `Copied!`.
124
+ In fullscreen mode (Pi's `tuiMode: "fullscreen"`), completed code blocks show a clickable `[Copy]` label in their rounded frame when there is enough width. User messages have a Copy label too. Clicking copies the source text and Pi flashes `Copied!`.
194
125
 
195
126
  ```text
196
127
  ╭─ sh ─────────────── [Copy] ╮
@@ -198,15 +129,16 @@ In fullscreen mode (Pi's `tuiMode: "fullscreen"`), every fenced code block is dr
198
129
  ╰────────────────────────────╯
199
130
  ```
200
131
 
201
- - Code blocks: the frame replaces the two fence rows, so a block keeps its height; long lines wrap inside the frame. The label copies the code without the fences, with indentation and tabs preserved. This applies to code in both user and assistant messages.
202
- - User messages: the label sits on the bubble's last row and copies the message as you typed it.
203
- - Whole assistant replies have no label; use Pi's `/copy` for that.
204
- - While a reply streams, its code blocks are framed without a label, so you cannot copy unfinished code. The label is also dropped when the frame is too narrow; thinking blocks keep Pi's plain fences.
205
- - Regular mode has no mouse capture, so code blocks keep Pi's plain fences there.
206
- - Drag-selecting across a frame includes its border characters and the `[Copy]` text.
207
- - If pi-pretty-tui is installed, its own code-block frames and copy buttons are kept and these are not drawn.
132
+ Code labels copy code without fences, preserving indentation and tabs. User-message labels copy the original message. Streaming code blocks gain their label when streaming finishes; regular mode and thinking blocks keep Pi's plain fences. Use Pi's `/copy` to copy a whole assistant reply.
133
+
134
+ Toggle **General → Messages & tools → Copy buttons** to enable or disable this feature. [Copy-button details](./docs/implementation.md#copy-button-behavior) cover width limits, cached blocks, and interaction with other renderers.
135
+
136
+ ## Documentation
208
137
 
209
- Toggle it from **General → Copy buttons** in `/open-tui`, or via `copyButtons` in `open-tui.json`.
138
+ - [Configuration reference](./docs/configuration.md#english) — complete defaults, options, and icon selection
139
+ - [Implementation and compatibility](./docs/implementation.md#english) — measurement formulas, layout, rendering, and lifecycle
140
+ - [Extension footer segments](./docs/footer-segments.md) — public events and an integration example for extension authors
141
+ - [Changelog](./CHANGELOG.md) — released and upcoming changes
210
142
 
211
143
  ## Local development
212
144
 
@@ -217,7 +149,7 @@ npm run typecheck
217
149
  pi -e .
218
150
  ```
219
151
 
220
- CI checks Pi 1.2.0 and the latest release on Node.js 22.19.0 and 24, across Linux, Windows, and macOS. Keep Pi packages on the same version when checking compatibility. Automated tests do not replace checking terminal fonts, mouse interaction, and cursor support with `pi -e .`.
152
+ CI checks Pi 1.5.0 and the latest release on Node.js 22.19.0 and 24 across Linux, Windows, and macOS. Keep all Pi packages on the same version. Use `pi -e .` to check terminal fonts, mouse interaction, and cursor support interactively.
221
153
 
222
154
  ## Acknowledgements
223
155
 
@@ -227,6 +159,7 @@ This project builds on several Pi community packages:
227
159
  - **[pi-claude-code-tui](https://github.com/Phoobobo/pi-claude-code-tui)** — Pi logo artwork and rounded editor border technique
228
160
  - **[pi-zentui](https://github.com/lmilojevicc/pi-zentui)** — Starship-style footer segments, runtime detection, session lifecycle, and settings UI pattern
229
161
  - **[pi-tps](https://github.com/monotykamary/pi-tps)** — turn timing, stall detection, and conservative TPS measurement
162
+ - **[pi-polish](https://github.com/Pringled/pi-extensions/blob/main/packages/pi-polish)** — compact tool-call rows and syntax-highlighted edit diffs
230
163
 
231
164
  The logo artwork is derived from Pi's official install script (`pi.dev/install.sh`). Runtime detection and Git porcelain parsing borrow structure from `pi-zentui`.
232
165