2 Commits

  • refactor(chat-ui): 拆分聊天页组件并抽离组合式逻辑
    - 将聊天页从超大单文件拆分为会话列表、会话面板、消息列表、消息项和覆盖层组件\n- 抽离会话、消息、搜索、导出、编辑、历史窗口等组合式逻辑\n- 下沉消息格式化、消息归一化、聊天记录解析与文件图标等工具模块\n- 新增 chat.css 并在 Nuxt 中注册,统一聊天页样式
  • fix: resolve chat messages not loading due to Nuxt auto-import bug and WCDB timeout
    - Move frontend/utils/ to frontend/lib/ to avoid Nuxt unimport scanner
      incorrectly extracting function parameter names (value, fallback) as
      module-level exports, which injected phantom imports that broke all
      client-side JavaScript execution
    - Update all import paths across 13 files from ~/utils/ to ~/lib/
    - Add timeout (5s) and negative cache (60s TTL) to WCDB realtime
      ensure_connected() to prevent open_account() from hanging indefinitely
      when the WeChat database is locked
    - Reorder selectContact() to fire loadMessages() before navigateTo() so
      the message fetch starts before route navigation triggers Suspense
    - Add watch: false to SSR useAsyncData calls to prevent unnecessary
      re-fetching on client-side route changes