fix: natural follow-up conversation flow
- Grader: separate followup hint from scoring feedback - Interviewer: use followup hint directly without prefix/suffix - Restored standard and choice question presentation paths
This commit is contained in:
@@ -252,10 +252,15 @@ Format your response as JSON:
|
||||
shouldFollowUp = false;
|
||||
}
|
||||
|
||||
let followupHintMsg: AIMessage | null = null;
|
||||
if (shouldFollowUp && followupHints.length > 0) {
|
||||
const hint = followupHints[Math.min(currentFollowUpCount, followupHints.length - 1)];
|
||||
const hintLabel = isZh ? '追问方向' : isJa ? '追加の方向性' : 'Follow-up hint';
|
||||
enhancedFeedback = `${result.feedback}\n\n${hintLabel}: ${hint}`;
|
||||
const hintLabel = isZh
|
||||
? `让我帮你完善一下:${hint}`
|
||||
: isJa
|
||||
? `もう少し詳しく伺います:${hint}`
|
||||
: `Let me help you elaborate: ${hint}`;
|
||||
followupHintMsg = new AIMessage(hintLabel);
|
||||
}
|
||||
|
||||
const feedbackMessage = new AIMessage(
|
||||
@@ -271,8 +276,12 @@ Format your response as JSON:
|
||||
saysIDontKnow,
|
||||
});
|
||||
|
||||
const feedbackHistoryMessages = followupHintMsg
|
||||
? [feedbackMessage, followupHintMsg]
|
||||
: [feedbackMessage];
|
||||
|
||||
return {
|
||||
feedbackHistory: [feedbackMessage],
|
||||
feedbackHistory: feedbackHistoryMessages,
|
||||
scores: newScores,
|
||||
shouldFollowUp: shouldFollowUp,
|
||||
followUpCount: shouldFollowUp ? currentFollowUpCount + 1 : 0,
|
||||
|
||||
Reference in New Issue
Block a user