feat(browser): implement input blocker overlay during automation (#21132)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
Co-authored-by: Gaurav Ghosh <gaghosh@google.com>
This commit is contained in:
Aditya Bijalwan
2026-03-12 16:59:57 +05:30
committed by GitHub
parent 41d4f59f5e
commit 333475c41f
12 changed files with 652 additions and 13 deletions
+15
View File
@@ -316,6 +316,8 @@ export interface BrowserAgentCustomConfig {
profilePath?: string;
/** Model override for the visual agent. */
visualModel?: string;
/** Disable user input on the browser window during automation. Default: true in non-headless mode */
disableUserInput?: boolean;
}
/**
@@ -2888,10 +2890,23 @@ export class Config implements McpContext, AgentLoopContext {
headless: customConfig.headless ?? false,
profilePath: customConfig.profilePath,
visualModel: customConfig.visualModel,
disableUserInput: customConfig.disableUserInput,
},
};
}
/**
* Determines if user input should be disabled during browser automation.
* Based on the `disableUserInput` setting and `headless` mode.
*/
shouldDisableBrowserUserInput(): boolean {
const browserConfig = this.getBrowserAgentConfig();
return (
browserConfig.customConfig?.disableUserInput !== false &&
!browserConfig.customConfig?.headless
);
}
async createToolRegistry(): Promise<ToolRegistry> {
const registry = new ToolRegistry(this, this.messageBus);