Skip to content
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

fix: improve state handling and JSON parsing with better error handling #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ManojINaik
Copy link

No description provided.

@warmshao
Copy link
Collaborator

warmshao commented Jan 8, 2025

Hi, I am Ok with the part of parsing json, which seems to be more robust. But:

  1. Regarding state = await self.browser_context.get_state(use_vision=self.use_vision) and handling browser_state: Why is this change necessary here? What specific problem does it solve, or what enhancement does it provide? Additionally, if a change is indeed required, it shouldn't be implemented directly within get_state. This negatively impacts code maintainability.
    For both of these points, I recommend providing a clear explanation and comparative tests demonstrating the problem being addressed. If these changes are confirmed to be more robust, the updates should be synchronized with the official browser-use component rather than being implemented solely within the web-ui.

  2. Regarding getattr for step_info. There are some unnecessary changes. For instance, using getattr to access step_info seems redundant as it already has an initial value.

  3. Please try to make each PR address a single feature or optimization. This will make the review process much easier. Let's refactor this current PR to focus only on optimizing the JSON parsing.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants