From f5771a022640662a7004bc379d7b8a32ccbbd8c1 Mon Sep 17 00:00:00 2001 From: Anthony Ronning <101225832+AnthonyRonning@users.noreply.github.com> Date: Tue, 28 Jul 2026 05:23:02 +0000 Subject: [PATCH] feat(agent): compact tool call rows --- frontend/src/components/AgentMode.tsx | 72 ++++++++++++--- .../services/agentToolPresentation.test.ts | 61 +++++++++++++ .../src/services/agentToolPresentation.ts | 87 +++++++++++++++++++ 3 files changed, 208 insertions(+), 12 deletions(-) create mode 100644 frontend/src/services/agentToolPresentation.test.ts create mode 100644 frontend/src/services/agentToolPresentation.ts diff --git a/frontend/src/components/AgentMode.tsx b/frontend/src/components/AgentMode.tsx index 8a45c6b9f..59b15eda2 100644 --- a/frontend/src/components/AgentMode.tsx +++ b/frontend/src/components/AgentMode.tsx @@ -12,6 +12,7 @@ import { useOpenAI } from "@/ai/useOpenAi"; import { AlertCircle, ArrowUp, + Blocks, Brain, Camera, Check, @@ -20,17 +21,23 @@ import { ChevronRight, Circle, Expand, + FilePenLine, + FileSearch, FolderOpen, + Globe2, Loader2, Lock, MessageSquarePlus, MoreHorizontal, ShieldCheck, Shrink, + SquareTerminal, Trash, + Wrench, X, Zap } from "lucide-react"; +import type { LucideIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { AlertDialog, @@ -109,6 +116,11 @@ import { } from "@/services/agentMcpErrors"; import { reconcileNewChatMcpServerNames } from "@/services/agentMcpServers"; import { agentOperationFence } from "@/services/agentOperationFence"; +import { + agentToolKind, + agentToolKindLabel, + type AgentToolKind +} from "@/services/agentToolPresentation"; import { AgentThoughtLabelFinalRequestRegistry, AgentThoughtLabelProvisionalScheduler, @@ -4061,23 +4073,47 @@ function ToolCallRow({ item }: { item: AgentTimelineItem }) { const status = item.status || "running"; const failed = status === "failed" || status === "error"; const active = isActiveAgentStatus(status); + const toolKind = agentToolKind(item.id, item.title); + const ToolKindIcon = AGENT_TOOL_KIND_ICONS[toolKind]; + const toolKindLabel = agentToolKindLabel(toolKind); const hasDetails = Boolean(item.text?.trim()) || item.input !== undefined || item.output !== undefined; const statusIcon = active ? ( - +