( toolName: string, state: ClientToolCallState, params?: Record<string, unknown> )
| 31 | } |
| 32 | |
| 33 | function specialToolDisplay( |
| 34 | toolName: string, |
| 35 | state: ClientToolCallState, |
| 36 | params?: Record<string, unknown> |
| 37 | ): ClientToolDisplay | undefined { |
| 38 | if (toolName === INTERNAL_RESPOND_TOOL || toolName.endsWith(HIDDEN_TOOL_SUFFIX)) { |
| 39 | return { |
| 40 | text: formatRespondLabel(state), |
| 41 | icon: Loader, |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | if (toolName === ReadTool.id) { |
| 46 | const target = describeReadTarget(readStringParam(params, 'path')) |
| 47 | return { |
| 48 | text: formatReadingLabel(target, state), |
| 49 | icon: FileText, |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | return undefined |
| 54 | } |
| 55 | |
| 56 | function formatRespondLabel(state: ClientToolCallState): string { |
| 57 | void state |
no test coverage detected