@@ -419,6 +419,11 @@ def create_ui(theme_name="Ocean"):
419
419
value = True ,
420
420
info = "Disable browser security features" ,
421
421
)
422
+ enable_recording = gr .Checkbox (
423
+ label = "Enable Recording" ,
424
+ value = True ,
425
+ info = "Enable saving browser recordings" ,
426
+ )
422
427
423
428
with gr .Row ():
424
429
window_w = gr .Number (
@@ -437,6 +442,7 @@ def create_ui(theme_name="Ocean"):
437
442
placeholder = "e.g. ./tmp/record_videos" ,
438
443
value = "./tmp/record_videos" ,
439
444
info = "Path to save browser recordings" ,
445
+ interactive = True , # Allow editing only if recording is enabled
440
446
)
441
447
442
448
with gr .TabItem ("🤖 Run Agent" , id = 4 ):
@@ -521,7 +527,14 @@ def list_recordings(save_recording_path):
521
527
lambda provider , api_key , base_url : update_model_dropdown (provider , api_key , base_url ),
522
528
inputs = [llm_provider , llm_api_key , llm_base_url ],
523
529
outputs = llm_model_name
524
- )
530
+ )
531
+
532
+ # Add this after defining the components
533
+ enable_recording .change (
534
+ lambda enabled : gr .update (interactive = enabled ),
535
+ inputs = enable_recording ,
536
+ outputs = save_recording_path
537
+ )
525
538
526
539
# Run button click handler
527
540
run_button .click (
0 commit comments