Skip to content

Commit

Permalink
fix: avoid empty tool provider tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Nov 20, 2024
1 parent 037d1e1 commit 9472526
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/types/entities/plugin_entities/tool_declaration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 9472526

Please sign in to comment.