fix(tui): make websearch provider label reactive (#26943)
This commit is contained in:
@@ -1985,11 +1985,11 @@ function WebFetch(props: ToolProps<typeof WebFetchTool>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function WebSearch(props: ToolProps<typeof WebSearchTool>) {
|
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 (
|
return (
|
||||||
<InlineTool icon="◈" pending="Searching web..." complete={props.input.query} part={props.part}>
|
<InlineTool icon="◈" pending="Searching web..." complete={props.input.query} part={props.part}>
|
||||||
{webSearchProviderLabel(metadata.provider)} "{props.input.query}"{" "}
|
{webSearchProviderLabel(metadata().provider)} "{props.input.query}"{" "}
|
||||||
<Show when={metadata.numResults}>({metadata.numResults} results)</Show>
|
<Show when={metadata().numResults}>({metadata().numResults} results)</Show>
|
||||||
</InlineTool>
|
</InlineTool>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user