mirror of
https://github.com/browser-use/web-ui.git
synced 2026-03-22 11:17:17 +08:00
Fixed unresponsive user response button
This commit is contained in:
@@ -632,11 +632,8 @@ async def run_agent_task(
|
||||
last_chat_len = len(webui_manager.bu_chat_history)
|
||||
yield update_dict
|
||||
# Wait until response is submitted or task finishes
|
||||
while (
|
||||
webui_manager.bu_response_event is not None
|
||||
and not agent_task.done()
|
||||
):
|
||||
await asyncio.sleep(0.2)
|
||||
await webui_manager.bu_response_event.wait()
|
||||
|
||||
# Restore UI after response submitted or if task ended unexpectedly
|
||||
if not agent_task.done():
|
||||
yield {
|
||||
@@ -1071,7 +1068,7 @@ def create_browser_use_agent_tab(webui_manager: WebuiManager):
|
||||
|
||||
# --- Connect Event Handlers using the Wrappers --
|
||||
run_button.click(
|
||||
fn=submit_wrapper, inputs=all_managed_components, outputs=run_tab_outputs
|
||||
fn=submit_wrapper, inputs=all_managed_components, outputs=run_tab_outputs, trigger_mode="multiple"
|
||||
)
|
||||
user_input.submit(
|
||||
fn=submit_wrapper, inputs=all_managed_components, outputs=run_tab_outputs
|
||||
|
||||
Reference in New Issue
Block a user