fix(rectification): stop the opening body from repeating the collect prompt
Independent Staging Quality Gate / validate (push) Has been cancelled
Independent Staging Quality Gate / publish (push) Has been cancelled

Persist the interview slot before the opening turn, keep the stem in the question slot, and hide that slot while a run is busy so the same ask does not appear twice.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-02 14:53:10 +08:00
co-authored by Cursor
parent aab3ad4b84
commit 661a0dab14
8 changed files with 61 additions and 8 deletions
@@ -1047,6 +1047,13 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
const collectSpokenPrompt = currentQuestion?.kind === "collect_spoken"
? currentQuestion.prompt
: null;
const showCollectSpokenPrompt = Boolean(
collectSpokenPrompt
&& !showLiveChoiceCard
&& !readonly
&& !busy
&& regeneratingMessageKey === null,
);
const resumableCase = caseStatus !== null && isResumableStatus(caseStatus);
const showMissingQuestion = Boolean(
caseSnapshotLoaded
@@ -1199,7 +1206,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
onStop={submitStop}
/>
)}
{collectSpokenPrompt && !showLiveChoiceCard && !readonly && (
{showCollectSpokenPrompt && (
<p id={collectSpokenPromptId} className="rectification-question-slot__prompt">
{collectSpokenPrompt}
</p>
@@ -1232,7 +1239,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
onStop={submitStop}
/>
)}
{collectSpokenPrompt && !showLiveChoiceCard && !readonly && (
{showCollectSpokenPrompt && (
<p id={collectSpokenPromptId} className="rectification-question-slot__prompt">
{collectSpokenPrompt}
</p>
@@ -1277,7 +1284,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
)}
<ChatComposer
inputRef={composer}
describedBy={collectSpokenPrompt && !showLiveChoiceCard && !readonly
describedBy={showCollectSpokenPrompt
? collectSpokenPromptId
: undefined}
value={draft}
@@ -1287,7 +1294,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
? "该校正已结束,只能查看历史;需要再次校正请新建。"
: showLiveChoiceCard
? "点上面的选项即可;想补一句细节再写"
: collectSpokenPrompt
: showCollectSpokenPrompt
? "请回答上面的问题…"
: "继续说你记得的人生经历,或回答刚才的问题…"}
maxLength={RECTIFICATION_COMPOSER_MAX_LENGTH}