checkDependenciesWithMap 使用完成映射检查依赖
(step *Step, completed map[string]bool)
| 393 | |
| 394 | // checkDependenciesWithMap 使用完成映射检查依赖 |
| 395 | func (e *Executor) checkDependenciesWithMap(step *Step, completed map[string]bool) bool { |
| 396 | if len(step.DependsOn) == 0 { |
| 397 | return true |
| 398 | } |
| 399 | |
| 400 | for _, depID := range step.DependsOn { |
| 401 | if !completed[depID] { |
| 402 | return false |
| 403 | } |
| 404 | } |
| 405 | |
| 406 | return true |
| 407 | } |
| 408 | |
| 409 | // Resume 恢复执行(从当前步骤继续) |
| 410 | func (e *Executor) Resume(ctx context.Context, plan *ExecutionPlan, toolCtx *tools.ToolContext) error { |