44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
// Labels and colour tones of task and runner statuses, shared by badges, rows and the side panel.
|
||
export type Tone = "primary" | "ok" | "warn" | "info" | "danger" | "muted";
|
||
|
||
export const TASK_STATUS: Record<string, { label: string; tone: Tone }> = {
|
||
backlog: { label: "Бэклог", tone: "muted" },
|
||
proposing: { label: "Proposal", tone: "primary" },
|
||
awaiting_approval: { label: "Ждёт одобрения", tone: "primary" },
|
||
in_progress: { label: "В работе", tone: "info" },
|
||
review: { label: "Ревью", tone: "ok" },
|
||
done: { label: "Готово", tone: "ok" },
|
||
blocked: { label: "Блок", tone: "danger" },
|
||
};
|
||
|
||
// PEP-89: said about an agent, in plain words — the reader is a product manager.
|
||
export const SESSION_STATUS: Record<string, { label: string; tone: Tone }> = {
|
||
starting: { label: "запускается", tone: "info" },
|
||
running: { label: "работает", tone: "info" },
|
||
waiting_input: { label: "ждёт вашего ответа", tone: "primary" },
|
||
idle: { label: "свободен", tone: "muted" },
|
||
stalled: { label: "остановился — нужна помощь", tone: "warn" },
|
||
rate_limited: { label: "ждёт сброса лимита", tone: "warn" },
|
||
done: { label: "закончил", tone: "ok" },
|
||
failed: { label: "остановился с ошибкой", tone: "danger" },
|
||
};
|
||
|
||
/** Text colour per tone, e.g. for status dots. */
|
||
export const TONE_TEXT: Record<Tone, string> = {
|
||
primary: "text-primary",
|
||
ok: "text-ok",
|
||
warn: "text-warn",
|
||
info: "text-info",
|
||
danger: "text-destructive",
|
||
muted: "text-muted-foreground",
|
||
};
|
||
|
||
export const TONE_BG: Record<Tone, string> = {
|
||
primary: "bg-primary",
|
||
ok: "bg-ok",
|
||
warn: "bg-warn",
|
||
info: "bg-info",
|
||
danger: "bg-destructive",
|
||
muted: "bg-muted-foreground",
|
||
};
|