pub struct WorkspaceNavigator {
pub project_root: PathBuf,
pub current_dir: PathBuf,
pub agent_workspaces: HashMap<String, PathBuf>,
pub main_workspace: PathBuf,
pub discovered_workspaces: HashMap<String, PathBuf>,
}Expand description
Workspace navigation utilities for managing and navigating between agent workspaces.
Fields§
§project_root: PathBufSprite project root (directory containing agents/agents.yaml)
current_dir: PathBufCurrent working directory
agent_workspaces: HashMap<String, PathBuf>Available agent workspaces
main_workspace: PathBufMain workspace (git root)
discovered_workspaces: HashMap<String, PathBuf>Additional discovered workspaces
Implementations§
Sourcepub fn get_all_workspaces(&self) -> Vec<WorkspaceInfo>
pub fn get_all_workspaces(&self) -> Vec<WorkspaceInfo>
Get all available workspaces.
Sourcepub fn find_workspace(&self, name: &str) -> Option<WorkspaceInfo>
pub fn find_workspace(&self, name: &str) -> Option<WorkspaceInfo>
Find workspace by name or path.
Sourcepub fn get_current_workspace(&self) -> Option<WorkspaceInfo>
pub fn get_current_workspace(&self) -> Option<WorkspaceInfo>
Get the current workspace information.
Sourcepub fn get_relative_path(&self, target: &Path) -> String
pub fn get_relative_path(&self, target: &Path) -> String
Get relative path from current directory to target.
Sourcepub fn workspace_exists(&self, name: &str) -> bool
pub fn workspace_exists(&self, name: &str) -> bool
Check if a workspace exists and is accessible.
Get navigation command for the specified workspace.
Navigate to workspace (returns command to execute).
Sourcepub fn generate_shell_integration(&self) -> String
pub fn generate_shell_integration(&self) -> String
Generate shell integration script for workspace navigation.
Sourcepub fn print_workspace_status(&self) -> Result<()>
pub fn print_workspace_status(&self) -> Result<()>
Print workspace status and navigation suggestions.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more