@each1024/pi-mini-mode 2.0.7 → 2.0.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 +4 -6
- package/README.zh-CN.md +3 -3
- package/extensions/footer-status.ts +6 -6
- package/lib/settings.html +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
60
60
|
|
|
61
61
|

|
|
62
62
|
|
|
63
|
-
**Images
|
|
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
65
|
**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.
|
|
66
66
|
|
|
@@ -120,17 +120,15 @@ Example with optional Cached and MCP fields enabled:
|
|
|
120
120
|
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500/1.0M ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 1% 120 tok/s
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
The first-run picker offers **Keep defaults**, **
|
|
123
|
+
The first-run picker offers **Keep defaults (保留默认)**, **Open browser settings (打开浏览器设置)**, 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 HTML settings page in your browser 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.
|
|
124
124
|
|
|
125
|
-
Open
|
|
125
|
+
Open settings any time in your browser with:
|
|
126
126
|
|
|
127
127
|
```text
|
|
128
128
|
/pi-mini-mode-settings
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
The
|
|
132
|
-
|
|
133
|
-
Changes take effect immediately. The command requires Pi's TUI mode. Its preview always uses fixed example data rather than your current session, while reflecting every setting toggle immediately.
|
|
131
|
+
The command requires an interactive Pi session and opens settings in your browser. Changes save automatically and apply immediately where the current renderer supports them. Focus a preview item and use the left/right arrow keys, or drag it, to change the footer order. The preview uses fixed sample data. Resetting defaults restores feature switches, image preview mode, and footer visibility and order.
|
|
134
132
|
|
|
135
133
|
Settings are stored globally at Pi's agent directory (normally `~/.pi/agent/pi-mini-mode.json`; installations with a different Pi config directory use that directory). A malformed or missing file safely falls back to the defaults.
|
|
136
134
|
|
package/README.zh-CN.md
CHANGED
|
@@ -60,7 +60,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
60
60
|
|
|
61
61
|

|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
**图片,就在输入框上方。** 图片默认以内联卡片显示,也可在设置中切换为光标浮窗。按 `Esc` 可关闭浮窗。
|
|
64
64
|
|
|
65
65
|
**收起路径,保留原图。** 输入框和消息中的图片路径收纳为带下划线的 `[image1]` 标签,提交时保留原始路径。使用终端的链接点击手势,即可通过系统默认应用打开原图或其他文件。
|
|
66
66
|
|
|
@@ -120,7 +120,7 @@ pi install git:github.com/eachann1024/pi-mini-mode
|
|
|
120
120
|
deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500/1.0M ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀ 1% 120 tok/s
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
首次设置会提供
|
|
123
|
+
首次设置会提供 **保留默认**、**打开浏览器设置** 和 **应用推荐配置**。保留默认值会保存默认字段选择、保持极简输出开启,并且不再显示首次设置提示;立即配置会直接在浏览器中打开 HTML 设置页。应用推荐配置会让你选择内置的 `cc-dark` 或 `cc-light` 主题,通过 Pi 官方设置 API 保存该主题和全局 `tuiMode=fullscreen`,立即应用主题,并提示重启 Pi(全屏渲染器在启动时决定)。项目设置和命令行参数可能覆盖全局设置。按 Esc/取消不会完成首次设置,下次交互式会话会再次提示。Print、JSON 等非交互模式不会显示提示。
|
|
124
124
|
|
|
125
125
|
设置保存在 Pi 的 agent 目录中,通常是 `~/.pi/agent/pi-mini-mode.json`;如果 Pi 使用其他配置目录,则保存在对应目录。文件缺失或格式错误时会安全回退到默认设置。设置示例:
|
|
126
126
|
|
|
@@ -171,7 +171,7 @@ deepseek-v4-flash high Total 45K Cached 25K CH 40.0% $0.012 ◇ MCP 3 500
|
|
|
171
171
|
生成速度设置中的 **显示 tok/s 单位** 是 **显示最新生成速度** 下方的缩进子设置。关闭它只会移除 `tok/s`,保留速度数字;即使隐藏生成速度,该子设置仍会保留。
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
设置命令需要 Pi
|
|
174
|
+
设置命令需要 Pi 交互会话,并在浏览器中打开设置页。修改会自动保存,并在当前渲染器支持时立即生效。选中预览字段后按左右方向键,或拖拽字段,可调整状态栏顺序。预览使用固定示例数据,费用为估算值。恢复默认会重置功能开关、图片预览方式、字段显示与排序。
|
|
175
175
|
|
|
176
176
|
</details>
|
|
177
177
|
|
|
@@ -87,8 +87,8 @@ const COPY = {
|
|
|
87
87
|
model: "显示模型", thinking: "显示思考等级", total: "显示会话总 token", cached: "显示会话缓存 token", miss: "显示缓存 miss", totalLabel: "Total", cachedLabel: "Cached", cacheHitLabel: "CH", cacheHit: "显示缓存命中率 (CH)", price: "显示会话价格", mcp: "显示已启用 MCP 服务器", context: "显示上下文 token 与进度条", dots: "↳ 使用点阵进度条", percent: "显示上下文百分比", speed: "显示最近生成速度", speedUnit: "↳ 显示 tok/s 单位", inputEnhancements: "输入增强", showThinking: "显示思考", tools: "显示工具调用", output: "显示过程输出", skills: "显示技能", agentUsage: "显示 Agent token 用量", shortcut: "新 Agent 显示 Ctrl+O 提示(6 秒)",
|
|
88
88
|
totalDescription: "Total:当前会话分支上的全部 token,含工具上报的 LLM 用量。", cachedDescription: "Cached:累计 cache-read + cache-write token(包含在 Total 中)。", cacheHitDescription: "CH(cache hit):cache-read / (input + cache-read)。Cache write 不计入此比率。",
|
|
89
89
|
enableMinimalDescription: "开启统一折叠思考、工具和技能过程;关闭恢复 Pi 默认会话历史。",
|
|
90
|
-
inputEnhancementsDescription: "原生 Ctrl+V 粘贴图片(Windows/WSL:Alt+V);图片显示为 [image1]
|
|
91
|
-
tuiRequired: "/pi-mini-mode-settings 需要 TUI 模式", saveFailed: "无法保存 Pi Mini Mode 设置", minimalRequired: "/pi-mini-mode-minimal 需要 TUI 模式", minimalUsage: "用法:/pi-mini-mode-minimal [on|off]", minimalState: "Pi Mini Mode 极简输出:", onboarding: "
|
|
90
|
+
inputEnhancementsDescription: "原生 Ctrl+V 粘贴图片(Windows/WSL:Alt+V);图片显示为 [image1] 标签,默认在输入框上方显示内联卡片(可切换光标悬停模式)。空白后 / 选择技能并在光标处插入。Cmd+点击带下划线的图片标签或消息文件路径,用系统默认应用打开;预览及点击需终端支持。关闭仅恢复原生行为。",
|
|
91
|
+
tuiRequired: "/pi-mini-mode-settings 需要 TUI 模式", saveFailed: "无法保存 Pi Mini Mode 设置", minimalRequired: "/pi-mini-mode-minimal 需要 TUI 模式", minimalUsage: "用法:/pi-mini-mode-minimal [on|off]", minimalState: "Pi Mini Mode 极简输出:", onboarding: "默认开启输入增强和极简输出;极简输出需要全屏模式。仅显示分支、缓存 token 和 MCP 服务数默认关闭。选择「打开浏览器设置」可调整字段、预览方式和功能开关;推荐配置会保存主题和全屏模式。以后可用 /pi-mini-mode-settings 修改。", keepDefaults: "保留默认", configureNow: "打开浏览器设置", applyRecommended: "应用推荐配置", chooseTheme: "选择主题(主题立即应用;全屏模式需重启 Pi)", themeSaved: "已保存主题和全屏模式。请重启 Pi 以启用全屏;项目设置或命令行参数可能覆盖全局设置。", themeSaveFailed: "无法保存推荐的 Pi 主题和全屏模式;未完成首次配置。", themeApplyFailed: "推荐设置已保存,但当前主题未能立即应用;请重启 Pi。",
|
|
92
92
|
} as const;
|
|
93
93
|
|
|
94
94
|
const RECOMMENDED_THEMES = ["cc-dark", "cc-light"] as const;
|
|
@@ -609,7 +609,7 @@ export function formatToolElapsed(startedAt: number | undefined, endedAt = Date.
|
|
|
609
609
|
|
|
610
610
|
function ensureThinkingClock(turn: MinimalTurn, index: number, startedAt = Date.now()): ThinkingClock {
|
|
611
611
|
const clocks = turn.thinkingClocks ??= [];
|
|
612
|
-
return clocks[index] ??= { startedAt
|
|
612
|
+
return clocks[index] ??= { startedAt };
|
|
613
613
|
}
|
|
614
614
|
|
|
615
615
|
function freezeThinkingClock(turn: MinimalTurn | undefined, index: number | undefined, endedAt = Date.now()): void {
|
|
@@ -625,7 +625,7 @@ function freezeOpenThinkingClocks(turn: MinimalTurn | undefined, endedAt = Date.
|
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
/**
|
|
628
|
+
/** Each Thinking row counts from its own start and keeps its frozen stop time. */
|
|
629
629
|
export function formatThinkingElapsed(
|
|
630
630
|
turn: Pick<MinimalTurn, "startedAt" | "thinkingClocks">,
|
|
631
631
|
processIndex: number,
|
|
@@ -633,7 +633,7 @@ export function formatThinkingElapsed(
|
|
|
633
633
|
now = Date.now(),
|
|
634
634
|
): string {
|
|
635
635
|
const clock = turn.thinkingClocks?.[processIndex];
|
|
636
|
-
const startedAt = clock?.startedAt
|
|
636
|
+
const startedAt = clock?.startedAt;
|
|
637
637
|
if (active && startedAt != null) return `${(Math.max(0, now - startedAt) / 1_000).toFixed(1)}s`;
|
|
638
638
|
if (clock?.endedAt != null) return `${(Math.max(0, clock.endedAt - clock.startedAt) / 1_000).toFixed(1)}s`;
|
|
639
639
|
return "";
|
|
@@ -1502,7 +1502,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
1502
1502
|
if (choice === COPY.configureNow) await openSettings(ctx);
|
|
1503
1503
|
};
|
|
1504
1504
|
pi.registerCommand("pi-mini-mode-settings", {
|
|
1505
|
-
description: "Open
|
|
1505
|
+
description: "Open browser settings for footer fields, image previews, and minimal output",
|
|
1506
1506
|
handler: async (_args, ctx) => openSettings(ctx),
|
|
1507
1507
|
});
|
|
1508
1508
|
|
package/lib/settings.html
CHANGED
|
@@ -35,30 +35,30 @@ const $=id=>document.getElementById(id),token=location.hash.slice(1);
|
|
|
35
35
|
history.replaceState(null,'',location.pathname);
|
|
36
36
|
const I18N={
|
|
37
37
|
title:{zh:'Pi Mini Mode',en:'Pi Mini Mode'},
|
|
38
|
-
subtitle:{zh:'
|
|
38
|
+
subtitle:{zh:'调整状态栏、图片预览和对话折叠。',en:'Adjust your footer, image previews, and conversation folding.'},
|
|
39
39
|
documentTitle:{zh:'Pi Mini Mode 设置',en:'Pi Mini Mode Settings'},
|
|
40
|
-
dragHint:{zh:'
|
|
40
|
+
dragHint:{zh:'拖拽或左右方向键调整预览字段顺序,改动自动保存。',en:'Drag or use Arrow Left/Right to reorder preview items · saves automatically.'},
|
|
41
41
|
featuresHeading:{zh:'功能说明',en:'Features'},
|
|
42
|
-
fieldsHeading:{zh:'
|
|
42
|
+
fieldsHeading:{zh:'状态栏字段与预览(示例数据)',en:'Status bar items & preview (sample data)'},
|
|
43
43
|
optionsHeading:{zh:'状态栏样式',en:'Status bar style'},
|
|
44
44
|
on:{zh:'开启',en:'On'},off:{zh:'关闭',en:'Off'},previewModeLabel:{zh:'图片预览方式',en:'Image preview mode'},previewHover:{zh:'光标浮窗',en:'Cursor popup'},previewInline:{zh:'内联卡片(多图排列)',en:'Inline cards (multiple images)'},previewModeHint:{zh:'卡片显示在输入框上方;终端不支持图片时显示占位。',en:'Cards appear above the editor; unsupported terminals show placeholders.'},
|
|
45
45
|
recordLimitLabel:{zh:'折叠时记录数',en:'Collapsed record limit'},
|
|
46
46
|
recordLimitHint:{zh:'默认 6 条。子代理始终显示,每个占一条;剩余额度显示最新执行记录。子代理超过上限时,仅显示全部子代理。',en:'Defaults to 6. Every subagent stays visible and uses one record; remaining slots show the latest execution records. When subagents exceed the limit, only their rows remain.'},
|
|
47
47
|
featureList:{
|
|
48
48
|
zh:[
|
|
49
|
-
{id:'minimal',setting:'pi-mini-mode-minimal-show',title:'极简输出',body:'
|
|
50
|
-
{id:'input-enhancements',setting:'pi-mini-mode-input-enhancements',title:'输入增强',body:'让输入框和消息里的图片、技能与文件路径直接可用。',points:['
|
|
49
|
+
{id:'minimal',setting:'pi-mini-mode-minimal-show',title:'极简输出',body:'在全屏模式下,把思考、工具与技能记录收进一棵可折叠过程树,保留完整回复。',points:['长用户消息显示前四行,点击展开全文','子代理始终显示,可展开活动记录与输出','Ctrl+O 展开或收起过程树,新问题默认收起','最终 Markdown 流畅呈现,失败与中断明确标记']},
|
|
50
|
+
{id:'input-enhancements',setting:'pi-mini-mode-input-enhancements',title:'输入增强',body:'让输入框和消息里的图片、技能与文件路径直接可用。',points:['图片默认以内联卡片陈列于输入框上方,亦可切换光标悬停','图片路径收纳为 [image1] 标签,提交时保留原图','空白后输入 / 就地搜索技能并插入光标处','点击图片标签或文件路径,用系统默认应用打开'],hint:'Ctrl+V 粘贴图片(Windows/WSL 使用 Alt+V)'},
|
|
51
51
|
{id:'themes',title:'明暗主题',body:'主题让 Markdown、代码高亮、表格与 Mermaid 图表跟随明暗切换。',points:['用户消息使用主题用户背景色,与正文区分','不支持、不完整或过宽的图表保留源文本'],hint:'回到 Pi,输入 /settings → Theme,选择 cc-dark / cc-light'}
|
|
52
52
|
],
|
|
53
53
|
en:[
|
|
54
|
-
{id:'minimal',setting:'pi-mini-mode-minimal-show',title:'Minimal transcript',body:'
|
|
55
|
-
{id:'input-enhancements',setting:'pi-mini-mode-input-enhancements',title:'Input enhancements',body:'Makes images, skills and file paths usable right where you type.',points:['
|
|
54
|
+
{id:'minimal',setting:'pi-mini-mode-minimal-show',title:'Minimal transcript',body:'In fullscreen mode, fold thinking, tools and skill reads into one process tree while keeping the full reply.',points:['Long user messages show four rendered rows; click to expand','Subagents stay visible; click to expand activity and output','Ctrl+O expands or collapses the full process tree; new questions start collapsed','Final Markdown streams plainly; failures and interrupts are marked']},
|
|
55
|
+
{id:'input-enhancements',setting:'pi-mini-mode-input-enhancements',title:'Input enhancements',body:'Makes images, skills and file paths usable right where you type.',points:['Images appear as inline cards above the editor by default, with optional cursor hover','Image paths collapse to [image1] labels while keeping the original path on submit','Type / after a space to search skills and insert at the cursor','Click image labels or file paths to open them in the default app'],hint:'Ctrl+V pastes images (Windows/WSL: Alt+V)'},
|
|
56
56
|
{id:'themes',title:'Light and dark themes',body:'Themes keep Markdown, code highlighting, tables and Mermaid diagrams in step with light and dark.',points:['User messages use the theme user background to stand out','Unsupported, incomplete or overly wide diagrams keep their source text'],hint:'In Pi, enter /settings → Theme and choose cc-dark or cc-light'}
|
|
57
57
|
]
|
|
58
58
|
},
|
|
59
59
|
reset:{zh:'恢复默认',en:'Reset defaults'},
|
|
60
60
|
retry:{zh:'重试',en:'Retry'},
|
|
61
|
-
confirmReset:{zh:'
|
|
61
|
+
confirmReset:{zh:'恢复默认功能开关、图片预览方式、字段显示与排序?',en:'Reset feature switches, image previews, and footer visibility and order?'},
|
|
62
62
|
connecting:{zh:'正在同步…',en:'Connecting…'},
|
|
63
63
|
saved:{zh:'已保存',en:'Saved'},
|
|
64
64
|
unsaved:{zh:'未保存的修改',en:'Unsaved changes'},
|
|
@@ -81,9 +81,9 @@ const I18N={
|
|
|
81
81
|
branch:{zh:'仅分支',en:'Branch Only'},
|
|
82
82
|
'session-tokens':{zh:'会话 Token',en:'Session Tokens'},
|
|
83
83
|
'cache-tokens':{zh:'缓存 Token',en:'Cache Tokens'},
|
|
84
|
-
'cache-miss':{zh:'
|
|
84
|
+
'cache-miss':{zh:'缓存未命中估算',en:'Estimated cache misses'},
|
|
85
85
|
ch:{zh:'缓存命中率',en:'Cache Hit Rate'},
|
|
86
|
-
cost:{zh:'
|
|
86
|
+
cost:{zh:'会话费用估算',en:'Estimated session cost'},
|
|
87
87
|
mcp:{zh:'MCP 服务数',en:'MCP Count'},
|
|
88
88
|
context:{zh:'上下文进度条',en:'Context Bar'},
|
|
89
89
|
'context-percent':{zh:'上下文百分比',en:'Context %'},
|
package/package.json
CHANGED