AddStep 添加步骤
(toolName, description string, params map[string]any)
| 134 | |
| 135 | // AddStep 添加步骤 |
| 136 | func (p *ExecutionPlan) AddStep(toolName, description string, params map[string]any) *Step { |
| 137 | step := Step{ |
| 138 | ID: generateStepID(), |
| 139 | Index: len(p.Steps), |
| 140 | ToolName: toolName, |
| 141 | Description: description, |
| 142 | Parameters: params, |
| 143 | Status: StepStatusPending, |
| 144 | } |
| 145 | p.Steps = append(p.Steps, step) |
| 146 | p.UpdatedAt = time.Now() |
| 147 | return &p.Steps[len(p.Steps)-1] |
| 148 | } |
| 149 | |
| 150 | // GetStep 获取指定步骤 |
| 151 | func (p *ExecutionPlan) GetStep(index int) *Step { |