) : null}
+ {retryRunId !== null && onRetryWorkspacePreparation ? (
+
+
+
+ ) : null}
);
}
diff --git a/packages/client-runtime/src/operations/commands.ts b/packages/client-runtime/src/operations/commands.ts
index c0cb8e67504c..bedf552f9b20 100644
--- a/packages/client-runtime/src/operations/commands.ts
+++ b/packages/client-runtime/src/operations/commands.ts
@@ -237,6 +237,10 @@ export interface CancelQueuedRunInput extends ThreadCommandInput {
readonly runId: RunId;
}
+export interface RetryWorkspacePreparationInput extends ThreadCommandInput {
+ readonly runId: RunId;
+}
+
export interface EditQueuedRunInput extends ThreadCommandInput {
readonly runId: RunId;
readonly text: string;
@@ -982,6 +986,17 @@ export const cancelQueuedRun = Effect.fn("EnvironmentCommands.cancelQueuedRun")(
});
});
+export const retryWorkspacePreparation = Effect.fn("EnvironmentCommands.retryWorkspacePreparation")(
+ function* (input: RetryWorkspacePreparationInput) {
+ return yield* dispatch({
+ type: "prepared-run.retry",
+ commandId: yield* allocateCommandId(input),
+ threadId: input.threadId,
+ runId: input.runId,
+ });
+ },
+);
+
export const editQueuedRun = Effect.fn("EnvironmentCommands.editQueuedRun")(function* (
input: EditQueuedRunInput,
) {
diff --git a/packages/client-runtime/src/state/threadCommands.ts b/packages/client-runtime/src/state/threadCommands.ts
index e3ad5c07f583..ed8cc1ec97cc 100644
--- a/packages/client-runtime/src/state/threadCommands.ts
+++ b/packages/client-runtime/src/state/threadCommands.ts
@@ -21,6 +21,7 @@ import {
type ThreadCommandInput,
type ArchiveThreadInput,
type CancelQueuedRunInput,
+ type RetryWorkspacePreparationInput,
type CreateThreadInput,
type DeleteThreadInput,
type EditQueuedRunInput,
@@ -65,6 +66,7 @@ import {
promoteQueuedRun,
reorderQueuedRun,
resumeThreadQueue,
+ retryWorkspacePreparation,
linkThreadPullRequest,
respondToThreadApproval,
respondToThreadUserInput,
@@ -357,6 +359,12 @@ export function createThreadEnvironmentAtoms