Skip to content

Commit e806ac3

Browse files
committed
✨ feat(ui): show skill name in tool display
GenericTool now shows 'skill: frontend-design' instead of just 'skill' when a skill tool is called. Also shows metadata name as subtitle. The thinking/redacted_thinking block error is a known Claude API constraint where thinking blocks in assistant messages cannot be modified during compaction. This requires deeper investigation of MessageV2.toModelMessages serialization. Filed for future fix.
1 parent f6120d3 commit e806ac3

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

packages/ui/src/components/basic-tool.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,29 @@ export function BasicTool(props: BasicToolProps) {
156156
)
157157
}
158158

159-
export function GenericTool(props: { tool: string; status?: string; hideDetails?: boolean }) {
160-
return <BasicTool icon="mcp" status={props.status} trigger={{ title: props.tool }} hideDetails={props.hideDetails} />
159+
export function GenericTool(props: {
160+
tool: string
161+
input?: Record<string, any>
162+
metadata?: Record<string, any>
163+
status?: string
164+
hideDetails?: boolean
165+
}) {
166+
const title = () => {
167+
// Show skill name for skill tool calls
168+
if (props.tool === "skill" && props.input?.name) return `skill: ${props.input.name}`
169+
return props.tool
170+
}
171+
const subtitle = () => {
172+
// Show output title from metadata if available
173+
if (props.metadata?.name) return props.metadata.name
174+
return undefined
175+
}
176+
return (
177+
<BasicTool
178+
icon="mcp"
179+
status={props.status}
180+
trigger={{ title: title(), subtitle: subtitle() }}
181+
hideDetails={props.hideDetails}
182+
/>
183+
)
161184
}

0 commit comments

Comments
 (0)