Skip to content

Commit

Permalink
hotfix: Change the execution order of subtasks #78
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Apr 27, 2023
1 parent 42f52f4 commit 8d3e498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AutonomousAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class AutonomousAgent {
currentTask as string,
result
);
this.tasks = this.tasks.concat(newTasks);
this.tasks = newTasks.concat(this.tasks);
for (const task of newTasks) {
await new Promise((r) => setTimeout(r, TIMOUT_SHORT));
this.sendTaskMessage(task);
Expand Down

0 comments on commit 8d3e498

Please sign in to comment.