()
| 799 | } |
| 800 | |
| 801 | fn cmd_stop() -> Result<(), Box<dyn std::error::Error>> { |
| 802 | tui::print_banner("Stop"); |
| 803 | ensure_default_config_migrated_if_present()?; |
| 804 | ensure_service_installed_for_lifecycle()?; |
| 805 | |
| 806 | if !platform::service_is_running()? { |
| 807 | tui::print_warning("ClawShell is not running."); |
| 808 | return Ok(()); |
| 809 | } |
| 810 | |
| 811 | println!("Stopping ClawShell via service manager..."); |
| 812 | platform::service_stop()?; |
| 813 | tui::print_success("ClawShell stopped successfully."); |
| 814 | tui::print_info("Logs", &process::log_file_path().display().to_string()); |
| 815 | Ok(()) |
| 816 | } |
| 817 | |
| 818 | fn cmd_status() -> Result<(), Box<dyn std::error::Error>> { |
| 819 | tui::print_banner("Status"); |
no test coverage detected