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.
Context
Implement an
EventEmitter
inShadowCheckpointService
so we can call it's methods without awaiting and have a convenient way to listening for completion without blocking the chat UI.I'm also deleting the
LocalCheckpointService
since in retrospect I think it was a bad idea not to have full isolation from the local git repo. However, some of the techniques could can be reused in a variant of theShadowCheckpointService
that is branch-per-task instead of repo-per-task. Cline is dabbling with a similar optimization.Note that
saveCheckpoint
will throw if a tool action triggers a checkpoint save and the service isn't initialized yet. As a follow-up we can optionally surface this error to user.Open question; if checkpoints are problematic should this code attempt to update your settings so that checkpoints are effectively off by default going forward?
Implementation
Screenshots
How to Test
Get in Touch
Important
Replaces
LocalCheckpointService
with asyncShadowCheckpointService
using event-driven checkpoints inCline.ts
.ShadowCheckpointService
inCline.ts
for async checkpoint handling.LocalCheckpointService
andCheckpointServiceFactory
.CheckpointEventEmitter
.saveCheckpoint
andrestoreCheckpoint
methods inShadowCheckpointService
emit events.ShadowCheckpointService
inShadowCheckpointService.test.ts
.CheckpointSaved.tsx
to use new checkpoint schema.strategy
andversion
fromcheckpointSchema
inschema.ts
.This description was created by
for e227a9e. It will automatically update as commits are pushed.