From 8a14247aedb1c6bf6cf955dcdbc024735ea83d39 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Thu, 30 Jul 2026 12:38:14 +0800 Subject: [PATCH] =?UTF-8?q?docs(BotOps):=20=E5=AE=89=E8=A3=85=E6=8C=87?= =?UTF-8?q?=E5=BC=95=E6=94=B9=E7=94=A8=E8=84=9A=E6=9C=AC=20+=20=E8=A1=A5?= =?UTF-8?q?=E5=85=A8=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=9E=84=E6=A0=91=20+=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20Nuitka=20=E7=BC=96=E8=AF=91=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 安装章节改用 bash _set.sh / _run.sh 一键脚本 - 新增 _inst.sh Nuitka 编译为 botops.bin 单文件的说明 - 项目结构树补全 _set.sh / _run.sh / _inst.sh / requirements.txt / __init__.py --- BotOps/README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/BotOps/README.md b/BotOps/README.md index 6b1c119..3de9e43 100644 --- a/BotOps/README.md +++ b/BotOps/README.md @@ -16,10 +16,20 @@ ```bash cd BotOps -python3 -m venv venv && source venv/bin/activate -pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple -python app.py # 默认 ws://localhost:8765 -python app.py ws://your-host:8765 # 指定 aibox 地址 + +# 一键初始化(创建 venv + 安装依赖) +bash _set.sh + +# 启动 +bash _run.sh # 默认 ws://localhost:8765 +bash _run.sh ws://your-host:8765 # 指定 aibox 地址 +``` + +### Nuitka 编译为独立二进制 + +```bash +bash _inst.sh # 产出 ./botops.bin(单文件,无需 Python 环境) +./botops.bin [ws://host:port] ``` ## 命令 @@ -34,7 +44,12 @@ BotOps/ ├── app.py # Textual App:布局 + 消息路由 + 快捷键 ├── ws_client.py # WebSocket 协议层(自动重连) ├── commands.py # 斜杠命令注册表 +├── _run.sh # 启动脚本 +├── _set.sh # 初始化脚本(venv + 依赖安装) +├── _inst.sh # Nuitka 编译脚本(产出 botops.bin) +├── requirements.txt # Python 依赖 └── widgets/ + ├── __init__.py ├── chat_view.py # 聊天区:AI 回复 Markdown 增量流式渲染 └── status_bar.py # 底部状态栏(连接状态) ```