mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-17 21:30:08 +00:00
fix(tui): make websearch provider label reactive (#26943)
This commit is contained in:
parent
907281a80a
commit
61174b7878
1 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue