feat: rewind conversations while keeping file changes #11358
Mergedmaria-rcksmerged 3 commits into
main fromrefs/pull/11358/headmerged by maria-rcks View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/orchestration/Layers/CheckpointReactor.ts line 776Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -766,4 +754,18 @@754+ cwd: checkpointCwd,755+ checkpointRef: targetCheckpointRef,756+ fallbackToHead: event.payload.turnCount === 0,757+ });758+ if (!restored) {759+ yield* appendRevertFailureActivity({760+ threadId: event.payload.threadId,761+ turnCount: event.payload.turnCount,762+ detail: `Filesystem checkpoint is unavailable for turn ${event.payload.turnCount}.`,763+ createdAt: now,764+ }).pipe(Effect.catch(() => Effect.void));765+ return;766+ }766767767- // Refresh the workspace entry index so the @-mention file picker768- // reflects the reverted filesystem state.769- yield* workspaceEntries.refresh(checkpointCwd);768+ // Refresh the workspace entry index so the @-mention file picker769+ // reflects the reverted filesystem state.770+ yield* workspaceEntries.refresh(checkpointCwd);771+ }apps/web/src/components/ChatView.tsx lines 6540 to 6540Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -6533,3 +6533,8 @@65336533 return () => window.removeEventListener("paste", handler, true);65346534 }, [activeThreadId, composerRef]);653565356536+ const [pendingRevert, setPendingRevert] = useState<{6537+ turnCount: number;6538+ messageId: MessageId;6539+ routeThreadKey: string;6540+ } | null>(null);
- apps/server/src/orchestration/Layers/CheckpointReactor.ts line 730Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -749,17 +749,4 @@749749750750 yield* providerService.assertConversationRollbackSupported(event.payload.threadId);751751752- const restored = yield* checkpointStore.restoreCheckpoint({753- cwd: checkpointCwd,754- checkpointRef: targetCheckpointRef,755- fallbackToHead: event.payload.turnCount === 0,756- });757- if (!restored) {758- yield* appendRevertFailureActivity({759- threadId: event.payload.threadId,760- turnCount: event.payload.turnCount,761- detail: `Filesystem checkpoint is unavailable for turn ${event.payload.turnCount}.`,762- createdAt: now,763- }).pipe(Effect.catch(() => Effect.void));764- return;765- }752+ if (event.payload.restoreFiles !== false) {apps/server/src/provider/Layers/OpenCodeAdapter.test.ts lines 393 to 395Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -355,4 +387,6 @@355387 runtimeMock.state.summarizeCalls.push(input);356388 return { data: true };357389 },358- messages: async () => ({ data: runtimeMock.state.messages }),390+ messages: async ({ sessionID }: { sessionID: string }) => ({391+ data:392+ runtimeMock.state.forkMessagesBySession.get(sessionID) ?? runtimeMock.state.messages,
maria-rcks merged thisefccda9
maria-rcks closed this
Sign in to join this conversation.




macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed