MCPcopy Create free account
hub / github.com/astercloud/aster / RejectPlan

Method RejectPlan

pkg/agent/execution_plan.go:176–194  ·  view source on GitHub ↗

RejectPlan 拒绝执行计划

(reason string)

Source from the content-addressed store, hash-verified

174
175// RejectPlan 拒绝执行计划
176func (m *ExecutionPlanManager) RejectPlan(reason string) error {
177 if m.currentPlan == nil {
178 return errors.New("no pending plan to reject")
179 }
180
181 m.currentPlan.Reject(reason)
182
183 // 触发回调
184 if m.onPlanRejected != nil {
185 m.onPlanRejected(m.currentPlan, reason)
186 }
187
188 agentLog.Info(context.Background(), "execution plan rejected", map[string]any{
189 "plan_id": m.currentPlan.ID,
190 "reason": reason,
191 })
192
193 return nil
194}
195
196// ExecutePlan 执行当前计划
197func (m *ExecutionPlanManager) ExecutePlan(ctx context.Context) error {

Callers

nothing calls this directly

Calls 2

RejectMethod · 0.80
InfoMethod · 0.65

Tested by

no test coverage detected