diff --git a/components/chat.tsx b/components/chat.tsx
index 5ea3890..c63e1b1 100644
--- a/components/chat.tsx
+++ b/components/chat.tsx
@@ -1310,6 +1310,12 @@ export function Chat({
}
onSubmitAnswer={(output) => {
if (!pending) return;
+ // THE INPUT-EVENTS CONTRACT (Wave B): the answer ride order is
+ // stash-then-send — addToolOutput triggers the SDK's automatic
+ // continuation send (sendAutomaticallyWhen), and the transport
+ // consumes THIS stash to build {chatId, input}. Dismissals ride
+ // the same callback (QuestionAnswerData.dismissed).
+ stashInput({ type: "answer", toolCallId: pending.toolCallId, answer: output });
void addToolOutput({
tool: pending.tool as "quiz" | "ask_user_question",
toolCallId: pending.toolCallId,
diff --git a/next-env.d.ts b/next-env.d.ts
index ce4e94a..a419cbe 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,7 +1,7 @@
///
///
-import "./.next/types/routes.d.ts";
-import "./.next/types/root-params.d.ts";
+import "./.next/dev/types/routes.d.ts";
+import "./.next/dev/types/root-params.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.