From 642d5e22e60318402ddea06bb4e1f3b94164bdda Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Mon, 8 Dec 2025 10:54:50 +0000 Subject: [PATCH] tweak: show tool name in timeline chip --- packages/ui/src/components/message-timeline.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/components/message-timeline.tsx b/packages/ui/src/components/message-timeline.tsx index fc28dd39..39e57dbc 100644 --- a/packages/ui/src/components/message-timeline.tsx +++ b/packages/ui/src/components/message-timeline.tsx @@ -32,7 +32,7 @@ const SEGMENT_LABELS: Record = { const SEGMENT_SHORT_LABELS: Record = { user: "U", assistant: "A", - tool: "T", + tool: "Tool", } const TOOL_FALLBACK_LABEL = "Tool Call" @@ -151,7 +151,7 @@ export function buildTimelineSegments(instanceId: string, record: MessageRecord) pending = null return } - const label = SEGMENT_LABELS[pending.type] + const label = pending.type === "tool" ? (pending.toolTitles[0] || SEGMENT_LABELS[pending.type]) : SEGMENT_LABELS[pending.type] const tooltip = pending.type === "tool" ? formatToolTooltip(pending.toolTitles) : formatTextsTooltip( @@ -306,7 +306,9 @@ const MessageTimeline: Component = (props) => { onMouseLeave={handleMouseLeave} > {segment.label} - {SEGMENT_SHORT_LABELS[segment.type]} + + {segment.type === "tool" ? (segment.label.slice(0, 4).toUpperCase()) : SEGMENT_SHORT_LABELS[segment.type]} + ) }}