-
Notifications
You must be signed in to change notification settings - Fork 67
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
[editor] Ctrl+Z does not return the prompts - input however returns the outputs - data #1457
Comments
Suggested Labels: |
@vanshb03 thanks a lot for reporting, and for your suggestion. @rholinshead what do you think about this? We are currently doing undo/redo just based on the state that is propagated to the TextDocument |
Hmm, @vanshb03 may I ask which version of the extension you are using? Undo/redo was added a little while ago and should include undo/redo on the prompt inputs. Here's what I experience, for reference (on lastest extension version Screen.Recording.2024-03-19.at.12.06.12.PM.movIf we can rule out the version as a potential cause of the issue, we can debug further to see what might be happening on your end to not have it working as expected. |
So to recreate the issue, you have to click in the box before you Ctrl+Z, that is when the output box is the only one that changes and the input box remains the same as shown on the issue. |
With clicking the input box I'm still able to get the input to be undone Screen.Recording.2024-03-19.at.4.12.33.PM.movBut, maybe I misunderstood the expected behaviour? For context, the series of events that happens when updating the input and running is: (update input) -> (run, clear existing input) -> (run, update output). When I Ctrl+Z I can see these events being undone in reverse. In your experience, is that not the case? Or are you instead proposing that Ctrl+Z in this case should undo the three events together as one step? If the latter, there is a complication with doing so. It's possible that there could be some other unrelated event between (update input) and (run) for that input (e.g. adding another cell), or it's possible that there are a series of (update input) events before running -- this is actually the case, as you type with short pauses -- which would then need some heuristic to understand how many updates to undo. Or, alternatively if you are proposing that Ctrl+Z should only undo the input and NOT the output, then that does resonate, since that's the behaviour in colab/jupyter for notebooks. If this is the case, the good news is I believe this will naturally happen as a result of some future updates to aiconfig. |
Yes, I was proposing that Ctrl+Z would only undo the input and not the output solely as it is currently. Suggested Labels: |
Proposed Solution:
When the user presses Ctrl+Z, the editor should undo the last action, including both the input and output, to restore the previous state compared to solely the output as it is right now. This behavior would be consistent with the interface, where Ctrl+Z typically undoes the last text entry or command. By restoring the input as well, users can easily revert to a previous state for their prompt input.
Expected Behavior:
Current Behavior:
The text was updated successfully, but these errors were encountered: