feat: 更新 Server 后端服务

- 更新 agent handler 和 service 层
- 新增 chat_group handler 和 service
- 删除废弃的 chat_handler
- 更新 tool 相关处理
- 更新 API 文档和依赖

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 21:26:27 +08:00
parent 237ab9f6d7
commit 71e8cc59d5
24 changed files with 5007 additions and 347 deletions

View File

@@ -44,6 +44,15 @@ func (r *ToolRepository) FindByID(id string) (*model.Tool, error) {
return &tool, nil
}
func (r *ToolRepository) FindByName(name string) (*model.Tool, error) {
var tool model.Tool
err := r.db.First(&tool, "name = ?", name).Error
if err != nil {
return nil, err
}
return &tool, nil
}
func (r *ToolRepository) Update(tool *model.Tool) error {
return r.db.Save(tool).Error
}