mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-31 06:12:26 +00:00
enable exa code/websearch
This commit is contained in:
@@ -1447,6 +1447,34 @@ ToolRegistry.register<typeof WebFetchTool>({
|
||||
},
|
||||
})
|
||||
|
||||
ToolRegistry.register({
|
||||
name: "codesearch",
|
||||
container: "inline",
|
||||
render(props: ToolProps<any>) {
|
||||
const input = props.input as any
|
||||
const metadata = props.metadata as any
|
||||
return (
|
||||
<ToolTitle icon="◇" fallback="Searching code..." when={input.query}>
|
||||
Exa Code Search "{input.query}" <Show when={metadata.results}>({metadata.results} results)</Show>
|
||||
</ToolTitle>
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
ToolRegistry.register({
|
||||
name: "websearch",
|
||||
container: "inline",
|
||||
render(props: ToolProps<any>) {
|
||||
const input = props.input as any
|
||||
const metadata = props.metadata as any
|
||||
return (
|
||||
<ToolTitle icon="◈" fallback="Searching web..." when={input.query}>
|
||||
Exa Web Search "{input.query}" <Show when={metadata.numResults}>({metadata.numResults} results)</Show>
|
||||
</ToolTitle>
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
ToolRegistry.register<typeof EditTool>({
|
||||
name: "edit",
|
||||
container: "block",
|
||||
|
||||
Reference in New Issue
Block a user