mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-20 06:29:37 +08:00
## Stack Context Part 3 (top) of a 3-PR stack moving memory deduplication into the SDKs. See `sdk-dedup/tools-ts` for full context. ## What? Update the SDK playground so its debug view reflects the SDK-owned memory block. - Displays the current deduplicated `<supermemory>` replacement block produced by the SDK middleware, instead of the old browser-side "seen facts" delta. - Adds a `memory-dedupe` helper and ignores local `*.tsbuildinfo`. ## Why? The previous debug cards were misleading — they showed an incremental browser-filtered delta while the middleware actually re-injected the full profile. Now the visualization matches what the SDK really sends. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Playground-only visualization and chat gating changes; no production SDK or API behavior. > > **Overview** > The playground **debug trace** now shows the **deduplicated memory block** the SDK middleware would inject (static → dynamic → search, mode-aware), instead of a misleading browser-side “new facts” delta. A new **`memory-dedupe`** helper mirrors `@supermemory/tools` middleware behavior and is applied when fetching container context and building middleware memory debug entries; the context preview card is relabeled to reflect that each turn **replaces** the prior `<supermemory>` block. > > **Chat UX:** messaging is enabled when API keys are configured on the **server** (`hasSupermemoryKey` / `hasOpenAiKey` from `/api/chat`), not only when keys are typed in the panel. The message input stays editable while waiting for text; Send still requires non-empty input. > > Also ignores `*.tsbuildinfo` in `.gitignore`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ed15364eb306534b4ef8a2c597997fa4fee7e439. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->