fix: ensure permission/stats persist until explicit disconnect (#110)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint & Test (push) Successful in 16m1s
CI / Build Linux (push) Successful in 20m27s
CI / Build Windows (cross-compile) (push) Successful in 32m18s

Also includes cached tokens in cost calculations to provide more accurate billing estimates.

Reviewed-on: #110
Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com>
Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit was merged in pull request #110.
This commit is contained in:
2026-02-06 13:54:31 -08:00
committed by Naomi Carrigan
parent 6a12a7a34d
commit 136f95cd1a
12 changed files with 350 additions and 82 deletions
+7 -1
View File
@@ -30,7 +30,7 @@
createSummary,
sanitizeForJson,
} from "$lib/utils/conversationUtils";
import { updateDiscordRpc } from "$lib/tauri";
import { updateDiscordRpc, setSkipNextGreeting } from "$lib/tauri";
const DISCORD_URL = "https://chat.nhcarrigan.com";
const DONATE_URL = "https://donate.nhcarrigan.com";
@@ -190,6 +190,9 @@
throw new Error("No active conversation");
}
await invoke("stop_claude", { conversationId });
// Clear granted permissions when user explicitly disconnects
claudeStore.revokeAllTools();
} catch (error) {
console.error("Failed to stop Claude:", error);
}
@@ -248,6 +251,9 @@
: sanitizedContent;
// Step 1: Disconnect from Claude to reset context
// Prevent stats reset on reconnection
setSkipNextGreeting(true);
if (connectionStatus === "connected") {
await invoke("stop_claude", { conversationId: activeId });
}