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

Function delete_session

src/apps/desktop/src/api/agentic_api.rs:1712–1733  ·  view source on GitHub ↗
(
    coordinator: State<'_, Arc<ConversationCoordinator>>,
    app_state: State<'_, AppState>,
    request: DeleteSessionRequest,
)

Source from the content-addressed store, hash-verified

1710
1711#[tauri::command]
1712pub 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]
1736pub async fn restore_session(

Callers

nothing calls this directly

Calls 3

delete_sessionMethod · 0.45

Tested by

no test coverage detected