perf: mcp tool type (#4820)

This commit is contained in:
Archer
2025-05-15 18:14:32 +08:00
committed by GitHub
parent 4e83840c14
commit 554b2ca8dc
20 changed files with 74 additions and 61 deletions

View File

@@ -553,7 +553,7 @@ const ChatBox = ({
const responseData = mergeChatResponseData(item.responseData || []);
if (responseData[responseData.length - 1]?.error) {
toast({
title: t(responseData[responseData.length - 1].error?.message),
title: t(getErrText(responseData[responseData.length - 1].error)),
status: 'error'
});
}

View File

@@ -22,6 +22,7 @@ import { ChatRecordContext } from '@/web/core/chat/context/chatRecordContext';
import { type AppFileSelectConfigType } from '@fastgpt/global/core/app/type';
import { defaultAppSelectFileConfig } from '@fastgpt/global/core/app/constants';
import { mergeChatResponseData } from '@fastgpt/global/core/chat/utils';
import { getErrText } from '@fastgpt/global/common/error/utils';
type PluginRunContextType = PluginRunBoxProps & {
isChatting: boolean;
@@ -258,7 +259,7 @@ const PluginRunContextProvider = ({
const responseData = mergeChatResponseData(item.responseData || []);
if (responseData[responseData.length - 1]?.error) {
toast({
title: t(responseData[responseData.length - 1].error?.message),
title: t(getErrText(responseData[responseData.length - 1].error)),
status: 'error'
});
}