Skip to content
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

g:vim_ai_chat vs g:vim_ai_chat_default vs default.chat roles.ini #145

Open
Konfekt opened this issue Feb 15, 2025 · 4 comments
Open

g:vim_ai_chat vs g:vim_ai_chat_default vs default.chat roles.ini #145

Konfekt opened this issue Feb 15, 2025 · 4 comments

Comments

@Konfekt
Copy link
Contributor

Konfekt commented Feb 15, 2025

Why is there ..._chat and .._chat_default? Why is ..._chat_default not mentioned? Why does default.chat not change the options in either of these dictionaries?

@madox2
Copy link
Owner

madox2 commented Feb 16, 2025

I am not sure what is the issue. The default configuration and an alternative config using default role is documented in Configuration section

@Konfekt
Copy link
Contributor Author

Konfekt commented Feb 16, 2025

I am sorry, I could not find _chat_default. If so, I'd wonder why there's _chat instead of _chat_default, but _image_default.

@Konfekt
Copy link
Contributor Author

Konfekt commented Feb 17, 2025

For example, in the mentioned https://github.com/madox2/vim-ai?tab=readme-ov-file#configuration section I read Alternatively in

let g:vim_ai_chat = {
\ "options": {
\ "initial_prompt": "",
\ },
}

Alternatively you can use special default role:

[default.chat]
options.initial_prompt =

as both settings being equivalent, but the latter was ignored whereas the former was not.

Therefore I thought g:vim_ai_chat_default
was meant instead of g:vim_ai_chat since it's also g:vim_ai_image_default and not g:vim_ai_image.
But this setting seemed to be ignored was well.

@madox2
Copy link
Owner

madox2 commented Feb 17, 2025

Right, there is a mistake in documentation, variables with _default postfix were never meant to be used for configuration, those are just for internal purposes, I fixed it in accbca7

There was also a bug with population of image options, fixed in 430966f

So you should be able to configure with a variable g:vim_ai_chat or a [default.chat] role. Default role takes precedence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants