mirror of
https://github.com/mksglu/context-mode.git
synced 2026-09-19 03:27:16 +08:00
46796db1b0
formatReport now accepts an optional `multiAdapter: MultiAdapterLifetimeStats` opt (Engineer #74's getMultiAdapterLifetimeStats output). When supplied: 3.2 — emits "Where it came from (tools you actually used — fixtures + probes filtered):" sub-block with per-adapter rows showing Captures / Indexed / Total kept out, marketing labels instead of raw IDs, sorted by total bytes desc, em-dash for zero captures (matches Mert-approved demo design). 3.3 — adds a "Skipped (N): name1, name2, ..." disclosure line under the table for adapters that have DBs on disk but failed the isReal filter (event count / project count / recency / avg bytes), with the "no real chat activity" rationale. 3.4 — opening tagline switches to "across N AI tools" when >= 2 real adapters are present, falls back to "in {marketing-label}" when only one. Days-since-first-event prefix when known. 3.5 — backward compat preserved: when `multiAdapter` is omitted the renderer's output is byte-identical to before. No load-bearing display strings touched in tests/session/stats-output-format.test.ts. 3.6 — "All your work" header is promoted to "All your work everywhere" and pulls totalEvents / totalSessions from the multi-adapter sums when supplied, so the receipt scope matches the rendered per-adapter breakdown. Wiring lives in all three formatReport paths (active session, fresh session, per-conversation) so behaviour is consistent regardless of which branch executes. Test coverage: tests/session/multi-adapter-render.test.ts (8 new tests, all GREEN). Engineer #74's tests/session/multi-adapter-stats.test.ts keeps passing untouched (16 tests). Full suite: 2546 passing (+28 vs baseline 2518), 12 failing (same 12 pre-existing baseline), 20 skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9.3 KiB
9.3 KiB