yetone / avante.nvim

Use your Neovim like using Cursor AI IDE!
Apache License 2.0
6.66k stars 240 forks source link

feature: separate prompt for questions where no code generation is required #536

Closed will-lynas closed 2 months ago

will-lynas commented 2 months ago

Feature request

Add a separate plugin prompt that does not ask LLM to generate any code.

Not sure how this would work. Different keybind to open a different type of sidebar? Multiple modes in the sidebar that can be toggled between?

Motivation

Often I find myself asking questions about the codebase without wanting any changes. The plugin prompt tends to force the LLMs to generate code even when it makes no sense to do so.

Other

No response

will-lynas commented 2 months ago

e.g.

image
aarnphm commented 2 months ago

there is a ask variable in the templates, https://github.com/yetone/avante.nvim/blob/8c021f36913048b9f1d00a8839ec44e9b3918033/lua/avante/templates/planning.avanterules#L10.

So we can pass in this option in AvanteAsk similar to position=right or position=left

aarnphm commented 2 months ago

https://github.com/yetone/avante.nvim/blob/8c021f36913048b9f1d00a8839ec44e9b3918033/lua/avante/llm.lua#L63

will-lynas commented 2 months ago

So its set up for it, but not used at the moment?

I quite like the toggling idea, so I'll have a go at that.

Wheres a good place to display the current mode / hint to change the mode? In a floating window like the submit hint?

aarnphm commented 2 months ago

See https://github.com/yetone/avante.nvim/blob/8c021f36913048b9f1d00a8839ec44e9b3918033/lua/avante/init.lua#L40 for example.

aarnphm commented 2 months ago

541 now support with

AvanteAsk ask=false. I will probably add a quick command AvanteChat which is an alias for this.

aarnphm commented 2 months ago

542 add AvanteChat.