import { useState, type JSX } from "react"; import { ChevronDown, ChevronRight } from "lucide-react"; import { BrainIcon } from "../app/renderer/components/icons/BrainIcon"; import { translate } from "../i18n/index"; import { CollapsibleReveal } from "./agentConversation/components/CollapsibleReveal"; import { AgentMessageMarkdown } from "./AgentMessageMarkdown"; import type { WorkspaceAgentSessionDetailThinking } from "./workspaceAgentSessionDetailViewModel"; import { ToolActivityKindIcon } from "./toolActivityKindIcons"; interface WorkspaceAgentSessionThinkingDisclosureProps { thinking: WorkspaceAgentSessionDetailThinking; label: string; onLinkClick?: (href: string) => void; } export function WorkspaceAgentSessionThinkingDisclosure({ thinking, label, onLinkClick }: WorkspaceAgentSessionThinkingDisclosureProps): JSX.Element { "use memo"; const [expanded, setExpanded] = useState(false); const isActive = thinking.statusKind === "working" || thinking.statusKind === "waiting"; const statusLabel = thinking.statusKind === "working" ? null : thinkingStatusLabel(thinking.statusKind); return (