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
+28
View File
@@ -0,0 +1,28 @@
export const FAST_MODE_STATUS_KEY = "codex-fast-mode";
export interface FooterStatusItem {
text: string;
accent: boolean;
}
/** Convert Pi extension statuses into compact footer segments. */
export function collectFooterStatusItems(
statuses: ReadonlyMap<string, string>,
): FooterStatusItem[] {
const items: FooterStatusItem[] = [];
for (const [key, value] of statuses) {
if (key === FAST_MODE_STATUS_KEY) {
if (value.trim().toLowerCase() === "on") {
items.push({ text: "Fast on", accent: true });
}
continue;
}
if (value.trim()) {
items.push({ text: value, accent: false });
}
}
return items;
}