(config_path: &str)
| 828 | } |
| 829 | |
| 830 | async fn cmd_restart(config_path: &str) -> Result<(), Box<dyn std::error::Error>> { |
| 831 | tui::print_banner("Restart"); |
| 832 | let path = PathBuf::from(config_path); |
| 833 | ensure_config_migrated(&path)?; |
| 834 | Config::from_file(&path) |
| 835 | .map_err(|e| format!("Failed to load configuration from '{}': {}", config_path, e))?; |
| 836 | ensure_service_config_matches(&path)?; |
| 837 | |
| 838 | tui::print_info("Config", config_path); |
| 839 | println!("Restarting ClawShell via service manager..."); |
| 840 | platform::service_restart()?; |
| 841 | tui::print_success("ClawShell restarted successfully."); |
| 842 | tui::print_info("Logs", &process::log_file_path().display().to_string()); |
| 843 | Ok(()) |
| 844 | } |
| 845 | |
| 846 | async fn cmd_logs( |
| 847 | level: Option<String>, |
no test coverage detected