@vue-skuilder/db 0.1.31 → 0.1.32-a
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/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/study/SessionController.ts +8 -0
- package/src/study/services/ResponseProcessor.ts +22 -2
package/dist/index.mjs
CHANGED
|
@@ -9319,8 +9319,9 @@ var ResponseProcessor = class {
|
|
|
9319
9319
|
}
|
|
9320
9320
|
try {
|
|
9321
9321
|
const history = await cardHistory;
|
|
9322
|
+
let result;
|
|
9322
9323
|
if (cardRecord.isCorrect) {
|
|
9323
|
-
|
|
9324
|
+
result = this.processCorrectResponse(
|
|
9324
9325
|
cardRecord,
|
|
9325
9326
|
history,
|
|
9326
9327
|
studySessionItem,
|
|
@@ -9330,7 +9331,7 @@ var ResponseProcessor = class {
|
|
|
9330
9331
|
cardId
|
|
9331
9332
|
);
|
|
9332
9333
|
} else {
|
|
9333
|
-
|
|
9334
|
+
result = this.processIncorrectResponse(
|
|
9334
9335
|
cardRecord,
|
|
9335
9336
|
history,
|
|
9336
9337
|
courseRegistrationDoc,
|
|
@@ -9342,6 +9343,18 @@ var ResponseProcessor = class {
|
|
|
9342
9343
|
sessionViews
|
|
9343
9344
|
);
|
|
9344
9345
|
}
|
|
9346
|
+
if (cardRecord.deferAdvance && result.shouldLoadNextCard) {
|
|
9347
|
+
logger.info(
|
|
9348
|
+
"[ResponseProcessor] deferAdvance requested \u2014 suppressing navigation, action stashed:",
|
|
9349
|
+
{ nextCardAction: result.nextCardAction }
|
|
9350
|
+
);
|
|
9351
|
+
result = {
|
|
9352
|
+
...result,
|
|
9353
|
+
shouldLoadNextCard: false,
|
|
9354
|
+
deferred: true
|
|
9355
|
+
};
|
|
9356
|
+
}
|
|
9357
|
+
return result;
|
|
9345
9358
|
} catch (e) {
|
|
9346
9359
|
logger.error("[ResponseProcessor] Failed to load card history", { e, cardId });
|
|
9347
9360
|
throw e;
|