From 1568fe903d469ac4c6e6b978e96549f2c88ac6fd Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 27 Apr 2025 02:05:09 +0000 Subject: fix(mcp): Fix spacing around the bookmarks --- apps/mcp/src/utils.ts | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'apps/mcp/src/utils.ts') diff --git a/apps/mcp/src/utils.ts b/apps/mcp/src/utils.ts index 6d7d8ad5..f34383ea 100644 --- a/apps/mcp/src/utils.ts +++ b/apps/mcp/src/utils.ts @@ -21,33 +21,25 @@ export function compactBookmark( ): string { let content: string; if (bookmark.content.type === "link") { - content = ` -Bookmark type: link -urk: ${bookmark.content.url} + content = `Bookmark type: link +Bookmarked URL: ${bookmark.content.url} description: ${bookmark.content.description ?? ""} author: ${bookmark.content.author ?? ""} publisher: ${bookmark.content.publisher ?? ""} `; } else if (bookmark.content.type === "text") { - content = ` - Bookmark type: text - Source URL: ${bookmark.content.sourceUrl ?? ""} -`; + content = `Bookmark type: text + Source URL: ${bookmark.content.sourceUrl ?? ""}`; } else if (bookmark.content.type === "asset") { - content = ` -Bookmark type: media + content = `Bookmark type: media Asset ID: ${bookmark.content.assetId} Asset type: ${bookmark.content.assetType} -Source URL: ${bookmark.content.sourceUrl ?? ""} -`; +Source URL: ${bookmark.content.sourceUrl ?? ""}`; } else { - content = ` -Bookmark type: unknown -`; + content = `Bookmark type: unknown`; } - return ` - Bookmark ID: ${bookmark.id} + return `Bookmark ID: ${bookmark.id} Created at: ${bookmark.createdAt} Title: ${ bookmark.title @@ -57,6 +49,5 @@ Bookmark type: unknown Summary: ${bookmark.summary ?? ""} Note: ${bookmark.note ?? ""} ${content} - Tags: ${bookmark.tags.map((t) => t.name).join(", ")} - `; + Tags: ${bookmark.tags.map((t) => t.name).join(", ")}`; } -- cgit v1.2.3-70-g09d2