fix: fix the yaml loading
This commit is contained in:
@@ -60,7 +60,7 @@ function M.load()
|
|||||||
if data and ok_yaml then
|
if data and ok_yaml then
|
||||||
local ok, result = pcall(lyaml.load, data)
|
local ok, result = pcall(lyaml.load, data)
|
||||||
if ok and type(result) == "table" then
|
if ok and type(result) == "table" then
|
||||||
local config = result[1]
|
local config = result
|
||||||
if type(config) == "table" then
|
if type(config) == "table" then
|
||||||
return {
|
return {
|
||||||
initial_prompt = config.initial_prompt or "",
|
initial_prompt = config.initial_prompt or "",
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ local function parse_response(raw)
|
|||||||
vim.api.nvim_err_writeln("Failed to parse YAML response.")
|
vim.api.nvim_err_writeln("Failed to parse YAML response.")
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
data = data[1]
|
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user