| 18 | const MAX_PROGRESS_MESSAGES_TO_SHOW = 3; |
| 19 | const INITIALIZING_TEXT = 'Initializing…'; |
| 20 | export function renderToolResultMessage(output: Output): React.ReactNode { |
| 21 | // Handle forked skill result |
| 22 | if ('status' in output && output.status === 'forked') { |
| 23 | return <MessageResponse height={1}> |
| 24 | <Text> |
| 25 | <Byline>{['Done']}</Byline> |
| 26 | </Text> |
| 27 | </MessageResponse>; |
| 28 | } |
| 29 | const parts: string[] = ['Successfully loaded skill']; |
| 30 | |
| 31 | // Show tools count (only for inline skills) |
| 32 | if ('allowedTools' in output && output.allowedTools && output.allowedTools.length > 0) { |
| 33 | const count = output.allowedTools.length; |
| 34 | parts.push(`${count} ${plural(count, 'tool')} allowed`); |
| 35 | } |
| 36 | |
| 37 | // Show model if non-default (only for inline skills) |
| 38 | if ('model' in output && output.model) { |
| 39 | parts.push(output.model); |
| 40 | } |
| 41 | return <MessageResponse height={1}> |
| 42 | <Text> |
| 43 | <Byline>{parts}</Byline> |
| 44 | </Text> |
| 45 | </MessageResponse>; |
| 46 | } |
| 47 | export function renderToolUseMessage({ |
| 48 | skill |
| 49 | }: Partial<Input>, { |