From 3cc3b28471fe0c79906557bf1b39585bd745ba65 Mon Sep 17 00:00:00 2001 From: Developer Date: Thu, 21 May 2026 12:57:04 +0800 Subject: [PATCH] fix: broader regex to strip conditional prefix from followup hints --- server/src/assessment/graph/nodes/grader.node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/assessment/graph/nodes/grader.node.ts b/server/src/assessment/graph/nodes/grader.node.ts index bea5eac..696d508 100644 --- a/server/src/assessment/graph/nodes/grader.node.ts +++ b/server/src/assessment/graph/nodes/grader.node.ts @@ -255,7 +255,7 @@ Format your response as JSON: let followupHintMsg: AIMessage | null = null; if (shouldFollowUp && followupHints.length > 0) { let hint = followupHints[Math.min(currentFollowUpCount, followupHints.length - 1)]; - hint = hint.replace(/^如果[^,,]*[,,]\s*追问[::]\s*/i, '').replace(/^如果[^。]*[。]\s*/i, ''); + hint = hint.replace(/^如果.+?追问[::]\s*/i, '').replace(/^[""「『]|[""」』]$/g, ''); const hintLabel = isZh ? `让我帮你完善一下:${hint}` : isJa