mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
feat: show fast mode in minimal footer
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user