(command: Commands)
| 400 | } |
| 401 | |
| 402 | async fn dispatch_command(command: Commands) -> tracedecay::errors::Result<()> { |
| 403 | match command { |
| 404 | Commands::Init { |
| 405 | path, |
| 406 | skip_folders, |
| 407 | include_folders, |
| 408 | } => { |
| 409 | commands::handle_init(path, skip_folders, include_folders).await?; |
| 410 | } |
| 411 | Commands::Sync { |
| 412 | path, |
| 413 | force, |
| 414 | skip_folders, |
| 415 | include_folders, |
| 416 | doctor, |
| 417 | verbose, |
| 418 | } => { |
| 419 | commands::handle_sync(path, force, skip_folders, include_folders, doctor, verbose) |
| 420 | .await?; |
| 421 | } |
| 422 | Commands::Status { |
| 423 | path, |
| 424 | project_id, |
| 425 | project_path, |
| 426 | json, |
| 427 | short, |
| 428 | details, |
| 429 | runtime, |
| 430 | } => { |
| 431 | status_cmd::handle_status_command( |
| 432 | path, |
| 433 | project_id, |
| 434 | project_path, |
| 435 | json, |
| 436 | short, |
| 437 | details, |
| 438 | runtime, |
| 439 | ) |
| 440 | .await?; |
| 441 | } |
| 442 | Commands::Tool { |
| 443 | project, |
| 444 | name, |
| 445 | args, |
| 446 | } => { |
| 447 | tool_command::run(project, name, args).await?; |
| 448 | } |
| 449 | Commands::Lsp { action } => { |
| 450 | lsp_cmd::handle_lsp_action(action)?; |
| 451 | } |
| 452 | Commands::Install { |
| 453 | agent, |
| 454 | local, |
| 455 | profile, |
| 456 | all_profiles, |
| 457 | project_root, |
| 458 | no_dashboard, |
| 459 | automation, |
no test coverage detected