-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix issue #78: [Feature] Support editing of messages #89
base: main
Are you sure you want to change the base?
Conversation
@onitbot - this implementation is incorrect. Instead of clearing old messages when an instruction is edited, we should treat it the same as pressing the 'regenerate' button: the 'instruction' field of the prompt should be edited, and we should call the generate() method. We'll need to change prompt.instruction to be an array of Strings instead of just a string, and then have it respect the 'generationIndex' field. We'll also need to make sure when the regenerate button is pressed, a new version of the current instruction is appended to the prompt.instruction array. Finally, we need to make sure FinalContextView (and any other view that displays prompt.instruction) shows the correct instruction based on generationIndex. |
Onitbot started fixing the pr! You can monitor the progress here. |
Here's a concise overview: Progress Made: Remaining Issues: Summary: While the foundational data structure changes are in place, critical functional requirements around regeneration and editing behaviors are still missing. The solution is incomplete and needs additional implementation work to fully meet the requirements. Recommendation: Focus next steps on implementing the missing regeneration and editing functionality while ensuring proper history maintenance. |
@onitbot - can you proceed and fix the remaining issues you listed above? Regarding the 2nd point, there should be an edit button on the view that displays the instruction. When clicked, this should make the instruction editable. In the place of the edit button, there should be a "send" button and a "cancel" button. If they edit and click send, then we should trigger generate() again. This should append the new instruction the instruction array and increment the generationIndex. |
Onitbot started fixing the pr! You can monitor the progress here. |
1 similar comment
Onitbot started fixing the pr! You can monitor the progress here. |
Based on the provided changes, here's a concise overview: ✅ Successfully Implemented:
The changes appear to fully address the core requirements by implementing a comprehensive editing system that maintains history while allowing new generations. The implementation follows existing patterns and provides appropriate user feedback. 🔍 No explicit issues are mentioned as remaining unresolved. The changes seem to form a complete solution that meets all specified requirements. Unless there are specific performance concerns or edge cases not mentioned in the overview, this appears to be a successful resolution of the original issues. |
This pull request fixes #78.
The changes implement message editing functionality by:
isEditing
flag to the Prompt model to track edit stateThe changes directly address the request to "edit every sent message" by:
This implementation allows users to edit existing messages while maintaining the expected behavior of regenerating responses based on edited content, which matches the requirement that "re-entering a message will remove the older chat history and display a new response."
Automatic fix generated by Onitbot 🤖