Skip to content

feat(desktop): multilingual memory retrieval, archive, and management panel (PR 0007) - #169

Merged
MagicCube merged 2 commits into
deer-flow:mainfrom
tokg-venv:pr/0007-memory-retrieval-and-storage
Sep 9, 2026
Merged

feat(desktop): multilingual memory retrieval, archive, and management panel (PR 0007)#169
MagicCube merged 2 commits into
deer-flow:mainfrom
tokg-venv:pr/0007-memory-retrieval-and-storage

Conversation

@tokg-venv

Copy link
Copy Markdown
Contributor

Summary

Implements spec 0007: upgrade the built-in memory plugin (1.0 → 1.1.0) and add a Settings panel to browse/manage the machine-wide store.

Plugin engine (bun/plugins/memory-plugin-files.ts, self-contained embedded scripts):

  • Script-aware tokenization (Unicode script classes, Intl.Segmenter for CJK with bigram fallback, per-script normalization) so Chinese/Japanese/Korean/Arabic/Russian/Thai/Hebrew memories are retrievable.
  • Scoring: coverage + whole-term match, origin weighting, 90-day time decay with a floor, optional project boost; scope parameter.
  • memory_save: optional id for upsert, normalized dedupe/near-duplicate detection (Jaccard), overflow moves to an archive file instead of being dropped, context.notify on changes.
  • Archive file (memories.archive.jsonl) with count + clear entry points; package bumped to 1.1.0 with config.schema.json knobs.

Bun-side store + RPC (bun/memory/index.ts, shared/memory.ts, client/memory.ts):

  • list/delete/update/export/clearArchive over the JSONL store; every mutation re-reads before writing so concurrent plugin writes survive.
  • DesktopRPCType: memoryList / memoryDelete / memoryUpdate / memoryExport / memoryClearArchive.

UI

  • Settings → Memory page: search, project filter, usage/quota, archived count, show/hide/edit/delete with explicit confirms, export, clear archive (en/zh).

Test plan

  • seed.test.ts extended: multilingual recall, bigram fallback, dedupe, upsert, archive, boost, decay, upgrade path — 20 plugin tests pass.
  • Full apps/desktop + packages/ui suites (439 tests) pass; typecheck:changed / lint:changed clean.

Notes

  • Thresholds (coverage ≥ 0.5, projectBoost +4, halfLife 90d, Jaccard ≥ 0.9) are initial values and are exposed via config.schema.json for tuning.
  • Export writes an unencrypted JSON beside the store; the panel surfaces explicit confirmations for export/delete/clear-archive.

zcai7675-bot added 2 commits September 8, 2026 21:15
…val, archive, and management panel (PR 0007)

Upgrade the built-in memory plugin (1.0 -> 1.1.0) and add a Settings panel
to browse/manage the machine-wide store.

Plugin engine (bun/plugins/memory-plugin-files.ts, self-contained scripts):
- Script-aware tokenization (Unicode script classes, Intl.Segmenter for
  CJK with bigram fallback, per-script normalization) so Chinese/Japanese/
  Korean/Arabic/Russian/Thai/Hebrew memories are retrievable.
- Scoring: coverage + whole-term match, origin weighting, 90-day time
  decay with a floor, optional project boost; scope parameter.
- memory_save: optional id for upsert, normalized dedupe/near-duplicate
  detection (Jaccard), overflow moves to an archive file instead of being
  dropped, context.notify on changes.
- Archive file (memories.archive.jsonl) with count + clear entry points;
  package bumped to 1.1.0 with config.schema.json knobs.

Bun-side store + RPC (bun/memory/index.ts, shared/memory.ts):
- list/delete/update/export/clearArchive over the JSONL store; every
  mutation re-reads before writing so concurrent plugin writes survive.
- DesktopRPCType: memoryList/memoryDelete/memoryUpdate/memoryExport/
  memoryClearArchive; client/memory.ts wrappers.

UI:
- Settings -> Memory page: search, project filter, usage/quota, archived
  count, show/hide/edit/delete with confirms, export, clear archive (en/zh).

Tests: seed.test.ts extended (multilingual recall, bigram, dedupe, upsert,
archive, boost, decay, upgrade path).
…R 0007)

memory-page.tsx imports useVirtualizer from @tanstack/react-virtual, but
the dependency was only declared in packages/ui. With hoisted workspace
install it worked locally, but CI's typed eslint run resolves imports
per-package and reported 14 'error typed value' / unsafe-* errors on
memory-page.tsx. Declare the catalog dependency so module types resolve.

Verified: full-repo 'bun run lint' (eslint .) and full typecheck pass.
@MagicCube
MagicCube merged commit 5950fe8 into deer-flow:main Sep 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants