feat(stats): add v1 immersion stats dashboard (#19)

This commit is contained in:
2026-03-20 02:43:28 -07:00
committed by GitHub
parent 42abdd1268
commit 6749ff843c
555 changed files with 46356 additions and 2553 deletions

View File

@@ -11,6 +11,7 @@ export function createStartupOsdSequencer(deps: { showOsd: (message: string) =>
notifyCharacterDictionaryStatus: (event: StartupOsdSequencerCharacterDictionaryEvent) => void;
} {
let tokenizationReady = false;
let tokenizationWarmupCompleted = false;
let annotationLoadingMessage: string | null = null;
let pendingDictionaryProgress: StartupOsdSequencerCharacterDictionaryEvent | null = null;
let pendingDictionaryFailure: StartupOsdSequencerCharacterDictionaryEvent | null = null;
@@ -24,6 +25,9 @@ export function createStartupOsdSequencer(deps: { showOsd: (message: string) =>
return false;
}
if (pendingDictionaryProgress) {
if (dictionaryProgressShown) {
return true;
}
deps.showOsd(pendingDictionaryProgress.message);
dictionaryProgressShown = true;
return true;
@@ -39,13 +43,14 @@ export function createStartupOsdSequencer(deps: { showOsd: (message: string) =>
return {
reset: () => {
tokenizationReady = false;
tokenizationReady = tokenizationWarmupCompleted;
annotationLoadingMessage = null;
pendingDictionaryProgress = null;
pendingDictionaryFailure = null;
dictionaryProgressShown = false;
},
markTokenizationReady: () => {
tokenizationWarmupCompleted = true;
tokenizationReady = true;
if (annotationLoadingMessage !== null) {
deps.showOsd(annotationLoadingMessage);
@@ -82,6 +87,9 @@ export function createStartupOsdSequencer(deps: { showOsd: (message: string) =>
if (canShowDictionaryStatus()) {
deps.showOsd(event.message);
dictionaryProgressShown = true;
} else if (tokenizationReady) {
deps.showOsd(event.message);
dictionaryProgressShown = true;
}
return;
}