feat(chat): 前端 chat_ws.js 实时渲染进度/错误(保留重载兜底)

This commit is contained in:
lhl
2026-08-29 11:58:38 +08:00
parent 61611b6b8a
commit 14a7dc3501
4 changed files with 68 additions and 0 deletions
+7
View File
@@ -119,6 +119,13 @@ def create_app(
raise _error(404, "NOT_FOUND", "chat_state.js 不存在")
return FileResponse(p, media_type="application/javascript")
@app.get("/chat_ws.js")
def chat_ws_js():
p = static_dir / "chat_ws.js"
if not p.exists():
raise _error(404, "NOT_FOUND", "chat_ws.js 不存在")
return FileResponse(p, media_type="application/javascript")
# ---------- 项目配置 ----------
@app.post("/api/projects")