Skip to main content

dispatch_command_with_mode

Function dispatch_command_with_mode 

Source
pub async fn dispatch_command_with_mode(
    command: Commands,
    config_service: Arc<dyn ConfigService>,
    output_mode: OutputMode,
) -> Result<()>
Expand description

Dispatch a command using an owned Arc<dyn ConfigService> and an explicit OutputMode.

This is the entry point used by the CLI runtime. The output_mode parameter is currently used to thread the renderer through to each per-command handler (a follow-up task wires it into the per-command payload emission). Today, the dispatcher itself does not branch on the mode — the global mode installed via crate::cli::output::install_active_mode already governs UI helpers — but the parameter is plumbed for forward compatibility so per-command sub-agents have a stable contract to consume.