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

Function renderToolUseMessage

src/tools/WebFetchTool/UI.tsx:9–28  ·  view source on GitHub ↗
({
  url,
  prompt
}: Partial<{
  url: string;
  prompt: string;
}>, {
  verbose
}: {
  theme?: string;
  verbose: boolean;
})

Source from the content-addressed store, hash-verified

7import { formatFileSize, truncate } from '../../utils/format.js';
8import type { Output } from './WebFetchTool.js';
9export function renderToolUseMessage({
10 url,
11 prompt
12}: Partial<{
13 url: string;
14 prompt: string;
15}>, {
16 verbose
17}: {
18 theme?: string;
19 verbose: boolean;
20}): React.ReactNode {
21 if (!url) {
22 return null;
23 }
24 if (verbose) {
25 return `url: "${url}"${verbose && prompt ? `, prompt: "${prompt}"` : ''}`;
26 }
27 return url;
28}
29export function renderToolUseProgressMessage(): React.ReactNode {
30 return <MessageResponse height={1}>
31 <Text dimColor>Fetching…</Text>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected