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

enhance: use workspace file revisions to avoid clobbering the database #437

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

njhale
Copy link
Member

@njhale njhale commented Feb 12, 2025

No description provided.

Comment on lines 129 to 135
if err := g.WriteFileInWorkspace(ctx, dbWorkspacePath, updatedDBData, gptscript.WriteFileInWorkspaceOptions{
WorkspaceID: workspaceID,
WorkspaceID: workspaceID,
CreateRevision: &([]bool{true}[0]),
LatestRevision: revisionID,
}); err != nil {
return fmt.Errorf("Error writing updated DB file to workspace: %v", err)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure I'm using the feature correctly, but if this is right I'll need to delete the last revision after creating the new one.

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.

1 participant