perf: tool call check (#4818)

* i18n

* tool call

* fix: mcp create permission;Plugin unauth tip

* fix: mcp create permission;Plugin unauth tip

* fix: Cite modal permission

* remove invalide cite

* perf: prompt

* filter fulltext search

* fix: ts

* fix: ts

* fix: ts
This commit is contained in:
Archer
2025-05-15 15:51:34 +08:00
committed by GitHub
parent a6c80684d1
commit 4e83840c14
48 changed files with 721 additions and 642 deletions

View File

@@ -9,6 +9,7 @@ import { type WorkflowTemplateBasicType } from '../workflow/type';
import { AppTypeEnum } from './constants';
import { AppErrEnum } from '../../common/error/code/app';
import { PluginErrEnum } from '../../common/error/code/plugin';
import { i18nT } from '../../../web/i18n/utils';
export const getDefaultAppForm = (): AppSimpleEditFormType => {
return {
@@ -189,7 +190,7 @@ export const getAppType = (config?: WorkflowTemplateBasicType | AppSimpleEditFor
return '';
};
export const checkAppUnExistError = (error?: string) => {
export const formatToolError = (error?: string) => {
const unExistError: Array<string> = [
AppErrEnum.unAuthApp,
AppErrEnum.unExist,
@@ -197,9 +198,9 @@ export const checkAppUnExistError = (error?: string) => {
PluginErrEnum.unExist
];
if (!!error && unExistError.includes(error)) {
return error;
if (error && unExistError.includes(error)) {
return i18nT('app:un_auth');
} else {
return undefined;
return error;
}
};