perf: async login (closes #253) (#258)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-08-27 02:12:35 -04:00
committed by GitHub
parent 64cedd61d5
commit ad5b61bf6a
2 changed files with 37 additions and 14 deletions

View File

@@ -1268,6 +1268,10 @@ function Sidebar:create_input()
end)
local function on_submit()
if not vim.g.avante_login then
Utils.warn("Sending message to fast!, API key is not yet set", { title = "Avante" })
return
end
if not self.input or not self.input.bufnr or not api.nvim_buf_is_valid(self.input.bufnr) then
return
end