Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Feb 11, 2025

Description

I improved the logging for the Windows locked file cases that I tested.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Enhance checkpoint functionality with metadata, improved error handling, and updated UI components for better user interaction.

  • Behavior:
    • Add checkpoint parameter to say() in Cline.ts to include checkpoint metadata in messages.
    • Log errors and disable checkpoints on failure in checkpointDiff(), checkpointSave(), and checkpointRestore() in Cline.ts.
    • Improve error handling in restoreMain() and saveCheckpoint() in CheckpointService.ts.
  • UI Components:
    • Update ChatRow.tsx and CheckpointMenu.tsx to display checkpoint metadata and handle user interactions.
    • Add checkpointSchema in schema.ts to validate checkpoint metadata.
    • Update CheckpointSaved.tsx to use checkpointSchema for metadata validation.
  • Tests:
    • Add tests in CheckpointService.test.ts to verify checkpoint creation, restoration, and error handling.

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

@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2025

⚠️ No Changeset found

Latest commit: 94cb09f

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

@cte cte changed the title Checkpoints logging tweaks + defensivce catches Checkpoints logging tweaks + defensive catches Feb 11, 2025
try {
await this.git.add(["-A"])
const status = await this.git.status()
this.log(`[saveCheckpoint] status: ${JSON.stringify(status)}`)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logging was too verbose.

throw new Error(
`[saveCheckpoint] Failed in stash commit phase: ${err instanceof Error ? err.message : String(err)}`,
)
if (!stashCommit) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't generate a stash commit then there are no changes to store in a checkpoint. This has handled by the diff step below, but we can short circuit that.

)

// Escalate to a forced checkout if we can't checkout the
// main branch under nor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this get cut off?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I think I lost my train of thought while writing that 😂

@cte cte merged commit 28cd4eb into main Feb 11, 2025
5 of 6 checks passed
@cte cte deleted the cte/checkpoints-logging branch February 11, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants