Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
fix(web-ui): keep running MCP tool calls visible (#2490)
JasonH00e4d2aade24
diff --git a/examples/web_ui/frontend/src/components/chat/ASMessageBubble.tsx b/examples/web_ui/frontend/src/components/chat/ASMessageBubble.tsxindex f78044460..a0cb43b20 100644--- a/examples/web_ui/frontend/src/components/chat/ASMessageBubble.tsx+++ b/examples/web_ui/frontend/src/components/chat/ASMessageBubble.tsx@@ -731,14 +731,16 @@ export function ASBlock({ block, ...props }: ASBlockProps) {}case 'tool_call_group': {const { title, insertions, deletions } = summarizeToolGroup(block.calls, t);- const allFinished = block.calls.some((c) => !c.result || c.result.state === 'running');+ const hasRunningCall = block.calls.some(+ (c) => !c.result || c.result.state === 'running',+ );return (<Collapsible defaultOpen={false}><CollapsibleTrigger asChild><divclassName={cn('group w-full flex gap-2 items-center text-sm text-muted-foreground cursor-pointer hover:text-primary',- allFinished && 'shimmer',+ hasRunningCall && 'shimmer',)}><span>{title}</span>diff --git a/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsx b/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsxindex 4d185519b..339a6993e 100644--- a/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsx+++ b/examples/web_ui/frontend/src/components/chat/tool-renderers/_shared.tsx@@ -79,12 +79,13 @@ export function ToolCallRow({// header's own leaf spans — not on a wrapper (a wrapper only makes descendant// text transparent). We target the direct span children of this flex row// instead of wrapping ``header``, which also keeps their ``gap-x-2`` spacing.+ const isRunning = !pair.result || pair.result.state === 'running';const row = (<divclassName={cn('group flex flex-row gap-x-2 items-center w-full',expandable && 'cursor-pointer',- !pair.result || pair.result.state === 'running' ? 'shimmer' : '',+ isRunning && 'shimmer',)}>{header}diff --git a/examples/web_ui/frontend/src/index.css b/examples/web_ui/frontend/src/index.cssindex 80e456d0f..f1a8ede92 100644--- a/examples/web_ui/frontend/src/index.css+++ b/examples/web_ui/frontend/src/index.css@@ -8,6 +8,16 @@@plugin '@tailwindcss/typography';+/* Shimmer relies on relative color syntax. Older browsers drop its gradient+ while keeping the text fill transparent, so fall back to visible text. */+@supports not (color: oklch(from red l c h)) {+ .shimmer {+ --shimmer-image: none;+ --shimmer-text-fill: currentColor;+ animation: none;+ }+}+html,body,#root {