(
coordinator: State<'_, Arc<ConversationCoordinator>>,
app_state: State<'_, AppState>,
request: DeleteSessionRequest,
)
| 1710 | |
| 1711 | #[tauri::command] |
| 1712 | pub async fn delete_session( |
| 1713 | coordinator: State<'_, Arc<ConversationCoordinator>>, |
| 1714 | app_state: State<'_, AppState>, |
| 1715 | request: DeleteSessionRequest, |
| 1716 | ) -> Result<(), String> { |
| 1717 | let effective_path = desktop_effective_session_storage_path( |
| 1718 | &app_state, |
| 1719 | &request.workspace_path, |
| 1720 | request.remote_connection_id.as_deref(), |
| 1721 | request.remote_ssh_host.as_deref(), |
| 1722 | ) |
| 1723 | .await; |
| 1724 | if let Some(acp_client_service) = app_state.acp_client_service.as_ref() { |
| 1725 | acp_client_service |
| 1726 | .release_bitfun_session(&request.session_id) |
| 1727 | .await; |
| 1728 | } |
| 1729 | coordinator |
| 1730 | .delete_session(&effective_path, &request.session_id) |
| 1731 | .await |
| 1732 | .map_err(|e| format!("Failed to delete session: {}", e)) |
| 1733 | } |
| 1734 | |
| 1735 | #[tauri::command] |
| 1736 | pub async fn restore_session( |
nothing calls this directly
no test coverage detected