import { api } from "@/lib/api-client"; interface CoachChatRequest { message: string; history?: { role: string; content: string }[]; context?: unknown; } interface CoachChatResponse { reply: string; } interface CoachTipResponse { tip: string; category: string; } interface CoachSuggestResponse { suggestion: string; focus_areas: string[]; daily_plan: { activity: string; duration_min: number; skill: string }[]; motivation: string; } interface CoachWritingResponse { improved_text: string; changes: { original: string; revised: string; reason: string }[]; tips: string[]; } export const coachingService = { async chat(data: CoachChatRequest): Promise { return api.post("/coach/chat", data); }, async getHint(data: { topic_id: number; question_id: string }): Promise<{ hint: string; strategy: string }> { return api.post("/coach/hint", data); }, async explain(data: { score_data: Record; student_context?: string }): Promise<{ explanation: string }> { return api.post("/coach/explain", data); }, async suggest(data?: Record): Promise { return api.post("/coach/suggest", data); }, async writingHelp(data: { task: string; draft: string; help_type: string }): Promise { return api.post("/coach/writing-help", data); }, async getTip(context: string): Promise { return api.get("/coach/tip", { context }); }, };