Explorar o código

修改推送格式

moki hai 2 semanas
pai
achega
96583c5c37
Modificáronse 3 ficheiros con 6 adicións e 10 borrados
  1. 4 5
      README.md
  2. 0 3
      cmd/monitor/main.go
  3. 2 2
      docs/api.md

+ 4 - 5
README.md

@@ -133,8 +133,8 @@ curl http://localhost:8080/api/mqtt
 | 思考中 | reasoning | 模型推理中 |
 | 使用工具中 | using_tool | AI 正在使用工具 |
 | 等待中 | pending | 工具等待执行 |
-| 运行中 | running | 工具执行中 |
-| 工具执行完成 | completed | 工具执行完成 |
+| 运行中 | running | 工具执行中(可附带工具名,如 `运行中: read`) |
+| 工具执行完成 | completed | 工具执行完成(可附带工具名,如 `工具执行完成: read`) |
 | 会话完成 | session_completed | 会话执行完成 |
 | 等待权限 | permission | AI 向用户申请权限 |
 | 错误 | error | 会话错误 |
@@ -150,7 +150,6 @@ curl http://localhost:8080/api/mqtt
   --host string        主机地址 (默认 "127.0.0.1")
   --ports string       端口列表,逗号分隔 (如: 4096,4097,4098)
   --scan string        扫描端口范围 (如: 4096-4100)
-  --pid                通过进程号查找端口
   --interval int       动态扫描间隔(秒) (默认 5)
   --db string          数据库路径 (默认 "./data/config.db")
   --api-addr string    API 服务地址 (如: :8080)
@@ -194,8 +193,8 @@ AI-Status-Light/
 │   ├── monitor/          # 监控器核心模块
 │   └── mqtt/             # MQTT 客户端模块
 ├── docs/                 # 文档
-├── dist/                 # 编译产物
-└── Makefile              # 构建脚本
+├── scripts/              # 构建脚本
+└── Makefile              # 构建配置
 ```
 
 ## 开发

+ 0 - 3
cmd/monitor/main.go

@@ -91,7 +91,6 @@ func runMonitor(args []string) {
 	host := fs.String("host", "127.0.0.1", "主机地址")
 	portsFlag := fs.String("ports", "", "端口列表,逗号分隔 (如: 4096,4097,4098)")
 	scanFlag := fs.String("scan", "", "扫描端口范围 (如: 4096-4100)")
-	pidFlag := fs.Bool("pid", false, "通过进程号查找端口")
 	intervalFlag := fs.Int("interval", 5, "动态扫描间隔(秒), 默认5")
 	dbPath := fs.String("db", defaultDBPath, "数据库路径")
 	apiAddr := fs.String("api-addr", "", "API 服务地址 (如: :8080)")
@@ -158,8 +157,6 @@ func runMonitor(args []string) {
 
 	if scanRange != nil {
 		fmt.Printf("扫描端口范围 %d-%d...\n", scanRange[0], scanRange[1])
-	} else if *pidFlag {
-		fmt.Println("通过进程号查找 OpenCode 端口...")
 	} else {
 		fmt.Println("查找 OpenCode 实例...")
 	}

+ 2 - 2
docs/api.md

@@ -226,8 +226,8 @@ API 已启用 CORS,支持跨域请求。
 | 思考中 | reasoning | 模型推理中 |
 | 使用工具中 | using_tool | AI 正在使用工具 |
 | 等待中 | pending | 工具等待执行 |
-| 运行中 | running | 工具执行中 |
-| 工具执行完成 | completed | 工具执行完成 |
+| 运行中 | running | 工具执行中(可附带工具名,如 `运行中: read`) |
+| 工具执行完成 | completed | 工具执行完成(可附带工具名,如 `工具执行完成: read`) |
 | 会话完成 | session_completed | 会话执行完成 |
 | 等待权限 | permission | AI 向用户申请权限 |
 | 错误 | error | 会话错误 |