- {/* v1.16.4 — quiet adopt-into-self-context offer once a
+ }
+ composer={
+
+ {/* v1.16.4 — quiet adopt-into-self-context offer once a
clarifying question has been answered. Self-removes
after settle; v1.16.5 reports the outcome back into the
guided machine for the closing summary. */}
- {pendingAdopt && !send.isStreaming ? (
- setPendingAdopt(null)}
- onSettled={(adoption) =>
- dispatchGuided({
- type: "ADOPTION_SETTLED",
- index: pendingAdopt.guidedIndex,
- adoption,
- })
- }
- />
- ) : null}
- {/* v1.16.5 — guided clarifying-questions entry card (V2 of
+ {pendingAdopt && !send.isStreaming ? (
+ setPendingAdopt(null)}
+ onSettled={(adoption) =>
+ dispatchGuided({
+ type: "ADOPTION_SETTLED",
+ index: pendingAdopt.guidedIndex,
+ adoption,
+ })
+ }
+ />
+ ) : null}
+ {/* v1.16.5 — guided clarifying-questions entry card (V2 of
the v1.16.0 chips). Offers the in-chat sequence while
questions pend and the flow hasn't started. */}
- {guided.phase === "idle" && pendingQuestions.length > 0 ? (
-
- dispatchGuided({ type: "START", questions: pendingQuestions })
- }
- onLater={() => dispatchGuided({ type: "LATER" })}
- onDismissAll={() =>
- dismissQuestions.mutate(undefined, {
- onSuccess: () => dispatchGuided({ type: "LATER" }),
- })
- }
- />
- ) : null}
- handleSubmit(inputValue)}
- onCancel={send.cancel}
- disabled={send.isStreaming}
- isStreaming={send.isStreaming}
- autoFocusOnOpen={autoFocusComposer}
- placeholder={
- guided.phase === "asking"
- ? t("insights.coach.guided.answerPlaceholder")
- : undefined
- }
- />
-
- }
- onHistoryClick={
- surface === "drawer" && onRequestFullView
- ? onRequestFullView
- : () => setHistoryTrayOpen(true)
- }
- onOpenSourcesTray={() => setSourcesTrayOpen(true)}
- />
+ {guided.phase === "idle" && pendingQuestions.length > 0 ? (
+
+ dispatchGuided({
+ type: "START",
+ questions: pendingQuestions,
+ })
+ }
+ onLater={() => dispatchGuided({ type: "LATER" })}
+ onDismissAll={() =>
+ dismissQuestions.mutate(undefined, {
+ onSuccess: () => dispatchGuided({ type: "LATER" }),
+ })
+ }
+ />
+ ) : null}
+ {composerNode}
+
+ }
+ onHistoryClick={
+ surface === "drawer" && onRequestFullView
+ ? onRequestFullView
+ : () => setHistoryTrayOpen(true)
+ }
+ onOpenSourcesTray={() => setSourcesTrayOpen(true)}
+ />
+ )}