Skip to main content

handle_deliver_peer_prompt

Function handle_deliver_peer_prompt 

Source
pub(crate) fn handle_deliver_peer_prompt(
    workspace: &Arc<Workspace>,
    caller: &SessionSlot,
    target_project: String,
    wrapped: WrappedPrompt,
) -> Result<(), String>
Expand description

Handle a Command::DeliverPeerPrompt. Resolves the target project to a running SessionTask (deliver immediately) or a sleeping one (buffer + auto-spawn), then dispatches the wrapped prompt as a regular Command::Prompt.

The answer is this handler’s own: Ok(()) once the prompt was accepted by the running session or parked for a spawn it kicked off, Err(reason) when nothing could take it. The caller’s ack is built from it, so a delivery that never left forge cannot read as sent (#2342).