Feature/edit code#830
Conversation
|
Nice, thanks @sbendary25 for working on this and of course @ericrallen for the incredible initial PR. If this can be adapted to the current codebase (I think this PR is from a few weeks ago) I'd be happy to merge. I'd probably simplify it tho — for example I think this shouldn't interface with any code scanning utils (any code the user has written = deemed safe by them, I think). Is the only reason for that crossover because we also use a tempfile to scan code? I'd probably want to reduce it to a magic command which edits the last code block, then continues OI from there. This way user's can:
|
|
I am excited for this one |
|
I think what we can do: if system_platform == 'windows':
subprocess.run(['start', 'your_editor', filename], shell=True)When the user is done we can give the option to re-edit the code or run it. |
Describe the changes you have made:
scan and edit recently edited code by creating a while loop around the "executing" chunk conditional block
Reference any relevant issue (Fixes #000)
this is based on the following PR by ericrallen
#612
I have tested the code on the following OS:
AI Language Model (if applicable)