fix: complete dynamic choice preview flow

This commit is contained in:
Jesse_Chen
2026-07-19 10:51:49 +08:00
parent c74c0bd70f
commit bfd49760ed
3 changed files with 83 additions and 22 deletions
@@ -183,6 +183,11 @@ export function useBirthTimeGuidedJourney(input: GuidedJourneyInput): BirthTimeG
};
const retryScoring = () => {
const turn = journey;
if (preview && turn?.journeyProtocol === "dynamic-choice-v2"
&& (turn.nextAction.kind === "score_pending" || turn.nextAction.kind === "retry_scoring")) {
operate((current) => Promise.resolve(previewAction(current, { kind: "retry_scoring" })));
return;
}
if (turn?.nextAction.kind === "score_pending") {
setError("");
setPollRun((value) => value + 1);