From c074b9a3f2964502a9a9deaae9ae131b7d1be426 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Sat, 27 Dec 2025 19:13:19 +0200 Subject: [PATCH] feat: enhance abortSession method to include current directory in query --- .../desktop/src-tauri/src/opencode_auth.rs | 18 ------------------ packages/ui/src/lib/opencode/client.ts | 1 + 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/desktop/src-tauri/src/opencode_auth.rs b/packages/desktop/src-tauri/src/opencode_auth.rs index e21fb5aa..633ab363 100644 --- a/packages/desktop/src-tauri/src/opencode_auth.rs +++ b/packages/desktop/src-tauri/src/opencode_auth.rs @@ -95,22 +95,4 @@ pub async fn remove_provider_auth(provider_id: &str) -> Result { Ok(true) } -/// Get provider auth entry -pub async fn get_provider_auth(provider_id: &str) -> Result> { - let auth = read_auth().await?; - Ok(auth - .as_object() - .and_then(|obj| obj.get(provider_id)) - .cloned()) -} - -/// List all provider IDs with auth -pub async fn list_provider_auths() -> Result> { - let auth = read_auth().await?; - - Ok(auth - .as_object() - .map(|obj| obj.keys().cloned().collect()) - .unwrap_or_default()) -} diff --git a/packages/ui/src/lib/opencode/client.ts b/packages/ui/src/lib/opencode/client.ts index f5f64ce1..b33c3bc7 100644 --- a/packages/ui/src/lib/opencode/client.ts +++ b/packages/ui/src/lib/opencode/client.ts @@ -473,6 +473,7 @@ class OpencodeService { async abortSession(id: string): Promise { const response = await this.client.session.abort({ path: { id }, + query: this.currentDirectory ? { directory: this.currentDirectory } : undefined, throwOnError: true, }); return Boolean(response.data);