import type { JSX } from "react"; import { AlertCircle, ChevronDown, ChevronRight } from "lucide-react"; import { FilePenLineIcon } from "../../../app/renderer/components/icons/FilePenLineIcon"; import { FileTextIcon } from "../../../app/renderer/components/icons/FileTextIcon"; import { HammerIcon } from "../../../app/renderer/components/icons/HammerIcon"; import { ToolsLinedIcon } from "../../../app/renderer/components/icons/ToolsLinedIcon"; import { WriteLinedIcon } from "../../../app/renderer/components/icons/WriteLinedIcon"; import { ToolNameIcon } from "../../toolActivityKindIcons"; import { isImageGenerationToolCall } from "../../imageGenerationTool"; import type { AgentToolCallVM } from "../contracts/agentToolCallVM"; import { getFileChangeRenderData, isFailedToolCall } from "./tool-renderers/render-data/agentToolRenderData"; const TOOL_ROW_ICON_SIZE = 16; interface AgentToolCallHeaderProps { call: AgentToolCallVM; expanded: boolean; hasDetail: boolean; } export function AgentToolCallHeader({ call, expanded, hasDetail }: AgentToolCallHeaderProps): JSX.Element { "use memo"; const diffStats = diffStatsForCall(call); const isActive = call.statusKind === "working" || call.statusKind === "waiting"; const isFailed = isFailedToolCall(call); return (