aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/utils
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2026-02-09 00:09:10 +0000
committerGitHub <noreply@github.com>2026-02-09 00:09:10 +0000
commit4186c4c64c68892248ce8671d9b8e67fc7f884a0 (patch)
tree91bbbfc0bb47a966b9e340fdbe2a61b2e10ebd19 /packages/shared/utils
parent77b186c3a599297da0cf19e923c66607ad7d74e7 (diff)
downloadkarakeep-4186c4c64c68892248ce8671d9b8e67fc7f884a0.tar.zst
feat(ai): Support restricting AI tags to a subset of existing tags (#2444)
* feat(ai): Support restricting AI tags to a subset of existing tags Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'packages/shared/utils')
-rw-r--r--packages/shared/utils/tag.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/shared/utils/tag.ts b/packages/shared/utils/tag.ts
index 4dc7c696..b69b817e 100644
--- a/packages/shared/utils/tag.ts
+++ b/packages/shared/utils/tag.ts
@@ -28,3 +28,10 @@ export function getTagStylePrompt(style: TagStyle): string {
return "";
}
}
+
+export function getCuratedTagsPrompt(curatedTags?: string[]): string {
+ if (curatedTags && curatedTags.length > 0) {
+ return `- ONLY use tags from this predefined list: [${curatedTags.join(", ")}]. Do not create any new tags outside this list. If no tags fit, don't emit any.`;
+ }
+ return "";
+}