feat(chat): 前端 chat_ws.js 实时渲染进度/错误(保留重载兜底)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user