CancelPlan 取消当前计划
(reason string)
| 267 | |
| 268 | // CancelPlan 取消当前计划 |
| 269 | func (m *ExecutionPlanManager) CancelPlan(reason string) { |
| 270 | if m.currentPlan == nil { |
| 271 | return |
| 272 | } |
| 273 | m.executor.Cancel(m.currentPlan, reason) |
| 274 | |
| 275 | agentLog.Info(context.Background(), "execution plan canceled", map[string]any{ |
| 276 | "plan_id": m.currentPlan.ID, |
| 277 | "reason": reason, |
| 278 | }) |
| 279 | } |
| 280 | |
| 281 | // ResumePlan 恢复执行当前计划 |
| 282 | func (m *ExecutionPlanManager) ResumePlan(ctx context.Context) error { |