Minor fix

This commit is contained in:
Jonas Widen 2025-03-16 17:47:41 +01:00
parent 9c6ce73028
commit e6c1867a68

View File

@ -157,6 +157,14 @@ local function gemini_query(prompt, context)
if response then
local formatted_content = "\nUser: " .. prompt .. "\n\nAssistant: " .. response
update_chat_window(formatted_content)
-- Move focus to chat window
if chat_winnr and vim.api.nvim_win_is_valid(chat_winnr) then
vim.api.nvim_set_current_win(chat_winnr)
end
-- Clear the command line
vim.cmd('echo ""')
else
vim.notify("Failed to get a response from Gemini API", vim.log.levels.ERROR)
end