fix: broader regex to strip conditional prefix from followup hints

This commit is contained in:
Developer
2026-05-21 12:57:04 +08:00
parent 5c82c75a09
commit 3cc3b28471
@@ -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