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

Method AddStep

pkg/executionplan/types.go:136–148  ·  view source on GitHub ↗

AddStep 添加步骤

(toolName, description string, params map[string]any)

Source from the content-addressed store, hash-verified

134
135// AddStep 添加步骤
136func (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 获取指定步骤
151func (p *ExecutionPlan) GetStep(index int) *Step {

Callers 15

TestAddStepFunction · 0.95
TestGetStepFunction · 0.95
TestGetCurrentStepFunction · 0.95
TestMarkStepStartedFunction · 0.95
TestMarkStepCompletedFunction · 0.95
TestMarkStepFailedFunction · 0.95
TestSummaryFunction · 0.95
TestGenerateIDsFunction · 0.95
TestStepDependenciesFunction · 0.95
TestRetryConfigurationFunction · 0.95
TestExecuteSequentialFunction · 0.95

Calls 1

generateStepIDFunction · 0.85

Tested by 15

TestAddStepFunction · 0.76
TestGetStepFunction · 0.76
TestGetCurrentStepFunction · 0.76
TestMarkStepStartedFunction · 0.76
TestMarkStepCompletedFunction · 0.76
TestMarkStepFailedFunction · 0.76
TestSummaryFunction · 0.76
TestGenerateIDsFunction · 0.76
TestStepDependenciesFunction · 0.76
TestRetryConfigurationFunction · 0.76
TestExecuteSequentialFunction · 0.76