mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
Session index (segment/message_context tables) was previously generated inconsistently: CLI used postImportHook, Desktop relied on a separate explicit RPC call, and the CLI sync/pull legacy importer never built it. Move generateSessionIndex / generateIncrementalSessionIndex into the shared importers (streaming-importer.ts, incremental-importer.ts) so every caller gets it automatically. Remove the now-redundant calls from CLI's postImportHook. Also add the calls to the legacy importer.ts used by CLI sync/pull, which had no session index at all. Incremental imports use generateIncrementalSessionIndex, which preserves existing AI summaries. Full imports call generateSessionIndex only on newly created sessions where no summaries exist. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>