@each1024/pi-mini-mode 1.3.6 → 1.3.8
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 +81 -58
- package/README.zh-CN.md +108 -52
- package/extensions/footer-status.ts +54 -35
- package/lib/agent-view.ts +74 -28
- package/lib/file-links.ts +80 -0
- package/lib/footer-tidy.ts +12 -59
- package/lib/input-enhancements.ts +622 -0
- package/lib/minimal-markdown.ts +42 -6
- package/lib/minimal-theme.ts +7 -3
- package/lib/transcript-adapter.ts +44 -3
- package/package.json +2 -2
- package/themes/cc-dark.json +1 -1
- package/themes/cc-light.json +1 -1
package/README.md
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
<p
|
|
2
|
-
<img src="assets/
|
|
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
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
<a href="#install">Install</a> · <a href="#make-it-yours">Settings</a> · <a href="https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763">Watch demo</a> · <a href="README.zh-CN.md">中文</a>
|
|
7
|
-
</p>
|
|
8
|
-
|
|
9
|
-
A compact, configurable footer for [Pi](https://pi.dev). Your model, usage, cost estimate, context, and generation speed — at a glance.
|
|
10
|
-
|
|
11
|
-
## Minimal output
|
|
12
|
-
|
|
13
|
-
`/pi-mini-mode-settings` now has **Lens**, a separate **Collapse replies** switch, and **Minimal output**. Collapsed replies are off by default, so Pi's conversation history stays native until you turn them on. While the switch is off, Minimal output options stay disabled.
|
|
5
|
+
[中文](README.zh-CN.md) · [Install](#install) · [Features](#features) · [Commands](#commands) · [Reference](#reference)
|
|
14
6
|
|
|
15
|
-
|
|
16
|
-
- Each turn uses one shared tree showing the latest **ten summary entries**: available thinking, tool calls, streaming tool output, and skill reads. `Ctrl+O` expands the full Markdown process and toggles it closed again; new questions start collapsed; tools without output show an elapsed wait counter, and empty progress events never overwrite existing content; there are no section headings, collapsed counts, or completion labels. Original session messages remain intact.
|
|
17
|
-
- Agent/subagent calls share the same chronological tree as tools and skills; `Ctrl+O` reveals tasks and Markdown output. A returned call does not imply background completion.
|
|
18
|
-
- The pi-subagents `async subagent` / `Async agents` widget uses a background-free status tree, retaining native detail shortcuts and output paths. This adapter is active only in minimal mode, restores on disable, and passes unknown formats through. Grouping design reference: [pi-cc-extensions](https://github.com/minuque/pi-cc-extensions).
|
|
19
|
-
- `/pi-mini-mode-history` browses complete process entries, five at a time.
|
|
20
|
-
- Final Markdown streams as text events arrive; failures and interruptions are indicated.
|
|
21
|
-
- `/reload` remounts the transcript, including history created in native mode. Expanded tree rails continue through paragraphs, blank lines and code blocks.
|
|
22
|
-
- `/pi-mini-mode-minimal off` restores Pi's default conversation history.
|
|
7
|
+
# Pi Mini Mode
|
|
23
8
|
|
|
24
|
-
|
|
9
|
+
**Less noise. More focus.**
|
|
25
10
|
|
|
26
|
-
|
|
11
|
+
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.
|
|
27
12
|
|
|
28
13
|
## Install
|
|
29
14
|
|
|
@@ -31,7 +16,9 @@ Checks: `npm run check && npm test`. Real terminal smoke test: `python3 test/min
|
|
|
31
16
|
pi install npm:@each1024/pi-mini-mode
|
|
32
17
|
```
|
|
33
18
|
|
|
34
|
-
Run `/reload` in Pi
|
|
19
|
+
Run `/reload` in Pi, then open `/pi-mini-mode-settings` to make it yours.
|
|
20
|
+
|
|
21
|
+
**Pi ≥ 0.84.0.** Input enhancements are on by default; minimal output is opt-in. Minimal mode uses a private **Pi 0.85.x** layout adapter—see [compatibility](#compatibility) before enabling it.
|
|
35
22
|
|
|
36
23
|
<details>
|
|
37
24
|
<summary>Install from GitHub instead</summary>
|
|
@@ -42,55 +29,81 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
42
29
|
|
|
43
30
|
</details>
|
|
44
31
|
|
|
45
|
-
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
### 01 / Input, refined
|
|
35
|
+
|
|
36
|
+
**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
|
+
|
|
38
|
+
**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.
|
|
39
|
+
|
|
40
|
+
**Skills where you type.** Enter `/` at the start or after whitespace to find a skill and insert `/skill:name` at the cursor. Inline skills expand on submission; URLs and paths keep their normal behavior.
|
|
41
|
+
|
|
42
|
+
Paste images with `Ctrl+V` (`Alt+V` on Windows/WSL). Disabling input enhancements preserves Pi’s native clipboard behavior.
|
|
43
|
+
|
|
44
|
+
### 02 / Process, quieter
|
|
45
|
+
|
|
46
|
+
Enable **Minimal output** in settings, or run `/pi-mini-mode-minimal on`.
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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.
|
|
52
|
+
- **Room for the answer.** Final Markdown streams without extra headings or backgrounds. Failures and interruptions stay explicit. Folding changes presentation, not stored session messages.
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
`/pi-mini-mode-history` opens complete process entries, five at a time. `/pi-mini-mode-minimal off` restores native Pi history.
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
- Session token totals
|
|
55
|
-
- Cached tokens & hit rate
|
|
56
|
-
- Estimated session cost
|
|
57
|
-
- Context usage & progress
|
|
58
|
-
- Latest generation speed
|
|
56
|
+
### 03 / Session, in focus
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
<td width="50%" valign="top">
|
|
58
|
+
**Light and dark, considered.** Includes `cc-light` and `cc-dark`, derived from [pi-cc-extensions](https://github.com/minuque/pi-cc-extensions) under MIT. User messages use the theme’s user-message surface; Markdown, highlighted code, tables and supported Mermaid diagrams adapt to the theme. Unsupported, incomplete or over-wide diagrams retain their source.
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
**The useful signals, in one line.** Model and thinking level, session tokens, cache totals and hit rate, estimated cost, context usage and generation speed. Choose your fields in `/pi-mini-mode-settings`; changes take effect immediately, and the footer adapts to narrow terminals.
|
|
64
61
|
|
|
65
|
-
|
|
62
|
+
<details>
|
|
63
|
+
<summary>See the footer settings and demo</summary>
|
|
64
|
+
|
|
65
|
+
[](assets/pi-mini-mode-settings.jpg)
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
[Watch the footer settings demo](https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763)
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
This earlier screenshot and recording show footer configuration, not the newer image, folding or subagent features. Settings previews use sample data.
|
|
70
|
+
|
|
71
|
+
</details>
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
</tr>
|
|
73
|
-
</table>
|
|
73
|
+
## Commands
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
| Command / shortcut | Purpose |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `/pi-mini-mode-settings` | Configure fields, input enhancements and minimal output |
|
|
78
|
+
| `/pi-mini-mode-minimal on` / `off` | Enable minimal output / restore native history |
|
|
79
|
+
| `Ctrl+O` | Expand or collapse the complete process tree |
|
|
80
|
+
| `/pi-mini-mode-prompts` | Select and expand/collapse a user message¹ |
|
|
81
|
+
| `/pi-mini-mode-tools` | Select and expand/collapse saved tool text or thinking¹ |
|
|
82
|
+
| `/pi-mini-mode-history` | Browse full process entries, five at a time |
|
|
83
|
+
| `/reload` | Reload the extension after installation or source changes |
|
|
76
84
|
|
|
77
|
-
|
|
85
|
+
¹ Requires fullscreen minimal output. Subagent rows have their own click-to-expand control; supported third-party widgets retain native detail shortcuts.
|
|
78
86
|
|
|
79
|
-
|
|
87
|
+
## Compatibility
|
|
80
88
|
|
|
89
|
+
- **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).
|
|
90
|
+
- **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.
|
|
91
|
+
- **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.
|
|
92
|
+
- **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.
|
|
93
|
+
- **Metrics:** costs are estimates, not provider invoices. See the calculation details below.
|
|
81
94
|
|
|
82
95
|
## Reference
|
|
83
96
|
|
|
84
97
|
<details>
|
|
85
98
|
<summary><strong>First run & configuration</strong> — defaults, controls, and settings file</summary>
|
|
86
99
|
|
|
87
|
-
On the first interactive TUI session, Pi Mini Mode shows a preview
|
|
100
|
+
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 and minimal output are off:
|
|
88
101
|
|
|
89
102
|
```text
|
|
90
103
|
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █░░░░░░░░░ 1% 120 tok/s
|
|
91
104
|
```
|
|
92
105
|
|
|
93
|
-
The first-run picker offers **Keep defaults** and **Configure now**. Keeping defaults
|
|
106
|
+
The first-run picker offers **Keep defaults** and **Configure now**. Keeping defaults saves the default field selection, leaves minimal output off, and prevents the prompt from appearing again; configuring opens the same settings list immediately. Print, JSON, and other non-interactive modes never prompt.
|
|
94
107
|
|
|
95
108
|
Open that settings UI any time with:
|
|
96
109
|
|
|
@@ -112,11 +125,14 @@ Settings are stored globally at Pi's agent directory (normally `~/.pi/agent/pi-m
|
|
|
112
125
|
"pi-mini-mode-session-tokens-show": true,
|
|
113
126
|
"pi-mini-mode-cache-tokens-show": true,
|
|
114
127
|
"pi-mini-mode-cost-show": true,
|
|
128
|
+
"pi-mini-mode-mcp-show": false,
|
|
115
129
|
"pi-mini-mode-context-show": true,
|
|
116
130
|
"pi-mini-mode-context-dots-show": false,
|
|
117
131
|
"pi-mini-mode-context-percent-show": true,
|
|
118
132
|
"pi-mini-mode-speed-show": true,
|
|
119
133
|
"pi-mini-mode-speed-unit-show": true,
|
|
134
|
+
"pi-mini-mode-minimal-show": false,
|
|
135
|
+
"pi-mini-mode-input-enhancements": true,
|
|
120
136
|
"onboardingCompleted": true
|
|
121
137
|
}
|
|
122
138
|
```
|
|
@@ -135,13 +151,8 @@ Settings are stored globally at Pi's agent directory (normally `~/.pi/agent/pi-m
|
|
|
135
151
|
| `pi-mini-mode-context-percent-show` | `true` | Context-use percentage |
|
|
136
152
|
| `pi-mini-mode-speed-show` | `true` | Generation speed at the far right |
|
|
137
153
|
| `pi-mini-mode-speed-unit-show` | `true` | Generation-speed sub-setting: append `tok/s` to the numeric value |
|
|
138
|
-
| `pi-mini-mode-minimal-show` | `false` |
|
|
139
|
-
| `pi-mini-mode-
|
|
140
|
-
| `pi-mini-mode-minimal-tools-show` | `true` | Show tool calls and agent calls |
|
|
141
|
-
| `pi-mini-mode-minimal-output-show` | `true` | Show process output |
|
|
142
|
-
| `pi-mini-mode-minimal-skills-show` | `true` | Show skill reads |
|
|
143
|
-
| `pi-mini-mode-agent-usage-show` | `true` | Show Agent token usage |
|
|
144
|
-
| `pi-mini-mode-agent-shortcut-show` | `true` | Show the temporary `Ctrl+O` hint for new Agents |
|
|
154
|
+
| `pi-mini-mode-minimal-show` | `false` | Minimal output; off keeps Pi's default conversation history |
|
|
155
|
+
| `pi-mini-mode-input-enhancements` | `true` | Image previews, inline skills, and message file links |
|
|
145
156
|
| `onboardingCompleted` | `false` initially | Internal marker that prevents another first-run prompt |
|
|
146
157
|
|
|
147
158
|
- **Generation speed**
|
|
@@ -169,20 +180,32 @@ The price is the same finalized active-branch usage and configured per-million-t
|
|
|
169
180
|
Install only the local copy while developing; installing npm and local copies together double-registers the extension:
|
|
170
181
|
|
|
171
182
|
```bash
|
|
172
|
-
pi remove npm:@each1024/pi-mini-mode && pi install /path/to/pi-
|
|
183
|
+
pi remove npm:@each1024/pi-mini-mode && pi install /path/to/pi-mini-mode
|
|
173
184
|
npm run check
|
|
174
185
|
npm test
|
|
175
186
|
```
|
|
176
187
|
|
|
177
|
-
After source changes, run `/reload` in an already-open Pi session. `npm run check` runs TypeScript checking and `npm test` runs the
|
|
188
|
+
After source changes, run `/reload` in an already-open Pi session. `npm run check` runs TypeScript checking and `npm test` runs the project self-checks.
|
|
189
|
+
|
|
190
|
+
For a real terminal smoke test, run `python3 test/minimal-pty.py`. It needs Python 3, Node, and the installed dependency’s bundled Pi CLI. Temporary fixtures cover regular/fullscreen output, toggling, process expansion, restored results, and narrow terminals without model calls.
|
|
178
191
|
|
|
179
192
|
</details>
|
|
180
193
|
|
|
181
|
-
|
|
194
|
+
<details>
|
|
195
|
+
<summary><strong>Publishing</strong></summary>
|
|
182
196
|
|
|
183
197
|
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.
|
|
184
198
|
|
|
185
|
-
|
|
199
|
+
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.
|
|
200
|
+
|
|
201
|
+
</details>
|
|
202
|
+
|
|
203
|
+
<details>
|
|
204
|
+
<summary><strong>Collaboration guidance</strong></summary>
|
|
205
|
+
|
|
206
|
+
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.
|
|
207
|
+
|
|
208
|
+
</details>
|
|
186
209
|
|
|
187
210
|
---
|
|
188
211
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[English](README.md)
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
<img src="assets/pi-mini-mode-hero.png" alt="Pi Mini Mode:显示模型、令牌、缓存、费用、上下文和生成速度的紧凑页脚" width="100%">
|
|
1
|
+
<p>
|
|
2
|
+
<img src="assets/readme-cover.zh-CN.svg" alt="Pi Mini Mode — 少一点干扰,多一点专注。图片输入、可折叠对话、子代理、明暗主题与实时页脚。" width="100%">
|
|
7
3
|
</p>
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
<a href="#安装">安装</a> · <a href="#按需配置">配置</a> · <a href="https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763">观看演示</a> · <a href="README.md">English</a>
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
|
-
适用于 [Pi](https://pi.dev) 的紧凑、可配置页脚。模型、用量、费用估算、上下文使用率和生成速度,一眼即可查看。
|
|
14
|
-
|
|
15
|
-
## 极简输出
|
|
5
|
+
[English](README.md) · [安装](#安装) · [功能](#功能) · [命令速查](#命令速查) · [参考](#参考)
|
|
16
6
|
|
|
17
|
-
|
|
7
|
+
# Pi Mini Mode
|
|
18
8
|
|
|
19
|
-
|
|
20
|
-
- 每轮使用一棵共享树,显示最新 **10 条摘要**,包括可用的思考、工具调用、流式工具输出和技能读取。按 `Ctrl+O` 可展开完整 Markdown 过程,再按一次收起;新问题默认收起。没有输出的工具会显示已等待时间,空的进度事件不会覆盖已有内容,也不会显示分组标题、折叠数量或完成标签。原始会话消息保持不变。
|
|
21
|
-
- Agent/subagent 调用会按时间顺序与工具、技能共用同一棵树;按 `Ctrl+O` 可查看任务和 Markdown 输出。调用返回并不代表后台任务已经完成。
|
|
22
|
-
- pi-subagents 的 `async subagent` / `Async agents` 小组件使用无背景的状态树,同时保留原生详情快捷键和输出路径。此适配器只在极简模式启用,关闭后恢复原状,未知格式会直接交给原生处理。分组设计参考 [pi-cc-extensions](https://github.com/minuque/pi-cc-extensions)。
|
|
23
|
-
- `/pi-mini-mode-history` 可浏览完整过程记录,每次显示 5 条。
|
|
24
|
-
- 最终 Markdown 会随着文本事件流式显示;失败和中断会明确标记。
|
|
25
|
-
- `/reload` 会重新挂载 transcript,也会包含原生模式中产生的历史记录。展开状态的树形连接线会贯穿段落、空行和代码块。
|
|
26
|
-
- `/pi-mini-mode-minimal off` 恢复 Pi 默认的对话历史显示。
|
|
9
|
+
**少一点干扰。多一点专注。**
|
|
27
10
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
极简模式使用私有的 Pi 0.85.x 布局适配器,不会修改 Pi 安装目录。未知布局会拒绝启用并保留原生输出。升级 Pi 后请重新检查兼容性;如果其他扩展也替换 transcript,可能产生冲突。
|
|
11
|
+
为 [Pi](https://pi.dev) 的日常工作做一点精细的改进,不止于页脚。光标处预览图片,折叠长消息和过程详情,展开子代理工作,让重要的会话状态始终清晰。
|
|
31
12
|
|
|
32
13
|
## 安装
|
|
33
14
|
|
|
@@ -35,40 +16,94 @@
|
|
|
35
16
|
pi install npm:@each1024/pi-mini-mode
|
|
36
17
|
```
|
|
37
18
|
|
|
38
|
-
在 Pi 中运行 `/reload
|
|
19
|
+
在 Pi 中运行 `/reload`,再用 `/pi-mini-mode-settings` 按你的习惯配置。
|
|
20
|
+
|
|
21
|
+
**需要 Pi ≥ 0.84.0。** 输入增强默认开启,极简输出按需开启。极简模式使用私有 **Pi 0.85.x** 布局适配器,启用前请查看[兼容性](#兼容性)。
|
|
39
22
|
|
|
40
|
-
|
|
23
|
+
<details>
|
|
24
|
+
<summary>也可以从 GitHub 安装</summary>
|
|
41
25
|
|
|
42
26
|
```bash
|
|
43
27
|
pi install git:github.com/eachann1024/pi-mini-mode
|
|
44
28
|
```
|
|
45
29
|
|
|
46
|
-
|
|
30
|
+
</details>
|
|
47
31
|
|
|
48
|
-
|
|
32
|
+
## 功能
|
|
49
33
|
|
|
50
|
-
|
|
51
|
-
- 会话令牌总数
|
|
52
|
-
- 缓存令牌与命中率
|
|
53
|
-
- 会话费用估算
|
|
54
|
-
- 上下文用量与进度条
|
|
55
|
-
- 最新生成速度
|
|
34
|
+
### 01 / 输入,更顺手
|
|
56
35
|
|
|
57
|
-
|
|
36
|
+
**图片,随光标浮现。** 编辑光标移入图片路径或紧凑标签,即可预览。全屏编辑器也支持悬停,按 `Esc` 关闭。
|
|
58
37
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
38
|
+
**收起路径,保留原图。** 输入框和消息中的图片路径收纳为带下划线的 `[image1]` 标签,提交时保留原始路径。使用终端的链接点击手势,即可通过系统默认应用打开原图或其他文件。
|
|
39
|
+
|
|
40
|
+
**技能,就在输入处。** 在输入起点或空白后键入 `/` 搜索技能,在当前光标处插入 `/skill:name`,提交时展开。URL 和文件路径中的斜杠保持原有行为。
|
|
41
|
+
|
|
42
|
+
使用 `Ctrl+V` 粘贴图片,Windows/WSL 使用 `Alt+V`。关闭输入增强不会关闭 Pi 原生剪贴板功能。
|
|
43
|
+
|
|
44
|
+
### 02 / 过程,更安静
|
|
45
|
+
|
|
46
|
+
在设置中开启 **极简输出**,或运行 `/pi-mini-mode-minimal on`。
|
|
47
|
+
|
|
48
|
+
- **长消息,自动折叠。** 全屏极简模式下,长用户消息默认保留前四个显示行。点击折叠控件展开全文,或用 `/pi-mini-mode-prompts` 选择消息。完整代码围栏保持完整。
|
|
49
|
+
- **子代理,清晰可查。** 点击子代理行,展开可用的活动记录与消息/最终输出。任务派发回执或工具调用返回,不等于后台任务已完成。
|
|
50
|
+
- **过程是一棵树,而非满屏输出。** 思考、工具与技能读取汇入同一棵时间顺序树,显示最新十条摘要;`Ctrl+O` 展开/收起完整过程,新问题默认收起。
|
|
51
|
+
- **工具详情,按需展开。** 点击工具/思考条目的折叠控件,或用 `/pi-mini-mode-tools` 选择。工具详情展示保存的文本,不还原原生自定义渲染器或图片输出。
|
|
52
|
+
- **把空间留给答案。** 最终 Markdown 流式呈现,不添加额外标题或背景。失败和中断明确标记;折叠只改变显示,不删除原始会话消息。
|
|
53
|
+
|
|
54
|
+
`/pi-mini-mode-history` 每次浏览五条完整过程记录;`/pi-mini-mode-minimal off` 恢复 Pi 原生历史。
|
|
55
|
+
|
|
56
|
+
### 03 / 状态,更清晰
|
|
57
|
+
|
|
58
|
+
**明暗,皆有章法。** 自带 `cc-light` 与 `cc-dark`,源自 [pi-cc-extensions](https://github.com/minuque/pi-cc-extensions),采用 MIT 许可。用户消息使用主题的用户背景色;Markdown、代码高亮、表格及支持的 Mermaid 图表适配明暗主题。不支持、不完整或过宽的图表保留源文本。
|
|
59
|
+
|
|
60
|
+
**重要指标,一行看清。** 模型与思考级别、会话令牌、缓存总量与命中率、费用估算、上下文用量与生成速度。在 `/pi-mini-mode-settings` 中选择显示字段,即时生效,页脚自动适配窄终端。
|
|
61
|
+
|
|
62
|
+
<details>
|
|
63
|
+
<summary>查看页脚设置截图与演示</summary>
|
|
64
|
+
|
|
65
|
+
[](assets/pi-mini-mode-settings.jpg)
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
[观看页脚设置演示](https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763)
|
|
64
68
|
|
|
65
|
-
|
|
69
|
+
这份已有截图和录屏展示页脚配置,不代表新增图片、折叠与子代理功能的当前界面。设置预览使用示例数据。
|
|
70
|
+
|
|
71
|
+
</details>
|
|
72
|
+
|
|
73
|
+
## 命令速查
|
|
74
|
+
|
|
75
|
+
| 命令/快捷键 | 用途 |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `/pi-mini-mode-settings` | 配置字段、输入增强和极简输出 |
|
|
78
|
+
| `/pi-mini-mode-minimal on` / `off` | 开启极简输出/恢复原生历史 |
|
|
79
|
+
| `Ctrl+O` | 展开/收起完整过程树 |
|
|
80
|
+
| `/pi-mini-mode-prompts` | 选择并展开/收起用户消息¹ |
|
|
81
|
+
| `/pi-mini-mode-tools` | 选择并展开/收起保存的工具文本或思考¹ |
|
|
82
|
+
| `/pi-mini-mode-history` | 浏览完整过程记录,每次五条 |
|
|
83
|
+
| `/reload` | 安装或修改源码后重载扩展 |
|
|
84
|
+
|
|
85
|
+
¹ 需要全屏极简输出。子代理行有独立的点击展开控件;受支持的第三方小组件保留原生详情快捷键。
|
|
86
|
+
|
|
87
|
+
## 兼容性
|
|
88
|
+
|
|
89
|
+
- **图片:** 预览依赖终端图片协议,不支持时显示提示。读取上限 **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)。
|
|
90
|
+
- **极简输出:** 使用私有 Pi 0.85.x 布局适配器,不修改 Pi 安装目录。未知布局会拒绝启用并保留原生输出;升级 Pi 后需重新检查,其他替换 transcript 的扩展可能冲突。
|
|
91
|
+
- **子代理:** pi-subagents 小组件适配仅在极简模式启用,关闭后恢复原状,未知格式原样交给原生处理。可用详情取决于集成提供的状态/输出数据,不是完整子代理会话查看器。
|
|
92
|
+
- **历史:** `/reload` 会重新挂载 transcript,包含原生模式中产生的历史。空进度事件不覆盖已有内容;无输出的工具显示等待时间。旧的极简输出细项不再单独过滤内容。
|
|
93
|
+
- **指标:** 费用是估算,不是 provider 账单。计算方式见下方参考。
|
|
94
|
+
|
|
95
|
+
## 参考
|
|
96
|
+
|
|
97
|
+
<details>
|
|
98
|
+
<summary><strong>首次使用与配置</strong></summary>
|
|
99
|
+
|
|
100
|
+
首次进入交互式 TUI 会话时,Pi Mini Mode 显示设置预览。页脚指标除 MCP 数量外默认开启,点阵样式与极简输出默认关闭,例如:
|
|
66
101
|
|
|
67
102
|
```text
|
|
68
103
|
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █░░░░░░░░░ 1% 120 tok/s
|
|
69
104
|
```
|
|
70
105
|
|
|
71
|
-
首次设置会提供 **Keep defaults(保留默认值)** 和 **Configure now
|
|
106
|
+
首次设置会提供 **Keep defaults(保留默认值)** 和 **Configure now(立即配置)**。保留默认值会保存默认字段选择、保持极简输出关闭,并且不再显示首次设置提示;立即配置会直接打开同一设置列表。Print、JSON 等非交互模式不会显示提示。
|
|
72
107
|
|
|
73
108
|
设置保存在 Pi 的 agent 目录中,通常是 `~/.pi/agent/pi-mini-mode.json`;如果 Pi 使用其他配置目录,则保存在对应目录。文件缺失或格式错误时会安全回退到默认设置。设置示例:
|
|
74
109
|
|
|
@@ -86,6 +121,8 @@ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █
|
|
|
86
121
|
"pi-mini-mode-context-percent-show": true,
|
|
87
122
|
"pi-mini-mode-speed-show": true,
|
|
88
123
|
"pi-mini-mode-speed-unit-show": true,
|
|
124
|
+
"pi-mini-mode-minimal-show": false,
|
|
125
|
+
"pi-mini-mode-input-enhancements": true,
|
|
89
126
|
"onboardingCompleted": true
|
|
90
127
|
}
|
|
91
128
|
```
|
|
@@ -104,18 +141,19 @@ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █
|
|
|
104
141
|
| `pi-mini-mode-context-percent-show` | `true` | 显示上下文使用百分比 |
|
|
105
142
|
| `pi-mini-mode-speed-show` | `true` | 显示最新生成速度 |
|
|
106
143
|
| `pi-mini-mode-speed-unit-show` | `true` | 速度子设置:在数字后追加 `tok/s` |
|
|
107
|
-
| `pi-mini-mode-minimal-show` | `false` |
|
|
108
|
-
| `pi-mini-mode-
|
|
109
|
-
| `pi-mini-mode-minimal-tools-show` | `true` | 显示工具调用和 Agent 调用 |
|
|
110
|
-
| `pi-mini-mode-minimal-output-show` | `true` | 显示过程输出 |
|
|
111
|
-
| `pi-mini-mode-minimal-skills-show` | `true` | 显示技能读取 |
|
|
112
|
-
| `pi-mini-mode-agent-usage-show` | `true` | 显示 Agent token 用量 |
|
|
113
|
-
| `pi-mini-mode-agent-shortcut-show` | `true` | 新 Agent 显示临时 `Ctrl+O` 提示 |
|
|
144
|
+
| `pi-mini-mode-minimal-show` | `false` | 极简输出总开关;关闭则使用 Pi 默认历史显示 |
|
|
145
|
+
| `pi-mini-mode-input-enhancements` | `true` | 图片预览、行内技能补全与展开、消息文件链接 |
|
|
114
146
|
| `onboardingCompleted` | 初始为 `false` | 防止再次显示首次设置提示的内部标记 |
|
|
115
147
|
|
|
116
148
|
生成速度设置中的 **显示 tok/s 单位** 是 **显示最新生成速度** 下方的缩进子设置。关闭它只会移除 `tok/s`,保留速度数字;即使隐藏生成速度,该子设置仍会保留。
|
|
117
149
|
|
|
118
|
-
|
|
150
|
+
|
|
151
|
+
设置命令需要 Pi 的 TUI 模式。预览使用固定示例数据而非当前会话,但会即时反映每项开关。选中项及对应预览字段会突出显示;全屏支持悬停聚焦、点击切换,普通终端使用键盘操作,悬停本身不会改变设置。
|
|
152
|
+
|
|
153
|
+
</details>
|
|
154
|
+
|
|
155
|
+
<details>
|
|
156
|
+
<summary><strong>指标如何计算</strong></summary>
|
|
119
157
|
|
|
120
158
|
会话总量来自当前会话分支中每一条已完成的 `assistant` 和 `toolResult` 记录。工具报告的嵌套 LLM 工作(例如子 Agent)会准确计入一次。若 provider 提供 `totalTokens`,`Total` 使用该值;较旧或自定义结果没有该字段时,则使用输入、输出、缓存读取和缓存写入令牌之和。`Cached` 是缓存读取与写入之和(包含在 `Total` 中);`CH` 是缓存读取量除以输入量与缓存读取量之和。只有已持久化的最终用量会计入,因此流式更新不会重复累计。
|
|
121
159
|
|
|
@@ -123,7 +161,10 @@ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █
|
|
|
123
161
|
|
|
124
162
|
在获得可测量响应前,速度字段完全不显示,不会出现 `-- tok/s` 占位符。速度位于页脚最右侧;启用上下文百分比时,百分比紧邻其左侧。颜色遵循 Pi 主题语义:至少 30 tok/s 为成功色,10–29.9 tok/s 为警告色,低于 10 tok/s 为错误色。费用是基于当前分支已完成用量和配置的每百万令牌费率得出的估算,并非 provider 账单。窄终端中,页脚会丢弃或截断优先级较低的内容,确保保持单行且不溢出。
|
|
125
163
|
|
|
126
|
-
|
|
164
|
+
</details>
|
|
165
|
+
|
|
166
|
+
<details>
|
|
167
|
+
<summary><strong>开发与检查</strong></summary>
|
|
127
168
|
|
|
128
169
|
开发时只安装本地副本;同时安装 npm 版本和本地版本会导致扩展重复注册:
|
|
129
170
|
|
|
@@ -141,12 +182,27 @@ python3 test/minimal-pty.py
|
|
|
141
182
|
|
|
142
183
|
该测试需要 Python 3、Node 以及已安装依赖中自带的 Pi CLI;会使用临时 fixture,覆盖普通/全屏模式、切换、10 条过程记录、`Ctrl+O` 展开/收起、恢复结果和窄终端,不会调用模型。
|
|
143
184
|
|
|
144
|
-
|
|
185
|
+
</details>
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary><strong>发布</strong></summary>
|
|
145
189
|
|
|
146
190
|
推送到 `main` 后,GitHub Actions 会在通过 `npm ci`、`npm run check` 和 `npm test` 后自动发布到 npm;也支持在 `main` 上手动触发。每次发布都会取本地版本基线与 npm 最新稳定版本加一个 patch 中的较高者。版本只在 runner 中变更,不创建版本提交或 tag;发布 major/minor 版本时,应同时提高 `package.json` 和 lockfile 中的基线。已经发布过的提交会跳过。Actions 并发策略可能替换等待中的推送,因此不是每次推送或一次推送中的每个提交都保证生成独立版本。
|
|
147
191
|
|
|
148
192
|
后续发布使用 npm Trusted Publisher、OIDC 和 provenance,无需 npm token。
|
|
149
193
|
|
|
194
|
+
|
|
195
|
+
发布前需为该包配置指向此 GitHub 仓库及 `publish.yml` 的 npm Trusted Publisher。
|
|
196
|
+
|
|
197
|
+
</details>
|
|
198
|
+
|
|
199
|
+
<details>
|
|
200
|
+
<summary><strong>协作说明</strong></summary>
|
|
201
|
+
|
|
202
|
+
主会话负责需求对齐、风险调研、完整方案、任务调度、关键决策、整合与总结;执行前应先调查关键风险点、边界、验收标准和解决方案。获得授权后,应积极使用子代理并并行拆分独立任务以节省时间,同时遵守相关性、风险、预算、并发和单一修改负责人约束。绝大部分任务及子代理默认使用 `low` 模型,仅在复杂推理、关键决策或风险审查确有需要时升级。
|
|
203
|
+
|
|
204
|
+
</details>
|
|
205
|
+
|
|
150
206
|
---
|
|
151
207
|
|
|
152
208
|
[MIT License](LICENSE) · 为 [Pi](https://pi.dev) 打造
|