Files
paseo/packages/app/src/utils/agent-status.ts
T
Mohamed BoudraandClaude 8cf808b14d refactor(agent): consolidate agent system into unified AgentManager with provider-based architecture
Replace separate ACP and agent-types modules with unified AgentManager using provider pattern. Migrate Claude and Codex implementations to provider-specific clients. Streamline session-agent integration, remove old ACP notification types, and introduce agent timeline events. Delete obsolete documentation and test files. Add AgentRegistry for persistence and agent-stream-based communication pattern.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-15 02:06:09 +01:00

28 lines
667 B
TypeScript

import type { Agent } from "@/contexts/session-context";
type AgentStatus = Agent["status"];
const STATUS_COLOR_MAP: Record<AgentStatus, string> = {
initializing: "#f59e0b",
idle: "#22c55e",
running: "#3b82f6",
error: "#ef4444",
closed: "#6b7280",
};
const STATUS_LABEL_MAP: Record<AgentStatus, string> = {
initializing: "Initializing",
idle: "Idle",
running: "Running",
error: "Error",
closed: "Closed",
};
export function getAgentStatusColor(status: AgentStatus): string {
return STATUS_COLOR_MAP[status] ?? "#9ca3af";
}
export function getAgentStatusLabel(status: AgentStatus): string {
return STATUS_LABEL_MAP[status] ?? "Unknown";
}