feat : add auto container tags feature to claude supermemory#45
Conversation
- Extract getResolvedContainers() shared helper in settings.js to eliminate duplicated config-loading logic between getContainerCatalog and validateContainerTag - Fix inconsistent no-memories output in context-hook.js: always show the no-memories message alongside error notices, regardless of containerCatalog - Change \s* to \n* in summary-hook.js regexes to avoid collapsing meaningful whitespace inside memory content - Extract parseMemoryArgs/parseSearchArgs into src/lib/parse-args.js to remove copy-pasted parseArgs across add-memory.js, save-project-memory.js, search-memory.js - Fix misleading default container tag in search-memory.js custom path
|
@claude pls review this |
|
Claude finished @ved015's task in 2m 52s —— View job PR Review: Auto Container Tags FeatureTasks:
OverviewThis PR adds a solid, well-structured feature for routing memories to named containers. The implementation is clean overall. I also verified that most of the issues raised in the vorflux review have already been addressed in the Previously Raised Issues (Vorflux Review) — Status Check
New Issues Found1. Medium — Auto-save in
// summary-hook.js:82-84 — always saves to default personal tag
const containerTag = getContainerTag(cwd);
// ...
await client.addMemory(cleanedContent, containerTag, ...);The feature description promises "intelligently route memories to specific containers" — but the auto-save on session stop doesn't do this. Only explicit 2. Minor — Duplicate container entries possible in
const containers = [...globalContainers, ...projectContainers].filter(...)If the same const allContainers = [...globalContainers, ...projectContainers];
const seen = new Set();
const containers = allContainers.filter(c => {
if (!c || typeof c.tag !== 'string' || typeof c.description !== 'string') return false;
if (seen.has(c.tag)) return false;
seen.add(c.tag);
return true;
});3. Minor — Redundant tag argument in
const client = new SupermemoryClient(apiKey, effectiveTag); // sets default tag
const result = await client.addMemory(content, effectiveTag, ...); // overrides it anywaySame pattern exists in 4. Minor — Still misleading in const defaultTag = containerType === 'custom' ? containerTag : personalTag;
const client = new SupermemoryClient(apiKey, defaultTag); // sets containerTag as default...
// ...
const result = await client.search(query, containerTag, ...); // ...but never uses itIn the custom path, 5. Informational — No test coverage for new logic The container validation, resolution, and catalog generation in What Works Well
Overall this is a solid, well-motivated feature. The main concern worth addressing before merge is clarifying the auto-save limitation in |
- summary-hook.js: add TODO comment documenting that auto-save on session stop always routes to the default personal container; custom container routing only works via explicit /add-memory --container calls - settings.js: deduplicate containers by tag in getResolvedContainers so if the same tag appears in both global and project config, the project config entry wins (Map-based merge, last-write wins)
|
@MaheshtheDev i have fixed the suggestions its ready for another round of review |
MaheshtheDev
left a comment
There was a problem hiding this comment.
don't we need to update the package version?
Yes done! |
Summary
This PR introduces Auto Container Tags allowing users to define custom memory buckets (e.g.,
work,personal,code_style) and giving the AI the ability to intelligently route memories to specific containers based on plain-English descriptions and doesnt just bulk a single space with everythingClaude use the specific containe tag to search and retrieve memories it also adds memory and routes to the specific container itself
Claude memories saved alongside with codex memories in the code_preferences container
Work and code_preferences space created on the dashboard