DocDoeAI / src /lib /ui /displayNames.ts
asnannp's picture
deploy: sync backend to Space root (learn-lesson HF cache fix)
65d68f5
Raw History Blame Contribute Delete
602 Bytes
export function getStudentFacingSourceTitle(rawTitle: string, fallbackSubject?: string): string {
if (!rawTitle) {
return fallbackSubject ? `${fallbackSubject} Material` : "Study Material";
}
const lower = rawTitle.toLowerCase();
if (lower.includes("final upload smoke")) {
return "Photosynthesis Notes";
}
if (lower.includes("launch verification")) {
return "Uploaded Biology Source";
}
if (lower.includes("debug pdf")) {
return "Biology Study Material";
}
if (lower.includes("http video pipeline check")) {
return "Study Video";
}
return rawTitle;
}