pub struct WorkspaceManager { /* private fields */ }Implementations§
Source§impl WorkspaceManager
impl WorkspaceManager
pub async fn new(config_path: PathBuf) -> Result<Self>
pub async fn new_with_root_override( config_path: PathBuf, root_override: Option<PathBuf>, ) -> Result<Self>
pub async fn init_workspace(&mut self, name: &str, root: &Path) -> Result<()>
pub async fn discover_repositories( &self, path: &Path, depth: usize, ) -> Result<Vec<PathBuf>>
pub async fn add_discovered_repositories( &mut self, repo_paths: &[PathBuf], ) -> Result<()>
pub async fn show_status( &self, dirty_only: bool, format: &str, group: Option<&str>, ) -> Result<()>
pub async fn execute_command( &self, command: &str, repos: Option<&str>, group: Option<&str>, parallel: bool, ) -> Result<()>
pub fn get_workspace_root(&self) -> &PathBuf
pub fn get_config_path(&self) -> &PathBuf
pub fn config(&self) -> &WorkspaceConfig
pub fn config_mut(&mut self) -> &mut WorkspaceConfig
pub async fn add_repository(&mut self, repo: Repository) -> Result<()>
pub fn get_config(&self) -> &WorkspaceConfig
pub fn get_template_manager(&self) -> &TemplateManager
Sourcepub async fn scan_repositories(
&mut self,
scan_path: &Path,
depth: usize,
import: bool,
restore: bool,
clean: bool,
) -> Result<()>
pub async fn scan_repositories( &mut self, scan_path: &Path, depth: usize, import: bool, restore: bool, clean: bool, ) -> Result<()>
Scan workspace for repositories with new hierarchical display and sync options
Sourcepub async fn sync_repositories(
&self,
fetch_only: bool,
prune: bool,
save_dirty: bool,
group: Option<&str>,
) -> Result<()>
pub async fn sync_repositories( &self, fetch_only: bool, prune: bool, save_dirty: bool, group: Option<&str>, ) -> Result<()>
Enhanced sync repositories with dirty handling
pub async fn save_config(&self) -> Result<()>
pub async fn init_config( &mut self, name: Option<&str>, root: Option<&Path>, auto_discover: bool, ) -> Result<()>
pub async fn edit_config(&self, direct: bool) -> Result<()>
pub async fn show_config( &self, format: &str, section: Option<&str>, ) -> Result<()>
pub async fn validate_config( &self, check_paths: bool, check_remotes: bool, check_apps: bool, ) -> Result<()>
Sourcepub async fn configure_app_for_repo(
&mut self,
repo_name: &str,
app: &str,
template: &str,
) -> Result<()>
pub async fn configure_app_for_repo( &mut self, repo_name: &str, app: &str, template: &str, ) -> Result<()>
Configure an app for a repository
Sourcepub fn list_apps_for_repo(
&self,
repo_name: &str,
) -> Result<Vec<(String, String)>>
pub fn list_apps_for_repo( &self, repo_name: &str, ) -> Result<Vec<(String, String)>>
List configured apps for a repository
Sourcepub async fn get_repos_with_apps_and_status(
&self,
) -> Result<Vec<RepoWithStatus>>
pub async fn get_repos_with_apps_and_status( &self, ) -> Result<Vec<RepoWithStatus>>
Get repositories that have at least one app configured, with git status
Sourcepub fn list_repos_with_app(&self, app: &str) -> Vec<(&Repository, String)>
pub fn list_repos_with_app(&self, app: &str) -> Vec<(&Repository, String)>
List repositories configured with a specific app
Sourcepub async fn init_templates(&self) -> Result<()>
pub async fn init_templates(&self) -> Result<()>
Initialize default templates if they don’t exist
Sourcepub async fn list_templates(&self, app: &str) -> Result<Vec<String>>
pub async fn list_templates(&self, app: &str) -> Result<Vec<String>>
List available templates for an app
Sourcepub async fn create_template(
&self,
app: &str,
template_name: &str,
from_template: &str,
) -> Result<()>
pub async fn create_template( &self, app: &str, template_name: &str, from_template: &str, ) -> Result<()>
Create a new template from an existing one
Sourcepub async fn delete_template(
&self,
app: &str,
template_name: &str,
) -> Result<()>
pub async fn delete_template( &self, app: &str, template_name: &str, ) -> Result<()>
Delete a template
Sourcepub async fn show_app_configurations(&self) -> Result<()>
pub async fn show_app_configurations(&self) -> Result<()>
Show configured apps for all repositories
Sourcepub async fn get_default_template(&self, app: &str) -> Result<String>
pub async fn get_default_template(&self, app: &str) -> Result<String>
Get the default template content for an app
Sourcepub async fn save_template(
&self,
app: &str,
name: &str,
content: &str,
) -> Result<()>
pub async fn save_template( &self, app: &str, name: &str, content: &str, ) -> Result<()>
Save a template with content
Sourcepub async fn update_default_templates(&self, apps: Vec<String>) -> Result<()>
pub async fn update_default_templates(&self, apps: Vec<String>) -> Result<()>
Update default templates with current bundled versions
Sourcepub async fn smart_open_repository(&self, repo_name: &str) -> Result<()>
pub async fn smart_open_repository(&self, repo_name: &str) -> Result<()>
Smart open repository - shows app choice menu with configured and available apps
Sourcepub async fn open_repo_with_app(&self, repo_name: &str, app: &str) -> Result<()>
pub async fn open_repo_with_app(&self, repo_name: &str, app: &str) -> Result<()>
Open a repository with a configured app
Sourcepub async fn open_repo_with_app_options(
&self,
repo_name: &str,
app: &str,
no_itermocil: bool,
) -> Result<()>
pub async fn open_repo_with_app_options( &self, repo_name: &str, app: &str, no_itermocil: bool, ) -> Result<()>
Open a repository with a configured app with options
Sourcepub fn get_current_app_states(&self, repo_name: &str) -> Result<AppConfigState>
pub fn get_current_app_states(&self, repo_name: &str) -> Result<AppConfigState>
Get current app configuration states for a repository
Sourcepub async fn remove_app_for_repo(
&mut self,
repo_name: &str,
app: &str,
) -> Result<()>
pub async fn remove_app_for_repo( &mut self, repo_name: &str, app: &str, ) -> Result<()>
Remove app configuration for a repository
Sourcepub async fn cleanup_app_files(&self, repo_name: &str, app: &str) -> Result<()>
pub async fn cleanup_app_files(&self, repo_name: &str, app: &str) -> Result<()>
Clean up app-generated files for a repository
Sourcepub async fn configure_multiple_apps(
&mut self,
repo_name: &str,
app_selections: Vec<AppSelection>,
) -> Result<Vec<String>>
pub async fn configure_multiple_apps( &mut self, repo_name: &str, app_selections: Vec<AppSelection>, ) -> Result<Vec<String>>
Configure multiple apps for a repository
Sourcepub async fn create_backup(
&self,
output_dir: Option<PathBuf>,
custom_name: Option<String>,
) -> Result<PathBuf>
pub async fn create_backup( &self, output_dir: Option<PathBuf>, custom_name: Option<String>, ) -> Result<PathBuf>
Create a backup archive of all configuration files
Sourcepub async fn factory_reset(&mut self, force: bool) -> Result<()>
pub async fn factory_reset(&mut self, force: bool) -> Result<()>
Factory reset - clear all configuration and reinitialize
Sourcepub async fn reset_repositories(&mut self, force: bool) -> Result<()>
pub async fn reset_repositories(&mut self, force: bool) -> Result<()>
Reset repository configuration only (clear all tracked repositories)
pub async fn factory_reset_with_options( &mut self, force: bool, skip_final_confirmation: bool, ) -> Result<()>
Sourcepub fn get_repository(&self, name: &str) -> Option<&Repository>
pub fn get_repository(&self, name: &str) -> Option<&Repository>
Get a repository by name
Sourcepub fn get_repository_flexible(&self, name: &str) -> Option<&Repository>
pub fn get_repository_flexible(&self, name: &str) -> Option<&Repository>
Get a repository by flexible name lookup (supports owner/repo format)
Sourcepub fn list_repositories(&self) -> &[Repository]
pub fn list_repositories(&self) -> &[Repository]
List all repositories
Sourcepub async fn remove_repository(&mut self, name: &str) -> Result<()>
pub async fn remove_repository(&mut self, name: &str) -> Result<()>
Remove a repository from the workspace
Sourcepub async fn is_app_available(&self, app_name: &str) -> bool
pub async fn is_app_available(&self, app_name: &str) -> bool
Check if an app is available on the system
Sourcepub async fn get_available_apps(&self) -> Vec<String>
pub async fn get_available_apps(&self) -> Vec<String>
Get all available apps on the system
Sourcepub async fn get_repository_cache(&mut self) -> Result<&RepositoryCache>
pub async fn get_repository_cache(&mut self) -> Result<&RepositoryCache>
Get repository cache (lazy initialization if needed)
Sourcepub async fn get_git_status_cache(&mut self) -> Result<&GitStatusCache>
pub async fn get_git_status_cache(&mut self) -> Result<&GitStatusCache>
Get git status cache (lazy initialization if needed)
Sourcepub async fn refresh_repository_cache(&mut self) -> Result<()>
pub async fn refresh_repository_cache(&mut self) -> Result<()>
Refresh repository cache from current configuration
Sourcepub async fn update_git_status_cache(
&mut self,
repo_names: &[String],
) -> Result<()>
pub async fn update_git_status_cache( &mut self, repo_names: &[String], ) -> Result<()>
Update git status cache for repositories (background operation)
Sourcepub async fn get_quick_launcher(&self) -> Result<QuickLauncher>
pub async fn get_quick_launcher(&self) -> Result<QuickLauncher>
Get quick launcher for fast repository selection
Get page size for main menu
Sourcepub fn get_repository_list_page_size(&self) -> usize
pub fn get_repository_list_page_size(&self) -> usize
Get page size for repository list
Sourcepub fn get_quick_launch_page_size(&self) -> usize
pub fn get_quick_launch_page_size(&self) -> usize
Get page size for quick launch
Sourcepub fn get_app_selection_page_size(&self) -> usize
pub fn get_app_selection_page_size(&self) -> usize
Get page size for app selection
Sourcepub fn get_git_search_results_page_size(&self) -> usize
pub fn get_git_search_results_page_size(&self) -> usize
Get page size for git search results
Get page size for management menus
Sourcepub fn get_app_installer_page_size(&self) -> usize
pub fn get_app_installer_page_size(&self) -> usize
Get page size for app installer
Sourcepub async fn list_available_backups(&self) -> Result<Vec<BackupInfo>>
pub async fn list_available_backups(&self) -> Result<Vec<BackupInfo>>
List available backup files in the default backup directory