-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Show restart
transformation button after successful inline assist
#20439
Show restart
transformation button after successful inline assist
#20439
Conversation
Thank you for this PR! Could you include a screenshot of the UI change, preferably both a before and after? Also, this PR needs a |
@mikayla-maki screenshots attached and Also I am going to rebase it, if you don't want that let me know and I will revert the rebase |
Rebase is good! I think we could use @danilo-leal or @iamnbutler taking a look at this though, that restart icon kinda throws off the whole UI. |
…nd wire it up to shift+alt+enter though something else would be fine too
Good idea, please have them review the shortcut I chose, I just pulled that outta my arse to have something to test with. |
92780c5
to
45c0dc8
Compare
@mikayla-maki rebase is done |
@danilo-leal that looks slick! What do you think about the keymap to activate it? zed/assets/keymaps/default-macos.json Line 27 in bdbcd77
zed/assets/keymaps/default-linux.json Line 20 in bdbcd77
|
Thank you! |
…ed-industries#20439) When using inline assist, after successfully generating a transformation it's not possible to generate a new transformation. Currently, you have to modify the prompt (i.e. add a `<SPACE>` and hit `<ENTER>`) to regenerate. So, I changed the restart button to be visible after a successful transformation. And in that case I map it to a different keyboard shortcut because `menu::Confirm` is mapped to accept the current suggestion. Now, I can invoke a series of transforms back to back until I get what I want! It might also be desired to keep the accept button visible after modifying the prompt (before submitting it). In that case we'll need to remap accept to an alternate key (perhaps the same alt-shift-enter I am using for restart. That wouldn't be too insane to remember. But maybe someone has a better idea. I don't care what the shortcut is, I just want the ability to regenerate without adding/deleting spaces. ## Before **Two choices** after a suggestions is presented. Also, a great example of why I would want to regenerate the suggestion, it left some tokens `<rewrite_this>`!  ## After **Three choices** after a suggestion is presented, the circular icon is for regenerate, just like you see if you modify the prompt text.  ## Release Notes: - Added Restart Button to Inline Assistant When Prompt Is Unchanged --------- Co-authored-by: Danilo Leal <[email protected]>
When using inline assist, after successfully generating a transformation it's not possible to generate a new transformation. Currently, you have to modify the prompt (i.e. add a
<SPACE>
and hit<ENTER>
) to regenerate.So, I changed the restart button to be visible after a successful transformation. And in that case I map it to a different keyboard shortcut because
menu::Confirm
is mapped to accept the current suggestion.Now, I can invoke a series of transforms back to back until I get what I want!
It might also be desired to keep the accept button visible after modifying the prompt (before submitting it). In that case we'll need to remap accept to an alternate key (perhaps the same alt-shift-enter I am using for restart. That wouldn't be too insane to remember. But maybe someone has a better idea.
I don't care what the shortcut is, I just want the ability to regenerate without adding/deleting spaces.
Before
Two choices after a suggestions is presented. Also, a great example of why I would want to regenerate the suggestion, it left some tokens
<rewrite_this>
!After
Three choices after a suggestion is presented, the circular icon is for regenerate, just like you see if you modify the prompt text.

Release Notes: