Skip to content

Commit a91376c

Browse files
Update webui.py
1 parent 2953661 commit a91376c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

webui.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@ def create_ui(theme_name="Ocean"):
419419
value=True,
420420
info="Disable browser security features",
421421
)
422+
enable_recording = gr.Checkbox(
423+
label="Enable Recording",
424+
value=True,
425+
info="Enable saving browser recordings",
426+
)
422427

423428
with gr.Row():
424429
window_w = gr.Number(
@@ -437,6 +442,7 @@ def create_ui(theme_name="Ocean"):
437442
placeholder="e.g. ./tmp/record_videos",
438443
value="./tmp/record_videos",
439444
info="Path to save browser recordings",
445+
interactive=True, # Allow editing only if recording is enabled
440446
)
441447

442448
with gr.TabItem("🤖 Run Agent", id=4):
@@ -521,7 +527,14 @@ def list_recordings(save_recording_path):
521527
lambda provider, api_key, base_url: update_model_dropdown(provider, api_key, base_url),
522528
inputs=[llm_provider, llm_api_key, llm_base_url],
523529
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+
)
525538

526539
# Run button click handler
527540
run_button.click(

0 commit comments

Comments
 (0)