/** Agent logs card sub-component for WorkItemDetailPanel. */ import type { AgentInfo, AgentStatusValue } from "../api/agents"; import { STATUS_COLORS } from "./workItemDetailPanelUtils"; interface AgentLogsSectionProps { agentInfo: AgentInfo | null; agentStatus: AgentStatusValue | null; agentLog: string[]; } /** * Renders the "Agent Logs" card when an agent is active, or a placeholder * when no agent is assigned to the story. */ export function AgentLogsSection({ agentInfo, agentStatus, agentLog, }: AgentLogsSectionProps) { if (!agentInfo) { return (
Agent Logs
Coming soon
); } return (
Agent Logs
{agentStatus && (
{agentInfo.agent_name} — {agentStatus}
)}
{agentLog.length > 0 ? (
{agentLog.join("")}
) : (
{agentStatus === "running" || agentStatus === "pending" ? "Waiting for output..." : "No output."}
)}
); }