fix: stabilize cockpit and assistant session handoff
This commit is contained in:
@@ -85,6 +85,12 @@ export default function CockpitPage() {
|
||||
prevMessageCountRef.current = session.messages.length
|
||||
}, [session.messages.length, showOnboarding])
|
||||
|
||||
// Reset local step UI when switching cases or when a new action set arrives.
|
||||
useEffect(() => {
|
||||
setActiveStepIndex(0)
|
||||
setCompletedSteps(new Set())
|
||||
}, [session.activeChatId, session.activeActions])
|
||||
|
||||
// ── Triage handlers ──
|
||||
|
||||
const handleTriageFieldSave = useCallback(async (field: keyof TriageMeta, value: string) => {
|
||||
@@ -306,8 +312,7 @@ export default function CockpitPage() {
|
||||
<FlowPilotAsks
|
||||
questions={session.activeQuestions}
|
||||
onAnswer={(answer) => {
|
||||
session.setInput(answer)
|
||||
setTimeout(() => session.handleSend(), 10)
|
||||
void session.sendMessage(answer, { clearComposer: false })
|
||||
}}
|
||||
loading={session.loading}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user