import { anthropic } from '@ai-sdk/anthropic'; import { UIToolInvocation } from 'ai'; export default function AnthropicWebSearchView({ invocation, }: { invocation: UIToolInvocation< ReturnType >; }) { switch (invocation.state) { case 'input-available': return (
Searching the web with the following query: {invocation.input.query}
); case 'output-available': return ( <>
Searching the web with the following query: {invocation.input.query}
{JSON.stringify(invocation.output, null, 2)}
); } }