Sfoglia il codice sorgente

fix: add Plugins.* to PluginDeclaration.Category()

Yeuoly 6 mesi fa
parent
commit
fc3cba5f2c
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      pkg/entities/plugin_entities/plugin_declaration.go

+ 3 - 3
pkg/entities/plugin_entities/plugin_declaration.go

@@ -183,13 +183,13 @@ type PluginDeclaration struct {
 }
 
 func (p *PluginDeclaration) Category() PluginCategory {
-	if p.Tool != nil {
+	if p.Tool != nil || len(p.Plugins.Tools) != 0 {
 		return PLUGIN_CATEGORY_TOOL
 	}
-	if p.Model != nil {
+	if p.Model != nil || len(p.Plugins.Models) != 0 {
 		return PLUGIN_CATEGORY_MODEL
 	}
-	if p.AgentStrategy != nil {
+	if p.AgentStrategy != nil || len(p.Plugins.AgentStrategies) != 0 {
 		return PLUGIN_CATEGORY_AGENT_STRATEGY
 	}
 	return PLUGIN_CATEGORY_EXTENSION