dustinblackman / oatmeal.nvim

Terminal UI to chat with large language models (LLM) using different model backends, and with a plugin for Neovim!
https://github.com/dustinblackman/oatmeal
MIT License
82 stars 3 forks source link

Oatmeal does not chat around the current buffer #11

Closed fredrikaverpil closed 7 months ago

fredrikaverpil commented 7 months ago

Hi ๐Ÿ‘‹ and thanks for a fantastic project! ๐Ÿ˜„

When I open a file and then run :Oatmeal from within Neovim 0.9.5, I can see the chat starts like this:

โ•ญcodellama:latestโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Hey there! Let's talk about the following:                                                                     โ”‚     โ–ฒ
โ”‚                                                                                                                โ”‚     โ–ˆ
โ”‚ File:                                                                                                          โ”‚     โ–ˆ
โ”‚ /Users/fredrik/code/work/some-repo/some_file.go
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ     โ–ˆ

But then if I e.g. ask it to explain each function in the file, it starts talking about a users API and hallucinates badly. It talks about things which are not even part of the project files.

Is it possible that the prompt is not properly populated (with the buffer's contents) when invoking :Oatmeal?

dustinblackman commented 7 months ago

Hey there! Thanks for the report, you're absolutely right. Lemme get that fixed up.

dustinblackman commented 7 months ago

Fixed in https://github.com/dustinblackman/oatmeal.nvim/commit/881d3493d3b72e76f38c3a18262e48c63be16309 and https://github.com/dustinblackman/oatmeal/commit/3655871838d54b15e4f2888dd46712b15d8993be

Thanks!