Spaces:
Configuration error

Yash030 commited on
Commit
dc238fd
Β·
1 Parent(s): bbea853

feat: dedup observations, fix dashboard buttons, add per-obs delete

Browse files

- Add SHA-256 content fingerprint dedup to folder_observe() β€” identical
text from the same (folder, agent) pair returns existing obs ID without
writing a duplicate. Per-pair threading.Lock prevents TOCTOU races.

- Add dedup_folder_observations() to clean up existing duplicates across
one or all (folder, agent) pairs, rebuilding the dedup index after.

- Add POST /agentmemory/folder/dedup REST endpoint (auth-gated).

- Add memory_dedup MCP tool (schema + dispatch).

- Viewer: fix Back/Delete-folder buttons to use data-action delegation
instead of fragile inline onclick with escaped string args.

- Viewer: add per-observation Delete button on each card in folder detail.

- Viewer: add Select-all checkbox + bulk Delete-selected with single
POST /forget call; cards removed from DOM without reload.

- Viewer: add one-click Dedup button in folder detail toolbar.

- Viewer: fix Tools tab TypeError β€” raw fetch() replaces apiFetchRaw()
so .text() is called on the Response object, not a parsed JS object.

8 files changed +748 -77
Files changed (8)
.kiro/specs/dedup-and-dashboard-fixes/design.mdAdded+150
.kiro/specs/dedup-and-dashboard-fixes/requirements.mdAdded+56
.kiro/specs/dedup-and-dashboard-fixes/tasks.mdAdded+95
src/functions.py+180-57
src/routes/mcp.py+19
src/routes/observations.py+28
src/storage/scopes.py+10
src/viewer/index.html+210-20