diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index fd68779..9e26d9b 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1636,7 +1636,7 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hikari-desktop" -version = "1.2.0" +version = "1.3.0" dependencies = [ "chrono", "dirs 5.0.1", diff --git a/src/lib/commands/slashCommands.ts b/src/lib/commands/slashCommands.ts index 90271a0..86b31f8 100644 --- a/src/lib/commands/slashCommands.ts +++ b/src/lib/commands/slashCommands.ts @@ -37,6 +37,12 @@ async function changeDirectory(path: string): Promise { // Capture conversation history before disconnecting const conversationHistory = claudeStore.getConversationHistory(); + // Get currently granted tools and config auto-granted tools + 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])]; + await invoke("stop_claude", { conversationId }); // Wait for clean shutdown @@ -50,12 +56,11 @@ async function changeDirectory(path: string): Promise { conversationId, options: { working_dir: validatedPath, + allowed_tools: allAllowedTools, }, }); // Update Discord RPC when reconnecting after directory change - const config = configStore.getConfig(); - const activeConversation = get(conversationsStore.activeConversation); if (activeConversation) { await updateDiscordRpc( activeConversation.name, diff --git a/src/lib/components/PermissionModal.svelte b/src/lib/components/PermissionModal.svelte index e96afd5..13f3e45 100644 --- a/src/lib/components/PermissionModal.svelte +++ b/src/lib/components/PermissionModal.svelte @@ -1,22 +1,17 @@