perf: mcp save raw schema (#5030)

* perf: mcp save raw schema

* fix: test

* code

* perf: json schema test

* perf: mcp
This commit is contained in:
Archer
2025-06-13 18:46:55 +08:00
committed by GitHub
parent 0914eacb5e
commit 9d6a48a62f
35 changed files with 424 additions and 415 deletions

View File

@@ -1,4 +1,5 @@
import { i18nT } from '../../../web/i18n/utils';
import type { JsonSchemaPropertiesItemType } from '../app/jsonschema';
export enum FlowNodeTemplateTypeEnum {
systemInput = 'systemInput',
@@ -40,7 +41,11 @@ export enum WorkflowIOValueTypeEnum {
selectApp = 'selectApp'
}
export const toolValueTypeList = [
export const toolValueTypeList: {
label: string;
value: WorkflowIOValueTypeEnum;
jsonSchema: JsonSchemaPropertiesItemType;
}[] = [
{
label: WorkflowIOValueTypeEnum.string,
value: WorkflowIOValueTypeEnum.string,
@@ -93,6 +98,14 @@ export const toolValueTypeList = [
}
}
];
export const valueTypeJsonSchemaMap: Record<string, JsonSchemaPropertiesItemType> =
toolValueTypeList.reduce(
(acc, item) => {
acc[item.value] = item.jsonSchema;
return acc;
},
{} as Record<string, JsonSchemaPropertiesItemType>
);
/* reg: modulename key */
export enum NodeInputKeyEnum {
@@ -231,7 +244,11 @@ export enum NodeInputKeyEnum {
// comment
commentText = 'commentText',
commentSize = 'commentSize'
commentSize = 'commentSize',
// Tool
toolData = 'system_toolData',
toolSetData = 'system_toolSetData'
}
export enum NodeOutputKeyEnum {