@each1024/pi-mini-mode 2.0.9 → 2.0.11
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 +11 -8
- package/README.zh-CN.md +8 -10
- package/extensions/footer-status.ts +46 -1189
- package/lib/agent-render.ts +203 -0
- package/lib/agent-state.ts +199 -0
- package/lib/agent-view.ts +5 -519
- package/lib/agent-widgets.ts +129 -0
- package/lib/footer-line.ts +206 -0
- package/lib/input-editor-paths.ts +79 -0
- package/lib/input-editor.ts +184 -0
- package/lib/input-enhancements-types.ts +51 -0
- package/lib/input-enhancements.ts +15 -797
- package/lib/input-hover-preview.ts +149 -0
- package/lib/input-image-graphics.ts +34 -0
- package/lib/input-image-paths.ts +120 -0
- package/lib/input-inline-images.ts +114 -0
- package/lib/input-skill-completion.ts +132 -0
- package/lib/minimal-output.ts +384 -0
- package/lib/minimal-turns.ts +203 -0
- package/lib/settings-web.ts +9 -2
- package/lib/settings.html +7 -6
- package/lib/settings.ts +153 -0
- package/lib/thinking-preview.ts +25 -21
- package/lib/thinking-stream.ts +96 -0
- package/lib/transcript-adapter.ts +15 -501
- package/lib/transcript-cards.ts +67 -0
- package/lib/transcript-notice-render.ts +211 -0
- package/lib/transcript-notices.ts +238 -0
- package/lib/usage.ts +137 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ An everyday refinement for [Pi](https://pi.dev), not just a footer. Preview imag
|
|
|
12
12
|
|
|
13
13
|
https://github.com/user-attachments/assets/1ad90757-ecea-4901-afd8-f33a68176ae2
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
|
|
17
17
|
Numbers in the footer shots come from a scripted demo session; prices are estimates, not provider bills.
|
|
18
18
|
|
|
@@ -62,7 +62,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
62
62
|
|
|
63
63
|
**Images where you write.** Images appear as inline cards above the editor by default; you can switch to cursor popups in settings. Press `Esc` to dismiss a popup.
|
|
64
64
|
|
|
65
|
-
**Less path clutter. Same image.** Image paths become underlined `[image1]` labels in the editor and messages, preserving the original path when submitted.
|
|
65
|
+
**Less path clutter. Same image.** Image paths become underlined `[image1]` labels in the editor and messages, preserving the original path when submitted. Left-click opens the original image or another linked file in its default app. In fullscreen, right-click reveals the file selected in its folder.
|
|
66
66
|
|
|
67
67
|
**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.
|
|
68
68
|
|
|
@@ -78,6 +78,7 @@ Enable **Minimal output** in `/pi-mini-mode-settings`.
|
|
|
78
78
|
- **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.
|
|
79
79
|
- **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.
|
|
80
80
|
- **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.
|
|
81
|
+
- **Readable summaries.** Long tool rows keep the command beginning and put the ellipsis at the end; expanding reveals the complete long or multiline input. Live thinking follows the latest returned summary, while completed thinking previews its beginning and expands to the full received text. Empty summaries show their actual state without repeating a tool command; failures and interruptions stop the thinking clock.
|
|
81
82
|
- **Room for the answer.** Final Markdown streams without extra headings or backgrounds. Failures and interruptions stay explicit. Folding changes presentation, not stored session messages.
|
|
82
83
|
|
|
83
84
|
Turn **Minimal output** off in settings to restore native Pi history.
|
|
@@ -101,7 +102,7 @@ This earlier screenshot shows footer configuration, not the newer image, folding
|
|
|
101
102
|
|
|
102
103
|
## Compatibility
|
|
103
104
|
|
|
104
|
-
- **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
|
|
105
|
+
- **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 a direct left-click. Right-clicking a file link reveals and selects that file on macOS and Windows, and opens its folder elsewhere. Right-clicking empty space keeps selection or paste behavior. See [Pi terminal setup](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/terminal-setup.md).
|
|
105
106
|
- **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.
|
|
106
107
|
- **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.
|
|
107
108
|
- **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.
|
|
@@ -203,21 +204,23 @@ Install only the local copy while developing; installing npm and local copies to
|
|
|
203
204
|
```bash
|
|
204
205
|
pi remove npm:@each1024/pi-mini-mode && pi install /path/to/pi-mini-mode
|
|
205
206
|
npm run check
|
|
206
|
-
npm
|
|
207
|
+
npm run check:syntax
|
|
207
208
|
```
|
|
208
209
|
|
|
209
|
-
After source changes, run `/reload` in an already-open Pi session. `npm run check`
|
|
210
|
+
After source changes, run `/reload` in an already-open Pi session. `npm run check` checks all extension and library TypeScript, including unused declarations and parameters. `npm run check:syntax` parses the JavaScript checks, maintenance scripts, and settings page without executing them.
|
|
211
|
+
|
|
212
|
+
For a specific regression, list the existing checks with `npm run check:focused -- --list`, then select one, for example `npm run check:focused -- settings-web`. `npm test` uses the same selector and requires a name; it never defaults to the full suite. Terminal fixtures in `test/minimal-pty.py` remain available for explicitly requested terminal investigations.
|
|
210
213
|
|
|
211
|
-
|
|
214
|
+
The direct development dependency on `@earendil-works/pi-server` is required by experimental modules imported by Pi 0.85.0; that Pi release omits it from its package dependencies. Keep it until a Pi upgrade fixes the upstream dependency declaration.
|
|
212
215
|
|
|
213
216
|
</details>
|
|
214
217
|
|
|
215
218
|
<details>
|
|
216
219
|
<summary><strong>Publishing</strong></summary>
|
|
217
220
|
|
|
218
|
-
|
|
221
|
+
Every push to main (including merged PRs) that changes `extensions/`, `lib/`, `themes/`, package.json or the lockfile publishes automatically via `.github/workflows/publish.yml`: a package.json version above the highest published npm version is used as is; otherwise the patch number of the highest published version is incremented, the package is published to npm, the version is committed back to main with `[skip ci]`, and a matching tag and GitHub Release are created. Docs-only or CI-only changes do not publish, and a version is never published twice. The Pi package gallery discovers the package from npm.
|
|
219
222
|
|
|
220
|
-
|
|
223
|
+
npm authentication prefers a Trusted Publisher (OIDC) bound to this repository and `publish.yml`; a repository secret `NPM_TOKEN` also works.
|
|
221
224
|
|
|
222
225
|
</details>
|
|
223
226
|
|
package/README.zh-CN.md
CHANGED
|
@@ -62,7 +62,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
62
62
|
|
|
63
63
|
**图片,就在输入框上方。** 图片默认以内联卡片显示,也可在设置中切换为光标浮窗。按 `Esc` 可关闭浮窗。
|
|
64
64
|
|
|
65
|
-
**收起路径,保留原图。** 输入框和消息中的图片路径收纳为带下划线的 `[image1]`
|
|
65
|
+
**收起路径,保留原图。** 输入框和消息中的图片路径收纳为带下划线的 `[image1]` 标签,提交时保留原始路径。左键用系统默认应用打开原图或其他文件;全屏模式右键在文件管理器中打开所在位置并选中该文件。
|
|
66
66
|
|
|
67
67
|
**技能,就在输入处。** 在输入起点或空白后键入 `/` 搜索技能,在当前光标处插入 `/skill:name`,提交时展开。URL 和文件路径中的斜杠保持原有行为。
|
|
68
68
|
|
|
@@ -101,7 +101,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
101
101
|
|
|
102
102
|
## 兼容性
|
|
103
103
|
|
|
104
|
-
- **图片:** 预览依赖终端图片协议,不支持时显示提示。大图仅对终端预览副本缩放(不超过 1200 × 800 像素、编码后 1 MB);原文件和提交路径不变。读取上限 **20 MB**,文件被清理后无法重新打开。点击手势由终端决定:macOS 通常使用 `Cmd+点击`,Windows/Linux 通常使用 `Ctrl+点击`;Ghostty 全屏可能需要 `Shift+Cmd` / `Shift+Ctrl`。Pi
|
|
104
|
+
- **图片:** 预览依赖终端图片协议,不支持时显示提示。大图仅对终端预览副本缩放(不超过 1200 × 800 像素、编码后 1 MB);原文件和提交路径不变。读取上限 **20 MB**,文件被清理后无法重新打开。点击手势由终端决定:macOS 通常使用 `Cmd+点击`,Windows/Linux 通常使用 `Ctrl+点击`;Ghostty 全屏可能需要 `Shift+Cmd` / `Shift+Ctrl`。Pi 全屏也支持直接左键打开链接;右键文件链接会在文件管理器中定位并选中该文件(macOS、Windows),其他系统打开所在文件夹。空白处右键仍按原来的选择或粘贴行为。参见 [Pi 终端设置](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/terminal-setup.md)。
|
|
105
105
|
- **极简输出:** 使用私有 Pi 0.85.x 布局适配器,不修改 Pi 安装目录。未知布局会拒绝启用并保留原生输出;升级 Pi 后需重新检查,其他替换 transcript 的扩展可能冲突。
|
|
106
106
|
- **子代理:** pi-subagents 小组件适配仅在极简模式启用,关闭后恢复原状,未知格式原样交给原生处理。可用详情取决于集成提供的状态/输出数据,不是完整子代理会话查看器。
|
|
107
107
|
- **历史:** `/reload` 会重新挂载 transcript,包含原生模式中产生的历史。空进度事件不覆盖已有内容;无输出的工具显示等待时间。旧的极简输出细项不再单独过滤内容。
|
|
@@ -194,25 +194,23 @@ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500
|
|
|
194
194
|
```bash
|
|
195
195
|
pi remove npm:@each1024/pi-mini-mode && pi install /path/to/pi-mini-mode
|
|
196
196
|
npm run check
|
|
197
|
-
npm
|
|
197
|
+
npm run check:syntax
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
修改源码后,在已打开的 Pi 会话中运行 `/reload`。`npm run check`
|
|
200
|
+
修改源码后,在已打开的 Pi 会话中运行 `/reload`。`npm run check` 检查扩展与 lib 中的全部 TypeScript,包含未使用声明和参数;`npm run check:syntax` 只解析检查脚本、维护脚本及设置页的 JavaScript,不执行检查脚本。
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
python3 test/minimal-pty.py
|
|
204
|
-
```
|
|
202
|
+
需要定位具体回归时,先用 `npm run check:focused -- --list` 列出已有检查,再指定一个名称,例如 `npm run check:focused -- settings-web`。`npm test` 使用相同入口,必须指定名称,不再默认执行全量套件。`test/minimal-pty.py` 保留供明确要求的终端问题调查使用。
|
|
205
203
|
|
|
206
|
-
|
|
204
|
+
开发依赖 `@earendil-works/pi-server` 是 Pi 0.85.0 的实验性模块间接导入所需,上游该版本漏写了依赖声明;升级 Pi 并确认上游修复后才能移除。
|
|
207
205
|
|
|
208
206
|
</details>
|
|
209
207
|
|
|
210
208
|
<details>
|
|
211
209
|
<summary><strong>发布</strong></summary>
|
|
212
210
|
|
|
213
|
-
|
|
211
|
+
推到 main(含 PR 合并)且 `extensions/`、`lib/`、`themes/`、package.json 或 lockfile 有变化时,`.github/workflows/publish.yml` 自动发布:package.json 版本高于 npm 已发布的最高版本就用它,否则在最高版本上末位 +1,发布 npm 后把版本号以 `[skip ci]` 提交回 main,并创建同名标签和 GitHub Release。只改文档或 CI 不发布;同一版本不会重复发布。Pi 插件目录从 npm 收录,无需另外上传。
|
|
214
212
|
|
|
215
|
-
|
|
213
|
+
npm 认证优先使用指向本仓库 `publish.yml` 的 Trusted Publisher(OIDC);也可配置仓库 Secret `NPM_TOKEN`。
|
|
216
214
|
|
|
217
215
|
</details>
|
|
218
216
|
|