From cf777ba62b22275566c4c0c067f64b7b5cc3c84b Mon Sep 17 00:00:00 2001 From: suyao Date: Fri, 29 Aug 2025 07:02:00 +0800 Subject: [PATCH] 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. --- src/renderer/src/pages/home/Inputbar/Inputbar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx index fdd2e25745..caba673dc5 100644 --- a/src/renderer/src/pages/home/Inputbar/Inputbar.tsx +++ b/src/renderer/src/pages/home/Inputbar/Inputbar.tsx @@ -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 = ({ 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