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

Function renderToolUseMessage

src/tools/WebSearchTool/UI.tsx:25–54  ·  view source on GitHub ↗
({
  query,
  allowed_domains,
  blocked_domains
}: Partial<{
  query: string;
  allowed_domains?: string[];
  blocked_domains?: string[];
}>, {
  verbose
}: {
  verbose: boolean;
})

Source from the content-addressed store, hash-verified

23 };
24}
25export function renderToolUseMessage({
26 query,
27 allowed_domains,
28 blocked_domains
29}: Partial<{
30 query: string;
31 allowed_domains?: string[];
32 blocked_domains?: string[];
33}>, {
34 verbose
35}: {
36 verbose: boolean;
37}): React.ReactNode {
38 if (!query) {
39 return null;
40 }
41 let message = '';
42 if (query) {
43 message += `"${query}"`;
44 }
45 if (verbose) {
46 if (allowed_domains && allowed_domains.length > 0) {
47 message += `, only allowing domains: ${allowed_domains.join(', ')}`;
48 }
49 if (blocked_domains && blocked_domains.length > 0) {
50 message += `, blocking domains: ${blocked_domains.join(', ')}`;
51 }
52 }
53 return message;
54}
55export function renderToolUseProgressMessage(progressMessages: ProgressMessage<WebSearchProgress>[]): React.ReactNode {
56 if (progressMessages.length === 0) {
57 return null;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected