Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a repo-per-workspace checkpoint service in addition to repo-per-task #1357

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

cte
Copy link
Collaborator

@cte cte commented Mar 4, 2025

Context

The initial checkpoint creation is significantly faster for large repos if we have a global shadow repo instead of a per-task repo. It also save a lot of disk space.

Implementation

Screenshots

before after

How to Test

Get in Touch


Important

Add repo-per-workspace checkpoint service to optimize checkpoint creation for large repos, with UI and backend support for new checkpoint strategies.

  • Behavior:
    • Adds checkpointStorage option to Cline class in Cline.ts to choose between "task" or "workspace" storage.
    • Implements getCheckpointService() and getInitializedCheckpointService() in Cline.ts to manage checkpoint services.
    • Updates checkpointDiff() and checkpointRestore() in Cline.ts to handle new checkpoint services.
  • Services:
    • Introduces RepoPerTaskCheckpointService and RepoPerWorkspaceCheckpointService in services/checkpoints.
    • RepoPerWorkspaceCheckpointService manages branches for each task.
    • Refactors ShadowCheckpointService to support new services.
  • UI:
    • Updates CheckpointMenu.tsx to handle new checkpoint actions.
    • Adds previousCommitHash to checkpointDiff payload in WebviewMessage.ts.
    • Minor UI adjustments in HistoryView.tsx for task history display.

This description was created by Ellipsis for d7fb998. It will automatically update as commits are pushed.

@cte cte requested a review from mrubens as a code owner March 4, 2025 01:04
Copy link

changeset-bot bot commented Mar 4, 2025

⚠️ No Changeset found

Latest commit: d7fb998

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Mar 4, 2025
@cte cte changed the title Add a repo-per-workspace checkpoints services in addition to repo-per-task Add a repo-per-workspace checkpoint service in addition to repo-per-task Mar 4, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 4, 2025
@cte cte force-pushed the cte/checkpoint-per-task branch from 45ca2e7 to 0bd56ad Compare March 4, 2025 09:37
@cte cte merged commit fd60c94 into main Mar 4, 2025
9 checks passed
@cte cte deleted the cte/checkpoint-per-task branch March 4, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants