MCPcopy Create free account
hub / github.com/freecodexyz/free-code / renderToolUseMessage

Function renderToolUseMessage

src/tools/SendMessageTool/UI.tsx:6–14  ·  view source on GitHub ↗
(input: Partial<Input>)

Source from the content-addressed store, hash-verified

4import { jsonParse } from '../../utils/slowOperations.js';
5import type { Input, SendMessageToolOutput } from './SendMessageTool.js';
6export 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}
15export function renderToolResultMessage(content: SendMessageToolOutput | string, _progressMessages: unknown, {
16 verbose
17}: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected