refactor: get rid of nui-components (#118)
This commit is contained in:
@@ -376,7 +376,10 @@ end
|
||||
---@type AvanteResponseParser
|
||||
M.parse_claude_response = function(data_stream, event_state, opts)
|
||||
if event_state == "content_block_delta" then
|
||||
local json = vim.json.decode(data_stream)
|
||||
local ok, json = pcall(vim.json.decode, data_stream)
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
opts.on_chunk(json.delta.text)
|
||||
elseif event_state == "message_stop" then
|
||||
opts.on_complete(nil)
|
||||
@@ -739,7 +742,7 @@ M.stream = function(question, code_lang, code_content, selected_content_content,
|
||||
return active_job
|
||||
end
|
||||
|
||||
---@private
|
||||
---@public
|
||||
function M.setup()
|
||||
if Config.provider == "copilot" and not M.copilot then
|
||||
M.copilot = {
|
||||
|
||||
Reference in New Issue
Block a user