-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add /fix
slash command
#828
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this, it is very useful, and should really help developers a lot.
[1] Tested the branch and it works well and nothing else seems to be broken.
[2] Tested that the /fix
command works in an active cell that has an error whether you click on the code or the output.
[3] Tested that when the cell does not have an error, then /fix
cannot be used.
[4] Tested that when the cell has only a warning, then /fix
cannot be used. Do we want to have /fix
work for cells with warnings?
[5] Nit: "Insert below active cell" (see below) does not say if the code will be inserted in the cell below (overwriting it) or insert a new cell and add the new code to it. The action is the latter but may be we want to point it out. (This is not directly related to this PR.)
[6] I am getting a new chat user as shown below, is this intended?
@srdas Thank you for the quick review! I've addressed your review feedback in the threads above.
This is likely because you have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!! Verified all suggestions are implemented! TY!
* remove unused clear_memory() method in default.py * implement error output signaling and retrieval in ActiveCellContext * fixup * implement /fix slash command * pre-commit * add docstring * edit reply message when no active cell with error output exists * add user documentation and screenshots for /fix
This PR introduces a new
/fix
slash command that fixes a code cell with error output when selected in an open notebook./fix
only works when a code cell with error output is the active cell. Otherwise the UI prevents/fix
from being sent./fix
also accepts additional instructions in natural language following/fix
.For example:
/fix Fix this code cell by using the numpy library only.
Demo video
Screen.Recording.2024-06-11.at.10.49.17.AM.mov