diff --git a/README.md b/README.md index ea4ba0cd..0c4e0faa 100644 --- a/README.md +++ b/README.md @@ -397,7 +397,7 @@ macOS/Linux arm64 与 x64 缺少二进制时,OpenPI 会从官方 Release 下 | Next-action Suggestion | 关闭;启用时显式选择 Registry 模型与 reasoning | | Workflow 并发 / 总调用 | 8 / 128;硬上限 64 / 1024 | | 大型 Header | 关闭 | -| Dashboard Footer | 开启;单行 `powerline` | +| Dashboard Footer | 开启;单行 `plain` | | Subagent / Bash / Write/Edit | `full` / `compact` / `compact` | | Post-edit 命令 | 关闭;单条命令最多 500 字符 | | 内置角色模型 | 全部继承父模型 | diff --git a/extensions/setup/index.ts b/extensions/setup/index.ts index 6eb05709..e34b47b4 100644 --- a/extensions/setup/index.ts +++ b/extensions/setup/index.ts @@ -132,7 +132,7 @@ export function buildInteractiveSetupPrompt(options: { "- Capability discovery: explicit is the safe default and keeps OpenPI model tools absent until the user asks for a capability. adaptive is opt-in and keeps only the small openpi_load_tools gateway visible, allowing the model to load Subagents, Workflows, background terminals, structured search, or Session tracking when it judges them useful. Loaded groups remain session-stable, and normal permission, concurrency, and workflow limits still apply.", "- Next-action suggestions: disabled, or model-generated after a fully settled main-agent run. A suggestion appears as dim inline text on the first row of an empty editor; reserved cells at the row end keep CJK IME preedit from overwriting it. Right accepts it without submitting, and any other editor input dismisses it. Enabling requires an available provider/model and reasoning level and adds one small model call per settled run.", "- Workflow fan-out: concurrency controls simultaneous agents and resource pressure; max agent calls controls the total capacity of one workflow. Valid ranges are 1-64 and 1-1024.", - "- UI: the large header costs vertical space; the custom footer is a declarative dashboard. Presets: powerline (default one-line ANSI256 blocks), powerline-mono (one-line high-contrast gray powerline), and compact (one-line plain text). Style can also be set independently: plain, powerline, powerline-mono. Custom lines are a 2D layout of cwd/model/thinking/context/cache/cost/throughput/git/pr plus at most one flex per line for left/right alignment. Nerd Font only affects powerline separator glyphs; text stays readable without it. Changes apply immediately in the active TUI session.", + "- UI: the large header costs vertical space; the custom footer is a declarative dashboard. Presets: powerline (one-line ANSI256 blocks), powerline-mono (one-line high-contrast gray powerline), and compact (one-line plain text); the default is plain with cwd/git/pr on the left and model/context/cost on the right. Style can also be set independently: plain, powerline, powerline-mono. Custom lines are a 2D layout of cwd/model/thinking/context/cache/cost/throughput/git/pr plus at most one flex per line for left/right alignment. Nerd Font only affects powerline separator glyphs; text stays readable without it. Changes apply immediately in the active TUI session.", "- Operational activity for Subagents, Workflows, and background terminals is core status and always remains visible whenever the custom footer is enabled.", "- Post-edit command: one optional shell command (maximum 500 characters) run in the background after a turn with successful Write/Edit operations (e.g. `npm run format`). Off by default, interactive TUI sessions only, failures surface as a notification. This is a single command, not an event-hook system.", "- Result detail display: Subagent results, Bash operations, and Write/Edit operations can each default to full (always expanded) or compact (Claude Code-style folded preview with a hidden-line count). Compact output can still be temporarily expanded with the configured app.tools.expand key (Ctrl+O by default). Bash and Write/Edit default to compact. Recommend compact for users who do not usually inspect implementation details.", diff --git a/extensions/shared/setup-config.ts b/extensions/shared/setup-config.ts index 698fba38..5f2ea62e 100644 --- a/extensions/shared/setup-config.ts +++ b/extensions/shared/setup-config.ts @@ -67,23 +67,12 @@ export const CAPABILITY_DISCOVERY_MODES = ["explicit", "adaptive"] as const; export type CapabilityDiscoveryMode = (typeof CAPABILITY_DISCOVERY_MODES)[number]; -/** Canonical default layout: one-line Powerline dashboard with flex alignment. */ +/** Canonical default layout: one-line plain footer with flex alignment. */ export const DEFAULT_FOOTER_LINES: FooterLines = [ - [ - "cwd", - "model", - "thinking", - "context", - "cache", - "cost", - "throughput", - "flex", - "git", - "pr", - ], + ["cwd", "git", "pr", "flex", "model", "context", "cost"], ]; -export const DEFAULT_FOOTER_STYLE: FooterStyle = "powerline"; +export const DEFAULT_FOOTER_STYLE: FooterStyle = "plain"; export const DEFAULT_FOOTER_ITEMS: readonly FooterItem[] = flattenFooterItems(DEFAULT_FOOTER_LINES); diff --git a/extensions/suggestions/config.test.ts b/extensions/suggestions/config.test.ts index 962d0cd0..1b3069bb 100644 --- a/extensions/suggestions/config.test.ts +++ b/extensions/suggestions/config.test.ts @@ -17,7 +17,7 @@ import { const defaultUi = { showHeader: false, customFooter: true, - footerStyle: "powerline" as const, + footerStyle: "plain" as const, footerLines: DEFAULT_FOOTER_LINES, footerItems: DEFAULT_FOOTER_ITEMS, subagentResultDisplay: "full" as const, @@ -29,7 +29,7 @@ test("setup defaults to disabled next-action suggestions", () => { assert.deepEqual(parseSetupConfig(undefined), DEFAULT_SETUP_CONFIG); assert.equal( formatSetupConfig(parseSetupConfig(undefined)), - `Capability discovery: explicit\nNext-action suggestions: disabled\nWorkflows: 8 concurrent agents · 128 total calls\nUI: large header off · custom footer on · powerline · ${formatFooterLines(DEFAULT_FOOTER_LINES)}\nSubagent results: full by default\nBash operations: folded preview (Ctrl+O expands all)\nWrite/Edit operations: folded preview (Ctrl+O expands all)\nPost-edit command: off\nAgent role models (Subagents + Workflows): explorer inherit · implementer inherit · reviewer inherit · advisor inherit`, + `Capability discovery: explicit\nNext-action suggestions: disabled\nWorkflows: 8 concurrent agents · 128 total calls\nUI: large header off · custom footer on · plain · ${formatFooterLines(DEFAULT_FOOTER_LINES)}\nSubagent results: full by default\nBash operations: folded preview (Ctrl+O expands all)\nWrite/Edit operations: folded preview (Ctrl+O expands all)\nPost-edit command: off\nAgent role models (Subagents + Workflows): explorer inherit · implementer inherit · reviewer inherit · advisor inherit`, ); }); @@ -70,7 +70,7 @@ test("setup config accepts suggestion models and migrates the recap key", () => }); assert.equal( formatSetupConfig(configured), - `Capability discovery: explicit\nNext-action suggestions: seal/deepseek-v4-flash · off · Right accepts\nWorkflows: 8 concurrent agents · 128 total calls\nUI: large header off · custom footer on · powerline · ${formatFooterLines(DEFAULT_FOOTER_LINES)}\nSubagent results: full by default\nBash operations: folded preview (Ctrl+O expands all)\nWrite/Edit operations: folded preview (Ctrl+O expands all)\nPost-edit command: off\nAgent role models (Subagents + Workflows): explorer inherit · implementer inherit · reviewer inherit · advisor inherit`, + `Capability discovery: explicit\nNext-action suggestions: seal/deepseek-v4-flash · off · Right accepts\nWorkflows: 8 concurrent agents · 128 total calls\nUI: large header off · custom footer on · plain · ${formatFooterLines(DEFAULT_FOOTER_LINES)}\nSubagent results: full by default\nBash operations: folded preview (Ctrl+O expands all)\nWrite/Edit operations: folded preview (Ctrl+O expands all)\nPost-edit command: off\nAgent role models (Subagents + Workflows): explorer inherit · implementer inherit · reviewer inherit · advisor inherit`, ); assert.deepEqual( @@ -132,14 +132,14 @@ test("workflow limits default safely and accept configured fan-out", () => { ); }); -test("UI defaults to a compact header and one-line powerline footer", () => { +test("UI defaults to a compact header and one-line plain footer", () => { assert.deepEqual(parseSetupConfig({}).ui, defaultUi); assert.deepEqual( parseSetupConfig({ ui: { showHeader: true, customFooter: false } }).ui, { showHeader: true, customFooter: false, - footerStyle: "powerline", + footerStyle: "plain", footerLines: DEFAULT_FOOTER_LINES, footerItems: DEFAULT_FOOTER_ITEMS, subagentResultDisplay: "full", @@ -184,11 +184,9 @@ test("legacy footerItems migrates onto the default one-line skeleton", () => { }, }).ui; - assert.deepEqual(ui.footerLines, [ - ["model", "context", "cache", "flex", "git"], - ]); - assert.deepEqual(ui.footerItems, ["model", "context", "cache", "git"]); - assert.equal(ui.footerStyle, "powerline"); + assert.deepEqual(ui.footerLines, [["git", "flex", "model", "context"]]); + assert.deepEqual(ui.footerItems, ["git", "model", "context"]); + assert.equal(ui.footerStyle, "plain"); }); test("empty legacy footerItems falls back to the default layout", () => { diff --git a/extensions/ui-customization/footer.test.ts b/extensions/ui-customization/footer.test.ts index 9f3a5047..1325442d 100644 --- a/extensions/ui-customization/footer.test.ts +++ b/extensions/ui-customization/footer.test.ts @@ -58,11 +58,8 @@ test("default one-line layout keeps flex alignment", () => { assert.equal(lines.length, 1); assert.match(lines[0]!, /project/); assert.match(lines[0]!, /seal\/gpt-5\.6-sol/); - assert.match(lines[0]!, /high/); assert.match(lines[0]!, /25%\/1\.0m/); - assert.match(lines[0]!, /cache 82%/); assert.match(lines[0]!, /\$4\.03/); - assert.match(lines[0]!, /~41 tok\/s/); assert.match(lines[0]!, /main/); assert.match(lines[0]!, /PR #42/); const gap =