fix(kimi-acp): kimi acp tool call update is missing the kind field (#2814)

This commit is contained in:
yetone
2025-10-31 20:41:12 +08:00
committed by GitHub
parent 15ef2a012c
commit 7f48770e66
5 changed files with 22 additions and 9 deletions

View File

@@ -1218,6 +1218,14 @@ To use ACP-compatible agents with Avante.nvim, you need to configure an ACP prov
}
```
#### Kimi CLI with ACP
```lua
{
provider = "kimi-cli",
-- other configuration options...
}
```
### ACP Configuration
ACP providers are configured in the `acp_providers` section of your configuration:

View File

@@ -254,7 +254,7 @@ M._defaults = {
},
["claude-code"] = {
command = "npx",
args = { "@zed-industries/claude-code-acp" },
args = { "-y", "@zed-industries/claude-code-acp" },
env = {
NODE_NO_WARNINGS = "1",
ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY"),
@@ -280,6 +280,10 @@ M._defaults = {
command = "opencode",
args = { "acp" },
},
["kimi-cli"] = {
command = "kimi",
args = { "--acp" },
},
},
---To add support for custom provider, follow the format below
---See https://github.com/yetone/avante.nvim/wiki#custom-providers for more details

View File

@@ -415,12 +415,12 @@ function ACPClient:_create_stdio_transport()
-- Read stderr for debugging
stderr:read_start(function(_, data)
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
-- 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

View File

@@ -957,7 +957,7 @@ function M._stream_acp(opts)
local message = History.Message:new("assistant", {
type = "tool_use",
id = update.toolCallId,
name = update.kind,
name = update.kind or update.title,
input = update.rawInput or {},
}, {
uuid = update.toolCallId,

View File

@@ -1653,7 +1653,8 @@ function Sidebar:toggle_code_window()
end
if self:get_layout() == "vertical" then
api.nvim_win_set_width(self.containers.result.winid, vim.o.columns)
api.nvim_win_set_width(self.code.winid, 0)
api.nvim_win_set_width(self.containers.result.winid, vim.o.columns - 1)
else
api.nvim_win_set_height(self.containers.result.winid, vim.o.lines)
end