aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cli/src/commands/lists.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-01-02 13:00:58 +0200
committerGitHub <noreply@github.com>2025-01-02 13:00:58 +0200
commit5ecdc36b7d60aa66b49e01e9fec8ba61ad537376 (patch)
tree57577822bb104b95900ba577a265fb4f8cf70b78 /apps/cli/src/commands/lists.ts
parent5df0258b2cd884347eabfa866d7e7fbc7225cdb3 (diff)
downloadkarakeep-5ecdc36b7d60aa66b49e01e9fec8ba61ad537376.tar.zst
feat: Add support for smart lists (#802)
* feat: Add support for smart lists * i18n * Fix update list endpoint * Add a test for smart lists * Add header to the query explainer * Hide remove from lists in the smart context list * Add proper validation to list form --------- Co-authored-by: Deepak Kapoor <41769111+orthdron@users.noreply.github.com>
Diffstat (limited to 'apps/cli/src/commands/lists.ts')
-rw-r--r--apps/cli/src/commands/lists.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/cli/src/commands/lists.ts b/apps/cli/src/commands/lists.ts
index 4b157cdf..57b6d948 100644
--- a/apps/cli/src/commands/lists.ts
+++ b/apps/cli/src/commands/lists.ts
@@ -89,9 +89,17 @@ listsCmd
.action(async (opts) => {
const api = getAPIClient();
try {
- const results = await api.lists.get.query({ listId: opts.list });
+ let resp = await api.bookmarks.getBookmarks.query({ listId: opts.list });
+ let results: string[] = resp.bookmarks.map((b) => b.id);
+ while (resp.nextCursor) {
+ resp = await api.bookmarks.getBookmarks.query({
+ listId: opts.list,
+ cursor: resp.nextCursor,
+ });
+ results = [...results, ...resp.bookmarks.map((b) => b.id)];
+ }
- printObject(results.bookmarks);
+ printObject(results);
} catch (error) {
printErrorMessageWithReason(
"Failed to get the ids of the bookmarks in the list",