Files
agent-desktop/server.config.json
T
Pine 280f672ee0 refactor(config): 服务端地址收敛为单一配置 server.config.json
三端统一从仓库根 server.config.json 的 opc_server_base_url 读取 OPC 服务端地址,
改一处即全局生效,消除散落硬编码:

- Python: constant.DEMO_API_BASE_URL 改为启动时读取该文件(缺失/损坏回退生产默认)
- Vite: console/vite.config.ts proxy 4 条 target 由 readOpcServerBaseUrl() 提供
- Rust: updates/remote.rs 编译期 include_str! 注入(打包前改配置即生效),
  更新检查 fallback 由 127.0.0.1:8090 改为该配置
- 清理残留: tauri.conf.json updater endpoint → 生产(与 version.conf 一致);
  im.py fallback 不再硬编码 8090;auth.py 修正过时文档(原声称支持 env 覆盖但未实现)

验证: Python 模块导入 + 配置联动切换测试 ✓;tsc -b ✓;cargo check ✓;8090 残留归零。
2026-09-13 17:01:44 +08:00

3 lines
55 B
JSON

{
"opc_server_base_url": "https://opc.pinesound.cn"
}