(
request: DeletePersistedSessionRequest,
app_state: State<'_, AppState>,
path_manager: State<'_, Arc<PathManager>>,
)
| 401 | |
| 402 | #[tauri::command] |
| 403 | pub 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] |
| 425 | pub async fn touch_session_activity( |
nothing calls this directly
no test coverage detected