-
Notifications
You must be signed in to change notification settings - Fork 152
feat : add auto container tags feature to claude supermemory #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
73fdce0
b42a27c
7856c9b
0d89ac4
2e043e3
60f3e8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // Parses --container <tag> from argv; remaining args become the content. | ||
| function parseMemoryArgs(args) { | ||
| let containerTag = null; | ||
| const contentParts = []; | ||
|
|
||
| for (let i = 0; i < args.length; i++) { | ||
| if (args[i] === '--container' && i + 1 < args.length) { | ||
| containerTag = args[++i]; | ||
| } else { | ||
| contentParts.push(args[i]); | ||
| } | ||
| } | ||
|
|
||
| return { content: contentParts.join(' '), containerTag }; | ||
| } | ||
|
|
||
| // Parses --user/--repo/--both/--container <tag> from argv; remaining args become the query. | ||
| function parseSearchArgs(args) { | ||
| let containerType = 'both'; | ||
| let containerTag = null; | ||
| const queryParts = []; | ||
|
|
||
| for (let i = 0; i < args.length; i++) { | ||
| if (args[i] === '--user') { | ||
| containerType = 'user'; | ||
| } else if (args[i] === '--repo') { | ||
| containerType = 'repo'; | ||
| } else if (args[i] === '--both') { | ||
| containerType = 'both'; | ||
| } else if (args[i] === '--container' && i + 1 < args.length) { | ||
| containerTag = args[++i]; | ||
| containerType = 'custom'; | ||
| } else { | ||
| queryParts.push(args[i]); | ||
| } | ||
| } | ||
|
|
||
| return { containerType, query: queryParts.join(' '), containerTag }; | ||
| } | ||
|
|
||
| module.exports = { parseMemoryArgs, parseSearchArgs }; |
Uh oh!
There was an error while loading. Please reload this page.