diff --git a/src/api/types/TaskStatus.ts b/src/api/types/TaskStatus.ts index 16df72e..a556e1d 100644 --- a/src/api/types/TaskStatus.ts +++ b/src/api/types/TaskStatus.ts @@ -11,8 +11,9 @@ * FINISHED: Task has finished and the agent has completed the task. * STOPPED: Task execution has been manually stopped (cannot be resumed). */ -export type TaskStatus = "started" | "paused" | "finished" | "stopped"; +export type TaskStatus = "created" | "started" | "paused" | "finished" | "stopped"; export const TaskStatus = { + Create: "created", Started: "started", Paused: "paused", Finished: "finished", diff --git a/src/wrapper/lib/parse.ts b/src/wrapper/lib/parse.ts index 60c47b8..63e11e2 100644 --- a/src/wrapper/lib/parse.ts +++ b/src/wrapper/lib/parse.ts @@ -161,6 +161,7 @@ export function wrapCreateTaskResponse( case "paused": break poll; case "started": + case "created": await new Promise((resolve) => setTimeout(resolve, intervalMs)); break; default: @@ -256,6 +257,7 @@ export function wrapCreateTaskResponse( } } case "started": + case "created": break; default: throw new ExhaustiveSwitchCheck(msg.data.status);