diff --git a/course-matrix/backend/src/controllers/aiController.ts b/course-matrix/backend/src/controllers/aiController.ts index 3b5c6fe4..e44561d1 100644 --- a/course-matrix/backend/src/controllers/aiController.ts +++ b/course-matrix/backend/src/controllers/aiController.ts @@ -255,6 +255,7 @@ export const chat = asyncHandler(async (req: Request, res: Response) => { - If the user provides a course code of length 6 like CSCA08, then assume they mean CSCA08H3 (H3 appended) - If the user wants to create a timetable, first call getCourses to get course information on the requested courses, then call generateTimetable. - Do not make up fake courses or offerings. + - You can only edit title of the timetable, nothing else. If a user tries to edit something else, acknowledge this limitation. - For delete timetable requests, if the user asks to delete an ambiguous timetable name (i.e many with similar name exist) then ask them to clarify which one - For delete timetable requests, first check that the timetable the user is refering to exists - For delete timetable requests, ask for user confirmation with command "/timetable confirm" before proceeding. If their next message is anything other than "/timetable confim" then cancel the deletion. @@ -273,13 +274,10 @@ export const chat = asyncHandler(async (req: Request, res: Response) => { }, }), updateTimetable: tool({ - description: "Update a user's timetable by title and/or semester", + description: "Update a user's timetable's title", parameters: z.object({ id: z.number().positive(), timetable_title: z.string().optional(), - semester: z - .enum(["Fall 2025", "Summer 2025", "Winter 2026"]) - .optional(), }), execute: async (args) => { return await availableFunctions.updateTimetable(args, req); diff --git a/course-matrix/frontend/src/pages/TimetableBuilder/TimetableBuilder.tsx b/course-matrix/frontend/src/pages/TimetableBuilder/TimetableBuilder.tsx index 7c52ccdb..bc6de33b 100644 --- a/course-matrix/frontend/src/pages/TimetableBuilder/TimetableBuilder.tsx +++ b/course-matrix/frontend/src/pages/TimetableBuilder/TimetableBuilder.tsx @@ -369,11 +369,13 @@ const TimetableBuilder = () => {
{ + console.error("Form submission errors:", errors); + })} className="space-y-8" >
- {/* ( @@ -382,11 +384,13 @@ const TimetableBuilder = () => {