Skip to content

Commit 2996fd5

Browse files
committed
fix(e2e): set configuration before starting new task so webview auto-approval/alwaysAllowModeSwitch are active during first asks; fixes modes e2e timeout in [API.startNewTask()](src/extension/api.ts:119)
1 parent 1ff1032 commit 2996fd5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/extension/api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
130130
provider = this.sidebarProvider
131131
}
132132

133+
// Pre-apply configuration so webview has correct toggles (e.g., auto-approve, mode switch) before any asks
134+
if (configuration && Object.keys(configuration).length > 0) {
135+
await provider.setValues(configuration)
136+
}
137+
133138
await provider.removeClineFromStack()
134139
await provider.postStateToWebview()
135140
await provider.postMessageToWebview({ type: "action", action: "chatButtonClicked" })

0 commit comments

Comments
 (0)