ACP
DimCode 支持 ACP(Agent Client Protocol),让编辑器以 agent server 方式与 dim 通信。
启动 ACP server
运行:
bash
dim acp编辑器会启动该命令并与之通信。
配置说明
ACP 模式与 TUI 共用同一套本地配置:
~/.dimcode/config.json(提供方与模型)~/.dimcode/tools.json(WebSearch / MCP 设置)
提示:先运行一次 dim,通过 /connect(或 Ctrl+P → Connect Provider)完成提供方配置,再去配置编辑器集成会更顺畅。
Zed 集成
在 Zed 设置中添加 agent_servers:
jsonc
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"agent_servers": {
"dim": {
"type": "custom",
"command": "dim",
"args": ["acp"],
},
},
// Keep your existing settings...
}注意:
- 确保
dim在PATH中(或在"command"使用绝对路径)。 - 如果需要跨编辑器请求保持稳定会话,可在编辑器环境设置
ACP_STICKY_SESSION=true。