feat: add web gateway hot reload and polling state sync (#1684)

* feat(gateway): support hot reload and empty startup

- extract gateway runtime into pkg/gateway
- add gateway.hot_reload config with default and example values
- allow starting the gateway without a default model via --allow-empty
- stop treating missing enabled channels as a startup error
- update related tests

* feat: replace gateway SSE updates with polling-based state sync

- remove gateway SSE broadcasting and event endpoint
- add polling-based gateway status refresh with stopping state handling
- detect when gateway restart is required after default model changes
- resolve gateway health and websocket proxy targets from configured host
- update gateway UI labels and add backend/frontend test coverage
This commit is contained in:
wenjie
2026-03-17 18:46:00 +08:00
committed by GitHub
parent 11207186c8
commit 8a44410e37
24 changed files with 700 additions and 543 deletions
+2 -1
View File
@@ -63,7 +63,8 @@
},
"status": {
"starting": "Starting Gateway...",
"restarting": "Restarting Gateway..."
"restarting": "Restarting Gateway...",
"stopping": "Stopping Gateway..."
},
"restartRequired": "Model changes require a gateway restart to take effect."
}
+2 -1
View File
@@ -63,7 +63,8 @@
},
"status": {
"starting": "服务启动中...",
"restarting": "服务重启中..."
"restarting": "服务重启中...",
"stopping": "服务停止中..."
},
"restartRequired": "切换默认模型后需要重启服务才能生效。"
}