Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix: support macos acp

huanggawa6c7ca1d1c26a
diff --git a/ACP_Client_Config.md b/ACP_Client_Config.md
index 19ee8aa804..237db95c1a 100644
--- a/ACP_Client_Config.md
+++ b/ACP_Client_Config.md
@@ -1,4 +1,4 @@
-# VS Code ACP Client插件配置流程
+# Winodws VS Code ACP Client插件配置流程
1. 安装 ACP Client 插件,标识符:`formulahendry.acp-client`
2. 插件内点击 `ACP: Add Agent Configuration`
3. `Name`:`jiuwenclaw`
@@ -6,3 +6,13 @@
5. `Config`:留空
6. 先在命令行启动主进程:`python -m jiuwenclaw.app`
7. 插件内连接 `jiuwenclaw` 后在 chat 窗口进行对话
+
+# MacOS/Linux VS Code ACP Client插件配置流程
+1. 安装 ACP Client 插件,标识符:`formulahendry.acp-client`
+2. 插件内点击 `ACP: Add Agent Configuration`
+3. `Add Acp Agent`:`jiuwenclaw`
+4. `Agent Command`:`./scripts/run_gateway_acp.sh(run_gateway_acp.sh的绝对路径)`
+5. `Agent Arguments`:留空
+6. 在终端执行添加可执行权限:chmod +x scripts/run_gateway_acp.sh
+7. 先在命令行启动主进程:`python -m jiuwenclaw.app`
+8. 插件内连接 `jiuwenclaw` 后在 chat 窗口进行对话
diff --git a/scripts/run_gateway_acp.sh b/scripts/run_gateway_acp.sh
new file mode 100755
index 0000000000..35a3d6ddfe
--- /dev/null
+++ b/scripts/run_gateway_acp.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# 自动获取项目根目录
+ROOT=$(cd "$(dirname "$0")/.." && pwd)
+
+# 设置环境变量
+export PYTHONPATH="$ROOT"
+export PYTHONIOENCODING=utf-8
+
+# 进入项目目录
+cd "$ROOT"
+
+# 启动程序(Linux/Mac 虚拟环境路径不同)
+"$ROOT/.venv/bin/python" -m jiuwenclaw.channel.acp_channel "$@"
\ No newline at end of file