|
|
@@ -1985,11 +1985,11 @@ function WebFetch(props: ToolProps<typeof WebFetchTool>) {
|
|
|
}
|
|
|
|
|
|
function WebSearch(props: ToolProps<typeof WebSearchTool>) {
|
|
|
- const metadata = props.metadata as { numResults?: number; provider?: unknown }
|
|
|
+ const metadata = () => props.metadata as { numResults?: number; provider?: unknown }
|
|
|
return (
|
|
|
<InlineTool icon="◈" pending="Searching web..." complete={props.input.query} part={props.part}>
|
|
|
- {webSearchProviderLabel(metadata.provider)} "{props.input.query}"{" "}
|
|
|
- <Show when={metadata.numResults}>({metadata.numResults} results)</Show>
|
|
|
+ {webSearchProviderLabel(metadata().provider)} "{props.input.query}"{" "}
|
|
|
+ <Show when={metadata().numResults}>({metadata().numResults} results)</Show>
|
|
|
</InlineTool>
|
|
|
)
|
|
|
}
|