feat: introduce ToolSourceType enum and refactor related code to use it

This commit is contained in:
mlogclub
2026-04-14 15:05:38 +08:00
parent 0ea493e536
commit 8d560bb6bd
12 changed files with 76 additions and 39 deletions
@@ -38,6 +38,7 @@ import {
type CreateAIAgentPayload,
type KnowledgeBase,
type MCPToolCatalogItem,
type MCPToolSourceType,
type SkillDefinition,
fetchAIAgent,
fetchAIConfigsAll,
@@ -63,7 +64,7 @@ type DirectToolOption = {
value: string;
label: string;
meta: DirectToolItem;
sourceType: string;
sourceType: MCPToolSourceType;
autoInjected: boolean;
groupLabel: string;
};
+3 -1
View File
@@ -359,11 +359,13 @@ export type MCPToolInfo = {
outputSchema?: unknown
}
export type MCPToolSourceType = "mcp" | "graph" | "builtin"
export type MCPToolCatalogItem = {
toolCode: string
serverCode: string
toolName: string
sourceType: string
sourceType: MCPToolSourceType
autoInjected: boolean
title: string
description: string