frankroeder / parrot.nvim

parrot.nvim 🦜 - the plugin that brings stochastic parrots to Neovim. This is a gp.nvim-fork focused on simplicity.
Other
219 stars 14 forks source link

[suggestion] Accept/Reject changes for Rewrite/Append #43

Closed sirupsen closed 2 weeks ago

sirupsen commented 1 month ago

@frankroeder thank you for a great project. If there's anywhere I can sponsor its development and maintneance, please let me know.

I've tried all the AI integrations under the sun now for Nvim, and yours is the most reliable I've been able to find. I appreciate your focus on simplicity, and robustness.

While I've been able to do most things I've wanted by scripting around your plugin (e.g. C-A bringing up an Fzf list with all the parrot commands), one thing I'd love if you'd consider it at some point would be the ability to ✅ / 🚫 a suggestion from Parrot.

  1. Perform selection
  2. Do Rewrite/Append
  3. Get prompted to Accept or Reject or Regenerate the change (or these are just shortcuts, I don't need an actual dialog)
frankroeder commented 1 month ago

Dear @sirupsen, I really appreciate your support! It is an honor to have caught your attention, especially since I followed your work when you were at Shopify and I was working primarily on Infra/DevOps-related tasks.

I am glad that my message about focusing on simplicity and robustness resonated with you.

I agree with the feature suggestion. Almost every LLM interface includes a "regenerate response" button. Let me think about a slim and intuitive workflow, and I will get back to you in a few days.

frankroeder commented 4 weeks ago

Hello @sirupsen,

I have implemented the first version of PrtRetry, which you can find in PR #45. There is an example in the updated README. Please feel free to provide feedback. This is a very minimal approach that simply remembers the last command details, e.g. rewrite, and can retry it as needed. You can simply invoke it with a shortcut like all the other commands.

frankroeder commented 2 weeks ago

A first version of this feature is now part of Parrot. After each interactive command—whether it's rewrite, append, or prepend—you can trigger PrtRetry to generate a new response, essentially rejecting the previous one. Users were already able to undo the text written by the LLM with native vim commands. I see no need for an explicit accept option. In case I am missing something, we can reopen this issue.

sirupsen commented 1 week ago

So sorry for the delay Frank. My Github email got completely out of control. This is awesome, thank you so much! 👏🏻