@cerefox/memory 1.14.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7400,7 +7400,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
7400
7400
  });
7401
7401
 
7402
7402
  // src/meta.ts
7403
- var PKG_VERSION = "1.14.0";
7403
+ var PKG_VERSION = "1.14.1";
7404
7404
  var init_meta = () => {};
7405
7405
 
7406
7406
  // ../../_shared/config/paths.ts
@@ -25774,7 +25774,7 @@ var init_bundled_docs = __esm(() => {
25774
25774
  });
25775
25775
 
25776
25776
  // ../../_shared/ef-meta/index.ts
25777
- var EF_VERSION = "1.14.0", CEREFOX_VERSION = "1.14.0", EF_LAST_CHANGED = "1.14.0";
25777
+ var EF_VERSION = "1.14.1", CEREFOX_VERSION = "1.14.1", EF_LAST_CHANGED = "1.14.0";
25778
25778
  var init_ef_meta = () => {};
25779
25779
 
25780
25780
  // ../../_shared/compatibility/index.ts
@@ -85454,10 +85454,15 @@ function registerDiscoveryRoutes(app, ctx) {
85454
85454
  });
85455
85455
  app.get("/api/v1/documents/trash", async (c) => {
85456
85456
  const limit = Math.min(Math.max(Number.parseInt(c.req.query("limit") ?? "50", 10) || 50, 1), 500);
85457
- const { data, error } = await ctx.supabase.from("cerefox_documents").select("id, title, source, chunk_count, total_chars, review_status, deleted_at, updated_at").not("deleted_at", "is", null).order("deleted_at", { ascending: false }).limit(limit);
85457
+ const [listed, counted] = await Promise.all([
85458
+ ctx.supabase.from("cerefox_documents").select("id, title, source, chunk_count, total_chars, review_status, deleted_at, updated_at").not("deleted_at", "is", null).order("deleted_at", { ascending: false }).limit(limit),
85459
+ ctx.supabase.from("cerefox_documents").select("id", { count: "exact", head: true }).not("deleted_at", "is", null)
85460
+ ]);
85461
+ const { data, error } = listed;
85458
85462
  if (error)
85459
85463
  return c.json({ detail: error.message }, 500);
85460
85464
  const docs = data ?? [];
85465
+ c.header("X-Total-Count", String(counted.count ?? docs.length));
85461
85466
  if (docs.length === 0)
85462
85467
  return c.json([]);
85463
85468
  const [projects, showReview] = await Promise.all([