@@ -282,7 +282,9 @@ async def run_org_agent(
282
282
_global_agent_state .clear_stop ()
283
283
284
284
extra_chromium_args = [f"--window-size={ window_w } ,{ window_h } " ]
285
+ cdp_url = None
285
286
if use_own_browser :
287
+ cdp_url = os .getenv ("CHROME_CDP" , None )
286
288
chrome_path = os .getenv ("CHROME_PATH" , None )
287
289
if chrome_path == "" :
288
290
chrome_path = None
@@ -296,6 +298,7 @@ async def run_org_agent(
296
298
_global_browser = Browser (
297
299
config = BrowserConfig (
298
300
headless = headless ,
301
+ cdp_url = cdp_url ,
299
302
disable_security = disable_security ,
300
303
chrome_instance_path = chrome_path ,
301
304
extra_chromium_args = extra_chromium_args ,
@@ -379,7 +382,10 @@ async def run_custom_agent(
379
382
_global_agent_state .clear_stop ()
380
383
381
384
extra_chromium_args = [f"--window-size={ window_w } ,{ window_h } " ]
385
+ cdp_url = None
382
386
if use_own_browser :
387
+ cdp_url = os .getenv ("CHROME_CDP" , None )
388
+
383
389
chrome_path = os .getenv ("CHROME_PATH" , None )
384
390
if chrome_path == "" :
385
391
chrome_path = None
@@ -397,6 +403,7 @@ async def run_custom_agent(
397
403
config = BrowserConfig (
398
404
headless = headless ,
399
405
disable_security = disable_security ,
406
+ cdp_url = cdp_url ,
400
407
chrome_instance_path = chrome_path ,
401
408
extra_chromium_args = extra_chromium_args ,
402
409
)
@@ -854,6 +861,15 @@ def update_llm_num_ctx_visibility(llm_provider):
854
861
info = "Browser window height" ,
855
862
)
856
863
864
+
865
+ save_recording_path = gr .Textbox (
866
+ label = "Recording Path" ,
867
+ placeholder = "e.g. ./tmp/record_videos" ,
868
+ value = config ['save_recording_path' ],
869
+ info = "Path to save browser recordings" ,
870
+ interactive = True , # Allow editing only if recording is enabled
871
+ )
872
+
857
873
save_recording_path = gr .Textbox (
858
874
label = "Recording Path" ,
859
875
placeholder = "e.g. ./tmp/record_videos" ,
0 commit comments