refactor: 调整智能体配置,增强智能体选择与状态管理

This commit is contained in:
wizardchen
2025-12-26 21:31:02 +08:00
parent abfe87eaed
commit 0ca947981a
36 changed files with 2421 additions and 916 deletions
@@ -57,6 +57,6 @@ func (r *customAgentRepository) UpdateAgent(ctx context.Context, agent *types.Cu
}
// DeleteAgent deletes an agent (soft delete)
func (r *customAgentRepository) DeleteAgent(ctx context.Context, id string) error {
return r.db.WithContext(ctx).Where("id = ?", id).Delete(&types.CustomAgent{}).Error
func (r *customAgentRepository) DeleteAgent(ctx context.Context, id string, tenantID uint64) error {
return r.db.WithContext(ctx).Where("id = ? AND tenant_id = ?", id, tenantID).Delete(&types.CustomAgent{}).Error
}