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

Function get_current_workspace

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

Source from the content-addressed store, hash-verified

1931
1932#[tauri::command]
1933pub async fn get_current_workspace(
1934 state: State<'_, AppState>,
1935 startup_trace: State<'_, DesktopStartupTrace>,
1936) -> Result<Option<WorkspaceInfoDto>, String> {
1937 let trace_started = Instant::now();
1938 let workspace_service = &state.workspace_service;
1939 let result = Ok(workspace_service
1940 .get_current_workspace()
1941 .await
1942 .map(|info| WorkspaceInfoDto::from_workspace_info(&info)));
1943 startup_trace.record_tauri_command_elapsed("get_current_workspace", None, trace_started);
1944 result
1945}
1946
1947#[tauri::command]
1948pub async fn get_recent_workspaces(

Callers

nothing calls this directly

Calls 2

get_current_workspaceMethod · 0.45

Tested by

no test coverage detected