代码提交

This commit is contained in:
fengxiangdebaozi committed 2026-07-23 15:07:23 +08:00
1 parent b60d9ed09e
commit 91c5d43c48
10 files changed
+808 -158

No files matched your search

@@ -149,6 +149,7 @@ export interface UseStep1IntentReturn {
hydrateFromDraft: (snapshot: Step1Snapshot) => void;
/** 给「跳过此项」按钮 / 「继续追问」按钮等本地 demo 操作用。 */
appendLocalMessage: (msg: InteractiveMessage) => void;
clearInteractiveMessages: () => void;
}
const INTENT_WELCOME_TEXT =
@@ -662,6 +663,12 @@ export function useStep1Intent(options: UseStep1IntentOptions): UseStep1IntentRe
setInteractiveMessages((prev) => [...prev, msg]);
}, []);
const clearInteractiveMessages = useCallback(() => {
setInteractiveMessages([]);
setPendingIntentClarificationMsgId(null);
setIntentClarificationSelections(new Map());
}, []);
const updateIntentReady = useCallback((next: IntentSummary) => {
// 用户手动改完意图 → 覆盖为权威值,并清掉「待澄清」态(已确认意图,无需再答问)。
setIntentReady(next);
@@ -687,5 +694,6 @@ export function useStep1Intent(options: UseStep1IntentOptions): UseStep1IntentRe
stopIntentStream,
hydrateFromDraft,
appendLocalMessage,
clearInteractiveMessages,
};
}