Skip to main content

shortcut_target

Function shortcut_target 

Source
fn shortcut_target(
    own: &str,
    requested: Option<&str>,
    other: impl FnOnce(&str) -> Result<String, (StatusCode, String)>,
) -> Result<String, (StatusCode, String)>
Expand description

The pane a command or key press acts on: the caller’s own pane (own) when requested is absent or names it, else the pane other accepts (a browser pane it opened), else the refusal. A command is the person’s own action as far as the app can tell, so an agent never runs one against the focused pane (which may be another agent’s, or theirs) or any pane it doesn’t drive.