浏览代码

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