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

Function delete_persisted_session

src/apps/desktop/src/api/session_api.rs:403–422  ·  view source on GitHub ↗
(
    request: DeletePersistedSessionRequest,
    app_state: State<'_, AppState>,
    path_manager: State<'_, Arc<PathManager>>,
)

Source from the content-addressed store, hash-verified

401
402#[tauri::command]
403pub async fn delete_persisted_session(
404 request: DeletePersistedSessionRequest,
405 app_state: State<'_, AppState>,
406 path_manager: State<'_, Arc<PathManager>>,
407) -> Result<(), String> {
408 let workspace_path = desktop_effective_session_storage_path(
409 &app_state,
410 &request.workspace_path,
411 request.remote_connection_id.as_deref(),
412 request.remote_ssh_host.as_deref(),
413 )
414 .await;
415 let manager = PersistenceManager::new(path_manager.inner().clone())
416 .map_err(|e| format!("Failed to create persistence manager: {}", e))?;
417
418 manager
419 .delete_session(&workspace_path, &request.session_id)
420 .await
421 .map_err(|e| format!("Failed to delete persisted session: {}", e))
422}
423
424#[tauri::command]
425pub async fn touch_session_activity(

Callers

nothing calls this directly

Calls 3

cloneMethod · 0.45
delete_sessionMethod · 0.45

Tested by

no test coverage detected