@@ -142,11 +142,13 @@ interface McpLaunchOptions {
142142 width : number ;
143143 height : number ;
144144 } ;
145- args ?: string [ ] ;
145+ chromeArgs ?: string [ ] ;
146+ ignoreDefaultChromeArgs ?: string [ ] ;
146147 devtools : boolean ;
147148}
148149
149150export async function launch ( options : McpLaunchOptions ) : Promise < Browser > {
151+ console . log ( '🔥' , options ) ;
150152 const { channel, executablePath, headless, isolated} = options ;
151153 const profileDirName =
152154 channel && channel !== 'stable'
@@ -167,9 +169,14 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
167169 }
168170
169171 const args : LaunchOptions [ 'args' ] = [
170- ...( options . args ?? [ ] ) ,
171- '--hide-crash-restore -bubble' ,
172+ ...( options . chromeArgs ?? [ ] ) ,
173+ '--hide-crash-resore -bubble' ,
172174 ] ;
175+ const ignoreDefaultArgs : LaunchOptions [ 'ignoreDefaultArgs' ] =
176+ options . ignoreDefaultChromeArgs ?? false ;
177+
178+ console . log ( ignoreDefaultArgs ) ;
179+
173180 if ( headless ) {
174181 args . push ( '--screen-info={3840x2160}' ) ;
175182 }
@@ -194,6 +201,7 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
194201 pipe : true ,
195202 headless,
196203 args,
204+ ignoreDefaultArgs : ignoreDefaultArgs ,
197205 acceptInsecureCerts : options . acceptInsecureCerts ,
198206 handleDevToolsAsPage : true ,
199207 } ) ;
0 commit comments