import { GlobeIcon } from "lucide-react" import { type WebSearchToolPart } from "@/tools" export function WebSearchPart({ part }: { part: WebSearchToolPart }) { const query = part.input?.query ? ` for “${part.input.query}”` : "" switch (part.state) { case "input-streaming": case "input-available": return (
Searching the web{query}…
) case "output-available": return (
Searched the web{query}
) case "output-error": return (
Web search failed: {part.errorText}
) default: return null } }