fix(rectification): narrate exhausted-probe adopt instead of keep-collecting
When leftover probes cannot split adjacent minutes, skip frameless follow-ups and let a no-tool agent explain the stop. Distinguish-card "no" no longer closes a whole evidence domain. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -74,6 +74,8 @@ export type RangeNarrationInput = {
|
||||
openingRange?: readonly [string, string] | null;
|
||||
variant?: RangeNarrationVariant;
|
||||
stopReason?: string | null;
|
||||
/** Extra stop sentence after BUG-503 prefixes; used when the probe pool is exhausted. */
|
||||
stopExplain?: string | null;
|
||||
};
|
||||
|
||||
function clockMinutes(value: string): number | null {
|
||||
@@ -137,6 +139,8 @@ export function nonConvergingRangeNarration(
|
||||
? progressClause(input.openingRange, rangeText, range)
|
||||
: null;
|
||||
const reason = variant === "delivery" ? stopReasonPrefix(input.stopReason) : null;
|
||||
const explain = variant === "delivery" ? (input.stopExplain?.trim() || null) : null;
|
||||
const prefix = [reason, explain].filter(Boolean).join("");
|
||||
|
||||
if (variant === "intermediate") {
|
||||
if (rangeText && representative) {
|
||||
@@ -155,19 +159,19 @@ export function nonConvergingRangeNarration(
|
||||
const head = progress ?? `更站得住的范围是 ${rangeText},代表分钟 ${representative}`;
|
||||
const representativeClause = progress ? `。代表分钟是 ${representative}。` : `。`;
|
||||
const body = `${head}${representativeClause}${boundaryCopy}`;
|
||||
return reason ? `${reason}${body}` : body;
|
||||
return prefix ? `${prefix}${body}` : body;
|
||||
}
|
||||
if (rangeText) {
|
||||
const head = progress ?? `更站得住的范围是 ${rangeText}`;
|
||||
const body = `${head}。${boundaryCopy}`;
|
||||
return reason ? `${reason}${body}` : body;
|
||||
return prefix ? `${prefix}${body}` : body;
|
||||
}
|
||||
if (representative) {
|
||||
const body = `当前代表分钟 ${representative}。${boundaryCopy}`;
|
||||
return reason ? `${reason}${body}` : body;
|
||||
return prefix ? `${prefix}${body}` : body;
|
||||
}
|
||||
const body = `当前几个候选还分不开。${boundaryCopy}`;
|
||||
return reason ? `${reason}${body}` : body;
|
||||
return prefix ? `${prefix}${body}` : body;
|
||||
}
|
||||
|
||||
export function deliveryAdoptNarration(input: RangeNarrationInput): string {
|
||||
|
||||
Reference in New Issue
Block a user