From f00287ede0675521c783c1199675538571f977d6 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Mon, 29 Dec 2025 23:35:28 +0000 Subject: refactor: reduce duplication in compare-models tool --- tools/compare-models/src/apiClient.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/compare-models/src/apiClient.ts') diff --git a/tools/compare-models/src/apiClient.ts b/tools/compare-models/src/apiClient.ts index f3a960cb..1d9f799d 100644 --- a/tools/compare-models/src/apiClient.ts +++ b/tools/compare-models/src/apiClient.ts @@ -53,7 +53,13 @@ export class KarakeepAPIClient { const batchBookmarks = (data?.bookmarks || []) .filter((b) => b.content?.type === "link") - .map((b) => b as Bookmark); + .map((b) => ({ + ...b, + tags: (b.tags || []).map((tag) => ({ + name: tag.name, + attachedBy: tag.attachedBy, + })), + })) as Bookmark[]; bookmarks.push(...batchBookmarks); cursor = data?.nextCursor || null; -- cgit v1.2.3-70-g09d2