mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-04 03:40:33 +08:00
parent
0004a8cafe
commit
dc8df98929
@ -1,4 +1,4 @@
|
|||||||
import { isMandatoryWebSearchModel, isWebSearchModel } from '@renderer/config/models'
|
import { isMandatoryWebSearchModel } from '@renderer/config/models'
|
||||||
import { defineTool, registerTool, TopicType } from '@renderer/pages/home/Inputbar/types'
|
import { defineTool, registerTool, TopicType } from '@renderer/pages/home/Inputbar/types'
|
||||||
|
|
||||||
import WebSearchButton from './components/WebSearchButton'
|
import WebSearchButton from './components/WebSearchButton'
|
||||||
@ -15,7 +15,7 @@ const webSearchTool = defineTool({
|
|||||||
label: (t) => t('chat.input.web_search.label'),
|
label: (t) => t('chat.input.web_search.label'),
|
||||||
|
|
||||||
visibleInScopes: [TopicType.Chat],
|
visibleInScopes: [TopicType.Chat],
|
||||||
condition: ({ model }) => isWebSearchModel(model) && !isMandatoryWebSearchModel(model),
|
condition: ({ model }) => !isMandatoryWebSearchModel(model),
|
||||||
|
|
||||||
render: function WebSearchToolRender(context) {
|
render: function WebSearchToolRender(context) {
|
||||||
const { assistant, quickPanelController } = context
|
const { assistant, quickPanelController } = context
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user