chore: run stylua [generated] (#460)

* chore: add stylua

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

* chore: running stylua

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>

---------

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-09-03 04:19:54 -04:00
committed by GitHub
parent 4ad913435c
commit e8c71d931e
28 changed files with 608 additions and 1181 deletions

View File

@@ -1,6 +1,6 @@
local Utils = require("avante.utils")
local P = require("avante.providers")
local Clipboard = require("avante.clipboard")
local Utils = require "avante.utils"
local P = require "avante.providers"
local Clipboard = require "avante.clipboard"
---@class AvanteProviderFunctor
local M = {}
@@ -47,9 +47,7 @@ end
M.parse_response = function(data_stream, _, opts)
local ok, json = pcall(vim.json.decode, data_stream)
if not ok then
opts.on_complete(json)
end
if not ok then opts.on_complete(json) end
if json.candidates then
if #json.candidates > 0 then
opts.on_chunk(json.candidates[1].content.parts[1].text)