feat: Implement and display AI-powered course recommendations with a new API endpoint and frontend UI.

This commit is contained in:
2026-01-18 15:24:56 -03:00
parent 46b6253f22
commit 57594ce628
8 changed files with 204 additions and 3 deletions
+14
View File
@@ -16,6 +16,17 @@ export interface Organization {
primary_color?: string;
secondary_color?: string;
}
export interface Recommendation {
title: string;
description: string;
lesson_id: string | null;
priority: "high" | "medium" | "low";
reason: string;
}
export interface RecommendationResponse {
recommendations: Recommendation[];
}
export interface Course {
id: string;
@@ -284,5 +295,8 @@ export const lmsApi = {
return apiFetch(`/notifications/${id}/read`, {
method: 'POST'
});
},
async getRecommendations(courseId: string): Promise<RecommendationResponse> {
return apiFetch(`/courses/${courseId}/recommendations`, {}, true);
}
};