Commit Graph
1114 Commits
Author SHA1 Message Date
digua eaf46c01f9 feat(relationships): improve galaxy focus and relevance 2026-06-30 14:41:46 +08:00
digua 5141ee4e63 feat(relationships): add 3d galaxy view 2026-06-30 14:41:46 +08:00
digua d04eddc37c fix(relationships): rank active close contacts accurately 2026-06-30 14:41:46 +08:00
digua 3afc2a7329 feat(relationships): enhance galaxy graph interactions 2026-06-30 14:41:46 +08:00
digua 85b9e203ab feat(people): add relationship galaxy graph 2026-06-30 14:41:46 +08:00
diguaandClaude Sonnet 4.6 d8034b3546 fix(semantic-index): stabilize embedding warmup (#261)
* fix(semantic-index): stabilize embedding warmup

Improve warmup job reliability and prevent raw API response body from
reaching app.log. Status code alone is sufficient for diagnosing failures;
stripping the response detail eliminates the risk of chat content being
written to the log via OpenAI-compatible services that echo submitted input.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(semantic-index): clear preload error after warmup retry

When local model preload fails, a later warmup can successfully recreate the extractor through embedDocuments but leave modelPreloadStatus stuck on error.

Mark the local model ready after a completed warmup writes chunks, and cover the retry path with a regression test.

* fix(semantic-index): guard warmup model status updates

Capture the model configuration used by a warmup job before it starts, and only clear local preload errors when the current local model still matches that job.

Add a regression test for switching local models while an older warmup is still completing.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 10:54:22 +08:00
digua ab6f4b7475 refactor(people): move contacts page under people module 2026-06-27 22:50:47 +08:00
digua 0d5d49a491 fix(contacts): stabilize navigation and facts cache
Wait for initial contact rows before scrolling to groupmates so tab navigation does not land on temporary rows. Avoid writing contacts session facts or latest facts when a session DB fingerprint changes during computation.
2026-06-27 22:13:25 +08:00
digua e784a16483 fix(contacts): refresh promoted friend rows
Replace friend rows after manual friend promotion so response-layer overrides are reflected even when the contacts snapshot signature is unchanged. Keep preserving the groupmate rows after local removal to avoid scroll jumps.
2026-06-27 22:13:25 +08:00
digua 0e318f5bca perf(avatar): lazy load session avatars 2026-06-27 22:13:25 +08:00
digua 2b6d483049 feat(contacts): add source chat record actions 2026-06-27 22:13:25 +08:00
digua e1543c5f3b fix(contacts): stabilize contact list refresh 2026-06-27 22:13:25 +08:00
digua 1e2148a4d2 perf(contacts): cache session facts 2026-06-27 22:13:25 +08:00
digua ba500bd462 feat(contacts): mark groupmates as friends 2026-06-27 20:02:23 +08:00
digua 928ac6064b refactor(contacts): split contact page panels 2026-06-27 20:02:23 +08:00
digua e9e19f1b05 refactor(contacts): remove low signal groupmate concept 2026-06-27 20:02:23 +08:00
digua 114ae79885 feat(contacts): paginate virtualized contacts list 2026-06-27 20:02:23 +08:00
digua 95f0e91c0d feat(contacts): add time range filtering 2026-06-27 20:02:23 +08:00
digua 1f0aed5358 fix(contacts): address review regressions 2026-06-27 20:02:23 +08:00
digua 25b658e981 chore(tests): clarify runtime and regression rules 2026-06-27 15:54:08 +08:00
digua dfd330e6bb fix(contacts): localize source type labels 2026-06-27 15:54:08 +08:00
digua 103df0eba9 fix(contacts): address review regressions 2026-06-27 15:54:08 +08:00
digua 9563c26645 refactor(contacts): group contacts service files 2026-06-27 15:54:08 +08:00
digua c8c4e1aca6 feat(contacts): compute contacts in background worker 2026-06-27 15:54:08 +08:00
digua d48665b2ed feat(contacts): simplify contacts experience 2026-06-27 15:54:08 +08:00
digua 11152a7c4b feat(web): add contacts page 2026-06-27 15:54:08 +08:00
digua c500d735a7 feat(http-routes): add contacts web routes 2026-06-27 15:54:08 +08:00
digua 9c8faeba09 feat(node-runtime): add contacts aggregation service 2026-06-27 15:54:08 +08:00
digua 39a97cae95 feat(contacts): add core analysis primitives 2026-06-27 15:54:08 +08:00
digua ef71543237 feat(electron): download updates silently
Start stable desktop update downloads in the background during automatic checks, then prompt only after the update is ready to install.

Keep manual update checks interactive so users still confirm the download after explicitly checking.
2026-06-26 14:03:45 +08:00
digua f74aae1bb4 release: v0.28.1 v0.28.1 2026-06-26 10:07:20 +08:00
digua 6cc7454049 fix(electron): preserve socks proxy fallback
Return a recorded SOCKS proxy before a fallback DIRECT rule so local model downloads fail explicitly instead of silently bypassing the configured system proxy.
2026-06-26 09:56:32 +08:00
digua cbc8728f41 fix(electron): resolve model download proxy from session
Make desktop proxy saves await Electron session proxy application before model download proxy resolution.

Resolve HTTP, HTTPS, and SOCKS system proxy rules for semantic index model downloads while preserving DIRECT precedence.
2026-06-26 09:56:32 +08:00
digua f304146c8f fix(semantic-index): honor proxy for local model downloads
Pass a model download proxy through the semantic index worker and local embedding provider so local Hugging Face downloads use the effective proxy.

Restart idle local workers when the proxy changes before preload, build, or search calls, and initialize app logging inside the worker process for preload diagnostics.
2026-06-26 09:56:32 +08:00
digua e5954d8fb1 feat(chat-record): polish viewer controls and highlights 2026-06-25 23:18:11 +08:00
digua 851166188d fix(import): harden push and pull import guards
Combine the PR review fixes for push import validation, deduplication, system sender handling, and pull import lock scoping into one reviewable change.
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 4694d83729 fix(electron): align Desktop API port with CLI, auto-fallback on conflict, update docs
- Change default port from 5200 to 3110 in sync config-manager, Vue store,
  and settings UI to match CLI DEFAULT_API_PORT
- Desktop API server now tries up to 10 consecutive ports when preferred
  port is occupied (e.g. CLI already running); reports actual bound port
- Scope Desktop import route lock to session (Set<string>) matching the
  push-importer fix
- Docs: remove unimplemented JSONL/X-Dry-Run claims, fix port references,
  replace platform-specific examples with generic ones

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 4e2130b2d7 fix(import): address review findings in push import API and pipeline
- Reject path-traversal sessionIds (SAFE_SESSION_ID_RE)
- Reject X-Dry-Run header with 400 instead of silently writing
- Propagate DataDirCompatibilityError as 409 instead of swallowing to 500
- Scope concurrency lock to session instead of process-wide boolean
- Fix hash dedup hole: load hashes for ALL existing messages, not just
  those without platformMessageId
- Fix backfill segment index: detect when written timestamps predate the
  existing tail and use full generateSessionIndex rebuild instead of
  incremental; apply same fix to shared incremental-importer used by
  Desktop and pull sync
- Validate member platformId, message content/platformMessageId types, and
  option enum values in validatePayload before any writes
- Use writeParseResultToDb in fullImport to populate member_name_history;
  pre-deduplicate messages before delegating and auto-create minimal members
  for senders absent from the members list
- Add content-hash to existingKeys when accepting a pmid-keyed row so a
  same-content no-pmid copy later in the same batch is caught

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 3442110c08 feat(ui): hide sidebar scrollbar by default, show on hover
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
digua 75a10c9fed fix(sync): refresh sessions after background pull 2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 1209e2ce4b refactor(import): migrate CLI sync/pull path to shared streaming importer
Removes the legacy apps/cli/src/import/importer.ts (hand-rolled FTS, dedup,
session-ID generation) and apps/cli/src/import/chatlab-reader.ts (buffered
in-memory JSON/JSONL parser). DirectImporter in sync/adapters.ts now calls
streamImport / incrementalImport from stream-import.ts, which use the
@openchatlab/parser streaming pipeline and node-runtime shared logic.

Changes:
- Add sessionId? to StreamImportOptions so callers can fix the target session
  ID instead of auto-generating one (needed by pull engine full-import path)
- Rewrite DirectImporter.incrementalImportFile and fullImportFile to use
  the shared importers; map IncrementalImportResult fields to ImportResult
- Remove legacy exports from apps/cli/src/import/index.ts
- Rewrite importer.test.ts to use streamImport + a temp ChatLab JSON file
  (same two data-dir compatibility gate assertions as before)
- Delete importer.ts and chatlab-reader.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 0f1ea43a11 refactor(electron): remove redundant generateIncrementalSessions calls after incremental import
Session index is now built inside the shared incremental-importer, so the
explicit post-import worker.generateIncrementalSessions(sessionId) calls in
the Desktop layer were no-ops. Remove all four call sites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 467222b68e docs: fix port 5200→3110, replace platform examples, add quick-test curl
- Correct default port from 5200 to 3110 (matches DEFAULT_API_PORT in config)
- Replace platform-specific example identifiers with generic ones to avoid
  trademark concerns; update session IDs, member IDs, and groupId format
- Add a copyable quick-test curl snippet to the import protocol doc (cn + en)
- Expose lastPlatformMessageId and importedAt in sessions/:id doc example
- Remove brand-name references from platform field descriptions in
  chatlab-format.md (kept valid platform identifiers in the enum table)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 ced4ed16bd feat(import): auto-generate session index after all import paths
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>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 2b0013f615 fix(api): expose lastPlatformMessageId and importedAt in GET /api/v1/sessions/:id
Both fields are documented in chatlab-api.md but were missing from the
response. lastPlatformMessageId is used as the incremental import boundary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
diguaandClaude Sonnet 4.6 419b3002c4 feat(import): add POST /api/v1/imports/:sessionId push import API
Implements the Push Import protocol documented in chatlab-import.md.
Creates a new session on first call, appends and deduplicates on
subsequent calls (platformMessageId preferred, content hash fallback).
Adds IMPORT_IN_PROGRESS (409) and IMPORT_FAILED (500) error codes.
Includes a global concurrency lock and incremental session index
generation after each write.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 21:45:16 +08:00
digua a2158cccc4 release: v0.28.0 v0.28.0 2026-06-25 00:12:53 +08:00
diguaandClaude Sonnet 4.6 22771eea37 fix(import): add stream-chain and stream-json to lockfile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 00:11:49 +08:00
diguaandClaude Sonnet 4.6 984fe3df3b fix(import): declare stream-json/stream-chain deps and stop multiChat scan fallthrough
- stream-json and stream-chain were used directly in GoogleChatTakeoutResolver
  but not declared in node-runtime's package.json; fixes module resolution
  failure in non-hoisted installs
- when detectFormat returns multiChat but scanMultiChatFile returns empty,
  the code fell through to single-file import and could silently import the
  first chat; now returns early with an error message in both cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 18:10:30 +08:00
digua fa55b6ee13 docs: add Google Chat to supported platforms in docs 2026-06-24 18:10:30 +08:00