@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.
- package/dist/core/index.js +80 -21
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +80 -21
- package/dist/core/index.mjs.map +1 -1
- package/dist/impl/couch/index.d.cts +32 -0
- package/dist/impl/couch/index.d.ts +32 -0
- package/dist/impl/couch/index.js +80 -21
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +80 -21
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.js +8 -5
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +8 -5
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +94 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -22
- package/dist/index.mjs.map +1 -1
- package/docs/session-lifecycle-and-replan.md +418 -0
- package/package.json +3 -3
- package/src/core/UserDBDebugger.ts +7 -1
- package/src/core/navigators/Pipeline.ts +4 -0
- package/src/core/navigators/generators/elo.ts +19 -6
- package/src/core/navigators/generators/srs.ts +10 -0
- package/src/impl/couch/courseDB.ts +146 -17
- package/src/study/SessionController.ts +56 -1
- package/src/study/services/CardHydrationService.ts +24 -0
|
@@ -1632,10 +1632,8 @@ var init_elo = __esm({
|
|
|
1632
1632
|
{ limit, elo: "user" },
|
|
1633
1633
|
(c) => !activeCards.some((ac) => c.cardID === ac.cardID)
|
|
1634
1634
|
)).map((c) => ({ ...c, status: "new" }));
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1637
|
-
const scored = newCards.map((c, i) => {
|
|
1638
|
-
const cardElo = cardEloData[i]?.global?.score ?? 1e3;
|
|
1635
|
+
const scored = newCards.map((c) => {
|
|
1636
|
+
const cardElo = c.elo ?? 1e3;
|
|
1639
1637
|
const distance = Math.abs(cardElo - userGlobalElo);
|
|
1640
1638
|
const rawScore = Math.max(0, 1 - distance / 500);
|
|
1641
1639
|
const samplingKey = rawScore > 0 ? Math.random() ** (1 / rawScore) : 0;
|
|
@@ -6185,9 +6183,14 @@ var init_UserDBDebugger = __esm({
|
|
|
6185
6183
|
*/
|
|
6186
6184
|
async showScheduledReviews(courseId) {
|
|
6187
6185
|
const userDB = getUserDB();
|
|
6188
|
-
if (!userDB)
|
|
6186
|
+
if (!userDB) {
|
|
6187
|
+
logger.info("[UserDB Debug] Data layer not available");
|
|
6188
|
+
return;
|
|
6189
|
+
}
|
|
6190
|
+
logger.info(`[UserDB Debug] Fetching pending reviews${courseId ? ` for course: ${courseId}` : ""}...`);
|
|
6189
6191
|
try {
|
|
6190
6192
|
const reviews = await userDB.getPendingReviews(courseId);
|
|
6193
|
+
logger.info(`[UserDB Debug] Got ${reviews.length} reviews`);
|
|
6191
6194
|
console.group(`\u{1F4C5} Scheduled Reviews${courseId ? ` (${courseId})` : ""}`);
|
|
6192
6195
|
logger.info(`Total: ${reviews.length}`);
|
|
6193
6196
|
if (reviews.length > 0) {
|