diff --git a/Enums/Copy.ts b/Enums/Copy.ts index 9372000..57dbfec 100644 --- a/Enums/Copy.ts +++ b/Enums/Copy.ts @@ -70,7 +70,7 @@ export enum Copy { PlanningFailedError = "Planning failed. No execution plan was generated. Please consult with the user about how to proceed.", StepDoesNotExistError = "Step {stepNumber} does not exist in the execution plan. Valid step numbers are 1-{totalSteps}.", StepMustBeCompletedInOrderError = "Cannot complete step {stepNumber}. Step \"{incompletStep}\" is not yet completed. Steps must be completed in order.", - StepCompletedWithNextStep = "Step {stepNumber} completed successfully. Now proceed with step {nextStepNumber}: {nextStepDescription}", + StepCompletedWithNextStep = "Step {stepNumber} completed successfully. Now proceed with step {nextStepNumber}.", AllStepsCompleted = "Step {stepNumber} completed successfully. All steps in the execution plan have been completed. Provide a final summary to the user based on the completed steps and overall success criteria.", MaxPlanningIterationsReached = "I've attempted multiple planning iterations but encountered persistent issues completing the task. It may need to be broken down further or requires additional clarification.", diff --git a/Types/ExecutionPlan.ts b/Types/ExecutionPlan.ts index d9e99a7..ae59b2c 100644 --- a/Types/ExecutionPlan.ts +++ b/Types/ExecutionPlan.ts @@ -64,7 +64,6 @@ export class ExecutionPlan { }; } } - currentStep.status = ExecutionStatus.Completed; const nextStep = this.executionSteps[stepIndex + 1]; @@ -73,9 +72,12 @@ export class ExecutionPlan { return { message: replaceCopy(Copy.StepCompletedWithNextStep, [ stepNumber.toString(), - (stepNumber + 1).toString(), - nextStep.description - ]) + (stepNumber + 1).toString() + ]), + step: nextStep.step, + description: nextStep.description, + instruction: nextStep.instruction, + ...(nextStep.context && { context: nextStep.context }) }; } else { return {