mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
29 lines
664 B
TypeScript
29 lines
664 B
TypeScript
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;
|
|
}
|