ResumePlan 恢复执行当前计划
(ctx context.Context)
| 280 | |
| 281 | // ResumePlan 恢复执行当前计划 |
| 282 | func (m *ExecutionPlanManager) ResumePlan(ctx context.Context) error { |
| 283 | if m.currentPlan == nil { |
| 284 | return errors.New("no plan to resume") |
| 285 | } |
| 286 | |
| 287 | toolCtx := &tools.ToolContext{ |
| 288 | AgentID: m.agent.id, |
| 289 | Sandbox: m.agent.sandbox, |
| 290 | Signal: ctx, |
| 291 | } |
| 292 | |
| 293 | return m.executor.Resume(ctx, m.currentPlan, toolCtx) |
| 294 | } |
| 295 | |
| 296 | // ClearPlan 清除当前计划 |
| 297 | func (m *ExecutionPlanManager) ClearPlan() { |