Skip to main content

Module open_here_mark

Module open_here_mark 

Source
Expand description

A pane bound with “Open here” and the refusal it is expected to get.

The agent picker’s Open here binds a fresh pane to an agent that is open in another pane. The single-live-instance guard refuses that second pane (open_in_other_pane), and the pane answers the refusal at once with Move here. The refusal is a step of the move, not news: written into the pane’s history it would stay there as a red line above the conversation after the agent has moved. The window marks the pane (agent:open_here) before it binds; the refusal still reaches the pane’s recovery row, only the line in the history is left out.

Constants§

META_OPEN_HERE
Block meta the window sets on a pane bound with Open here. srv clears it once the agent has moved.

Functions§

expected_for_block
is_expected_open_here_refusal for the block block_id as stored.
is_expected_open_here_refusal
Whether message, a refusal about to be written into the pane’s history, is the one an Open here pane expects: the agent is open in another pane, and this pane is marked.
settle_after_move
The agent has moved into this pane. Drop the mark, so every refusal after this one is news again, and the “open in another pane” failure that asked for the move: it is no longer true, and left in the pane’s meta it brings the recovery row back when the pane reloads.