fix: stats persistence

This commit is contained in:
2026-02-06 09:27:37 -08:00
parent 716949e114
commit 1492983ba9
4 changed files with 22 additions and 2 deletions
+7 -2
View File
@@ -338,17 +338,22 @@ User: ${formattedMessage}`;
throw new Error("No active conversation");
}
// Get current working directory before reconnecting
// Get current working directory and granted tools before reconnecting
const workingDir = await invoke<string>("get_working_directory", { conversationId });
const activeConversation = get(conversationsStore.activeConversation);
const grantedTools = activeConversation ? Array.from(activeConversation.grantedTools) : [];
const config = configStore.getConfig();
const allAllowedTools = [...new Set([...grantedTools, ...config.auto_granted_tools])];
// Set the flag to skip greeting on next connection
setSkipNextGreeting(true);
// Reconnect to Claude
// Reconnect to Claude with preserved permissions
await invoke("start_claude", {
conversationId,
options: {
working_dir: workingDir,
allowed_tools: allAllowedTools,
},
});