Skip to content

Commit

Permalink
Loosen requirement on tag match
Browse files Browse the repository at this point in the history
  • Loading branch information
tedspare committed Oct 28, 2024
1 parent 5b7b39f commit ccf3d10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit ccf3d10

Please sign in to comment.