From c5d3cffc405f41cefddbe92d11057c99cde06987 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Thu, 8 Oct 2026 19:03:25 +0200 Subject: [PATCH] fix: start panel chats in ask permission whatever mode was saved elsewhere Co-Authored-By: Claude Opus 5.5 --- browser_extension/README.md | 2 +- .../src/lib/components/copilot/chat/AIChatManager.svelte.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/browser_extension/README.md b/browser_extension/README.md index 67ba034e7a..bf1ee69f8e 100644 --- a/browser_extension/README.md +++ b/browser_extension/README.md @@ -28,7 +28,7 @@ icon to open the panel. - Reading and screenshots run without asking. Each click, type and navigation waits for the chat's own approval card, which lives in Windmill's frame where the page cannot reach it. The chat's Yolo mode skips the card, and its warning says pages can try to steer it. -- Approval runs in two steps. When the card opens, the extension pins the target (tab, +- Approval runs in two steps. Before the card opens, the extension pins the target (tab, document and element, the element held in the extension's isolated world) and describes it for the card. After approval it acts only on that target, and refuses if the tab is no longer active, the page navigated or reloaded, or the element changed. diff --git a/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts b/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts index bc9a8e986d..cd074a6d27 100644 --- a/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts +++ b/frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts @@ -2706,6 +2706,9 @@ export class AIChatManager implements ChatViewHost { enableBrowserTools = () => { this.browserTools = true + // Yolo here also clicks and types on the user's page, so it is chosen in the panel, never + // inherited from the setting saved by a chat elsewhere. Not persisted, so that setting stays. + if (this.autonomyMode === AIAutonomyMode.YOLO) this.autonomyMode = AIAutonomyMode.DEFAULT // The side panel renders no preview pane: forms stay inline and runs open in a new // tab, as in the docked chat. this.openRunInPreview = undefined