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

UI updates #54

Merged
merged 40 commits into from
Jul 2, 2024
Merged

UI updates #54

merged 40 commits into from
Jul 2, 2024

Conversation

deepak-akkil
Copy link
Collaborator

No description provided.

@deepak-akkil deepak-akkil requested a review from teaxio June 20, 2024 20:44
@deepak-akkil
Copy link
Collaborator Author

Its not yet ready, i could do another round of clean up and add namespacing to agentE UI styling.
But for efficiency, let me know if you notice anything, so we can get this merged this week

Copy link
Collaborator

@teaxio teaxio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not finish everything in the review. This is what I have so far. We should make message_type as an enum though

ae/core/agents/browser_nav_agent.py Show resolved Hide resolved
ae/core/agents/high_level_planner_agent.py Outdated Show resolved Hide resolved
ae/core/autogen_wrapper.py Outdated Show resolved Hide resolved
ae/core/autogen_wrapper.py Outdated Show resolved Hide resolved
ae/core/autogen_wrapper.py Outdated Show resolved Hide resolved
ae/core/autogen_wrapper.py Outdated Show resolved Hide resolved

safe_message_type = escape_js_message(message_type)
if self.ui_manager.overlay_show_details == False:
if not (message_type == "plan" or message_type == "question" or message_type == "answer" or message_type == "info"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would look cleaner as:

if message_type not in {"plan", "question", "answer", "info"}:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed

return

if self.ui_manager.overlay_show_details == True:
if not (message_type == "plan" or message_type == "question" or message_type == "answer" or message_type == "info" or message_type == "step"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaner as:

if message_type not in {"plan", "question", "answer", "info", "step"}:

page = await self.get_current_page()
await page.evaluate(js_code)
logger.debug("User notification completed")
except Exception as e:
print(f"Failed to notify user with message \"{message}\". However, most likey this will work itself out after the page loads: {e}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just change the logger line below it to be logger.error (logger.warn) right? This way we have one print

Update the processing state of the overlay.

Args:
is_processing (str): "init", "processing", "done"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be best put in an enum. But we can fix that at some point, maybe just a #TODO: as reminder to address this?

@deepak-akkil deepak-akkil requested a review from teaxio July 2, 2024 13:08
Copy link
Collaborator

@teaxio teaxio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made some minor tweaks. Well done .. looks gorgeous

@teaxio teaxio merged commit 01a6ba8 into dev Jul 2, 2024
@deepak-akkil deepak-akkil deleted the UI-updates branch July 19, 2024 14:36
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.

2 participants