feat: show fast mode in minimal footer

This commit is contained in:
叶林立
2026-08-19 22:24:37 +08:00
parent 3cdcc3510b
commit 5c4d6c6a87
15 changed files with 1340 additions and 14 deletions
+29
View File
@@ -0,0 +1,29 @@
import assert from "node:assert/strict";
import test from "node:test";
import { collectFooterStatusItems, FAST_MODE_STATUS_KEY } from "../status.ts";
test("renders enabled Codex Fast mode as an explicit accented segment", () => {
const items = collectFooterStatusItems(new Map([[FAST_MODE_STATUS_KEY, "on"]]));
assert.deepEqual(items, [{ text: "Fast on", accent: true }]);
});
test("hides disabled Codex Fast mode", () => {
const items = collectFooterStatusItems(new Map([[FAST_MODE_STATUS_KEY, "off"]]));
assert.deepEqual(items, []);
});
test("preserves other non-empty extension statuses", () => {
const items = collectFooterStatusItems(new Map([
["one", "Ready"],
["empty", " "],
["two", "2 tasks"],
]));
assert.deepEqual(items, [
{ text: "Ready", accent: false },
{ text: "2 tasks", accent: false },
]);
});