s5_chat_list.md
822 Bytes
PLAN: S5 — 聊天列表页
Goal
新增 AI 聊天页面 /chat,包含左侧会话列表 + 右侧消息区域。
Current
chat.htmlexists but serves WeChat talker chats (different layout)- No
/chat(without talker) route for AI chat - S2 APIs exist: GET /api/conversations (list), POST /api/conversations (create)
Tasks
- Add
@app.route("/chat")→ renders newaichat.htmltemplate - Create
aichat.html:- Left sidebar (260px): "+ 新建对话" button + scrollable conversation list
- Right area: placeholder for S6's chat interface
- JS: fetch /api/conversations, render list, click to select, new button POSTs
Files
app.py: add routetemplates/aichat.html: new template
Verification
- curl /chat → HTTP 200 + HTML contains sidebar elements
- Smoke test passes