-
Notifications
You must be signed in to change notification settings - Fork 251
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
Cody: Apply fixups by default #1407
Comments
I put together a design for this @umpox, including the ability to "Retry" with an updated prompt (replacing "Regenerate" in #1383): It does include the idea of "Undo". And the way "Retry" is designed, it would do an undo then reattempt the edit with the new prompt, which is what a lot of other code AI tools are doing. If it's not possible to implement "Undo" at all, we could have "Retry" just edit over the top and I think the UI labelling still works.
I think every code lens action has to map to an action and be clickable. Instead of "Diff" we can make the first "Edits Applied" action show the diff instead. That would be slightly less discoverable, but the diff view isn't great to use, and most people have a git diff too… so I think that's the right balance? |
@toolmantim Thanks, will update some things! |
@toolmantim I think every code lens action has to map to an action and be clickable. Actually it's possible to provide an empty command and the codelens action will still show, but will be unclickable and won't have the usual hover etc effects of a button. Although this is a recent undocumented change I believe (as with so many VS Code changes) Makes sense though. I've made these changes in this PR: #1411 We now have Undo and Retry logic, LMK what you think |
closes #1407 ## Description This PR: - Applies fixups by default - Adds support for applying fixups in the background, when the target file isn't visible. Instead of opening it and changing the users' flow, we do a workspace edit and notify the user when done. - Adds a codelens state where the fixup is applied, but can be differed, regen etc. To avoid this being an annoyance, this codelens is removed when a user saves the document, or edits part of the fixup. - Via the Fixup view, adds the functionality to manage applied fixups by accepting them all or accepting all in a file. - Fixes some over-logging for telemetry ## Screenshot <img width="565" alt="image" src="https://github.com/sourcegraph/cody/assets/9516420/99476b54-ed82-4d22-a439-32d9a8f0c7a1"> ## Video (Fixup - Happy path) https://github.com/sourcegraph/cody/assets/9516420/a515bf02-ac64-45e3-a92b-9d196da77084 ## Video (Fixup - Happy path (in background)) https://github.com/sourcegraph/cody/assets/9516420/9fc24cf2-b509-43dd-8346-b0c00188597f ## Video (Fixup - Unhappy path - Undo) https://github.com/sourcegraph/cody/assets/9516420/421880d4-bf41-4c67-8877-7471e7b5556c ## Video (Fixup - Unhappy path - Retry) <small>yes, i misspelled code _twice_</small> https://github.com/sourcegraph/cody/assets/9516420/fefb2c98-c131-4837-bdb0-6cbaa24fb098 ## Test plan Test: - Instruction fixups (via command palette) - Documentation command - Code action fixup - Fixup UX flow <!-- Required. See https://docs.sourcegraph.com/dev/background-information/testing_principles. -->
Fixups should apply by default. We should provide the codelens options:
Undo/Revert should be possible using normal undo flow
The text was updated successfully, but these errors were encountered: