pi-compact-transcript 0.4.0 → 0.6.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,17 +1,28 @@
1
1
  # pi-compact-transcript
2
2
 
3
- A compact transcript extension for [pi](https://pi.dev):
3
+ A compact transcript extension for [pi](https://pi.dev).
4
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.
11
- - Expanded tool output still falls back to pi's original renderer, so you can use pi's normal tool expansion when details matter.
12
- - Minimizes vertical space so long agent runs do not scroll away as quickly.
5
+ | With the extension | Without the extension|
6
+ |---|---|
7
+ | <img width="2131" height="552" alt="image" src="https://github.com/user-attachments/assets/4ec40fe8-13da-4415-8274-e26e43cca4e1" /> | <img width="2135" height="1275" alt="image" src="https://github.com/user-attachments/assets/b6fe8d3b-9170-435c-b353-98a6aa84fe7b" />
8
+ |
13
9
 
14
- ## Install from GitHub
10
+ What it does:
11
+
12
+ - Collapses every tool call/result into a dimmed one-line preview with a status diamond: blinking gray `◆` while running, green on success, red on failure. Durations show at a second or longer.
13
+ - Consecutive uses of the same tool coalesce into a single row, e.g. `◆ 4× read src/foo.ts {12 lines · 8s}`. Failed tools always get their own visible row.
14
+ - Each agent run ends with a one-line summary, e.g. `Read 6 files, edited 2, ran 3 commands, 1 failed · 42s`.
15
+ - Suppresses `Thinking...` markers when thinking is hidden.
16
+ - Works with custom/external tools from other extensions; unknown tools preview their most meaningful string argument (command, code, query, path, url, ...) instead of raw JSON.
17
+ - Expanded tool output still uses pi's original renderer, so pi's normal tool expansion works when details matter.
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ pi install npm:pi-compact-transcript
23
+ ```
24
+
25
+ Or from GitHub:
15
26
 
16
27
  ```bash
17
28
  pi install git:github.com/avhagedorn/pi-compact-transcript
@@ -29,17 +40,9 @@ Reload or restart pi after installing:
29
40
  /reload
30
41
  ```
31
42
 
32
- ## Install from npm
33
-
34
- Once published to npm:
35
-
36
- ```bash
37
- pi install npm:pi-compact-transcript
38
- ```
39
-
40
43
  ## Recommended settings
41
44
 
42
- The extension works best with hidden thinking and no output padding:
45
+ Works best with hidden thinking and no output padding — set in `~/.pi/agent/settings.json` or via `/settings`:
43
46
 
44
47
  ```json
45
48
  {
@@ -48,45 +51,20 @@ The extension works best with hidden thinking and no output padding:
48
51
  }
49
52
  ```
50
53
 
51
- Set these in `~/.pi/agent/settings.json`, or use `/settings` in pi.
54
+ Thinking suppression only applies when `hideThinkingBlock` is on; with it off, pi renders thinking traces normally.
52
55
 
53
56
  ## Commands
54
57
 
55
58
  ```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>
59
+ /compact-transcript # toggle on/off
60
+ /compact-transcript on|off # set explicitly
61
+ /compact-transcript status # show current state
65
62
  ```
66
63
 
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
- ```
64
+ Toggling re-renders the visible transcript immediately no reload needed. Pre-0.5 mode names (`balanced`, `aggressive`, `debug`, `disabled`) are accepted as legacy aliases for `on`/`off`.
87
65
 
88
66
  ## Notes
89
67
 
90
- This extension changes display only. Tool execution is still handled by pi and any other extensions that registered or override tools.
68
+ This extension changes display only tool execution is still handled by pi and any other extensions that registered or override tools.
91
69
 
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.
70
+ Compact rendering uses pi's public exported TUI components where available. Burst compaction and thinking suppression rely on pi's current TUI internals; if a future pi release changes those, the affected rows fall back to pi's normal rendering.