375}
376}
377.onChange(of: agentSession.thoughts) {
378scrollToLast(input: scrollProxy)
379startAgentSessionIfNeeded()
380}
378.onChange(of: inputDocument, initial: true)
379.onChange(of: inputAttachments, initial: true)
380.onDisappear(perform: saveDraft)
381}
"Follow-up prompt" preview — starts from .sampleCompletedWithResponse (one finished, collapsed group) with a "Send follow-up" button in the top safe area. Tapping it appends a prompt plus a thought and an action, which is what a sent message produces: the prompt closes the old segment and opens a new active one. The button disables after one tap so activity IDs stay unique.
What to look for: the new “Working 0:03” group appears collapsed, and tapping the chevron expands its content. On appear the list now scrolls to the new response.