Commit Graph
35 Commits
Author SHA1 Message Date
digua dab38f1b1c perf(parser): optimize WhatsApp text parsing 2026-07-30 22:35:26 +08:00
digua f0bdba63fb perf(parser): optimize browser parsing hot paths 2026-07-30 22:15:13 +08:00
digua 2e8ca2bebd fix(parser): preprocess large native fallbacks
Retry strict native fallback through the slim QQ export path so compatible large imports retain the existing memory safeguard.
2026-07-30 21:01:20 +08:00
digua 5d943ab0b3 feat(parser): add shuakami/qq-chat-exporter native parser 2026-07-30 21:01:20 +08:00
digua faedaa852a fix(parser): verify QQ manifest fallbacks
Require the chunked marker before a manifest filename can override normal format detection.
2026-07-27 23:21:03 +08:00
digua 9847e30855 fix(parser): detect large QQ chunked manifests
Use the manifest entry filename when sender statistics push the chunk metadata beyond the sniffer head.
2026-07-27 23:21:03 +08:00
digua eb2d1ea3bf fix(parser): support current QQ chunked exports 2026-07-27 23:21:03 +08:00
digua 1f0528ebd0 refactor(import): simplify demo import implementation 2026-07-26 01:43:43 +08:00
digua cf3fd2ab85 fix(import): enforce reserved system sender contract
Restrict the ChatLab SYSTEM sender to system and recall events, keep bundled validators synchronized, and canonicalize its identity consistently in Node and Browser runtimes. Preserve ordinary participants named SYSTEM in non-ChatLab formats.
2026-07-26 01:43:43 +08:00
digua dc20320041 fix(demo): harden cross-platform demo imports
Rebase official Demo timelines against the browser timezone, bound stalled downloads, and roll back partial batches across Desktop, CLI Web, and Web WASM. Document the platform cleanup hook's established best-effort boundary.
2026-07-26 01:43:43 +08:00
digua 9e7c76fb89 feat(demo): add rolling cross-platform imports 2026-07-26 01:43:43 +08:00
digua 6bd288a2cd refactor(parser): expose browser-safe parsers 2026-07-19 21:27:23 +08:00
digua 1d183cbe6a fix(parser): align ChatLab JSONL validation
Keep automatic format detection consistent with accepted JSONL syntax and reject unresolved owner metadata. Regenerate the standalone skill validators from the canonical implementation.
2026-07-19 15:16:29 +08:00
digua 3a995f6491 feat(cli): add ChatLab format validator 2026-07-19 15:16:29 +08:00
digua 5d30254c17 fix(parser): preserve JSONL member metadata
Emit explicit members before the first streamed message batch so merge previews do not retain metadata-free member stubs. Add parser ordering and temporary database regression coverage.
2026-07-18 17:38:12 +08:00
digua c0942a72f0 fix(import): stabilize large and multi-file imports 2026-07-18 17:38:12 +08:00
digua 7d156040f8 fix(runtime): contain and clean temporary workspaces 2026-07-16 20:09:18 +08:00
digua 8360cd182f fix(parser): validate QCE private chat type
Treat more than two real senders as stronger evidence than a conflicting private marker while preserving genuine private chats with system placeholders.
2026-07-15 10:22:28 +08:00
Shuakami 748613adb7 fix(parser): QCE private chats misdetected as group and phantom "0" member 2026-07-15 09:52:34 +08:00
digua 6dc35722c0 fix(import): disambiguate ChatLab reimports 2026-07-13 01:01:42 +08:00
digua 27f46dfcb6 feat(import): add automatic session matcher 2026-07-13 01:01:42 +08:00
digua a9a1557867 fix(import): preserve ChatLab owner and aliases
Thread ownerId and member aliases through the TS and native parsers. Persist aliases across full and incremental imports so exported ChatLab JSON retains user identity metadata.
2026-07-12 21:27:39 +08:00
digua 37c446c751 fix(parser): preserve ChatLab members in TS fallback
Stream members and messages in one pass so nested member metadata is parsed structurally. Cover exports whose complete member list exceeds the filtered messages.
2026-07-12 21:27:39 +08:00
digua f6a861c128 fix(parser): parse dotted WhatsApp AM/PM markers 2026-07-11 11:09:29 +08:00
hh7418695 1dabcf4dfd fix(parser): support bracketed WhatsApp TXT timestamps 2026-07-11 10:51:30 +08:00
digua ac662d319d feat(contacts): relax relationship entry threshold 2026-07-05 22:51:39 +08:00
digua c0548f63c8 feat(import): prepare native parser rollout 2026-07-05 22:49:38 +08:00
diguaandCursor c265925e3e fix(import): report accurate post-parse progress stages in real time
The UI stayed on "parsing messages" during the whole post-parse phase:
the importer emitted an 'importing' stage the frontend had no text for,
and on CLI Web the synchronous DB writes / index / FTS build starved the
event loop so buffered SSE progress events only arrived after the import
finished.

- Replace 'importing' with 'saving' (message writes) and a new 'indexing'
  stage (indexes / FTS / session index) in ParseProgress, with UI texts
  for all four locales.
- Yield a macrotask between native parser batches and before heavy
  synchronous steps so SSE progress events flush while importing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 22:49:38 +08:00
diguaandCursor 1e7aefe08b feat(import): add Rust native parsing kernels for WeFlow and ChatLab JSON
Add @openchatlab/parser-native (napi-rs v3) with a shared byte-level JSON
scanner and two format kernels. Parsing large exports is 4-10x faster in
real-data benchmarks. The native module is an optional local build; the
pure-TS parsers remain as automatic fallback when it is unavailable,
disabled via CHATLAB_DISABLE_NATIVE_PERF=1, or rejects off-spec files.

The ChatLab kernel also parses the members array structurally, fixing the
TS head-regex heuristic that silently dropped avatars/roles for files with
nested arrays or long member lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 22:49:38 +08:00
diguaandClaude Sonnet 4.6 7ea95d5c74 feat(parser): parse Google Chat takeout conversations
Add streaming zip reader dependency (fflate) and a new parser for Google
Chat takeout conversation files. Handles localized message types, reactions,
topic threads, and deduplication of multi-file exports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 18:10:30 +08:00
digua 2887f1cb73 test(parser,config): cover representative fixtures and migrations 2026-06-08 10:14:42 +08:00
diguaandCursor 0ba9ae04a6 chore: migrate workspace packages to ESM
- Add "type": "module" to all workspace package.json files
- Replace __dirname with import.meta.url-based resolveCliPath() helper
- Convert stream-json/stream-chain CJS named imports to default + destructure
  for ESM compatibility
- Use createRequire() for @node-rs/jieba native module loading in ESM context

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 23:19:47 +08:00
diguaandCursor 9421662a52 feat(import): support unified directory import for Electron and Web
Add directory import support for multi-file formats (e.g. shuakami chunked-jsonl).
Users can select or drag-and-drop a directory via the "Import Folder" checkbox.

- Add `findEntryFileInDirectory()` to parser layer for format-agnostic entry file discovery
- Add `importDirectory` method to ImportAdapter interface
- Implement FetchImportAdapter.importDirectory with multi-file FormData upload
- Add `POST /_web/import-directory` CLI route with directory reconstruction
- Add `chat:importDirectory` IPC handler in Electron main process
- Enhance FileDropZone with `directory` prop and drag-and-drop directory support
- Refactor FetchImportAdapter to extract reusable `consumeSseStream` helper

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 10:20:39 +08:00
digua b12c07dc32 refactor: extract Electron shell to apps/desktop/
Move Electron-specific code (main, preload, shared) and configs
(electron.vite, electron-builder) into apps/desktop/ to prepare
for multi-platform support (Web Browser standalone).

- Create apps/desktop/ with dedicated package.json and tsconfig
- Split Electron deps (electron, electron-updater, better-sqlite3,
  etc.) from shared frontend deps in root package.json
- Declare better-sqlite3 and @node-rs/jieba in packages/node-runtime
- Add stream-json to packages/parser where it belongs
- Update all path aliases (@electron/* → apps/desktop/*) in tsconfig,
  vite configs, and relative imports in preload/main
- Keep slim root tsconfig.node.json as shared base for packages
- Update CI/CD release workflow for new directory layout
- Fix pre-existing type errors (pi-ai Model generic, SQLLabTab
  LLMChatStreamChunk, filter.test.ts empty methods)
2026-05-19 00:31:00 +08:00
digua 4e1f03e252 refactor: extract parser to @openchatlab/parser shared package
Move all 14+ format parsers (QQ, WeChat, Telegram, WhatsApp, LINE,
Discord, Instagram, etc.) from electron/main/parser/ to packages/parser/
as a standalone shared package. Electron's parser module becomes a thin
re-export wrapper. This enables the server to use the same parser for
CLI serve Web import functionality.
2026-05-13 20:19:13 +08:00