feat: support codex acp provider (#2774)

This commit is contained in:
yetone
2025-10-16 01:26:04 +08:00
committed by GitHub
parent 4fc83dc308
commit 4a68e29165
6 changed files with 60 additions and 4 deletions

View File

@@ -86,7 +86,11 @@ end
local function thinking_to_lines(item)
local text = item.thinking or item.data or ""
local text_lines = vim.split(text, "\n")
--- trime suffix empty lines
--- trim prefix empty lines
while #text_lines > 0 and text_lines[1] == "" do
table.remove(text_lines, 1)
end
--- trim suffix empty lines
while #text_lines > 0 and text_lines[#text_lines] == "" do
table.remove(text_lines, #text_lines)
end