MCPcopy Create free account
hub / github.com/GCWing/BitFun / lookup_remote_entry_for_path

Function lookup_remote_entry_for_path

src/apps/desktop/src/api/path_target.rs:114–126  ·  view source on GitHub ↗
(
    app_state: &AppState,
    path: &str,
    request_preferred: Option<&str>,
)

Source from the content-addressed store, hash-verified

112}
113
114async fn lookup_remote_entry_for_path(
115 app_state: &AppState,
116 path: &str,
117 request_preferred: Option<&str>,
118) -> Option<RemoteWorkspaceEntry> {
119 let manager = get_remote_workspace_manager()?;
120 let legacy = app_state
121 .get_remote_workspace_async()
122 .await
123 .map(|workspace| workspace.connection_id);
124 let preferred = request_preferred.map(|s| s.to_string()).or(legacy);
125 manager.lookup_connection(path, preferred.as_deref()).await
126}
127
128pub async fn resolve_desktop_path_target(
129 app_state: &AppState,

Callers 1

Calls 3

lookup_connectionMethod · 0.45

Tested by

no test coverage detected