Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a turn after a steered queued message reuses the last checkpoint #43745

MergedMauriceCRRR(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/43745/headmerged by juliusmarminge View on GitHub

Showing 12 changed files with 82 additions and 1 deletion (loading 9).

x
0 of 12 viewed, 12 left
10 additions and 0 deletionsapps/server/src/checkpointing/CheckpointStore.tsModified
View file
@@ -93,6 +93,8 @@
input: Omit<RestoreCheckpointInput, "fallbackToHead">,
) => Effect.Effect<boolean, CheckpointStoreError>;
​
+ readonly copyCheckpointRef: VcsCheckpointOps["copyCheckpointRef"];
+​
readonly restoreCheckpoint: (
input: RestoreCheckpointInput,
) => Effect.Effect<boolean, CheckpointStoreError>;
@@ -160,6 +162,13 @@
return yield* checkpoints.hasCheckpointRef(input);
});
​
+ const copyCheckpointRef: CheckpointStore["Service"]["copyCheckpointRef"] = Effect.fn(
+ "CheckpointStore.copyCheckpointRef",
+ )(function* (input) {
+ const checkpoints = yield* resolveCheckpoints(input.cwd);
+ return yield* checkpoints.copyCheckpointRef(input);
+ });
+​
const restoreCheckpoint: CheckpointStore["Service"]["restoreCheckpoint"] = Effect.fn(
"restoreCheckpoint",
)(function* (input) {
@@ -194,6 +203,7 @@
resolveCleanHead,
captureHeadCheckpoint,
hasCheckpointRef,
+ copyCheckpointRef,