+
+ {t('intelligence.agentWork.subtitle')}
+
+
+ {BUCKET_ORDER.map(bucket => {
+ const group = groupByBucket.get(bucket);
+ const rows = group?.rows ?? [];
+ if (rows.length === 0) return null;
+ return (
+
+
+
+ {bucket === 'working' && (
+
+ )}
+ {t(BUCKET_LABEL_KEY[bucket])}
+
+
+ {group?.count ?? rows.length}
+
+
+
+
+ {rows.map(row => (
+
+ ))}
+
+
+ );
+ })}
+
+ );
+}
+
+interface AgentWorkRowItemProps {
+ row: AgentWorkRow;
+ onOpenThread: (threadId: string) => void;
+}
+
+function AgentWorkRowItem({ row, onOpenThread }: AgentWorkRowItemProps) {
+ const { t } = useT();
+ const name = row.displayName || row.agentId || row.runId;
+ const totalTokens = row.inputTokens + row.outputTokens;
+ // Localize the backend enum values, falling back to the raw value for any
+ // status/kind the UI doesn't yet have a key for.
+ const statusLabel = STATUS_LABEL_KEY[row.status] ? t(STATUS_LABEL_KEY[row.status]) : row.status;
+ const kindLabel = KIND_LABEL_KEY[row.kind] ? t(KIND_LABEL_KEY[row.kind]) : row.kind;
+
+ return (
+