(input: Partial<Input>)
| 4 | import { jsonParse } from '../../utils/slowOperations.js'; |
| 5 | import type { Input, SendMessageToolOutput } from './SendMessageTool.js'; |
| 6 | export function renderToolUseMessage(input: Partial<Input>): React.ReactNode { |
| 7 | if (typeof input.message !== 'object' || input.message === null) { |
| 8 | return null; |
| 9 | } |
| 10 | if (input.message.type === 'plan_approval_response') { |
| 11 | return input.message.approve ? `approve plan from: ${input.to}` : `reject plan from: ${input.to}`; |
| 12 | } |
| 13 | return null; |
| 14 | } |
| 15 | export function renderToolResultMessage(content: SendMessageToolOutput | string, _progressMessages: unknown, { |
| 16 | verbose |
| 17 | }: { |
nothing calls this directly
no outgoing calls
no test coverage detected