@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
package/dist/core/index.mjs
CHANGED
|
@@ -673,13 +673,12 @@ function clearRunHistory() {
|
|
|
673
673
|
_pendingRuns = [];
|
|
674
674
|
}
|
|
675
675
|
function getOrigin(card) {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
return "unknown";
|
|
676
|
+
return card.reviewID ? "review" : "new";
|
|
677
|
+
}
|
|
678
|
+
function requiredBy(card) {
|
|
679
|
+
return card.provenance.find(
|
|
680
|
+
(p) => p.strategy === "ephemeralHint" && p.score === Number.POSITIVE_INFINITY
|
|
681
|
+
)?.strategyName;
|
|
683
682
|
}
|
|
684
683
|
function captureRun(report) {
|
|
685
684
|
const fullReport = {
|
|
@@ -703,17 +702,23 @@ function parseCardElo(provenance) {
|
|
|
703
702
|
}
|
|
704
703
|
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards, regulators) {
|
|
705
704
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
706
|
-
const toReport = (card) =>
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
705
|
+
const toReport = (card) => {
|
|
706
|
+
const required = requiredBy(card);
|
|
707
|
+
const first = card.provenance[0];
|
|
708
|
+
const generator = first && first.strategy !== "ephemeralHint" ? first.strategyName || first.strategy : void 0;
|
|
709
|
+
return {
|
|
710
|
+
cardId: card.cardId,
|
|
711
|
+
courseId: card.courseId,
|
|
712
|
+
origin: getOrigin(card),
|
|
713
|
+
...generator ? { generator } : {},
|
|
714
|
+
...required ? { required } : {},
|
|
715
|
+
finalScore: card.score,
|
|
716
|
+
cardElo: card.cardElo ?? parseCardElo(card.provenance),
|
|
717
|
+
provenance: card.provenance,
|
|
718
|
+
tags: card.tags,
|
|
719
|
+
selected: selectedIds.has(card.cardId)
|
|
720
|
+
};
|
|
721
|
+
};
|
|
717
722
|
const selectedReported = [];
|
|
718
723
|
const nearMissReported = [];
|
|
719
724
|
const discardedTailCards = [];
|
|
@@ -1842,10 +1847,14 @@ var init_elo = __esm({
|
|
|
1842
1847
|
const userElo = toCourseElo2(courseReg.elo);
|
|
1843
1848
|
userGlobalElo = userElo.global.score;
|
|
1844
1849
|
}
|
|
1845
|
-
const activeCards = await
|
|
1850
|
+
const [activeCards, seenCards] = await Promise.all([
|
|
1851
|
+
this.user.getActiveCards(),
|
|
1852
|
+
this.user.getSeenCards(this.course.getCourseID()).catch(() => [])
|
|
1853
|
+
]);
|
|
1854
|
+
const notNew = /* @__PURE__ */ new Set([...activeCards.map((ac) => ac.cardID), ...seenCards]);
|
|
1846
1855
|
const newCards = (await this.course.getCardsCenteredAtELO(
|
|
1847
1856
|
{ limit, elo: "user" },
|
|
1848
|
-
(c) => !
|
|
1857
|
+
(c) => !notNew.has(c.cardID)
|
|
1849
1858
|
)).map((c) => ({ ...c, status: "new" }));
|
|
1850
1859
|
const scored = newCards.map((c) => {
|
|
1851
1860
|
const cardElo = c.elo ?? 1e3;
|
|
@@ -1898,6 +1907,7 @@ __export(prescribed_exports, {
|
|
|
1898
1907
|
default: () => PrescribedCardsGenerator,
|
|
1899
1908
|
unmetIntroExposeTags: () => unmetIntroExposeTags
|
|
1900
1909
|
});
|
|
1910
|
+
import { tagRole, withTagRole } from "@vue-skuilder/common";
|
|
1901
1911
|
function dedupe(arr) {
|
|
1902
1912
|
return [...new Set(arr)];
|
|
1903
1913
|
}
|
|
@@ -1938,11 +1948,11 @@ function formatAge(ms) {
|
|
|
1938
1948
|
}
|
|
1939
1949
|
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
1940
1950
|
if (minCount <= 0) return [];
|
|
1941
|
-
const exposeTags = new Set(tags.filter((tag) => tag
|
|
1951
|
+
const exposeTags = new Set(tags.filter((tag) => tagRole(tag) === "expose"));
|
|
1942
1952
|
for (const tag of tags) {
|
|
1943
|
-
if (
|
|
1944
|
-
const
|
|
1945
|
-
if (
|
|
1953
|
+
if (tagRole(tag) !== "intro") continue;
|
|
1954
|
+
const expose = withTagRole(tag, "expose");
|
|
1955
|
+
if (expose) exposeTags.add(expose);
|
|
1946
1956
|
}
|
|
1947
1957
|
return [...exposeTags].filter((tag) => {
|
|
1948
1958
|
const tagElo = userTagElo[tag];
|
|
@@ -3144,6 +3154,7 @@ __export(eloDistance_exports, {
|
|
|
3144
3154
|
mountMultiDimEloToggle: () => mountMultiDimEloToggle,
|
|
3145
3155
|
tagAwareGap: () => tagAwareGap
|
|
3146
3156
|
});
|
|
3157
|
+
import { COUNT_ONLY_SCORE, isCountOnlyTag } from "@vue-skuilder/common";
|
|
3147
3158
|
function computeMultiplier(distance, halfLife, minMultiplier, maxMultiplier) {
|
|
3148
3159
|
const normalizedDistance = distance / halfLife;
|
|
3149
3160
|
const decay = Math.exp(-(normalizedDistance * normalizedDistance));
|
|
@@ -3186,7 +3197,9 @@ function tagAwareGap(cardTags, cardElo, userElo, minTagCount) {
|
|
|
3186
3197
|
const tags = [];
|
|
3187
3198
|
for (const tag of cardTags) {
|
|
3188
3199
|
const user = userElo.tags[tag];
|
|
3189
|
-
if (!user || user.score ===
|
|
3200
|
+
if (isCountOnlyTag(tag) || !user || user.score === COUNT_ONLY_SCORE || user.count < minTagCount) {
|
|
3201
|
+
continue;
|
|
3202
|
+
}
|
|
3190
3203
|
const card = cardElo.tags[tag]?.score ?? cardElo.global.score;
|
|
3191
3204
|
tags.push({
|
|
3192
3205
|
tag,
|
|
@@ -3258,7 +3271,7 @@ function createEloDistanceFilter(config) {
|
|
|
3258
3271
|
transform: (cards, context) => applyEloDistance(cards, context, resolved, source)
|
|
3259
3272
|
};
|
|
3260
3273
|
}
|
|
3261
|
-
var DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF,
|
|
3274
|
+
var DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF, DEFAULT_CARD_ELO, MULTI_DIM_ELO_KEY, multiDimElo, EloDistanceFilter;
|
|
3262
3275
|
var init_eloDistance = __esm({
|
|
3263
3276
|
"src/core/navigators/filters/eloDistance.ts"() {
|
|
3264
3277
|
"use strict";
|
|
@@ -3272,7 +3285,6 @@ var init_eloDistance = __esm({
|
|
|
3272
3285
|
minTagCount: 3
|
|
3273
3286
|
};
|
|
3274
3287
|
TAG_CONFIDENCE_HALF = 10;
|
|
3275
|
-
COUNT_ONLY_SENTINEL = -1;
|
|
3276
3288
|
DEFAULT_CARD_ELO = 1e3;
|
|
3277
3289
|
MULTI_DIM_ELO_KEY = "skuilder:multiDimElo";
|
|
3278
3290
|
multiDimElo = readMultiDimElo();
|
|
@@ -7133,6 +7145,7 @@ var init_tagRecent = __esm({
|
|
|
7133
7145
|
import {
|
|
7134
7146
|
adjustCourseScores,
|
|
7135
7147
|
adjustCourseScoresPerTag,
|
|
7148
|
+
isCountOnlyTag as isCountOnlyTag2,
|
|
7136
7149
|
toCourseElo as toCourseElo7
|
|
7137
7150
|
} from "@vue-skuilder/common";
|
|
7138
7151
|
var init_EloService = __esm({
|