workspace/ files existed on disk but were not included in previous incremental commit, causing git to record them as deleted. Re-adding all workspace card components, AgentWorkspace, ActivityTimeline, and WorkspaceCardRenderer to properly track them. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
28 lines
872 B
TypeScript
28 lines
872 B
TypeScript
"use client";
|
|
import { KnowledgeResultCard } from "./cards/KnowledgeResultCard";
|
|
import { TicketSummaryCard } from "./cards/TicketSummaryCard";
|
|
import { SearchResultCard } from "./cards/SearchResultCard";
|
|
import { DocumentResultCard } from "./cards/DocumentResultCard";
|
|
import { SandboxResultCard } from "./cards/SandboxResultCard";
|
|
import { ErrorCard } from "./cards/ErrorCard";
|
|
import type { WorkspaceCard } from "@/lib/api";
|
|
|
|
const COMPONENT_MAP: Record<string, React.ComponentType<any>> = {
|
|
KnowledgeResultCard,
|
|
TicketSummaryCard,
|
|
SearchResultCard,
|
|
DocumentResultCard,
|
|
SandboxResultCard,
|
|
ErrorCard,
|
|
};
|
|
|
|
export function WorkspaceCardRenderer({ card }: { card: WorkspaceCard }) {
|
|
const Component = COMPONENT_MAP[card.name];
|
|
if (!Component) return null;
|
|
return (
|
|
<div className="mb-3">
|
|
<Component {...(card.props as any)} />
|
|
</div>
|
|
);
|
|
}
|