Can't get the context command to work
wirtsi opened this issue · comments
Selecting text in visual mode and issuing :NeoAIContext gives me this error
E5108: Error executing lua ...local/share/nvim/lazy/neoai.nvim/lua/neoai/chat/init.lua:98: attempt to index field 'chat_history' (a nil value) stack traceback: ...local/share/nvim/lazy/neoai.nvim/lua/neoai/chat/init.lua:98: in function 'send_prompt' ...rause/.local/share/nvim/lazy/neoai.nvim/lua/neoai/ui.lua:142: in function 'send_prompt' ...rause/.local/share/nvim/lazy/neoai.nvim/lua/neoai/ui.lua:132: in function 'submit_prompt' [string ":lua"]:1: in main chunk
This happens on first call and also when entering a prompt
Thanks for the feedback. I believe the issue was the fact that I was setting the chat_history variable back to nil when setting the context which stuffed up when the GUI was already opened.