-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Enable bowser-use to support MCP #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mrge found 34 issues across 22 files. View them in mrge.io
""" | ||
if hasattr(webui_manager, "bu_controller") and webui_manager.bu_controller: | ||
logger.warning("⚠️ Close controller because mcp file has changed!") | ||
webui_manager.bu_controller.close_mcp_client() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling close_mcp_client synchronously when it's defined as an async method
""" | ||
Creates an agent settings tab. | ||
""" | ||
input_components = set(webui_manager.get_components()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable 'input_components'
outputs=[planner_llm_model_name] | ||
) | ||
|
||
mcp_json_file.change( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent return values in update_mcp_server function
if config.provider == "ollama": | ||
if "deepseek-r1" in config.model_name: | ||
from src.utils.llm import DeepSeekR1ChatOllama | ||
from src.utils.llm_provider import DeepSeekR1ChatOllama |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import path changed from src.utils.llm to src.utils.llm_provider but there's no corresponding update to the import in the commented out pdb.set_trace() section below.
|
||
# For other providers, use the standard configuration | ||
llm = utils.get_llm_model( | ||
llm = llm_provider.get_llm_model( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function call changed from utils.get_llm_model to llm_provider.get_llm_model but the corresponding import statement doesn't match the module structure.
if not hasattr(webui_manager, 'bu_chat_history'): | ||
logger.error("Attribute 'bu_chat_history' not found in webui_manager! Cannot add chat message.") | ||
# Initialize it maybe? Or raise an error? For now, log and potentially skip chat update. | ||
webui_manager.bu_chat_history = [] # Initialize if missing (consider if this is the right place) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improper initialization of state in callback function
except asyncio.TimeoutError: | ||
logger.warning("Agent task did not finish quickly after stop signal, cancelling.") | ||
agent_task.cancel() | ||
except Exception: # Catch task exceptions if it errors on stop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overly broad exception handler without logging
|
||
try: | ||
logger.info("Waiting for user response event...") | ||
await asyncio.wait_for(webui_manager.bu_response_event.wait(), timeout=3600.0) # Long timeout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extremely long timeout (1 hour) could block resources unnecessarily
"""Wrapper for handle_clear.""" | ||
await close_browser(webui_manager) | ||
|
||
headless.change(close_wrapper) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using synchronous function wrapper for async function without proper handling
""" | ||
Creates a browser settings tab. | ||
""" | ||
input_components = set(webui_manager.get_components()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable that adds unnecessary complexity
Summary by mrge
Added support for MCP in browser-use, introduced a new DeepResearch Agent, and rebuilt the web UI for easier agent configuration and chat with human intervention.
New Features
Refactors