@vue-skuilder/db 0.2.30 → 0.2.31
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/{contentSource-CqJmbOZN.d.ts → contentSource-DMduBjDC.d.ts} +19 -4
- package/dist/{contentSource-B6FrSihy.d.cts → contentSource-Doh1aVBJ.d.cts} +19 -4
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +88 -76
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +40 -27
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-DUxDqMtZ.d.cts → dataLayerProvider-BW1CBAbb.d.cts} +1 -1
- package/dist/{dataLayerProvider-B9_UCvkR.d.ts → dataLayerProvider-Cxfe4nSK.d.ts} +1 -1
- package/dist/diagnostics/index.d.cts +18 -3
- package/dist/diagnostics/index.d.ts +18 -3
- package/dist/diagnostics/index.js +159 -135
- package/dist/diagnostics/index.js.map +1 -1
- package/dist/diagnostics/index.mjs +156 -135
- package/dist/diagnostics/index.mjs.map +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +92 -80
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +40 -27
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +79 -67
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +40 -27
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +141 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/navigators/PipelineDebugger.ts +42 -23
- package/src/core/navigators/filters/eloDistance.ts +7 -8
- package/src/core/navigators/generators/elo.ts +8 -2
- package/src/core/navigators/generators/prescribed.ts +7 -5
- package/src/core/types/studySession.ts +12 -1
- package/src/diagnostics/derive.ts +5 -2
- package/src/diagnostics/pipeline.ts +28 -0
- package/src/diagnostics/text.ts +11 -4
- package/src/study/SessionController.ts +3 -1
- package/src/study/services/EloService.ts +33 -6
|
@@ -748,13 +748,12 @@ function clearRunHistory() {
|
|
|
748
748
|
_pendingRuns = [];
|
|
749
749
|
}
|
|
750
750
|
function getOrigin(card) {
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
return "unknown";
|
|
751
|
+
return card.reviewID ? "review" : "new";
|
|
752
|
+
}
|
|
753
|
+
function requiredBy(card) {
|
|
754
|
+
return card.provenance.find(
|
|
755
|
+
(p) => p.strategy === "ephemeralHint" && p.score === Number.POSITIVE_INFINITY
|
|
756
|
+
)?.strategyName;
|
|
758
757
|
}
|
|
759
758
|
function captureRun(report) {
|
|
760
759
|
const fullReport = {
|
|
@@ -778,17 +777,23 @@ function parseCardElo(provenance) {
|
|
|
778
777
|
}
|
|
779
778
|
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards, regulators) {
|
|
780
779
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
781
|
-
const toReport = (card) =>
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
780
|
+
const toReport = (card) => {
|
|
781
|
+
const required = requiredBy(card);
|
|
782
|
+
const first = card.provenance[0];
|
|
783
|
+
const generator = first && first.strategy !== "ephemeralHint" ? first.strategyName || first.strategy : void 0;
|
|
784
|
+
return {
|
|
785
|
+
cardId: card.cardId,
|
|
786
|
+
courseId: card.courseId,
|
|
787
|
+
origin: getOrigin(card),
|
|
788
|
+
...generator ? { generator } : {},
|
|
789
|
+
...required ? { required } : {},
|
|
790
|
+
finalScore: card.score,
|
|
791
|
+
cardElo: card.cardElo ?? parseCardElo(card.provenance),
|
|
792
|
+
provenance: card.provenance,
|
|
793
|
+
tags: card.tags,
|
|
794
|
+
selected: selectedIds.has(card.cardId)
|
|
795
|
+
};
|
|
796
|
+
};
|
|
792
797
|
const selectedReported = [];
|
|
793
798
|
const nearMissReported = [];
|
|
794
799
|
const discardedTailCards = [];
|
|
@@ -1917,10 +1922,14 @@ var init_elo = __esm({
|
|
|
1917
1922
|
const userElo = toCourseElo2(courseReg.elo);
|
|
1918
1923
|
userGlobalElo = userElo.global.score;
|
|
1919
1924
|
}
|
|
1920
|
-
const activeCards = await
|
|
1925
|
+
const [activeCards, seenCards] = await Promise.all([
|
|
1926
|
+
this.user.getActiveCards(),
|
|
1927
|
+
this.user.getSeenCards(this.course.getCourseID()).catch(() => [])
|
|
1928
|
+
]);
|
|
1929
|
+
const notNew = /* @__PURE__ */ new Set([...activeCards.map((ac) => ac.cardID), ...seenCards]);
|
|
1921
1930
|
const newCards = (await this.course.getCardsCenteredAtELO(
|
|
1922
1931
|
{ limit, elo: "user" },
|
|
1923
|
-
(c) => !
|
|
1932
|
+
(c) => !notNew.has(c.cardID)
|
|
1924
1933
|
)).map((c) => ({ ...c, status: "new" }));
|
|
1925
1934
|
const scored = newCards.map((c) => {
|
|
1926
1935
|
const cardElo = c.elo ?? 1e3;
|
|
@@ -1973,6 +1982,7 @@ __export(prescribed_exports, {
|
|
|
1973
1982
|
default: () => PrescribedCardsGenerator,
|
|
1974
1983
|
unmetIntroExposeTags: () => unmetIntroExposeTags
|
|
1975
1984
|
});
|
|
1985
|
+
import { tagRole, withTagRole } from "@vue-skuilder/common";
|
|
1976
1986
|
function dedupe(arr) {
|
|
1977
1987
|
return [...new Set(arr)];
|
|
1978
1988
|
}
|
|
@@ -2013,11 +2023,11 @@ function formatAge(ms) {
|
|
|
2013
2023
|
}
|
|
2014
2024
|
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
2015
2025
|
if (minCount <= 0) return [];
|
|
2016
|
-
const exposeTags = new Set(tags.filter((tag) => tag
|
|
2026
|
+
const exposeTags = new Set(tags.filter((tag) => tagRole(tag) === "expose"));
|
|
2017
2027
|
for (const tag of tags) {
|
|
2018
|
-
if (
|
|
2019
|
-
const
|
|
2020
|
-
if (
|
|
2028
|
+
if (tagRole(tag) !== "intro") continue;
|
|
2029
|
+
const expose = withTagRole(tag, "expose");
|
|
2030
|
+
if (expose) exposeTags.add(expose);
|
|
2021
2031
|
}
|
|
2022
2032
|
return [...exposeTags].filter((tag) => {
|
|
2023
2033
|
const tagElo = userTagElo[tag];
|
|
@@ -3219,6 +3229,7 @@ __export(eloDistance_exports, {
|
|
|
3219
3229
|
mountMultiDimEloToggle: () => mountMultiDimEloToggle,
|
|
3220
3230
|
tagAwareGap: () => tagAwareGap
|
|
3221
3231
|
});
|
|
3232
|
+
import { COUNT_ONLY_SCORE, isCountOnlyTag } from "@vue-skuilder/common";
|
|
3222
3233
|
function computeMultiplier(distance, halfLife, minMultiplier, maxMultiplier) {
|
|
3223
3234
|
const normalizedDistance = distance / halfLife;
|
|
3224
3235
|
const decay = Math.exp(-(normalizedDistance * normalizedDistance));
|
|
@@ -3261,7 +3272,9 @@ function tagAwareGap(cardTags, cardElo, userElo, minTagCount) {
|
|
|
3261
3272
|
const tags = [];
|
|
3262
3273
|
for (const tag of cardTags) {
|
|
3263
3274
|
const user = userElo.tags[tag];
|
|
3264
|
-
if (!user || user.score ===
|
|
3275
|
+
if (isCountOnlyTag(tag) || !user || user.score === COUNT_ONLY_SCORE || user.count < minTagCount) {
|
|
3276
|
+
continue;
|
|
3277
|
+
}
|
|
3265
3278
|
const card = cardElo.tags[tag]?.score ?? cardElo.global.score;
|
|
3266
3279
|
tags.push({
|
|
3267
3280
|
tag,
|
|
@@ -3333,7 +3346,7 @@ function createEloDistanceFilter(config) {
|
|
|
3333
3346
|
transform: (cards, context) => applyEloDistance(cards, context, resolved, source)
|
|
3334
3347
|
};
|
|
3335
3348
|
}
|
|
3336
|
-
var DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF,
|
|
3349
|
+
var DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF, DEFAULT_CARD_ELO, MULTI_DIM_ELO_KEY, multiDimElo, EloDistanceFilter;
|
|
3337
3350
|
var init_eloDistance = __esm({
|
|
3338
3351
|
"src/core/navigators/filters/eloDistance.ts"() {
|
|
3339
3352
|
"use strict";
|
|
@@ -3347,7 +3360,6 @@ var init_eloDistance = __esm({
|
|
|
3347
3360
|
minTagCount: 3
|
|
3348
3361
|
};
|
|
3349
3362
|
TAG_CONFIDENCE_HALF = 10;
|
|
3350
|
-
COUNT_ONLY_SENTINEL = -1;
|
|
3351
3363
|
DEFAULT_CARD_ELO = 1e3;
|
|
3352
3364
|
MULTI_DIM_ELO_KEY = "skuilder:multiDimElo";
|
|
3353
3365
|
multiDimElo = readMultiDimElo();
|
|
@@ -7799,6 +7811,7 @@ var init_tagRecent = __esm({
|
|
|
7799
7811
|
import {
|
|
7800
7812
|
adjustCourseScores,
|
|
7801
7813
|
adjustCourseScoresPerTag,
|
|
7814
|
+
isCountOnlyTag as isCountOnlyTag2,
|
|
7802
7815
|
toCourseElo as toCourseElo7
|
|
7803
7816
|
} from "@vue-skuilder/common";
|
|
7804
7817
|
var init_EloService = __esm({
|