Skip to content

Canceling an edit creates a new branch with prompt only #51

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

Open
2 tasks done
Anangaya opened this issue Apr 9, 2025 · 5 comments
Open
2 tasks done

Canceling an edit creates a new branch with prompt only #51

Anangaya opened this issue Apr 9, 2025 · 5 comments

Comments

@Anangaya
Copy link

Anangaya commented Apr 9, 2025

  • I have read the Common Issues and ensured this issue is not covered there.
  • I have searched the existing issues and this is not a duplicate.

Describe the bug
If a prompt is edited and then the edit was cancel it still creates another branch with that prompt only (sometimes even the prompt is empty)

Expected behavior
Only add another branch if the edited prompt was send

Demo
Image

Environment

  • Platform: Windows
  • Version: [e.g. v1.5.8]
@NitroRCr
Copy link
Owner

This is the expected behavior. “Edit” means creating a new branch from the current content. The “Cancel” button is actually a clear button, which clears the current input regardless of whether a new branch is created or not. Deleting branches is not supported currently.

@Anangaya
Copy link
Author

There is no use for an empty branch created like this. In both ChatGPT and DeepSeek apps, a new branch is created only when the edit is accepted by pressing the send button, not when the edit button is clicked.

The ability to delete a branch is very welcome. This is a useful feature that I haven't seen anywhere else. For this issue, it would be better not to create the empty branch in the first place, rather than deleting it after its creation.

@NitroRCr
Copy link
Owner

When you click “Edit”, a new branch is created. The advantage of this is that the editing experience is the same as normal input, with the ability to preview input, add/remove images/attachments, and save input in real time. If you edit through a popup dialog box, you obviously can't achieve all of the above features.

The ability to delete branches will be considered.

@Anangaya
Copy link
Author

Okay. The prompt editing experience is indeed very good in AIaW, and changing its implementation for this feature might not be worth the effort.

Surely you agree that an empty branch created in the event of a cancellation serves no useful purpose, right? So, if the ability to delete branches is implemented, when canceled instead of clearing the input (which currently doesn't clear attachments), it should delete the empty branch.

@NitroRCr
Copy link
Owner

NitroRCr commented Apr 10, 2025

Surely you agree that an empty branch created in the event of a cancellation serves no useful purpose, right?

Yes

when canceled instead of clearing the input (which currently doesn't clear attachments), it should delete the empty branch.

That is just a button to clear the text in the input box, not a cancel button. If the ability to delete branches is implemented, you can just delete the unnecessary branches, and it will be another button.

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

No branches or pull requests

2 participants