pi-compact-transcript 0.4.0 → 0.5.0

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 CHANGED
@@ -1,13 +1,22 @@
1
1
  # pi-compact-transcript
2
2
 
3
- A compact transcript extension for [pi](https://pi.dev):
4
-
5
- - Collapses hidden thinking blocks into `Thinking...` and consecutive thinking blocks into `Thinking... (Nx)`.
6
- - Shows only real collapsed thinking labels/counters; it does not invent next-step prose.
7
- - Collapses tool calls/results into one-line previews, including custom/external tools added by other extensions.
8
- - Consecutive non-mutating tool uses are summarized by count and kind, e.g. `Used 7 tools: 4 read, 2 grep, 1 bash · latest read src/foo.ts`.
9
- - Mutating tools (`edit`, `write`, configured mutation tools, and destructive-looking `bash` commands) stay visible as transcript anchors and break tool bursts.
10
- - Failed tools stay visible by default so errors are not hidden.
3
+ A compact transcript extension for [pi](https://pi.dev).
4
+
5
+ | Without the extension | With the extension |
6
+ |---|---|
7
+ | ![pi transcript without the extension](docs/plugin_disabled.png) | ![pi transcript with the extension](docs/plugin_enabled.png) |
8
+
9
+ What it does:
10
+
11
+ - Collapses every tool call/result into a one-line preview, including custom/external tools added by other extensions.
12
+ - Each tool row carries a status diamond: blinking gray `◆` while the tool runs, solid green `◆` on success, solid red `◆` on failure.
13
+ - Consecutive uses of the same tool coalesce into a single row, e.g. `◆ 4× read src/foo.ts {12 lines · 8s}`; a different tool starts a new row with its own diamond.
14
+ - Tool rows show durations when they take a second or longer; grouped rows show the total.
15
+ - Failed tools always get their own visible row (red diamond) and end the current burst.
16
+ - Tool rows render dimmed so assistant text stands out.
17
+ - Hidden thinking blocks are suppressed entirely — no `Thinking...` markers.
18
+ - Each agent run ends with a one-line summary, e.g. `Read 6 files, edited 2, ran 3 commands, 1 failed · 42s`.
19
+ - Unknown tools preview their most meaningful string argument (command, code, query, path, url, ...) instead of dumping raw JSON args.
11
20
  - Expanded tool output still falls back to pi's original renderer, so you can use pi's normal tool expansion when details matter.
12
21
  - Minimizes vertical space so long agent runs do not scroll away as quickly.
13
22
 
@@ -50,43 +59,20 @@ The extension works best with hidden thinking and no output padding:
50
59
 
51
60
  Set these in `~/.pi/agent/settings.json`, or use `/settings` in pi.
52
61
 
62
+ Thinking suppression only applies when `hideThinkingBlock` is on; with it off, pi renders thinking traces normally.
63
+
53
64
  ## Commands
54
65
 
55
66
  ```text
56
- /compact-transcript # open the settings-style panel
57
- /compact-transcript status # same as above
58
- /compact-transcript disabled|balanced|aggressive|debug
59
- /compact-transcript custom-tools on|off
60
- /compact-transcript failed on|off
61
- /compact-transcript bash-mutations on|off
62
- /compact-transcript always-show <tool[,tool]|/regex/|clear>
63
- /compact-transcript mutation-tools <tool[,tool]|/regex/|clear>
64
- /compact-transcript template <tool|/regex/> <template|clear>
67
+ /compact-transcript # toggle on/off
68
+ /compact-transcript on|off # set explicitly
69
+ /compact-transcript status # show current state
65
70
  ```
66
71
 
67
- In interactive pi, `/compact-transcript` opens a focused settings-style panel in the editor area. Press `Enter`/`Space` to toggle values, edit list/template rows inline, and `Esc` to close it.
68
-
69
- Modes:
70
-
71
- - `balanced` (default): compact non-mutating bursts, keep mutations/failures visible, and preserve normal hidden-thinking markers.
72
- - `aggressive`: shorter previews and coalesced thinking-only markers.
73
- - `debug`: compact rows but do not hide earlier burst rows; useful when tuning rules.
74
- - `disabled`: fully disable compact-transcript rendering for future rows. (`off` is accepted as a legacy alias.)
75
-
76
- Switching modes never changes the other toggles (custom tools, failed tools, bash anchors); those are independent settings.
77
-
78
- Preview templates support `{name}`, `{args}`, top-level argument names like `{path}` and `{command}`, and nested fields like `{arg.query.text}`. In the panel, edit templates as semicolon-separated `tool=template` pairs, so template text itself cannot contain `;`.
79
-
80
- Examples:
81
-
82
- ```text
83
- /compact-transcript always-show ask_user_question,/^deploy_/
84
- /compact-transcript mutation-tools db_query,kubectl
85
- /compact-transcript template fetch_content fetch {url}
86
- ```
72
+ Toggling applies to the visible transcript immediately existing rows re-render, no reload needed. The pre-0.5 mode names (`balanced`, `aggressive`, `debug`, `disabled`) are accepted as legacy aliases for `on`/`off`.
87
73
 
88
74
  ## Notes
89
75
 
90
76
  This extension changes display only. Tool execution is still handled by pi and any other extensions that registered or override tools.
91
77
 
92
- For built-in and extension tools, compact rendering uses pi's public exported TUI components where available. The cross-tool burst compaction and consecutive-thinking coalescing still rely on pi's current TUI component internals, so if pi changes those internals in a future release, the extension falls back to pi's normal rendering behavior for the affected rows.
78
+ For built-in and extension tools, compact rendering uses pi's public exported TUI components where available. The cross-tool burst compaction and thinking suppression still rely on pi's current TUI component internals, so if pi changes those internals in a future release, the extension falls back to pi's normal rendering behavior for the affected rows.