import { anthropic } from '@ai-sdk/anthropic'; import { UIToolInvocation } from 'ai'; export default function AnthropicWebFetchView({ invocation, }: { invocation: UIToolInvocation< ReturnType >; }) { switch (invocation.state) { case 'input-streaming': case 'input-available': return (
Analyzing the following URL: {invocation.input?.url}
); case 'output-available': return ( <>
Analyzing the following URL: {invocation.input.url}
{JSON.stringify(invocation.output, null, 2)}
); } }