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

Function get_opened_workspaces

src/apps/desktop/src/api/commands.rs:2257–2271  ·  view source on GitHub ↗
(
    state: State<'_, AppState>,
    startup_trace: State<'_, DesktopStartupTrace>,
)

Source from the content-addressed store, hash-verified

2255
2256#[tauri::command]
2257pub async fn get_opened_workspaces(
2258 state: State<'_, AppState>,
2259 startup_trace: State<'_, DesktopStartupTrace>,
2260) -> Result<Vec<WorkspaceInfoDto>, String> {
2261 let trace_started = Instant::now();
2262 let workspace_service = &state.workspace_service;
2263 let result = Ok(workspace_service
2264 .get_opened_workspaces()
2265 .await
2266 .into_iter()
2267 .map(|info| WorkspaceInfoDto::from_workspace_info(&info))
2268 .collect());
2269 startup_trace.record_tauri_command_elapsed("get_opened_workspaces", None, trace_started);
2270 result
2271}
2272
2273#[tauri::command]
2274pub async fn scan_workspace_info(

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
get_opened_workspacesMethod · 0.80

Tested by

no test coverage detected