fix: preserve analyzer clarification state
This commit is contained in:
parent
8357e69820
commit
4167f30fce
@ -72,6 +72,7 @@ function applyDirectExecutionPolicy(
|
||||
|
||||
const compactText = params.text.replace(/\s+/g, "").trim();
|
||||
const hasAnyRequestText = compactText.length > 0;
|
||||
const keepClarification = Boolean(result.needsClarification);
|
||||
const normalizedIntent = result.intent === "chat" || result.intent === "vision" ? "image_edit" : result.intent;
|
||||
const normalizedSubIntent =
|
||||
normalizedIntent === "image_edit"
|
||||
@ -83,8 +84,8 @@ function applyDirectExecutionPolicy(
|
||||
intent: normalizedIntent,
|
||||
subIntent: normalizedSubIntent,
|
||||
confidence: Math.max(result.confidence, 0.72),
|
||||
needsClarification: false,
|
||||
clarifyingQuestions: [],
|
||||
needsClarification: keepClarification,
|
||||
clarifyingQuestions: keepClarification ? result.clarifyingQuestions || [] : [],
|
||||
conversationalReply:
|
||||
result.conversationalReply ||
|
||||
(hasAnyRequestText ? "收到,我会按你的描述直接执行生成。" : "收到图片,我先按保真优化策略直接执行生成。"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user