fix(backend): Agent 任务 - 限制循环读取并收紧提交后的取消边界

This commit is contained in:
Codex Audit committed 2026-09-23 11:09:57 +08:00
1 parent bc0d109428
commit a218996e23
16 files changed
+778 -46

No files matched your search

+2 -1
View File
@@ -545,7 +545,8 @@ func (s *Service) prepareCloudAgentMedia(run *model.CloudAgentExecution, state *
}
a.Mode = strings.ToLower(strings.TrimSpace(a.Mode))
a.DraftRunID = run.ID
if state.Approval != nil && state.Approval.Call.ID == call.ID {
if state.Approval != nil && state.Approval.Prepared != nil &&
state.Approval.CallHash == cloudAgentApprovalCallHash(call) {
a.Prepared = state.Approval.Prepared
}
if err := s.fillCloudAgentMediaSnapshotHash(run.UserID, state.Request.CanvasID, &a); err != nil {