ai fixes
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-06-26 14:44:54 +01:00
parent 25d62ce723
commit 2c4c9b0595
21 changed files with 1553 additions and 259 deletions

View File

@@ -206,16 +206,63 @@ export interface StatsOverview {
xpByCategory: { category: string; amount: number }[];
}
export type TeacherDifficulty = "beginner" | "intermediate" | "advanced";
export type TeacherLength = "short" | "standard" | "deep";
export interface TeacherResearchAssignment {
steps: string[];
expectedOutcome?: string;
estimatedTimeMinutes?: number;
}
export interface TeacherHomework {
task: string;
instructions: string[];
}
export interface TeacherCalibreSuggestion {
title: string;
authors: string[];
reason: string;
}
export interface TeacherQuizQuestion {
question: string;
options: string[];
type?: "multiple_choice" | "short_answer";
options?: string[];
/** 0-based index for multiple choice (legacy + normalized MC) */
answer: number;
answerText?: string;
explanation?: string;
}
export interface TeacherAnswerKeyEntry {
questionIndex: number;
answer: string;
explanation?: string;
}
export interface TeacherLessonContent {
title?: string;
/** Alias kept for legacy stored lessons */
introduction?: string;
overview?: string;
whyItMatters?: string;
/** Alias kept for legacy stored lessons */
objectives?: string[];
learningObjectives?: string[];
explanation?: string;
researchAssignment?: TeacherResearchAssignment;
readingSteps?: string[];
calibreSuggestions?: TeacherCalibreSuggestion[];
externalReading?: string[];
homework?: TeacherHomework;
flashcards: { front: string; back: string }[];
quiz: TeacherQuizQuestion[];
assignment: string;
assignment?: string;
reflectionPrompt?: string;
answerKey?: TeacherAnswerKeyEntry[];
nextLessonSuggestion?: string;
}
export interface TeacherLessonData {
@@ -226,4 +273,11 @@ export interface TeacherLessonData {
explorationId?: string | null;
completedNote?: string | null;
createdAt: string;
source?: "ai" | "fallback";
fallbackReason?:
| "offline"
| "model_unavailable"
| "parse_failed"
| "generation_failed"
| "timeout";
}