ソースを参照

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

Yeuoly 6 ヶ月 前
コミット
fc3cba5f2c
共有1 個のファイルを変更した3 個の追加3 個の削除を含む
  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