@each1024/pi-mini-mode 1.3.15 → 2.0.1

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,8 +1,6 @@
1
- <p>
2
- <img src="assets/readme-cover.en.svg" alt="Pi Mini Mode — Less noise. More focus. Image input, foldable conversations, subagents, themes and a live footer." width="100%">
3
- </p>
1
+ ![Pi Mini Mode — Less noise. More focus. Image input, foldable conversations, subagents, themes and a live footer.](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/readme-cover.en.svg)
4
2
 
5
- [中文](README.zh-CN.md) · [Install](#install) · [Features](#features) · [Commands](#commands) · [Reference](#reference)
3
+ [中文](https://github.com/eachann1024/pi-mini-mode/blob/main/README.zh-CN.md) · [Install](#install) · [Features](#features) · [Reference](#reference)
6
4
 
7
5
  # Pi Mini Mode
8
6
 
@@ -10,16 +8,35 @@
10
8
 
11
9
  An everyday refinement for [Pi](https://pi.dev), not just a footer. Preview images at the cursor, fold long messages and process details, inspect subagent work, and keep your session’s essential signals in view.
12
10
 
11
+ <details>
12
+ <summary>See the full interface</summary>
13
+
14
+ ![Pi Mini Mode interface](https://github.com/user-attachments/assets/9990b080-f82b-4dd0-bc7b-a0cdded72181)
15
+
16
+ </details>
17
+
13
18
  ## Install
14
19
 
15
20
  ```bash
16
21
  pi install npm:@each1024/pi-mini-mode
17
22
  ```
18
23
 
19
- Run `/reload` in Pi. On the first interactive TUI session, choose **Apply recommended setup** to select `cc-dark` or `cc-light` and save the theme plus `tuiMode=fullscreen` globally; restart Pi for fullscreen to take effect. Project settings and CLI flags may override global settings. You can retry later with `/pi-mini-mode-setup`, or configure only Pi Mini Mode with `/pi-mini-mode-settings`.
24
+ In an open Pi session, run Pi's built-in `/reload` command. On first use, choose **Apply recommended setup** for a bundled theme and fullscreen mode, then restart Pi for fullscreen to take effect. Configure this extension any time with `/pi-mini-mode-settings`. Project settings and CLI flags may override global settings.
20
25
 
21
26
  **Pi ≥ 0.84.0.** Input enhancements and minimal output are on by default. Minimal mode uses a private **Pi 0.85.x** layout adapter—see [compatibility](#compatibility) before enabling it.
22
27
 
28
+ ### Update an existing npm installation
29
+
30
+ ```bash
31
+ pi update npm:@each1024/pi-mini-mode
32
+ ```
33
+
34
+ Then run `/reload` in Pi and reopen `/pi-mini-mode-settings` (or restart Pi). The HTML settings page ships with the extension; no separate npm command or development server is needed. Publishing does not update users' installed copies or already-open browser tabs automatically. Pinned versions must first be replaced with `pi install npm:@each1024/pi-mini-mode@latest`; local development installs continue to use local files.
35
+
36
+ **`pi update` updates Pi itself by default, not its plugins.** Use `pi update --extensions` for all plugins, or `pi update --all` for both. `/reload` reloads files already on disk; it does not download updates.
37
+
38
+ **Older `1.3.x` installations:** this package's version was previously reset to `0.9.x` / `1.0.x`. Pi treats the installed `1.3.x` as newer than npm `latest`, skipping both updates and update notifications. Version **2.0.0** restores a version higher than the historical stable maximum `1.3.15`, so normal plugin updates can resume. If an installation is still stuck, explicitly reinstall the current `latest` with `pi install npm:@each1024/pi-mini-mode@latest`, then `/reload` and reopen settings. First check `pi list` to confirm Pi loads the npm source, not a local path or another copy. Use the `@latest` tag rather than an exact version; an install without a tag may retain the saved dependency range.
39
+
23
40
  <details>
24
41
  <summary>Install from GitHub instead</summary>
25
42
 
@@ -33,6 +50,8 @@ pi install git:github.com/eachann1024/pi-mini-mode
33
50
 
34
51
  ### 01 / Input, refined
35
52
 
53
+ ![Image previews and compact labels in Pi Mini Mode](https://github.com/user-attachments/assets/2ea6d037-d3f0-423c-8588-17992a49d445)
54
+
36
55
  **Images at your cursor.** Move the editing cursor into an image path or compact label to preview it. Fullscreen also supports editor hover. Press `Esc` to dismiss.
37
56
 
38
57
  **Less path clutter. Same image.** Image paths become underlined `[image1]` labels in the editor and messages, preserving the original path when submitted. Open the original image or another linked file in its default app using your terminal’s link gesture.
@@ -43,15 +62,19 @@ Paste images with `Ctrl+V` (`Alt+V` on Windows/WSL). Disabling input enhancement
43
62
 
44
63
  ### 02 / Process, quieter
45
64
 
46
- Enable **Minimal output** in settings, or run `/pi-mini-mode-minimal on`.
65
+ Enable **Minimal output** in `/pi-mini-mode-settings`.
66
+
67
+ ![Folded process tree in minimal output](https://github.com/user-attachments/assets/eb8c88f6-84af-499e-b105-5395b4f02e66)
47
68
 
48
- - **Long prompts, folded.** In fullscreen minimal mode, long user messages show the first four rendered rows. Click the fold control to reveal the rest, or select a message with `/pi-mini-mode-prompts`. Complete fenced code blocks stay intact.
49
- - **Subagents, in plain sight.** Click a subagent row to expand its available activity and message/final output. A dispatch receipt or returned tool call is not a completed background task.
50
- - **A process tree, not a wall of output.** Thinking, tools and skill reads share one chronological tree. The latest ten summaries stay visible; `Ctrl+O` expands or collapses the full process. New questions start collapsed.
51
- - **Tool details on demand.** Expand a tool/thinking entry using its fold control or `/pi-mini-mode-tools`. Tool details show saved text, not the original custom renderer or image output.
69
+ - **Long prompts, folded.** In fullscreen minimal mode, long user messages show the first four rendered rows. Click the fold control to reveal the rest. Complete fenced code blocks stay intact.
70
+ - **Subagents, in plain sight.** Click a subagent row to expand its available activity and message/final output. In minimal mode, this extension uses `Ctrl+S` to expand or collapse completed subagent summaries; Pi's focused selectors keep their own keys. A dispatch receipt or returned tool call is not a completed background task.
71
+ - **A process tree, not a wall of output.** Thinking, tools and skill reads share one chronological tree. The latest summaries stay visible, including the latest thinking; `Ctrl+O` expands or collapses the full process. New questions start collapsed.
72
+ - **Tool details on demand.** Expand a tool or thinking entry, including the latest thinking, using its fold control. Thinking starts collapsed and only expands or collapses manually, including while running. Tool details show saved text, not the original custom renderer or image output.
52
73
  - **Room for the answer.** Final Markdown streams without extra headings or backgrounds. Failures and interruptions stay explicit. Folding changes presentation, not stored session messages.
53
74
 
54
- `/pi-mini-mode-history` opens complete process entries, five at a time. `/pi-mini-mode-minimal off` restores native Pi history.
75
+ Turn **Minimal output** off in settings to restore native Pi history.
76
+
77
+ ![Expanded process details](https://github.com/user-attachments/assets/53f5aa28-4b96-45db-b02e-0108aa9e68bc)
55
78
 
56
79
  ### 03 / Session, in focus
57
80
 
@@ -62,7 +85,7 @@ Enable **Minimal output** in settings, or run `/pi-mini-mode-minimal on`.
62
85
  <details>
63
86
  <summary>See the footer settings and demo</summary>
64
87
 
65
- [![Existing footer settings screenshot](assets/pi-mini-mode-settings.jpg)](assets/pi-mini-mode-settings.jpg)
88
+ [![Existing footer settings screenshot](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/pi-mini-mode-settings.jpg)](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/pi-mini-mode-settings.jpg)
66
89
 
67
90
  [Watch the footer settings demo](https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763)
68
91
 
@@ -70,25 +93,9 @@ This earlier screenshot and recording show footer configuration, not the newer i
70
93
 
71
94
  </details>
72
95
 
73
- ## Commands
74
-
75
- | Command / shortcut | Purpose |
76
- | --- | --- |
77
- | `/pi-mini-mode-settings` | Configure fields, input enhancements and minimal output |
78
- | `/pi-mini-mode-setup` | Choose the bundled theme and save global fullscreen mode; restart Pi afterward |
79
- | `/pi-mini-mode-minimal on` / `off` | Enable minimal output / restore native history |
80
- | `Ctrl+O` | Expand or collapse the complete process tree |
81
- | `Ctrl+S` | Expand or collapse completed subagent rows; yields to Pi `/model`, `/thinking`, and other selectors |
82
- | `/pi-mini-mode-prompts` | Select and expand/collapse a user message¹ |
83
- | `/pi-mini-mode-tools` | Select and expand/collapse saved tool text or thinking¹ |
84
- | `/pi-mini-mode-history` | Browse full process entries, five at a time |
85
- | `/reload` | Reload the extension after installation or source changes |
86
-
87
- ¹ Requires fullscreen minimal output. Subagent rows have their own click-to-expand control; supported third-party widgets retain native detail shortcuts.
88
-
89
96
  ## Compatibility
90
97
 
91
- - **Images:** previews require a terminal image protocol; unsupported terminals show a hint. Image reads are limited to **20 MB**, and deleted files cannot be reopened. Link gestures depend on the terminal: usually `Cmd+click` on macOS or `Ctrl+click` on Windows/Linux; Ghostty fullscreen may require `Shift+Cmd` / `Shift+Ctrl`. Pi fullscreen also supports direct link clicks. See [Pi terminal setup](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/terminal-setup.md).
98
+ - **Images:** previews require a terminal image protocol; unsupported terminals show a hint. Large images are resized for the terminal preview only (up to 1200 × 800 pixels and 1 MB encoded); the original file and submitted path are unchanged. Image reads are limited to **20 MB**, and deleted files cannot be reopened. Link gestures depend on the terminal: usually `Cmd+click` on macOS or `Ctrl+click` on Windows/Linux; Ghostty fullscreen may require `Shift+Cmd` / `Shift+Ctrl`. Pi fullscreen also supports direct link clicks. See [Pi terminal setup](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/terminal-setup.md).
92
99
  - **Minimal output:** uses a private Pi 0.85.x layout adapter without patching Pi’s installation. Unknown layouts refuse activation and keep native output. Recheck after Pi upgrades; other transcript-replacing extensions can conflict.
93
100
  - **Subagents:** the pi-subagents widget adapter runs only in minimal mode, restores on disable, and passes unknown formats through. Available details depend on the integration’s status/output data; this is not a complete subagent transcript viewer.
94
101
  - **History:** `/reload` remounts the transcript, including history created in native mode. Empty progress events do not erase existing content; tools without output show elapsed waiting time. Legacy per-item minimal controls no longer filter content.
@@ -99,13 +106,15 @@ This earlier screenshot and recording show footer configuration, not the newer i
99
106
  <details>
100
107
  <summary><strong>First run & configuration</strong> — defaults, controls, and settings file</summary>
101
108
 
102
- On the first interactive TUI session, Pi Mini Mode shows a preview. Footer metrics are on by default except MCP count; the dot-matrix style is off; minimal output is on:
109
+ On the first interactive TUI session, Pi Mini Mode shows a preview. **Branch-only**, **Cached tokens**, and **MCP count** are off by default; branch-only is mutually exclusive with **project & branch**. Change anything later with `/pi-mini-mode-settings`.
110
+
111
+ Example with optional Cached and MCP fields enabled:
103
112
 
104
113
  ```text
105
- deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █░░░░░░░░░ 1% 120 tok/s
114
+ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500/1.0M ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 1% 120 tok/s
106
115
  ```
107
116
 
108
- The first-run picker offers **Keep defaults**, **Configure now**, and **Apply recommended setup**. Keeping defaults saves the default field selection, leaves minimal output on, and prevents the prompt from appearing again; configuring opens the same settings list immediately. Applying the recommendation asks you to choose the bundled `cc-dark` or `cc-light` theme, saves that theme and global `tuiMode=fullscreen` through Pi's settings API, applies the theme immediately, and asks you to restart Pi because the fullscreen renderer is chosen at startup. Project settings and CLI flags may override these global values. Escape/cancel leaves onboarding incomplete; retry with `/pi-mini-mode-setup`. Print, JSON, and other non-interactive modes never prompt.
117
+ The first-run picker offers **Keep defaults**, **Configure now**, and **Apply recommended setup**. Keeping defaults saves the default field selection, leaves minimal output on, and prevents the prompt from appearing again; configuring opens the same settings list immediately. Applying the recommendation asks you to choose the bundled `cc-dark` or `cc-light` theme, saves that theme and global `tuiMode=fullscreen` through Pi's settings API, applies the theme immediately, and asks you to restart Pi because the fullscreen renderer is chosen at startup. Project settings and CLI flags may override these global values. Escape/cancel leaves onboarding incomplete; it runs again on the next interactive session. Print, JSON, and other non-interactive modes never prompt.
109
118
 
110
119
  Open that settings UI any time with:
111
120
 
@@ -121,15 +130,18 @@ Settings are stored globally at Pi's agent directory (normally `~/.pi/agent/pi-m
121
130
 
122
131
  ```json
123
132
  {
133
+ "pi-mini-mode-project-branch-show": true,
134
+ "pi-mini-mode-branch-show": false,
124
135
  "pi-mini-mode-model-show": true,
125
136
  "pi-mini-mode-thinking-show": true,
126
137
  "pi-mini-mode-ch-show": true,
127
138
  "pi-mini-mode-session-tokens-show": true,
128
- "pi-mini-mode-cache-tokens-show": true,
139
+ "pi-mini-mode-cache-tokens-show": false,
140
+ "pi-mini-mode-cache-miss-show": true,
129
141
  "pi-mini-mode-cost-show": true,
130
142
  "pi-mini-mode-mcp-show": false,
131
143
  "pi-mini-mode-context-show": true,
132
- "pi-mini-mode-context-dots-show": false,
144
+ "pi-mini-mode-context-dots-show": true,
133
145
  "pi-mini-mode-context-percent-show": true,
134
146
  "pi-mini-mode-speed-show": true,
135
147
  "pi-mini-mode-speed-unit-show": true,
@@ -141,15 +153,18 @@ Settings are stored globally at Pi's agent directory (normally `~/.pi/agent/pi-m
141
153
 
142
154
  | Key | Default | Controls |
143
155
  | --- | --- | --- |
156
+ | `pi-mini-mode-project-branch-show` | `true` | Project name and branch |
157
+ | `pi-mini-mode-branch-show` | `false` | Branch only, instead of project and branch |
144
158
  | `pi-mini-mode-model-show` | `true` | Model ID without provider prefix |
145
159
  | `pi-mini-mode-thinking-show` | `true` | Thinking level |
146
160
  | `pi-mini-mode-ch-show` | `true` | Session cache-hit rate (`CH`) |
147
161
  | `pi-mini-mode-session-tokens-show` | `true` | Accumulated session tokens (`Total`) |
148
- | `pi-mini-mode-cache-tokens-show` | `true` | Accumulated cache read + cache write tokens |
162
+ | `pi-mini-mode-cache-tokens-show` | `false` | Accumulated cache read + cache write tokens |
163
+ | `pi-mini-mode-cache-miss-show` | `true` | Estimated cache misses when detected |
149
164
  | `pi-mini-mode-cost-show` | `true` | Estimated session list price |
150
165
  | `pi-mini-mode-mcp-show` | `false` | Enabled MCP server count |
151
166
  | `pi-mini-mode-context-show` | `true` | Used/total context tokens and progress bar |
152
- | `pi-mini-mode-context-dots-show` | `false` | Use a single-line dot-matrix bar instead of the default solid bar |
167
+ | `pi-mini-mode-context-dots-show` | `true` | Use a single-line dot-matrix bar instead of the solid bar |
153
168
  | `pi-mini-mode-context-percent-show` | `true` | Context-use percentage |
154
169
  | `pi-mini-mode-speed-show` | `true` | Generation speed at the far right |
155
170
  | `pi-mini-mode-speed-unit-show` | `true` | Generation-speed sub-setting: append `tok/s` to the numeric value |
@@ -196,16 +211,9 @@ For a real terminal smoke test, run `python3 test/minimal-pty.py`. It needs Pyth
196
211
  <details>
197
212
  <summary><strong>Publishing</strong></summary>
198
213
 
199
- Pushes to `main` automatically publish to npm after `npm ci`, `npm run check`, and `npm test`; the workflow also supports manual dispatch on `main`. Each release uses the higher of the local version baseline and npm's latest stable version plus one patch. Versions change only in the runner, with no version commits or tags; raise the baseline in `package.json` and the lockfile for a major/minor release. Already-published commits are skipped. Actions concurrency can replace pending pushes, so not every push (or every commit within a push) is guaranteed a separate package release.
200
-
201
- Releases require the package’s npm Trusted Publisher to be configured for this GitHub repository and `publish.yml`. Subsequent publishing uses OIDC and provenance without an npm token.
202
-
203
- </details>
204
-
205
- <details>
206
- <summary><strong>Collaboration guidance</strong></summary>
214
+ Normal releases are published from this machine with the npm token in `.npmrc` (`npm publish --access public`). `publish.yml` is only a manual backup (`workflow_dispatch` on `main`): it runs `npm ci`, `npm run check`, and `npm test`, then `scripts/publish.mjs`. That script publishes the higher of the local version baseline and npm's highest historically published stable version plus one patch, changes the version only in the runner (no version commit or tag), and skips commits that are already published. Raise the baseline in `package.json` and the lockfile for a major or minor release.
207
215
 
208
- The main session owns requirement alignment, risk research, the complete solution, task scheduling, key decisions, integration, and the final summary. Before implementation, it should investigate the key risks, boundaries, acceptance criteria, and solution. Once authorized, use subagents aggressively and parallelize independent work to save time, while respecting relevance, risk, budget, concurrency, and single-writer constraints. Use the `low` model by default for most tasks and subagents; upgrade only for complex reasoning, key decisions, or risk reviews when necessary.
216
+ The backup workflow needs the package’s npm Trusted Publisher configured for this GitHub repository and `publish.yml`. It uses OIDC and provenance and does not use an npm token.
209
217
 
210
218
  </details>
211
219
 
package/README.zh-CN.md CHANGED
@@ -1,8 +1,6 @@
1
- <p>
2
- <img src="assets/readme-cover.zh-CN.svg" alt="Pi Mini Mode — 少一点干扰,多一点专注。图片输入、可折叠对话、子代理、明暗主题与实时页脚。" width="100%">
3
- </p>
1
+ ![Pi Mini Mode — 少一点干扰,多一点专注。图片输入、可折叠对话、子代理、明暗主题与实时页脚。](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/readme-cover.zh-CN.svg)
4
2
 
5
- [English](README.md) · [安装](#安装) · [功能](#功能) · [命令速查](#命令速查) · [参考](#参考)
3
+ [English](https://github.com/eachann1024/pi-mini-mode/blob/main/README.md) · [安装](#安装) · [功能](#功能) · [参考](#参考)
6
4
 
7
5
  # Pi Mini Mode
8
6
 
@@ -10,16 +8,35 @@
10
8
 
11
9
  为 [Pi](https://pi.dev) 的日常工作做一点精细的改进,不止于页脚。光标处预览图片,折叠长消息和过程详情,展开子代理工作,让重要的会话状态始终清晰。
12
10
 
11
+ <details>
12
+ <summary>查看完整界面</summary>
13
+
14
+ ![Pi Mini Mode 完整界面](https://github.com/user-attachments/assets/8f7abdc8-646e-4ded-8009-b58d2833c1f4)
15
+
16
+ </details>
17
+
13
18
  ## 安装
14
19
 
15
20
  ```bash
16
21
  pi install npm:@each1024/pi-mini-mode
17
22
  ```
18
23
 
19
- 在 Pi 中运行 `/reload`。首次进入交互式 TUI 时,选择 **应用推荐配置**,再选择 `cc-dark` 或 `cc-light`;它会通过 Pi 官方设置 API 保存主题与全局 `tuiMode=fullscreen`,重启 Pi 后全屏模式才会生效。项目设置和命令行参数可能覆盖全局设置。之后可用 `/pi-mini-mode-setup` 重试,或用 `/pi-mini-mode-settings` 只配置 Pi Mini Mode。
24
+ 已打开的 Pi 会话中,运行 Pi 自带的 `/reload`。首次使用选择 **应用推荐配置**,设置内置主题和全屏模式,重启 Pi 后全屏才会生效。之后可用 `/pi-mini-mode-settings` 随时配置本扩展。项目设置和命令行参数可能覆盖全局设置。
20
25
 
21
26
  **需要 Pi ≥ 0.84.0。** 输入增强和极简输出默认开启。极简模式使用私有 **Pi 0.85.x** 布局适配器,启用前请查看[兼容性](#兼容性)。
22
27
 
28
+ ### 更新已安装的 npm 版本
29
+
30
+ ```bash
31
+ pi update npm:@each1024/pi-mini-mode
32
+ ```
33
+
34
+ 然后在 Pi 中运行 `/reload`,重新打开 `/pi-mini-mode-settings`(或重启 Pi)。HTML 设置页随扩展一起更新,不需要另外执行 npm 命令或启动开发服务器。发布本身不会自动更新用户已安装的副本或已打开的浏览器标签页。固定版本用户需先用 `pi install npm:@each1024/pi-mini-mode@latest` 替换安装;本地开发安装仍读取本地文件。
35
+
36
+ **注意:`pi update` 默认只更新 Pi 本体。** 更新全部插件用 `pi update --extensions`,同时更新 Pi 和插件用 `pi update --all`。`/reload` 只重新加载磁盘上的代码,不下载新版本。
37
+
38
+ **旧版 `1.3.x` 用户:** 本包曾把版本号回退到 `0.9.x` / `1.0.x`,Pi 会认为 `1.3.x` 已比 npm `latest` 更新,因而跳过更新和更新提醒。**2.0.0** 已恢复高于历史最高稳定版 `1.3.15` 的版本号,正常插件更新可以继续。若仍停留在旧版,可用 `pi install npm:@each1024/pi-mini-mode@latest` 显式重装当前 `latest`,再 `/reload` 并重新打开设置页。先运行 `pi list` 确认加载的是 npm 源,而非本地路径或另一份副本;固定版本源需改成 `@latest` 标签;不带标签的安装可能沿用之前保存的依赖范围。
39
+
23
40
  <details>
24
41
  <summary>也可以从 GitHub 安装</summary>
25
42
 
@@ -33,6 +50,8 @@ pi install git:github.com/eachann1024/pi-mini-mode
33
50
 
34
51
  ### 01 / 输入,更顺手
35
52
 
53
+ ![图片预览与紧凑标签](https://github.com/user-attachments/assets/2ea6d037-d3f0-423c-8588-17992a49d445)
54
+
36
55
  **图片,随光标浮现。** 编辑光标移入图片路径或紧凑标签,即可预览。全屏编辑器也支持悬停,按 `Esc` 关闭。
37
56
 
38
57
  **收起路径,保留原图。** 输入框和消息中的图片路径收纳为带下划线的 `[image1]` 标签,提交时保留原始路径。使用终端的链接点击手势,即可通过系统默认应用打开原图或其他文件。
@@ -43,15 +62,19 @@ pi install git:github.com/eachann1024/pi-mini-mode
43
62
 
44
63
  ### 02 / 过程,更安静
45
64
 
46
- 在设置中开启 **极简输出**,或运行 `/pi-mini-mode-minimal on`。
65
+ 在 `/pi-mini-mode-settings` 中开启 **极简输出**。
47
66
 
48
- - **长消息,自动折叠。** 全屏极简模式下,长用户消息默认保留前四个显示行。点击折叠控件展开全文,或用 `/pi-mini-mode-prompts` 选择消息。完整代码围栏保持完整。
49
- - **子代理,清晰可查。** 点击子代理行,展开可用的活动记录与消息/最终输出。任务派发回执或工具调用返回,不等于后台任务已完成。
50
- - **过程是一棵树,而非满屏输出。** 思考、工具与技能读取汇入同一棵时间顺序树,显示最新十条摘要;`Ctrl+O` 展开/收起完整过程,新问题默认收起。
51
- - **工具详情,按需展开。** 点击工具/思考条目的折叠控件,或用 `/pi-mini-mode-tools` 选择。工具详情展示保存的文本,不还原原生自定义渲染器或图片输出。
67
+ ![极简输出中的过程树](https://github.com/user-attachments/assets/eb8c88f6-84af-499e-b105-5395b4f02e66)
68
+
69
+ - **长消息,自动折叠。** 全屏极简模式下,长用户消息默认保留前四个显示行。点击折叠控件展开全文。完整代码围栏保持完整。
70
+ - **子代理,清晰可查。** 点击子代理行,展开可用的活动记录与消息/最终输出。极简模式下,本扩展用 `Ctrl+S` 展开/收起已完成的子代理摘要;Pi 当前聚焦的选择器保留自己的快捷键。任务派发回执或工具调用返回,不等于后台任务已完成。
71
+ - **过程是一棵树,而非满屏输出。** 思考、工具与技能读取汇入同一棵时间顺序树,显示最新摘要,包括最新一条思考;`Ctrl+O` 展开/收起完整过程,新问题默认收起。
72
+ - **工具详情,按需展开。** 点击工具或思考条目的折叠控件,最新一条思考也可以展开。思考默认收起,进行中与结束后均只由手动操作展开或收起。工具详情展示保存的文本,不还原原生自定义渲染器或图片输出。
52
73
  - **把空间留给答案。** 最终 Markdown 流式呈现,不添加额外标题或背景。失败和中断明确标记;折叠只改变显示,不删除原始会话消息。
53
74
 
54
- `/pi-mini-mode-history` 每次浏览五条完整过程记录;`/pi-mini-mode-minimal off` 恢复 Pi 原生历史。
75
+ 在设置中关闭 **极简输出** 即恢复 Pi 原生历史。
76
+
77
+ ![展开后的过程详情](https://github.com/user-attachments/assets/53f5aa28-4b96-45db-b02e-0108aa9e68bc)
55
78
 
56
79
  ### 03 / 状态,更清晰
57
80
 
@@ -62,7 +85,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
62
85
  <details>
63
86
  <summary>查看页脚设置截图与演示</summary>
64
87
 
65
- [![已有的页脚设置截图](assets/pi-mini-mode-settings.jpg)](assets/pi-mini-mode-settings.jpg)
88
+ [![已有的页脚设置截图](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/pi-mini-mode-settings.jpg)](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/pi-mini-mode-settings.jpg)
66
89
 
67
90
  [观看页脚设置演示](https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763)
68
91
 
@@ -70,25 +93,9 @@ pi install git:github.com/eachann1024/pi-mini-mode
70
93
 
71
94
  </details>
72
95
 
73
- ## 命令速查
74
-
75
- | 命令/快捷键 | 用途 |
76
- | --- | --- |
77
- | `/pi-mini-mode-settings` | 配置字段、输入增强和极简输出 |
78
- | `/pi-mini-mode-setup` | 选择内置主题并保存全局全屏模式;之后需重启 Pi |
79
- | `/pi-mini-mode-minimal on` / `off` | 开启极简输出/恢复原生历史 |
80
- | `Ctrl+O` | 展开/收起完整过程树 |
81
- | `Ctrl+S` | 展开/收起已完成的子代理行;打开 `/model`、`/thinking` 等选择器时交给 Pi |
82
- | `/pi-mini-mode-prompts` | 选择并展开/收起用户消息¹ |
83
- | `/pi-mini-mode-tools` | 选择并展开/收起保存的工具文本或思考¹ |
84
- | `/pi-mini-mode-history` | 浏览完整过程记录,每次五条 |
85
- | `/reload` | 安装或修改源码后重载扩展 |
86
-
87
- ¹ 需要全屏极简输出。子代理行有独立的点击展开控件;受支持的第三方小组件保留原生详情快捷键。
88
-
89
96
  ## 兼容性
90
97
 
91
- - **图片:** 预览依赖终端图片协议,不支持时显示提示。读取上限 **20 MB**,文件被清理后无法重新打开。点击手势由终端决定:macOS 通常使用 `Cmd+点击`,Windows/Linux 通常使用 `Ctrl+点击`;Ghostty 全屏可能需要 `Shift+Cmd` / `Shift+Ctrl`。Pi 全屏也支持直接点击链接。参见 [Pi 终端设置](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/terminal-setup.md)。
98
+ - **图片:** 预览依赖终端图片协议,不支持时显示提示。大图仅对终端预览副本缩放(不超过 1200 × 800 像素、编码后 1 MB);原文件和提交路径不变。读取上限 **20 MB**,文件被清理后无法重新打开。点击手势由终端决定:macOS 通常使用 `Cmd+点击`,Windows/Linux 通常使用 `Ctrl+点击`;Ghostty 全屏可能需要 `Shift+Cmd` / `Shift+Ctrl`。Pi 全屏也支持直接点击链接。参见 [Pi 终端设置](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/terminal-setup.md)。
92
99
  - **极简输出:** 使用私有 Pi 0.85.x 布局适配器,不修改 Pi 安装目录。未知布局会拒绝启用并保留原生输出;升级 Pi 后需重新检查,其他替换 transcript 的扩展可能冲突。
93
100
  - **子代理:** pi-subagents 小组件适配仅在极简模式启用,关闭后恢复原状,未知格式原样交给原生处理。可用详情取决于集成提供的状态/输出数据,不是完整子代理会话查看器。
94
101
  - **历史:** `/reload` 会重新挂载 transcript,包含原生模式中产生的历史。空进度事件不覆盖已有内容;无输出的工具显示等待时间。旧的极简输出细项不再单独过滤内容。
@@ -99,27 +106,32 @@ pi install git:github.com/eachann1024/pi-mini-mode
99
106
  <details>
100
107
  <summary><strong>首次使用与配置</strong></summary>
101
108
 
102
- 首次进入交互式 TUI 会话时,Pi Mini Mode 显示设置预览。页脚指标除 MCP 数量外默认开启,点阵样式默认关闭,极简输出默认开启,例如:
109
+ 首次进入交互式 TUI 会话时,Pi Mini Mode 显示设置预览。「仅显示分支」「缓存 token」「MCP」默认关闭;「仅显示分支」与「项目与分支」互斥。之后可用 `/pi-mini-mode-settings` 再改。
110
+
111
+ 以下示例开启了可选的 Cached 和 MCP 字段:
103
112
 
104
113
  ```text
105
- deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █░░░░░░░░░ 1% 120 tok/s
114
+ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500/1.0M ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 1% 120 tok/s
106
115
  ```
107
116
 
108
- 首次设置会提供 **Keep defaults(保留默认值)**、**Configure now(立即配置)** 和 **Apply recommended setup(应用推荐配置)**。保留默认值会保存默认字段选择、保持极简输出开启,并且不再显示首次设置提示;立即配置会直接打开同一设置列表。应用推荐配置会让你选择内置的 `cc-dark` 或 `cc-light` 主题,通过 Pi 官方设置 API 保存该主题和全局 `tuiMode=fullscreen`,立即应用主题,并提示重启 Pi(全屏渲染器在启动时决定)。项目设置和命令行参数可能覆盖全局设置。按 Esc/取消不会完成首次设置,可稍后用 `/pi-mini-mode-setup` 重试。Print、JSON 等非交互模式不会显示提示。
117
+ 首次设置会提供 **Keep defaults(保留默认值)**、**Configure now(立即配置)** 和 **Apply recommended setup(应用推荐配置)**。保留默认值会保存默认字段选择、保持极简输出开启,并且不再显示首次设置提示;立即配置会直接打开同一设置列表。应用推荐配置会让你选择内置的 `cc-dark` 或 `cc-light` 主题,通过 Pi 官方设置 API 保存该主题和全局 `tuiMode=fullscreen`,立即应用主题,并提示重启 Pi(全屏渲染器在启动时决定)。项目设置和命令行参数可能覆盖全局设置。按 Esc/取消不会完成首次设置,下次交互式会话会再次提示。Print、JSON 等非交互模式不会显示提示。
109
118
 
110
119
  设置保存在 Pi 的 agent 目录中,通常是 `~/.pi/agent/pi-mini-mode.json`;如果 Pi 使用其他配置目录,则保存在对应目录。文件缺失或格式错误时会安全回退到默认设置。设置示例:
111
120
 
112
121
  ```json
113
122
  {
123
+ "pi-mini-mode-project-branch-show": true,
124
+ "pi-mini-mode-branch-show": false,
114
125
  "pi-mini-mode-model-show": true,
115
126
  "pi-mini-mode-thinking-show": true,
116
127
  "pi-mini-mode-ch-show": true,
117
128
  "pi-mini-mode-session-tokens-show": true,
118
- "pi-mini-mode-cache-tokens-show": true,
129
+ "pi-mini-mode-cache-tokens-show": false,
130
+ "pi-mini-mode-cache-miss-show": true,
119
131
  "pi-mini-mode-cost-show": true,
120
132
  "pi-mini-mode-mcp-show": false,
121
133
  "pi-mini-mode-context-show": true,
122
- "pi-mini-mode-context-dots-show": false,
134
+ "pi-mini-mode-context-dots-show": true,
123
135
  "pi-mini-mode-context-percent-show": true,
124
136
  "pi-mini-mode-speed-show": true,
125
137
  "pi-mini-mode-speed-unit-show": true,
@@ -131,15 +143,18 @@ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █
131
143
 
132
144
  | 配置项 | 默认值 | 说明 |
133
145
  | --- | --- | --- |
146
+ | `pi-mini-mode-project-branch-show` | `true` | 显示项目名称与分支 |
147
+ | `pi-mini-mode-branch-show` | `false` | 仅显示分支,代替项目与分支 |
134
148
  | `pi-mini-mode-model-show` | `true` | 显示不含 provider 前缀的模型 ID |
135
149
  | `pi-mini-mode-thinking-show` | `true` | 显示思考级别 |
136
150
  | `pi-mini-mode-ch-show` | `true` | 显示会话缓存命中率(`CH`) |
137
151
  | `pi-mini-mode-session-tokens-show` | `true` | 显示会话累计令牌(`Total`) |
138
- | `pi-mini-mode-cache-tokens-show` | `true` | 显示缓存读取与写入令牌(已包含在 Total 中) |
152
+ | `pi-mini-mode-cache-tokens-show` | `false` | 显示缓存读取与写入令牌(已包含在 Total 中) |
153
+ | `pi-mini-mode-cache-miss-show` | `true` | 检测到缓存 miss 时显示估算量 |
139
154
  | `pi-mini-mode-cost-show` | `true` | 显示会话费用估算 |
140
155
  | `pi-mini-mode-mcp-show` | `false` | 显示已启用的 MCP 服务器数量 |
141
156
  | `pi-mini-mode-context-show` | `true` | 显示已用/总上下文令牌和进度条 |
142
- | `pi-mini-mode-context-dots-show` | `false` | 使用单行点阵进度条替代默认实心进度条 |
157
+ | `pi-mini-mode-context-dots-show` | `true` | 使用单行点阵进度条替代实心进度条 |
143
158
  | `pi-mini-mode-context-percent-show` | `true` | 显示上下文使用百分比 |
144
159
  | `pi-mini-mode-speed-show` | `true` | 显示最新生成速度 |
145
160
  | `pi-mini-mode-speed-unit-show` | `true` | 速度子设置:在数字后追加 `tok/s` |
@@ -189,19 +204,9 @@ python3 test/minimal-pty.py
189
204
  <details>
190
205
  <summary><strong>发布</strong></summary>
191
206
 
192
- 推送到 `main` 后,GitHub Actions 会在通过 `npm ci`、`npm run check` 和 `npm test` 后自动发布到 npm;也支持在 `main` 上手动触发。每次发布都会取本地版本基线与 npm 最新稳定版本加一个 patch 中的较高者。版本只在 runner 中变更,不创建版本提交或 tag;发布 major/minor 版本时,应同时提高 `package.json` 和 lockfile 中的基线。已经发布过的提交会跳过。Actions 并发策略可能替换等待中的推送,因此不是每次推送或一次推送中的每个提交都保证生成独立版本。
193
-
194
- 后续发布使用 npm Trusted Publisher、OIDC 和 provenance,无需 npm token。
195
-
196
-
197
- 发布前需为该包配置指向此 GitHub 仓库及 `publish.yml` 的 npm Trusted Publisher。
198
-
199
- </details>
200
-
201
- <details>
202
- <summary><strong>协作说明</strong></summary>
207
+ 日常发布在本机完成,使用 `.npmrc` 中的 npm token(`npm publish --access public`)。`publish.yml` 只作为手动备份(在 `main` 上 `workflow_dispatch`):先执行 `npm ci`、`npm run check` 和 `npm test`,再运行 `scripts/publish.mjs`。该脚本发布本地版本基线与 npm 最新稳定版本再加一个 patch 中的较高者,版本只在 runner 中变更(不创建版本提交或 tag),并跳过已经发布过的提交。发布 major 或 minor 时,同时提高 `package.json` 和 lockfile 中的基线。
203
208
 
204
- 主会话负责需求对齐、风险调研、完整方案、任务调度、关键决策、整合与总结;执行前应先调查关键风险点、边界、验收标准和解决方案。获得授权后,应积极使用子代理并并行拆分独立任务以节省时间,同时遵守相关性、风险、预算、并发和单一修改负责人约束。绝大部分任务及子代理默认使用 `low` 模型,仅在复杂推理、关键决策或风险审查确有需要时升级。
209
+ 备份流程需要为该包配置指向此 GitHub 仓库及 `publish.yml` 的 npm Trusted Publisher。它使用 OIDC 和 provenance,不使用 npm token。
205
210
 
206
211
  </details>
207
212