Compare commits

...
Author SHA1 Message Date
celestial-vault f6c796e1b5 changeset 2025-04-07 16:58:32 -07:00
celestial-vault 8a5b144c69 remove event.isTrusted check 2025-04-07 16:57:49 -07:00
celestial-vault 94b87f9678 changeset 2025-04-07 16:20:17 -07:00
celestial-vault 6a8062a9d6 fix state out of sync 2025-04-07 16:19:53 -07:00
4 changed files with 20 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Fix auto approve state out of sync
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Fix tool toggle auto approve
+6 -1
View File
@@ -627,7 +627,12 @@ export class McpHub {
// Update the tools list to reflect the change
const connection = this.connections.find((conn) => conn.server.name === serverName)
if (connection) {
if (connection && connection.server.tools) {
// Update the autoApprove property of each tool in the in-memory server object
connection.server.tools = connection.server.tools.map((tool) => ({
...tool,
autoApprove: autoApprove.includes(tool.name),
}))
await this.notifyWebviewOfServerChanges()
}
} catch (error) {
@@ -14,7 +14,10 @@ const McpToolRow = ({ tool, serverName }: McpToolRowProps) => {
// Accept the event object
const handleAutoApproveChange = (event: any) => {
// Only proceed if the event was triggered by a direct user interaction
if (!serverName || !event.isTrusted) return
if (!serverName) {
return
}
vscode.postMessage({
type: "toggleToolAutoApprove",