Skip to content

Commit bd8c442

Browse files
ChangingSelfclaude
andcommitted
docs: 添加 Web Dashboard 启动说明
在 README.md、AGENTS.md 和 getting-started.md 中添加 Web Dashboard 的启动方式和配置说明。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 39627ed commit bd8c442

3 files changed

Lines changed: 71 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,29 @@ uv run python main.py --debug
200200
uv run python main.py --filter EdgeTTSProvider SubtitleProvider
201201
```
202202

203+
### Web Dashboard
204+
205+
项目内置 Web 管理界面,启动后端服务后访问 `http://127.0.0.1:60214`
206+
207+
```bash
208+
# 后端自动启动(默认启用)
209+
uv run python main.py
210+
211+
# 前端开发模式(需单独启动)
212+
cd dashboard
213+
npm install
214+
npm run dev
215+
```
216+
217+
**配置**`config.toml`):
218+
219+
```toml
220+
[dashboard]
221+
enabled = true
222+
host = "127.0.0.1"
223+
port = 60214
224+
```
225+
203226
### 测试
204227

205228
```bash

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,20 @@ uv run python main.py --debug
127127
uv run python main.py --filter EdgeTTSProvider SubtitleProvider
128128
```
129129

130+
### Web Dashboard
131+
132+
项目内置 Web 管理界面,启动后访问 http://127.0.0.1:60214
133+
134+
```bash
135+
# 后端自动启动(默认启用)
136+
uv run python main.py
137+
138+
# 前端开发模式(需单独启动)
139+
cd dashboard
140+
npm install
141+
npm run dev
142+
```
143+
130144
详见 [快速开始](docs/getting-started.md)
131145

132146
## 文档导航

docs/getting-started.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,40 @@ uv add package-name
172172
uv remove package-name
173173
```
174174

175+
### 4.4 Web Dashboard
176+
177+
项目提供 Web 管理界面,可以实时查看会话历史、调试消息、监控系统状态。
178+
179+
```bash
180+
# 方式一:后端自动启动(默认启用)
181+
uv run python main.py
182+
# 后端服务启动后访问 http://127.0.0.1:60214
183+
184+
# 方式二:前端开发模式(需要单独启动)
185+
cd dashboard
186+
npm install # 首次安装依赖
187+
npm run dev # 启动开发服务器(端口 5173)
188+
```
189+
190+
**配置选项**(在 `config.toml` 中):
191+
192+
```toml
193+
[dashboard]
194+
enabled = true # 是否启用 Dashboard
195+
host = "127.0.0.1" # 监听地址
196+
port = 60214 # 监听端口
197+
cors_origins = ["http://localhost:5173"] # 允许的跨域来源
198+
max_history_messages = 1000 # 最大历史消息数
199+
websocket_heartbeat = 30 # WebSocket 心跳间隔(秒)
200+
```
201+
202+
**功能特性**
203+
- 实时会话历史查看
204+
- 消息调试和重放
205+
- Provider 状态监控
206+
- 配置在线修改
207+
- LLM 对话调试
208+
175209
## 5. 快速验证
176210

177211
启动后,检查日志输出确保以下组件正常初始化:

0 commit comments

Comments
 (0)