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

Function get_recent_workspaces

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

Source from the content-addressed store, hash-verified

1946
1947#[tauri::command]
1948pub async fn get_recent_workspaces(
1949 state: State<'_, AppState>,
1950 startup_trace: State<'_, DesktopStartupTrace>,
1951) -> Result<Vec<WorkspaceInfoDto>, String> {
1952 let trace_started = Instant::now();
1953 let workspace_service = &state.workspace_service;
1954 let result = Ok(workspace_service
1955 .get_recent_workspaces()
1956 .await
1957 .into_iter()
1958 .map(|info| WorkspaceInfoDto::from_workspace_info(&info))
1959 .collect());
1960 startup_trace.record_tauri_command_elapsed("get_recent_workspaces", None, trace_started);
1961 result
1962}
1963
1964async fn collect_workspace_state_snapshot(state: &State<'_, AppState>) -> WorkspaceStateSnapshot {
1965 let workspace_service = &state.workspace_service;

Callers

nothing calls this directly

Calls 3

collectMethod · 0.80
get_recent_workspacesMethod · 0.45

Tested by

no test coverage detected