fix: websearch button condition (#11440)

fix: button
This commit is contained in:
SuYao 2025-11-25 13:24:37 +08:00 committed by GitHub
parent 0004a8cafe
commit dc8df98929
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 WebSearchButton from './components/WebSearchButton'
@ -15,7 +15,7 @@ const webSearchTool = defineTool({
label: (t) => t('chat.input.web_search.label'),
visibleInScopes: [TopicType.Chat],
condition: ({ model }) => isWebSearchModel(model) && !isMandatoryWebSearchModel(model),
condition: ({ model }) => !isMandatoryWebSearchModel(model),
render: function WebSearchToolRender(context) {
const { assistant, quickPanelController } = context