fix: broader regex to strip conditional prefix from followup hints
This commit is contained in:
@@ -255,7 +255,7 @@ Format your response as JSON:
|
|||||||
let followupHintMsg: AIMessage | null = null;
|
let followupHintMsg: AIMessage | null = null;
|
||||||
if (shouldFollowUp && followupHints.length > 0) {
|
if (shouldFollowUp && followupHints.length > 0) {
|
||||||
let hint = followupHints[Math.min(currentFollowUpCount, followupHints.length - 1)];
|
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
|
const hintLabel = isZh
|
||||||
? `让我帮你完善一下:${hint}`
|
? `让我帮你完善一下:${hint}`
|
||||||
: isJa
|
: isJa
|
||||||
|
|||||||
Reference in New Issue
Block a user