fix(kimi-acp): kimi acp tool call update is missing the kind field (#2814)
This commit is contained in:
@@ -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 Configuration
|
||||||
|
|
||||||
ACP providers are configured in the `acp_providers` section of your configuration:
|
ACP providers are configured in the `acp_providers` section of your configuration:
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ M._defaults = {
|
|||||||
},
|
},
|
||||||
["claude-code"] = {
|
["claude-code"] = {
|
||||||
command = "npx",
|
command = "npx",
|
||||||
args = { "@zed-industries/claude-code-acp" },
|
args = { "-y", "@zed-industries/claude-code-acp" },
|
||||||
env = {
|
env = {
|
||||||
NODE_NO_WARNINGS = "1",
|
NODE_NO_WARNINGS = "1",
|
||||||
ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY"),
|
ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY"),
|
||||||
@@ -280,6 +280,10 @@ M._defaults = {
|
|||||||
command = "opencode",
|
command = "opencode",
|
||||||
args = { "acp" },
|
args = { "acp" },
|
||||||
},
|
},
|
||||||
|
["kimi-cli"] = {
|
||||||
|
command = "kimi",
|
||||||
|
args = { "--acp" },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
---To add support for custom provider, follow the format below
|
---To add support for custom provider, follow the format below
|
||||||
---See https://github.com/yetone/avante.nvim/wiki#custom-providers for more details
|
---See https://github.com/yetone/avante.nvim/wiki#custom-providers for more details
|
||||||
|
|||||||
@@ -415,12 +415,12 @@ function ACPClient:_create_stdio_transport()
|
|||||||
|
|
||||||
-- Read stderr for debugging
|
-- Read stderr for debugging
|
||||||
stderr:read_start(function(_, data)
|
stderr:read_start(function(_, data)
|
||||||
if data then
|
-- if data then
|
||||||
-- Filter out common session recovery error messages to avoid user confusion
|
-- -- Filter out common session recovery error messages to avoid user confusion
|
||||||
if not (data:match("Session not found") or data:match("session/prompt")) then
|
-- 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)
|
-- vim.schedule(function() vim.notify("ACP stderr: " .. data, vim.log.levels.DEBUG) end)
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -957,7 +957,7 @@ function M._stream_acp(opts)
|
|||||||
local message = History.Message:new("assistant", {
|
local message = History.Message:new("assistant", {
|
||||||
type = "tool_use",
|
type = "tool_use",
|
||||||
id = update.toolCallId,
|
id = update.toolCallId,
|
||||||
name = update.kind,
|
name = update.kind or update.title,
|
||||||
input = update.rawInput or {},
|
input = update.rawInput or {},
|
||||||
}, {
|
}, {
|
||||||
uuid = update.toolCallId,
|
uuid = update.toolCallId,
|
||||||
|
|||||||
@@ -1653,7 +1653,8 @@ function Sidebar:toggle_code_window()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self:get_layout() == "vertical" then
|
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
|
else
|
||||||
api.nvim_win_set_height(self.containers.result.winid, vim.o.lines)
|
api.nvim_win_set_height(self.containers.result.winid, vim.o.lines)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user