({
query,
allowed_domains,
blocked_domains
}: Partial<{
query: string;
allowed_domains?: string[];
blocked_domains?: string[];
}>, {
verbose
}: {
verbose: boolean;
})
| 23 | }; |
| 24 | } |
| 25 | export 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 | } |
| 55 | export function renderToolUseProgressMessage(progressMessages: ProgressMessage<WebSearchProgress>[]): React.ReactNode { |
| 56 | if (progressMessages.length === 0) { |
| 57 | return null; |
nothing calls this directly
no outgoing calls
no test coverage detected