mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-23 11:34:44 -07:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user