jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.71k stars 310 forks source link

EditWithInstructions allow prompt injection #374

Open danielo515 opened 8 months ago

danielo515 commented 8 months ago

Hello, very good plugin. Extra kudos for the effort you put into the nicer UX.

I think It will be nice if we can configure some 'prompt injection' when you use this feature. Many times I want to add more code using the current one as context, but rather than including everything, the newly generated code most of the times only includes the new stuff. I have to instruct the bot everytime with something like make sure to also include the existing parts of the code that are already correct or stuff like that. Not sure if prompt-injection is the best workaround, but it's the only thing I can think of