@vue-skuilder/db 0.2.0 → 0.2.2

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.
@@ -1608,10 +1608,8 @@ var init_elo = __esm({
1608
1608
  { limit, elo: "user" },
1609
1609
  (c) => !activeCards.some((ac) => c.cardID === ac.cardID)
1610
1610
  )).map((c) => ({ ...c, status: "new" }));
1611
- const cardIds = newCards.map((c) => c.cardID);
1612
- const cardEloData = await this.course.getCardEloData(cardIds);
1613
- const scored = newCards.map((c, i) => {
1614
- const cardElo = cardEloData[i]?.global?.score ?? 1e3;
1611
+ const scored = newCards.map((c) => {
1612
+ const cardElo = c.elo ?? 1e3;
1615
1613
  const distance = Math.abs(cardElo - userGlobalElo);
1616
1614
  const rawScore = Math.max(0, 1 - distance / 500);
1617
1615
  const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
@@ -6159,9 +6157,14 @@ var init_UserDBDebugger = __esm({
6159
6157
  */
6160
6158
  async showScheduledReviews(courseId) {
6161
6159
  const userDB = getUserDB();
6162
- if (!userDB) return;
6160
+ if (!userDB) {
6161
+ logger.info("[UserDB Debug] Data layer not available");
6162
+ return;
6163
+ }
6164
+ logger.info(`[UserDB Debug] Fetching pending reviews${courseId ? ` for course: ${courseId}` : ""}...`);
6163
6165
  try {
6164
6166
  const reviews = await userDB.getPendingReviews(courseId);
6167
+ logger.info(`[UserDB Debug] Got ${reviews.length} reviews`);
6165
6168
  console.group(`\u{1F4C5} Scheduled Reviews${courseId ? ` (${courseId})` : ""}`);
6166
6169
  logger.info(`Total: ${reviews.length}`);
6167
6170
  if (reviews.length > 0) {