feat(tui): add /snapshots command to list and restore captured snapshots#2690
Merged
dgageot merged 3 commits intodocker:mainfrom May 7, 2026
Merged
feat(tui): add /snapshots command to list and restore captured snapshots#2690dgageot merged 3 commits intodocker:mainfrom
dgageot merged 3 commits intodocker:mainfrom
Conversation
rumpl
approved these changes
May 7, 2026
|
❌ PR Review Failed — The review agent encountered an error and could not complete the review. View logs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
/snapshotsslash command that opens a dialog showing every snapshot captured during the current session and lets the user restore any of them (or the original pre-agent state).What it does
/snapshotsopens a modal listing the captured snapshots with their file counts, plus an<original>entry for the pre-agent state.<original>reverts everything./undo) are hidden from both the palette and the slash-command parser when snapshots aren't enabled, so the UI stays uncluttered for users who haven't opted in.Implementation
ListSnapshotsandResetSnapshotoperations alongside the existingUndoLastSnapshot, plumbed throughpkg/hooks/builtins,pkg/runtime, andpkg/app.snapshotRuntimeinterface inpkg/appcaptures all four runtime methods (SnapshotsEnabled, undo, list, reset); runtimes that don't support snapshots simply don't implement it and the related commands disappear automatically.popHistoryTail(renamed fromtruncateAfter) clears popped slots in the backing array so the dropped file lists can be GC'd.len(fileCounts).Docs & tests
docs/features/tui/index.mdupdated.ListSnapshots,ResetSnapshot, the no-op cases, the disabled-snapshots filtering of/undoand/snapshots, and thatApp.SnapshotsEnabled()answers the runtime-capability question without needing an active session.