@each1024/pi-mini-mode 1.3.15 → 2.0.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 +53 -43
- package/README.zh-CN.md +53 -46
- package/extensions/footer-status.ts +194 -113
- package/lib/file-links.ts +36 -17
- package/lib/input-enhancements.ts +330 -50
- package/lib/settings-web.ts +7 -2
- package/lib/settings.html +109 -47
- package/lib/terminal-capabilities.ts +45 -0
- package/lib/transcript-adapter.ts +42 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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%">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/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
|
-
[中文](README.zh-CN.md) · [Install](#install) · [Features](#features) · [
|
|
5
|
+
[中文](https://github.com/eachann1024/pi-mini-mode/blob/main/README.zh-CN.md) · [Install](#install) · [Features](#features) · [Reference](#reference)
|
|
6
6
|
|
|
7
7
|
# Pi Mini Mode
|
|
8
8
|
|
|
@@ -10,16 +10,35 @@
|
|
|
10
10
|
|
|
11
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.
|
|
12
12
|
|
|
13
|
+
<details>
|
|
14
|
+
<summary>See the full interface</summary>
|
|
15
|
+
|
|
16
|
+
<img width="1698" height="1588" alt="Pi Mini Mode interface" src="https://github.com/user-attachments/assets/9990b080-f82b-4dd0-bc7b-a0cdded72181" />
|
|
17
|
+
|
|
18
|
+
</details>
|
|
19
|
+
|
|
13
20
|
## Install
|
|
14
21
|
|
|
15
22
|
```bash
|
|
16
23
|
pi install npm:@each1024/pi-mini-mode
|
|
17
24
|
```
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
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
27
|
|
|
21
28
|
**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
29
|
|
|
30
|
+
### Update an existing npm installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pi update npm:@each1024/pi-mini-mode
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
**`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.
|
|
39
|
+
|
|
40
|
+
**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.
|
|
41
|
+
|
|
23
42
|
<details>
|
|
24
43
|
<summary>Install from GitHub instead</summary>
|
|
25
44
|
|
|
@@ -33,6 +52,8 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
33
52
|
|
|
34
53
|
### 01 / Input, refined
|
|
35
54
|
|
|
55
|
+
<img width="1092" height="764" alt="Image previews and compact labels in Pi Mini Mode" src="https://github.com/user-attachments/assets/2ea6d037-d3f0-423c-8588-17992a49d445" />
|
|
56
|
+
|
|
36
57
|
**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
58
|
|
|
38
59
|
**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 +64,19 @@ Paste images with `Ctrl+V` (`Alt+V` on Windows/WSL). Disabling input enhancement
|
|
|
43
64
|
|
|
44
65
|
### 02 / Process, quieter
|
|
45
66
|
|
|
46
|
-
Enable **Minimal output** in
|
|
67
|
+
Enable **Minimal output** in `/pi-mini-mode-settings`.
|
|
68
|
+
|
|
69
|
+
<img width="1092" height="764" alt="Folded process tree in minimal output" src="https://github.com/user-attachments/assets/eb8c88f6-84af-499e-b105-5395b4f02e66" />
|
|
47
70
|
|
|
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
|
|
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
|
|
51
|
-
- **Tool details on demand.** Expand a tool
|
|
71
|
+
- **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.
|
|
72
|
+
- **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.
|
|
73
|
+
- **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.
|
|
74
|
+
- **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
75
|
- **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
76
|
|
|
54
|
-
|
|
77
|
+
Turn **Minimal output** off in settings to restore native Pi history.
|
|
78
|
+
|
|
79
|
+
<img width="1092" height="764" alt="Expanded process details" src="https://github.com/user-attachments/assets/53f5aa28-4b96-45db-b02e-0108aa9e68bc" />
|
|
55
80
|
|
|
56
81
|
### 03 / Session, in focus
|
|
57
82
|
|
|
@@ -62,7 +87,7 @@ Enable **Minimal output** in settings, or run `/pi-mini-mode-minimal on`.
|
|
|
62
87
|
<details>
|
|
63
88
|
<summary>See the footer settings and demo</summary>
|
|
64
89
|
|
|
65
|
-
[](assets/pi-mini-mode-settings.jpg)
|
|
90
|
+
[](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/pi-mini-mode-settings.jpg)
|
|
66
91
|
|
|
67
92
|
[Watch the footer settings demo](https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763)
|
|
68
93
|
|
|
@@ -70,25 +95,9 @@ This earlier screenshot and recording show footer configuration, not the newer i
|
|
|
70
95
|
|
|
71
96
|
</details>
|
|
72
97
|
|
|
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
98
|
## Compatibility
|
|
90
99
|
|
|
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).
|
|
100
|
+
- **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
101
|
- **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
102
|
- **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
103
|
- **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 +108,15 @@ This earlier screenshot and recording show footer configuration, not the newer i
|
|
|
99
108
|
<details>
|
|
100
109
|
<summary><strong>First run & configuration</strong> — defaults, controls, and settings file</summary>
|
|
101
110
|
|
|
102
|
-
On the first interactive TUI session, Pi Mini Mode shows a preview.
|
|
111
|
+
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`.
|
|
112
|
+
|
|
113
|
+
Example with optional Cached and MCP fields enabled:
|
|
103
114
|
|
|
104
115
|
```text
|
|
105
|
-
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M
|
|
116
|
+
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500/1.0M ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 1% 120 tok/s
|
|
106
117
|
```
|
|
107
118
|
|
|
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;
|
|
119
|
+
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
120
|
|
|
110
121
|
Open that settings UI any time with:
|
|
111
122
|
|
|
@@ -121,15 +132,18 @@ Settings are stored globally at Pi's agent directory (normally `~/.pi/agent/pi-m
|
|
|
121
132
|
|
|
122
133
|
```json
|
|
123
134
|
{
|
|
135
|
+
"pi-mini-mode-project-branch-show": true,
|
|
136
|
+
"pi-mini-mode-branch-show": false,
|
|
124
137
|
"pi-mini-mode-model-show": true,
|
|
125
138
|
"pi-mini-mode-thinking-show": true,
|
|
126
139
|
"pi-mini-mode-ch-show": true,
|
|
127
140
|
"pi-mini-mode-session-tokens-show": true,
|
|
128
|
-
"pi-mini-mode-cache-tokens-show":
|
|
141
|
+
"pi-mini-mode-cache-tokens-show": false,
|
|
142
|
+
"pi-mini-mode-cache-miss-show": true,
|
|
129
143
|
"pi-mini-mode-cost-show": true,
|
|
130
144
|
"pi-mini-mode-mcp-show": false,
|
|
131
145
|
"pi-mini-mode-context-show": true,
|
|
132
|
-
"pi-mini-mode-context-dots-show":
|
|
146
|
+
"pi-mini-mode-context-dots-show": true,
|
|
133
147
|
"pi-mini-mode-context-percent-show": true,
|
|
134
148
|
"pi-mini-mode-speed-show": true,
|
|
135
149
|
"pi-mini-mode-speed-unit-show": true,
|
|
@@ -141,15 +155,18 @@ Settings are stored globally at Pi's agent directory (normally `~/.pi/agent/pi-m
|
|
|
141
155
|
|
|
142
156
|
| Key | Default | Controls |
|
|
143
157
|
| --- | --- | --- |
|
|
158
|
+
| `pi-mini-mode-project-branch-show` | `true` | Project name and branch |
|
|
159
|
+
| `pi-mini-mode-branch-show` | `false` | Branch only, instead of project and branch |
|
|
144
160
|
| `pi-mini-mode-model-show` | `true` | Model ID without provider prefix |
|
|
145
161
|
| `pi-mini-mode-thinking-show` | `true` | Thinking level |
|
|
146
162
|
| `pi-mini-mode-ch-show` | `true` | Session cache-hit rate (`CH`) |
|
|
147
163
|
| `pi-mini-mode-session-tokens-show` | `true` | Accumulated session tokens (`Total`) |
|
|
148
|
-
| `pi-mini-mode-cache-tokens-show` | `
|
|
164
|
+
| `pi-mini-mode-cache-tokens-show` | `false` | Accumulated cache read + cache write tokens |
|
|
165
|
+
| `pi-mini-mode-cache-miss-show` | `true` | Estimated cache misses when detected |
|
|
149
166
|
| `pi-mini-mode-cost-show` | `true` | Estimated session list price |
|
|
150
167
|
| `pi-mini-mode-mcp-show` | `false` | Enabled MCP server count |
|
|
151
168
|
| `pi-mini-mode-context-show` | `true` | Used/total context tokens and progress bar |
|
|
152
|
-
| `pi-mini-mode-context-dots-show` | `
|
|
169
|
+
| `pi-mini-mode-context-dots-show` | `true` | Use a single-line dot-matrix bar instead of the solid bar |
|
|
153
170
|
| `pi-mini-mode-context-percent-show` | `true` | Context-use percentage |
|
|
154
171
|
| `pi-mini-mode-speed-show` | `true` | Generation speed at the far right |
|
|
155
172
|
| `pi-mini-mode-speed-unit-show` | `true` | Generation-speed sub-setting: append `tok/s` to the numeric value |
|
|
@@ -196,16 +213,9 @@ For a real terminal smoke test, run `python3 test/minimal-pty.py`. It needs Pyth
|
|
|
196
213
|
<details>
|
|
197
214
|
<summary><strong>Publishing</strong></summary>
|
|
198
215
|
|
|
199
|
-
|
|
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>
|
|
216
|
+
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
217
|
|
|
208
|
-
The
|
|
218
|
+
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
219
|
|
|
210
220
|
</details>
|
|
211
221
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<p>
|
|
2
|
-
<img src="assets/readme-cover.zh-CN.svg" alt="Pi Mini Mode — 少一点干扰,多一点专注。图片输入、可折叠对话、子代理、明暗主题与实时页脚。" width="100%">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/readme-cover.zh-CN.svg" alt="Pi Mini Mode — 少一点干扰,多一点专注。图片输入、可折叠对话、子代理、明暗主题与实时页脚。" width="100%">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
[English](README.md) · [安装](#安装) · [功能](#功能) · [
|
|
5
|
+
[English](https://github.com/eachann1024/pi-mini-mode/blob/main/README.md) · [安装](#安装) · [功能](#功能) · [参考](#参考)
|
|
6
6
|
|
|
7
7
|
# Pi Mini Mode
|
|
8
8
|
|
|
@@ -10,16 +10,35 @@
|
|
|
10
10
|
|
|
11
11
|
为 [Pi](https://pi.dev) 的日常工作做一点精细的改进,不止于页脚。光标处预览图片,折叠长消息和过程详情,展开子代理工作,让重要的会话状态始终清晰。
|
|
12
12
|
|
|
13
|
+
<details>
|
|
14
|
+
<summary>查看完整界面</summary>
|
|
15
|
+
|
|
16
|
+
<img width="892" height="797" alt="Pi Mini Mode 完整界面" src="https://github.com/user-attachments/assets/8f7abdc8-646e-4ded-8009-b58d2833c1f4" />
|
|
17
|
+
|
|
18
|
+
</details>
|
|
19
|
+
|
|
13
20
|
## 安装
|
|
14
21
|
|
|
15
22
|
```bash
|
|
16
23
|
pi install npm:@each1024/pi-mini-mode
|
|
17
24
|
```
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
已打开的 Pi 会话中,运行 Pi 自带的 `/reload`。首次使用选择 **应用推荐配置**,设置内置主题和全屏模式,重启 Pi 后全屏才会生效。之后可用 `/pi-mini-mode-settings` 随时配置本扩展。项目设置和命令行参数可能覆盖全局设置。
|
|
20
27
|
|
|
21
28
|
**需要 Pi ≥ 0.84.0。** 输入增强和极简输出默认开启。极简模式使用私有 **Pi 0.85.x** 布局适配器,启用前请查看[兼容性](#兼容性)。
|
|
22
29
|
|
|
30
|
+
### 更新已安装的 npm 版本
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pi update npm:@each1024/pi-mini-mode
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
然后在 Pi 中运行 `/reload`,重新打开 `/pi-mini-mode-settings`(或重启 Pi)。HTML 设置页随扩展一起更新,不需要另外执行 npm 命令或启动开发服务器。发布本身不会自动更新用户已安装的副本或已打开的浏览器标签页。固定版本用户需先用 `pi install npm:@each1024/pi-mini-mode@latest` 替换安装;本地开发安装仍读取本地文件。
|
|
37
|
+
|
|
38
|
+
**注意:`pi update` 默认只更新 Pi 本体。** 更新全部插件用 `pi update --extensions`,同时更新 Pi 和插件用 `pi update --all`。`/reload` 只重新加载磁盘上的代码,不下载新版本。
|
|
39
|
+
|
|
40
|
+
**旧版 `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` 标签;不带标签的安装可能沿用之前保存的依赖范围。
|
|
41
|
+
|
|
23
42
|
<details>
|
|
24
43
|
<summary>也可以从 GitHub 安装</summary>
|
|
25
44
|
|
|
@@ -33,6 +52,8 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
33
52
|
|
|
34
53
|
### 01 / 输入,更顺手
|
|
35
54
|
|
|
55
|
+
<img width="1092" height="764" alt="图片预览与紧凑标签" src="https://github.com/user-attachments/assets/2ea6d037-d3f0-423c-8588-17992a49d445" />
|
|
56
|
+
|
|
36
57
|
**图片,随光标浮现。** 编辑光标移入图片路径或紧凑标签,即可预览。全屏编辑器也支持悬停,按 `Esc` 关闭。
|
|
37
58
|
|
|
38
59
|
**收起路径,保留原图。** 输入框和消息中的图片路径收纳为带下划线的 `[image1]` 标签,提交时保留原始路径。使用终端的链接点击手势,即可通过系统默认应用打开原图或其他文件。
|
|
@@ -43,15 +64,19 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
43
64
|
|
|
44
65
|
### 02 / 过程,更安静
|
|
45
66
|
|
|
46
|
-
|
|
67
|
+
在 `/pi-mini-mode-settings` 中开启 **极简输出**。
|
|
47
68
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
69
|
+
<img width="1092" height="764" alt="极简输出中的过程树" src="https://github.com/user-attachments/assets/eb8c88f6-84af-499e-b105-5395b4f02e66" />
|
|
70
|
+
|
|
71
|
+
- **长消息,自动折叠。** 全屏极简模式下,长用户消息默认保留前四个显示行。点击折叠控件展开全文。完整代码围栏保持完整。
|
|
72
|
+
- **子代理,清晰可查。** 点击子代理行,展开可用的活动记录与消息/最终输出。极简模式下,本扩展用 `Ctrl+S` 展开/收起已完成的子代理摘要;Pi 当前聚焦的选择器保留自己的快捷键。任务派发回执或工具调用返回,不等于后台任务已完成。
|
|
73
|
+
- **过程是一棵树,而非满屏输出。** 思考、工具与技能读取汇入同一棵时间顺序树,显示最新摘要,包括最新一条思考;`Ctrl+O` 展开/收起完整过程,新问题默认收起。
|
|
74
|
+
- **工具详情,按需展开。** 点击工具或思考条目的折叠控件,最新一条思考也可以展开。思考默认收起,进行中与结束后均只由手动操作展开或收起。工具详情展示保存的文本,不还原原生自定义渲染器或图片输出。
|
|
52
75
|
- **把空间留给答案。** 最终 Markdown 流式呈现,不添加额外标题或背景。失败和中断明确标记;折叠只改变显示,不删除原始会话消息。
|
|
53
76
|
|
|
54
|
-
|
|
77
|
+
在设置中关闭 **极简输出** 即恢复 Pi 原生历史。
|
|
78
|
+
|
|
79
|
+
<img width="1092" height="764" alt="展开后的过程详情" src="https://github.com/user-attachments/assets/53f5aa28-4b96-45db-b02e-0108aa9e68bc" />
|
|
55
80
|
|
|
56
81
|
### 03 / 状态,更清晰
|
|
57
82
|
|
|
@@ -62,7 +87,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
62
87
|
<details>
|
|
63
88
|
<summary>查看页脚设置截图与演示</summary>
|
|
64
89
|
|
|
65
|
-
[](assets/pi-mini-mode-settings.jpg)
|
|
90
|
+
[](https://raw.githubusercontent.com/eachann1024/pi-mini-mode/main/assets/pi-mini-mode-settings.jpg)
|
|
66
91
|
|
|
67
92
|
[观看页脚设置演示](https://github.com/user-attachments/assets/5f2f4816-45ed-4759-b035-d9ee59e8a763)
|
|
68
93
|
|
|
@@ -70,25 +95,9 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
70
95
|
|
|
71
96
|
</details>
|
|
72
97
|
|
|
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
98
|
## 兼容性
|
|
90
99
|
|
|
91
|
-
- **图片:**
|
|
100
|
+
- **图片:** 预览依赖终端图片协议,不支持时显示提示。大图仅对终端预览副本缩放(不超过 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
101
|
- **极简输出:** 使用私有 Pi 0.85.x 布局适配器,不修改 Pi 安装目录。未知布局会拒绝启用并保留原生输出;升级 Pi 后需重新检查,其他替换 transcript 的扩展可能冲突。
|
|
93
102
|
- **子代理:** pi-subagents 小组件适配仅在极简模式启用,关闭后恢复原状,未知格式原样交给原生处理。可用详情取决于集成提供的状态/输出数据,不是完整子代理会话查看器。
|
|
94
103
|
- **历史:** `/reload` 会重新挂载 transcript,包含原生模式中产生的历史。空进度事件不覆盖已有内容;无输出的工具显示等待时间。旧的极简输出细项不再单独过滤内容。
|
|
@@ -99,27 +108,32 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
99
108
|
<details>
|
|
100
109
|
<summary><strong>首次使用与配置</strong></summary>
|
|
101
110
|
|
|
102
|
-
首次进入交互式 TUI 会话时,Pi Mini Mode
|
|
111
|
+
首次进入交互式 TUI 会话时,Pi Mini Mode 显示设置预览。「仅显示分支」「缓存 token」「MCP」默认关闭;「仅显示分支」与「项目与分支」互斥。之后可用 `/pi-mini-mode-settings` 再改。
|
|
112
|
+
|
|
113
|
+
以下示例开启了可选的 Cached 和 MCP 字段:
|
|
103
114
|
|
|
104
115
|
```text
|
|
105
|
-
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M
|
|
116
|
+
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500/1.0M ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 1% 120 tok/s
|
|
106
117
|
```
|
|
107
118
|
|
|
108
|
-
首次设置会提供 **Keep defaults(保留默认值)**、**Configure now(立即配置)** 和 **Apply recommended setup(应用推荐配置)**。保留默认值会保存默认字段选择、保持极简输出开启,并且不再显示首次设置提示;立即配置会直接打开同一设置列表。应用推荐配置会让你选择内置的 `cc-dark` 或 `cc-light` 主题,通过 Pi 官方设置 API 保存该主题和全局 `tuiMode=fullscreen`,立即应用主题,并提示重启 Pi(全屏渲染器在启动时决定)。项目设置和命令行参数可能覆盖全局设置。按 Esc
|
|
119
|
+
首次设置会提供 **Keep defaults(保留默认值)**、**Configure now(立即配置)** 和 **Apply recommended setup(应用推荐配置)**。保留默认值会保存默认字段选择、保持极简输出开启,并且不再显示首次设置提示;立即配置会直接打开同一设置列表。应用推荐配置会让你选择内置的 `cc-dark` 或 `cc-light` 主题,通过 Pi 官方设置 API 保存该主题和全局 `tuiMode=fullscreen`,立即应用主题,并提示重启 Pi(全屏渲染器在启动时决定)。项目设置和命令行参数可能覆盖全局设置。按 Esc/取消不会完成首次设置,下次交互式会话会再次提示。Print、JSON 等非交互模式不会显示提示。
|
|
109
120
|
|
|
110
121
|
设置保存在 Pi 的 agent 目录中,通常是 `~/.pi/agent/pi-mini-mode.json`;如果 Pi 使用其他配置目录,则保存在对应目录。文件缺失或格式错误时会安全回退到默认设置。设置示例:
|
|
111
122
|
|
|
112
123
|
```json
|
|
113
124
|
{
|
|
125
|
+
"pi-mini-mode-project-branch-show": true,
|
|
126
|
+
"pi-mini-mode-branch-show": false,
|
|
114
127
|
"pi-mini-mode-model-show": true,
|
|
115
128
|
"pi-mini-mode-thinking-show": true,
|
|
116
129
|
"pi-mini-mode-ch-show": true,
|
|
117
130
|
"pi-mini-mode-session-tokens-show": true,
|
|
118
|
-
"pi-mini-mode-cache-tokens-show":
|
|
131
|
+
"pi-mini-mode-cache-tokens-show": false,
|
|
132
|
+
"pi-mini-mode-cache-miss-show": true,
|
|
119
133
|
"pi-mini-mode-cost-show": true,
|
|
120
134
|
"pi-mini-mode-mcp-show": false,
|
|
121
135
|
"pi-mini-mode-context-show": true,
|
|
122
|
-
"pi-mini-mode-context-dots-show":
|
|
136
|
+
"pi-mini-mode-context-dots-show": true,
|
|
123
137
|
"pi-mini-mode-context-percent-show": true,
|
|
124
138
|
"pi-mini-mode-speed-show": true,
|
|
125
139
|
"pi-mini-mode-speed-unit-show": true,
|
|
@@ -131,15 +145,18 @@ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 500/1.0M █
|
|
|
131
145
|
|
|
132
146
|
| 配置项 | 默认值 | 说明 |
|
|
133
147
|
| --- | --- | --- |
|
|
148
|
+
| `pi-mini-mode-project-branch-show` | `true` | 显示项目名称与分支 |
|
|
149
|
+
| `pi-mini-mode-branch-show` | `false` | 仅显示分支,代替项目与分支 |
|
|
134
150
|
| `pi-mini-mode-model-show` | `true` | 显示不含 provider 前缀的模型 ID |
|
|
135
151
|
| `pi-mini-mode-thinking-show` | `true` | 显示思考级别 |
|
|
136
152
|
| `pi-mini-mode-ch-show` | `true` | 显示会话缓存命中率(`CH`) |
|
|
137
153
|
| `pi-mini-mode-session-tokens-show` | `true` | 显示会话累计令牌(`Total`) |
|
|
138
|
-
| `pi-mini-mode-cache-tokens-show` | `
|
|
154
|
+
| `pi-mini-mode-cache-tokens-show` | `false` | 显示缓存读取与写入令牌(已包含在 Total 中) |
|
|
155
|
+
| `pi-mini-mode-cache-miss-show` | `true` | 检测到缓存 miss 时显示估算量 |
|
|
139
156
|
| `pi-mini-mode-cost-show` | `true` | 显示会话费用估算 |
|
|
140
157
|
| `pi-mini-mode-mcp-show` | `false` | 显示已启用的 MCP 服务器数量 |
|
|
141
158
|
| `pi-mini-mode-context-show` | `true` | 显示已用/总上下文令牌和进度条 |
|
|
142
|
-
| `pi-mini-mode-context-dots-show` | `
|
|
159
|
+
| `pi-mini-mode-context-dots-show` | `true` | 使用单行点阵进度条替代实心进度条 |
|
|
143
160
|
| `pi-mini-mode-context-percent-show` | `true` | 显示上下文使用百分比 |
|
|
144
161
|
| `pi-mini-mode-speed-show` | `true` | 显示最新生成速度 |
|
|
145
162
|
| `pi-mini-mode-speed-unit-show` | `true` | 速度子设置:在数字后追加 `tok/s` |
|
|
@@ -189,19 +206,9 @@ python3 test/minimal-pty.py
|
|
|
189
206
|
<details>
|
|
190
207
|
<summary><strong>发布</strong></summary>
|
|
191
208
|
|
|
192
|
-
|
|
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>
|
|
209
|
+
日常发布在本机完成,使用 `.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
210
|
|
|
204
|
-
|
|
211
|
+
备份流程需要为该包配置指向此 GitHub 仓库及 `publish.yml` 的 npm Trusted Publisher。它使用 OIDC 和 provenance,不使用 npm token。
|
|
205
212
|
|
|
206
213
|
</details>
|
|
207
214
|
|