s5_chat_list.md 822 Bytes

PLAN: S5 — 聊天列表页

Goal

新增 AI 聊天页面 /chat,包含左侧会话列表 + 右侧消息区域。

Current

  • chat.html exists 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

  1. Add @app.route("/chat") → renders new aichat.html template
  2. 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 route
  • templates/aichat.html: new template

Verification

  • curl /chat → HTTP 200 + HTML contains sidebar elements
  • Smoke test passes