fix: Correct role config versioning, sync on publish, and resolve chat flow copy bug

This commit is contained in:
lvxinyu.1117
2025-07-31 12:29:26 +08:00
parent de3ec2c1e2
commit a5905f24ee
4 changed files with 52 additions and 1 deletions

View File

@ -3910,7 +3910,13 @@ func (w *ApplicationService) GetChatFlowRole(ctx context.Context, req *workflow.
var version string
if wf.Meta.AppID != nil {
version = "" // TODO : search version from DB using AppID
vl, err := GetWorkflowDomainSVC().GetWorkflowVersionsByConnector(ctx, mustParseInt64(req.GetConnectorID()), wf.ID, 1)
if err != nil {
return nil, err
}
if len(vl) > 0 {
version = vl[0]
}
}
role, err := GetWorkflowDomainSVC().GetChatFlowRole(ctx, mustParseInt64(req.WorkflowID), version)