refactor: remove agent ID references from AI workflow handling and related components
This commit is contained in:
@@ -437,7 +437,7 @@ func (s *channelService) buildChannelModel(id int64, req request.CreateChannelRe
|
||||
return nil, errorsx.InvalidParamI18n("error.e0004")
|
||||
}
|
||||
if aiAgent.RuntimeMode == "" || aiAgent.RuntimeMode == enums.AIAgentRuntimeModeWorkflow {
|
||||
if aiAgent.WorkflowVersionID <= 0 {
|
||||
if len(AIAgentService.ListEnabledWorkflowBindings(sqls.DB(), aiAgent.ID)) != 1 {
|
||||
return nil, errorsx.InvalidParam("ai agent workflow must be published before binding channel")
|
||||
}
|
||||
} else if aiAgent.RuntimeMode == enums.AIAgentRuntimeModeAutonomous {
|
||||
@@ -445,7 +445,7 @@ func (s *channelService) buildChannelModel(id int64, req request.CreateChannelRe
|
||||
return nil, errorsx.InvalidParam("autonomous ai agent must be published before binding channel")
|
||||
}
|
||||
} else if aiAgent.RuntimeMode == enums.AIAgentRuntimeModeHybrid {
|
||||
if aiAgent.PublishedRevisionID <= 0 || aiAgent.WorkflowVersionID <= 0 {
|
||||
if aiAgent.PublishedRevisionID <= 0 {
|
||||
return nil, errorsx.InvalidParam("hybrid ai agent and workflow must be published before binding channel")
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user