fix(stream): remove auto force stream (closes #90) (#91)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-19 12:09:04 -04:00 committed by GitHub
parent 6ba2143fed
commit 60e3eac77e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View File

@ -542,12 +542,6 @@ M.stream = function(question, code_lang, code_content, selected_content_content,
ProviderConfig = Config.vendors[provider] ProviderConfig = Config.vendors[provider]
spec = ProviderConfig.parse_curl_args(ProviderConfig, code_opts) spec = ProviderConfig.parse_curl_args(ProviderConfig, code_opts)
end end
--- If the provider doesn't have stream set, we set it to true
if spec.body.stream == nil then
spec = vim.tbl_deep_extend("force", spec, {
body = { stream = true },
})
end
---@param line string ---@param line string
local function parse_and_call(line) local function parse_and_call(line)

View File

@ -36,8 +36,8 @@ function M.in_visual_mode()
return current_mode == "v" or current_mode == "V" or current_mode == "" return current_mode == "v" or current_mode == "V" or current_mode == ""
end end
-- Get the selected content and range in Visual mode ---Get the selected content and range in Visual mode
-- @return avante.SelectionResult | nil Selected content and range ---@return avante.SelectionResult | nil Selected content and range
function M.get_visual_selection_and_range() function M.get_visual_selection_and_range()
local Range = require("avante.range") local Range = require("avante.range")
local SelectionResult = require("avante.selection_result") local SelectionResult = require("avante.selection_result")