feat: add automatic ACP session recovery with intelligent history truncation (#2711)

This commit is contained in:
1A7432
2025-09-18 15:22:26 +08:00
committed by GitHub
parent e538060156
commit 44db8eba87
2 changed files with 128 additions and 1 deletions

View File

@@ -397,7 +397,12 @@ function ACPClient:_create_stdio_transport()
-- Read stderr for debugging
stderr:read_start(function(_, data)
if data then vim.schedule(function() vim.notify("ACP stderr: " .. data, vim.log.levels.DEBUG) end) end
if data then
-- Filter out common session recovery error messages to avoid user confusion
if not (data:match("Session not found") or data:match("session/prompt")) then
vim.schedule(function() vim.notify("ACP stderr: " .. data, vim.log.levels.DEBUG) end)
end
end
end)
end