From 7699ab00a9e974128e500d09fba60358799bc67a Mon Sep 17 00:00:00 2001 From: Harry Date: Fri, 8 Aug 2025 11:02:11 +0800 Subject: [PATCH] refactor(plugin_entities): remove unused properties from built-in schema definitions --- .../builtin_schema/resolver.go | 72 +------------------ 1 file changed, 1 insertion(+), 71 deletions(-) diff --git a/pkg/entities/plugin_entities/builtin_schema/resolver.go b/pkg/entities/plugin_entities/builtin_schema/resolver.go index f6d7b2ee..67f10674 100644 --- a/pkg/entities/plugin_entities/builtin_schema/resolver.go +++ b/pkg/entities/plugin_entities/builtin_schema/resolver.go @@ -12,11 +12,6 @@ var BuiltinDefinitions = map[string]any{ "file": map[string]any{ "type": "object", "properties": map[string]any{ - "dify_builtin_type": map[string]any{ - "type": "string", - "enum": []string{"File"}, - "description": "Business type identifier for frontend", - }, "name": map[string]any{ "type": "string", "description": "file name", @@ -52,64 +47,9 @@ var BuiltinDefinitions = map[string]any{ }, "required": []string{"name"}, }, - "website_crawl": map[string]any{ - "type": "object", - "properties": map[string]any{ - "dify_builtin_type": map[string]any{ - "type": "string", - "enum": []string{"WebsiteCrawl"}, - "description": "Business type identifier for frontend", - }, - "source_url": map[string]any{ - "type": "string", - "description": "The URL of the crawled website", - }, - "content": map[string]any{ - "type": "string", - "description": "The content of the crawled website", - }, - "title": map[string]any{ - "type": "string", - "description": "The title of the crawled website", - }, - "description": map[string]any{ - "type": "string", - "description": "The description of the crawled website", - }, - }, - "required": []string{"source_url", "content"}, - }, - "online_document": map[string]any{ - "type": "object", - "properties": map[string]any{ - "dify_builtin_type": map[string]any{ - "type": "string", - "enum": []string{"OnlineDocument"}, - "description": "Business type identifier for frontend", - }, - "workspace_id": map[string]any{ - "type": "string", - "description": "The ID of the workspace where the document is stored", - }, - "page_id": map[string]any{ - "type": "string", - "description": "The ID of the page in the document", - }, - "content": map[string]any{ - "type": "string", - "description": "The content of the online document", - }, - }, - "required": []string{"content"}, - }, "general_structure_chunk": map[string]any{ "type": "object", "properties": map[string]any{ - "dify_builtin_type": map[string]any{ - "type": "string", - "enum": []string{"GeneralStructureChunk"}, - "description": "Business type identifier for frontend", - }, "general_chunks": map[string]any{ "type": "array", "items": map[string]any{ @@ -123,11 +63,6 @@ var BuiltinDefinitions = map[string]any{ "parent_child_structure_chunk": map[string]any{ "type": "object", "properties": map[string]any{ - "dify_builtin_type": map[string]any{ - "type": "string", - "enum": []string{"ParentChildStructureChunk"}, - "description": "Business type identifier for frontend", - }, "parent_mode": map[string]any{ "type": "string", "description": "The mode of parent-child relationship", @@ -159,11 +94,6 @@ var BuiltinDefinitions = map[string]any{ "qa_structure_chunk": map[string]any{ "type": "object", "properties": map[string]any{ - "dify_builtin_type": map[string]any{ - "type": "string", - "enum": []string{"QAStructureChunk"}, - "description": "Business type identifier for frontend", - }, "qa_chunks": map[string]any{ "type": "array", "items": map[string]any{ @@ -269,4 +199,4 @@ func ProcessDatasourceYAML(yamlData map[string]any) (map[string]any, error) { // ProcessToolYAML processes tool YAML data by resolving output_schema references func ProcessToolYAML(yamlData map[string]any) (map[string]any, error) { return ProcessYAMLWithRefs(yamlData, "output_schema") -} \ No newline at end of file +}