diff --git a/ui/web/src/components/chat/message-bubble.tsx b/ui/web/src/components/chat/message-bubble.tsx index be4b51ff..749b877a 100644 --- a/ui/web/src/components/chat/message-bubble.tsx +++ b/ui/web/src/components/chat/message-bubble.tsx @@ -1,6 +1,8 @@ -import { Bot, User } from "lucide-react"; +import { useState } from "react"; +import { Bot, User, Wrench, ChevronRight } from "lucide-react"; import { MessageContent } from "./message-content"; import type { ChatMessage } from "@/types/chat"; +import type { ToolCall } from "@/types/session"; interface MessageBubbleProps { message: ChatMessage; @@ -14,6 +16,25 @@ export function MessageBubble({ message }: MessageBubbleProps) { return null; // Tool messages are shown inline with assistant messages } + const hasContent = !!message.content?.trim(); + const hasToolCalls = message.toolCalls && message.toolCalls.length > 0; + + // Skip assistant messages with neither text nor tool calls + if (!isUser && !hasContent && !hasToolCalls) { + return null; + } + + // Tool-call-only assistant message: render compact tool call list + if (!isUser && !hasContent && hasToolCalls) { + return ( +
+ {JSON.stringify(toolCall.arguments, null, 2)}
+
+ )}
+