fix(rectification): show spoken collect questions in the chat UI
Spoken collect prompts lived only in GET current_question. The chat never parsed that field, Agent projections returned null after evidence writes, and active_focus followups collapsed the questionId. Render the parsed prompt, keep choiceReady on real cards, and give collect focuses a stable domain-scoped id. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,7 +32,7 @@ import {
|
||||
shouldDeclineCollectFocus,
|
||||
shouldContinueAgentForDatedEvent,
|
||||
} from "@/lib/rectification-agentic/v9/turn-intent-classifier";
|
||||
import { persistServerOwnedFocus, openQuestionFromPersistedFocus, isCollectFocusSchema } from "@/lib/rectification-agentic/v9/server-focus";
|
||||
import { persistServerOwnedFocus, openQuestionFromPersistedFocus, isCollectFocusSchema, isRenderableChoiceOpenQuestion } from "@/lib/rectification-agentic/v9/server-focus";
|
||||
import { buildMethodFollowupPlan } from "@/lib/rectification-agentic/v9/method-followup";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
@@ -451,7 +451,7 @@ export async function POST(request: Request) {
|
||||
followup: plan.next_followup,
|
||||
});
|
||||
const open = openQuestionFromPersistedFocus(persisted);
|
||||
if (open && persisted.focus && open.unrenderable !== true) {
|
||||
if (open && persisted.focus && isRenderableChoiceOpenQuestion(open)) {
|
||||
let classified = null;
|
||||
try {
|
||||
classified = await classifyRectificationTurnIntent(selectedModel, {
|
||||
|
||||
Reference in New Issue
Block a user