ExecutePlanDirect 直接执行指定计划(不设置为当前计划)
(ctx context.Context, plan *executionplan.ExecutionPlan)
| 225 | |
| 226 | // ExecutePlanDirect 直接执行指定计划(不设置为当前计划) |
| 227 | func (m *ExecutionPlanManager) ExecutePlanDirect(ctx context.Context, plan *executionplan.ExecutionPlan) error { |
| 228 | // 创建工具上下文 |
| 229 | toolCtx := &tools.ToolContext{ |
| 230 | AgentID: m.agent.id, |
| 231 | Sandbox: m.agent.sandbox, |
| 232 | Signal: ctx, |
| 233 | } |
| 234 | |
| 235 | return m.executor.Execute(ctx, plan, toolCtx) |
| 236 | } |
| 237 | |
| 238 | // GetCurrentPlan 获取当前执行计划 |
| 239 | func (m *ExecutionPlanManager) GetCurrentPlan() *executionplan.ExecutionPlan { |