feat(websearch): add parallel provider rollout (#26227)
This commit is contained in:
@@ -45,7 +45,7 @@ import type { GrepTool } from "@/tool/grep"
|
||||
import type { EditTool } from "@/tool/edit"
|
||||
import type { ApplyPatchTool } from "@/tool/apply_patch"
|
||||
import type { WebFetchTool } from "@/tool/webfetch"
|
||||
import type { WebSearchTool } from "@/tool/websearch"
|
||||
import { webSearchProviderLabel, type WebSearchTool } from "@/tool/websearch"
|
||||
import type { TaskTool } from "@/tool/task"
|
||||
import type { QuestionTool } from "@/tool/question"
|
||||
import type { SkillTool } from "@/tool/skill"
|
||||
@@ -1933,10 +1933,11 @@ function WebFetch(props: ToolProps<typeof WebFetchTool>) {
|
||||
}
|
||||
|
||||
function WebSearch(props: ToolProps<typeof WebSearchTool>) {
|
||||
const metadata = props.metadata as { numResults?: number }
|
||||
const metadata = props.metadata as { numResults?: number; provider?: unknown }
|
||||
return (
|
||||
<InlineTool icon="◈" pending="Searching web..." complete={props.input.query} part={props.part}>
|
||||
Exa Web Search "{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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user