fix(agent): 模型任务恢复 - 启用孤儿步骤任务接管避免测试超时

This commit is contained in:
ddcat666
2026-10-01 14:11:20 +08:00
parent c49107fa02
commit 42f14cd73e

View File

@@ -110,17 +110,15 @@ func (s *Service) runCloudAgentModelStep(ctx context.Context, userID, runID stri
// 重启恢复:上一个运行时进程已为这一步建好模型任务(可能已经出结果),
// 只是没来得及把结果交回就退出了。运行时对 /model 串行调用,此时仍挂着的
// 步骤任务只可能是这种遗留任务:接手等待它的结果,不再建新任务和订单。
if false {
adopt, released, err := s.adoptCloudAgentPiModelStep(userID, runID, state.ActiveTaskID)
if err != nil {
return nil, false, err
}
if adopt {
break
}
if released {
continue
}
adopt, released, err := s.adoptCloudAgentPiModelStep(userID, runID, state.ActiveTaskID)
if err != nil {
return nil, false, err
}
if adopt {
break
}
if released {
continue
}
canonical := canonicalFromRuntimeMessages(messages, state.Canonical.Tools, state.Canonical.SystemPrompt)