From ccf3d1017776a11ffa735a9129eec3ed6f205e82 Mon Sep 17 00:00:00 2001 From: tedspare Date: Mon, 28 Oct 2024 13:38:17 -0400 Subject: [PATCH] Loosen requirement on tag match --- CHANGELOG.md | 1 + package.json | 2 +- src/index.ts | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a45f673..d739eeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- [2024-10-28] [Loosen requirement on tag match](https://github.com/RubricLab/memory/commit/691545e6a012c6f0a7263dbc4d2ceff9837dc3fd) - [2024-10-24] [add notify-monorepo action](https://github.com/RubricLab/memory/commit/53d286bb680f8785ebd63806f5bc2a4514ec9bbc) - [2024-10-22] [Bun x kysely codegen](https://github.com/RubricLab/memory/commit/d0dfa75f9bc720454301e751d91bf8410e7d60f5) - [2024-10-22] [DB generate on postinstall](https://github.com/RubricLab/memory/commit/2aef7c241b719d7baba6dc5daef6d53407540b60) diff --git a/package.json b/package.json index 71c93f6..0fa81bf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@rubriclab/memory", "module": "src/index.ts", "main": "src/index.ts", - "version": "0.0.43", + "version": "0.0.44", "private": false, "type": "module", "devDependencies": { diff --git a/src/index.ts b/src/index.ts index 52e4941..d71af78 100644 --- a/src/index.ts +++ b/src/index.ts @@ -229,7 +229,9 @@ export class Memory { const uniqueSimilarTagIds = Array.from(new Set(similarTags.map(s => s.tagId))) console.log('similarTags', similarTags) - const netNewTags = uniqueTags.filter(t => !similarTags.some(s => s?.tagBody === t)) + const netNewTags = uniqueTags.filter( + t => !similarTags.some(s => s?.tagBody.toLowerCase() === t.toLowerCase()) + ) console.log('netNewTags', netNewTags) const tagsInserted = await this.insert({ tags: netNewTags }, { userId })