Expand description
Handing an open question to the chat conversation its task came from.
A task filed by the standing chat (Source::Agent with
crate::queue::CHAT_NODE, whose run is the conversation’s id) can raise
a question the owner would rather talk through where the task started. The
owner passes it on; the chat agent either answers it with magi answer or
puts the decision points to the owner in the conversation.
Three rules, each with a reason:
- One place decides.
origin_talkis the only judge of “does this question have a chat to ask”; the web view and both entry points use it. - Not a choice. The hand-over never goes into
Question::choicesand never touchesQuestion::answer: the question staysOpen, its validation and the choice actions stay as they were. - No new seat, no new waiter. The text is queued as a draft of the existing talk, so the chat’s own turn machinery (its session, its turn gate) runs it exactly as if the owner had typed it.
Enums§
- Started
- What
start_turndid.
Functions§
- begin
- Record the hand-over and queue the question as the chat’s next message.
- chat_
talk_ of - The talk
startdescends from: the id recorded on a task (Task::chat_talk) wins, so deleted ancestors do not matter; tasks written before it existed are resolved by walking the ancestry. - origin_
talk - The conversation
qmay be handed to, if any. - pending_
consults - Is any question handed to talk
talk_idstill open? - refuse_
operator_ held - Refuse a chat’s answer to a merge approval whose task the operator held, as
ask_settle_cmddoes for a deputy: such a hold is lifted by the operator’s button. The task is the oneq.runnames, directly or as one of its runs; none found (an unreadable task is not listed) does not refuse. The caller reads the queue before taking the question lock, so a hold placed in between is missed for that one call. - start_
turn begin, then run the chat’s turn here, under the talk’s own lease.- validate_
answer - Validate a merge approval answered by a running chat. Terminal answers and other question types retain their existing behavior. Intent is judged by the chat; this gate requires evidence from the correct conversation.