Repository URL to install this package:
|
Version:
0.4.47 ▾
|
import React from "react";
import { Text } from "ink";
const PHASE_COLORS = {
running: "green",
continuing: "green",
provisioning: "yellow",
connecting: "yellow",
session_creating: "yellow",
retrying: "yellow",
awaiting_input: "blue",
error: "red",
completed: "gray",
idle: "gray",
ready: "cyan",
};
const PRIORITY_COLORS = {
low: "gray",
medium: "blue",
high: "yellow",
critical: "red",
};
export function PhaseBadge({ phase }) {
if (!phase)
return null;
const color = PHASE_COLORS[phase] ?? "gray";
return React.createElement(Text, { color: color },
"[",
phase,
"]");
}
export function PriorityBadge({ priority }) {
const color = PRIORITY_COLORS[priority] ?? "gray";
return React.createElement(Text, { color: color }, priority);
}
export function TaskStatusBadge({ status }) {
if (!status)
return null;
const color = PHASE_COLORS[status.type] ?? "gray";
return React.createElement(Text, { color: color },
"[",
status.type,
"]");
}
//# sourceMappingURL=StatusBadge.js.map