chore: ai, public course and other ui improvements

This commit is contained in:
Rotimi Best
2026-05-09 06:05:03 +01:00
parent 5717dd8004
commit c31ad63955
318 changed files with 20668 additions and 4788 deletions
@@ -105,6 +105,23 @@ class AiAssistantApi extends BaseApiWithErrors {
});
}
async generateCourseMeta(prompt: string): Promise<{ title: string; description: string } | null> {
let meta: { title: string; description: string } | null = null;
await this.execute<(typeof classroomio.agent)['generate-course-title']['$post']>({
requestFn: () =>
classroomio.agent['generate-course-title'].$post({
json: { prompt }
}),
logContext: 'generating course meta',
onSuccess: (result) => {
meta = (result as { data: { title: string; description: string } }).data;
}
});
return meta;
}
async uploadDocument(
file: File,
courseId: string,