acp_thread: Emit elicitation completion from state transitions (#64609)
Emit elicitation completion from the authoritative state transition
rather than from the task awaiting its response.
ACP request cancellation can drop the response task before canceling the
stored elicitation. Previously, the request became canceled but never
emitted `ElicitationResponded`. A regression reproduces the consequence:
idle-sleep prevention stays disabled even though the request is no
longer pending and the agent is still generating.
- Make response tasks receiver-only; emit completion from the owning
session thread or connection store.
- Distinguish resolving a pending request from canceling an
already-accepted URL flow, which must not emit a second response.
- Preserve existing response payloads, update-before-completion event
order, and duplicate/no-op behavior.
Release Notes:
- N/A
05958c4773Ben Brandt committed on 9/23/2026, 12:07:03 PM· committed by GitHubparenta3ccafe