mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
Extract duplicated session info assembly from electron/main/worker/query/sessions.ts, packages/server/src/http/routes/web.ts, and sessions.ts into shared core functions. - Add CoreSessionInfo type covering all single-DB queryable AnalysisSession fields - Add buildSessionInfo pure mapper (meta + overview → flat info) - Add getSessionInfo convenience (one-call DB query) - Add getSummaryCount and getLastPlatformMessageId helpers - Electron: thin adapter with cache-first overview, platform-specific dbPath/avatar/aiCount - Server web.ts & sessions.ts: delegate to getSessionInfo, eliminate inline assembly - Add 9 unit tests for all new core session functions Co-authored-by: Cursor <cursoragent@cursor.com>