feat: 优化口语防重复问答、课程推进流转、键盘输入流畅度与竖屏锁定

- AI口语约束:在对话系统提示词与单轮指导中增加防重复问答约束,避免重复寒暄及索取已提供信息,根据历史自然向前推进
- 课程流转:修复多段课程学完后今日任务卡片流转下一课,及退出重进定位逻辑
- 竖屏锁定:在 Flutter、Android 及 iOS 平台配置仅支持竖屏显示
- 对话交互:优化对话界面文本输入重绘与词汇查询,解决键盘输入卡顿
- 测试用例:补充并更新单轮约束、状态流转与返回键退出测试,212项测试全绿
This commit is contained in:
shen
2026-09-18 07:38:54 -07:00
parent 0a4f97d105
commit 5b9cba793e
16 changed files with 568 additions and 242 deletions
@@ -110,7 +110,11 @@ void main() {
expect(last, startsWith('My name is Alex.'));
expect(
last,
endsWith('After your line the learner has to: say where they are from.'),
contains('After your line the learner has to: say where they are from.'),
);
expect(
last,
endsWith('Do not repeat any questions or greetings already asked or answered.'),
);
expect(messages![0]['content'], isNot(contains('Ask where the learner')));
});
@@ -127,6 +131,7 @@ void main() {
);
expect(a, b);
expect(a, contains('CEFR A1'));
expect(a, contains('Strictly do not repeat any question'));
expect(a, endsWith('Taught language: Excuse me.; Can you help me?'));
expect(
AiService.dialogueSystemPrompt(level: 'A0', allowedLanguage: const []),