pub(crate) async fn close_pane_as(
state: &AppState,
caller_agent_id: &str,
target_block_id: &str,
reason: Option<&str>,
via: &str,
) -> (StatusCode, Value)Expand description
Close the tab target_block_id on behalf of caller_agent_id: it waits 30 s for its
user to keep it (§6.5) and answers 202 with the pending request, which names the tab and
says whether the pane closes with it (pane_closes: it was the pane’s last tab). The
pane’s other tabs stay. That includes a tab the caller is in: closing it ends the caller
(which only QuitSelf may do without the user’s window). Audited as pane.close. Shared by ClosePane
and RunCommand’s pane:close (server/ui_shortcuts.rs), so both carry the
same protection. via names the tool in the pending request and the audit.