Skip to main content

with_question_controller

Function with_question_controller 

Source
fn with_question_controller<T>(
    command: &str,
    action: &str,
    block_id: &str,
    tool_use_id: &str,
    f: impl FnOnce(&PersistentSubprocessController) -> Result<T, String>,
) -> Result<T, String>
Expand description

Run f on block_id’s persistent controller for agent.answer / agent.cancel. The error strings are matched by the frontend’s SAFE_TO_RETRY_VIA_FOLLOWUP allowlist (useAgentQuestions.ts).