Skip to content

Commit 5aa4606

Browse files
committed
feat: local browser support args
1 parent 7cf93d6 commit 5aa4606

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/agent-infra/browser/src/local-browser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export class LocalBrowser extends BaseBrowser {
6161
options?.profilePath
6262
? `--profile-directory=${options.profilePath}`
6363
: '',
64+
...(options.args ?? []),
6465
].filter((item) => {
6566
if (type === 'firefox') {
6667
// firefox not support rules

packages/agent-infra/browser/src/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export type BrowserType = 'chrome' | 'edge' | 'firefox';
1212
* @interface LaunchOptions
1313
*/
1414
export interface LaunchOptions {
15+
/**
16+
* Additional command line arguments to pass to the browser instance.
17+
*/
18+
args?: string[];
1519
/**
1620
* Whether to run browser in headless mode
1721
* @default false

0 commit comments

Comments
 (0)