feat(inputbar): enhance MCP tools visibility with prompt tool support

- Updated the Inputbar component to include the `isPromptToolUse` function, allowing for better visibility of MCP tools based on the assistant's capabilities.
- This change improves user experience by expanding the conditions under which MCP tools are displayed.
This commit is contained in:
suyao 2025-08-29 07:02:00 +08:00
parent 4918628131
commit cf777ba62b
No known key found for this signature in database

View File

@ -46,7 +46,7 @@ import {
getTextFromDropEvent,
isSendMessageKeyPressed
} from '@renderer/utils/input'
import { isSupportedToolUse } from '@renderer/utils/mcp-tools'
import { isPromptToolUse, isSupportedToolUse } from '@renderer/utils/mcp-tools'
import { documentExts, imageExts, textExts } from '@shared/config/constant'
import { IpcChannel } from '@shared/IpcChannel'
import { Button, Tooltip } from 'antd'
@ -831,7 +831,7 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
const isExpanded = expanded || !!textareaHeight
const showThinkingButton = isSupportedThinkingTokenModel(model) || isSupportedReasoningEffortModel(model)
const showMcpTools = isSupportedToolUse(assistant)
const showMcpTools = isSupportedToolUse(assistant) || isPromptToolUse(assistant)
if (isMultiSelectMode) {
return null