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

Function renderToolUseProgressMessage

src/tools/WebSearchTool/UI.tsx:55–78  ·  view source on GitHub ↗
(progressMessages: ProgressMessage<WebSearchProgress>[])

Source from the content-addressed store, hash-verified

53 return message;
54}
55export function renderToolUseProgressMessage(progressMessages: ProgressMessage<WebSearchProgress>[]): React.ReactNode {
56 if (progressMessages.length === 0) {
57 return null;
58 }
59 const lastProgress = progressMessages[progressMessages.length - 1];
60 if (!lastProgress?.data) {
61 return null;
62 }
63 const data = lastProgress.data;
64 switch (data.type) {
65 case 'query_update':
66 return <MessageResponse>
67 <Text dimColor>Searching: {data.query}</Text>
68 </MessageResponse>;
69 case 'search_results_received':
70 return <MessageResponse>
71 <Text dimColor>
72 Found {data.resultCount} results for &quot;{data.query}&quot;
73 </Text>
74 </MessageResponse>;
75 default:
76 return null;
77 }
78}
79export function renderToolResultMessage(output: Output): React.ReactNode {
80 const {
81 searchCount

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected