feat: 完善听力口语辅助状态记录、练习分块与复习抽查间隔机制

This commit is contained in:
shen
2026-09-23 18:33:22 -07:00
parent 6b42b7abc3
commit d740a9e19c
106 changed files with 2933 additions and 845 deletions
+6 -4
View File
@@ -964,8 +964,9 @@ class AiService {
'''Evaluate a beginner's open-ended English writing response using the input JSON.
Return JSON only with exactly these fields: schemaVersion, verdict, feedback, suggestion, missing, lessonId.
schemaVersion must be "writing-feedback-1" and lessonId must exactly copy input.lessonId.
verdict must be accepted, rewrite, or uncertain. feedback is one short helpful Chinese sentence (max 80 Chinese characters). suggestion is null or one simple rewrite at input.level (max 18 words). missing is an array of at most 3 short Chinese descriptions.
Assess only whether the learner expressed input.taskPrompt. Do not claim pronunciation, do not introduce grammar beyond input.level, and do not invent facts the learner did not write.''';
verdict must be accepted, rewrite, or uncertain. Use accepted only when the answer meets input.taskPrompt and has no spelling or grammar mistakes; ignore minor capitalisation and final punctuation. Use rewrite when the task is missed or there is a spelling or grammar mistake. Use uncertain when the intended meaning cannot be determined.
feedback is one short helpful Chinese sentence (max 80 Chinese characters). suggestion is null or one simple rewrite at input.level (max 18 words). missing is an array of at most 3 short Chinese descriptions of actual issues.
Do not claim pronunciation, do not introduce grammar beyond input.level, and do not invent facts the learner did not write.''';
final content = await _requestStructured(
provider: provider,
endpoint: endpoint,
@@ -985,8 +986,9 @@ Assess only whether the learner expressed input.taskPrompt. Do not claim pronunc
}
/// Checks a review answer or dialogue turn for spelling and grammar. It
/// reuses the writing feedback schema, keyed by [answerId], and stays
/// advisory: the local check still decides whether the answer counts.
/// reuses the writing feedback schema, keyed by [answerId]. Lesson answers
/// need both a local task match and an accepted verdict for independent
/// evidence; the caller makes that decision on-device.
Future<WritingAiFeedback?> answerFeedback({
required AiProviderType provider,
required String endpoint,