nvms / wingman

Your pair programming wingman. Supports OpenAI, Anthropic, or any LLM on your local inference server.
https://marketplace.visualstudio.com/items?itemName=nvms.ai-wingman
ISC License
61 stars 10 forks source link

The selected code is forcibly replaced. #34

Closed czkoko closed 8 months ago

czkoko commented 8 months ago

hello @nvms The experience of wingman v2 is excellent. Thank you for your contribution.

I found a relatively obvious problem: The selected code is automatically replaced with the generated code, and in many cases the generated code is not suitable for directly replacing the original code.

In addition, if the text button below the code is changed to an easy-to-understand icon button, the interface layout should be more beautiful.

2023-12-10 19 13 39
nvms commented 8 months ago

Hi @czkoko

You can change the insertion method of a prompt to change or disable this behavior. Most prompts default to "Replace selection", but you can set it to "None" so that nothing happens:

Screenshot 2023-12-10 at 9 15 25 AM

Totally agree about the icons. I'll try and find some good ones today.

czkoko commented 8 months ago

So that's it. I think an automatic and manual switching option can be added to control the global Insertion method. If Insertion is set to manual, the application insertion button will appear under the generated code. After all, the local model will not be as understanding as GPT4, and many cases will generate unexpected code.

nvms commented 8 months ago

I can see how that would be useful. Playing around with where to put this. I'm thinking that somewhere out of the way, like below the chat input, makes the most sense.

Screenshot 2023-12-10 at 4 31 03 PM
nvms commented 8 months ago

Thank you for the idea. This feature is available now in 2.0.27.