pi-pretty-tui 0.1.3 → 0.1.5
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/README.md +30 -8
- package/assets/screenshot.png +0 -0
- package/extensions/index.ts +1252 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# pi-pretty-tui
|
|
2
2
|
|
|
3
|
-
A visual refinement extension for the [Pi coding agent](https://pi.dev/). It provides compact tool-call rendering and cleaner list presentation while preserving Pi's built-in
|
|
3
|
+
A visual refinement extension for the [Pi coding agent](https://pi.dev/). It provides framed user messages, compact tool-call rendering, and cleaner list presentation while preserving Pi's built-in behavior.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
+
- Rounded, titled `User` message frames with theme-aware borders, filled backgrounds, and Markdown support
|
|
10
|
+
- A rounded prompt editor that preserves native cursor, IME, autocomplete, and mouse behavior
|
|
9
11
|
- Compact `Read`, `Bash`, `Edit`, `Write`, `Grep`, `Find`, and `List` calls
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- Concise per-tool call and result summaries with expandable details
|
|
13
|
+
- Native-style `Write` previews in `full` mode: first 10 lines when collapsed, full content when expanded
|
|
14
|
+
- Live `Bash` output in `full` mode: latest 5 lines when collapsed, all available output when expanded
|
|
15
|
+
- Switchable `full`, `compact`, and `clean` rendering modes with persistent settings
|
|
16
|
+
- Clean mode hides thinking blocks (including Pi's standalone `Thinking...` placeholder) while collapsed and reveals the original thinking content when expanded
|
|
14
17
|
- Colored `+added` and `-removed` edit statistics and diffs
|
|
15
18
|
- Correct hanging indentation for long paths and wrapped tool output
|
|
16
19
|
- Bullet (`•`) markers for unordered Markdown lists
|
|
@@ -25,15 +28,34 @@ Restart Pi or run `/reload` after installation.
|
|
|
25
28
|
|
|
26
29
|
Pi may warn that built-in tools are being overridden. This is expected: pi-pretty-tui re-registers Pi's built-in tools and delegates execution to their original implementations, changing only their TUI renderers.
|
|
27
30
|
|
|
31
|
+
## Rendering modes
|
|
32
|
+
|
|
33
|
+
Run `/pretty-tui` to choose a mode interactively, or set one directly:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/pretty-tui full
|
|
37
|
+
/pretty-tui compact
|
|
38
|
+
/pretty-tui clean
|
|
39
|
+
/pretty-tui status
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- `full`: preserve each tool's detailed call renderer and normal result preview. Press `Ctrl+O` to expand available output, diffs, and content.
|
|
43
|
+
- `compact`: when collapsed, all supported built-in tools use concise one-line call summaries and final result summaries. Long commands, written content, edit diffs, and tool output stay hidden until expanded; press `Ctrl+O` to reveal the full details.
|
|
44
|
+
- `clean` (default): collapse supported tool calls into a single `Running(...)` status; the activity slot shows a tool name as soon as its streamed tool call appears, such as `Running(3 tool calls · Read)`, and remains visible for at least 1 second before changing to `thinking...`. Once settled, the label becomes `Done(...)`. Click a group status to reveal all tools in that group as indented compact children while retaining the parent `Running`/`Done` row, then click an individual tool to toggle its full details. Visible assistant text starts a new tool group, so later calls get a separate status. Collapsed thinking blocks stay hidden without Pi's `Thinking...` placeholder; press `Ctrl+O` to reveal thinking content and all expanded tool calls/output in transcript order.
|
|
45
|
+
|
|
46
|
+
Clean mode covers the built-in tools managed by this package: `read`, `bash`, `edit`, `write`, `grep`, `find`, and `ls`. Third-party tools keep their own rendering.
|
|
47
|
+
|
|
48
|
+
The selected mode applies immediately and persists in `~/.pi/agent/pretty-tui.json` (or the directory selected by `PI_CODING_AGENT_DIR`).
|
|
49
|
+
|
|
28
50
|
## Expand tool output
|
|
29
51
|
|
|
30
|
-
Press `Ctrl+O` (Pi's default `app.tools.expand` keybinding) to show or hide detailed output, edit diffs,
|
|
52
|
+
Press `Ctrl+O` (Pi's default `app.tools.expand` keybinding) to show or hide detailed output, edit diffs, complete `Write` content, full tool details, and thinking content in `compact` or `clean` mode. In clean mode, mouse interaction also supports progressive disclosure: click a group status to retain it as a parent and reveal compact child tools, click one child for its full view, or click the parent again to collapse the group.
|
|
31
53
|
|
|
32
54
|
## Compatibility notice
|
|
33
55
|
|
|
34
|
-
Tool rendering uses Pi's documented extension APIs.
|
|
56
|
+
Tool rendering uses Pi's documented extension APIs. Clean thinking and active-tool state follow Pi's built-in expansion and execution transitions through its exported interactive components. Framing native user messages, rounding the native prompt editor, and changing unordered-list markers require reload-safe runtime patches because Pi does not currently expose public renderer hooks for those presentation details. User Markdown and terminal semantic zones remain handled by Pi, and code blocks use Pi's original renderer without modification.
|
|
35
57
|
|
|
36
|
-
No Pi source files are modified.
|
|
58
|
+
No Pi source files are modified. Runtime patches are removed during session shutdown, but a future Pi release may require this extension to be updated.
|
|
37
59
|
|
|
38
60
|
## Uninstall
|
|
39
61
|
|
package/assets/screenshot.png
CHANGED
|
Binary file
|