Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 字符 |
| 内置角色模型 | 全部继承父模型 |
Expand Down
2 changes: 1 addition & 1 deletion extensions/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
17 changes: 3 additions & 14 deletions extensions/shared/setup-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
18 changes: 8 additions & 10 deletions extensions/suggestions/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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`,
);
});

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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", () => {
Expand Down
3 changes: 0 additions & 3 deletions extensions/ui-customization/footer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Loading