From 947252609e4f2e30daa67c24d0afb484d137a3ac Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Wed, 20 Nov 2024 19:58:54 +0800 Subject: [PATCH] fix: avoid empty tool provider tags --- .../types/entities/plugin_entities/tool_declaration.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/types/entities/plugin_entities/tool_declaration.go b/internal/types/entities/plugin_entities/tool_declaration.go index 746341a..d8ddb8c 100644 --- a/internal/types/entities/plugin_entities/tool_declaration.go +++ b/internal/types/entities/plugin_entities/tool_declaration.go @@ -217,6 +217,10 @@ func (t *ToolProviderDeclaration) UnmarshalYAML(value *yaml.Node) error { t.Tools = []ToolDeclaration{} } + if t.Identity.Tags == nil { + t.Identity.Tags = []manifest_entities.PluginTag{} + } + return nil } @@ -279,6 +283,10 @@ func (t *ToolProviderDeclaration) UnmarshalJSON(data []byte) error { t.Tools = []ToolDeclaration{} } + if t.Identity.Tags == nil { + t.Identity.Tags = []manifest_entities.PluginTag{} + } + return nil }