-
Notifications
You must be signed in to change notification settings - Fork 140
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
UI updates #54
Conversation
Its not yet ready, i could do another round of clean up and add namespacing to agentE UI styling. |
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.
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/playwright_manager.py
Outdated
|
||
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"): |
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.
This would look cleaner as:
if message_type not in {"plan", "question", "answer", "info"}:
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.
Indeed
ae/core/playwright_manager.py
Outdated
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"): |
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.
Cleaner as:
if message_type not in {"plan", "question", "answer", "info", "step"}:
ae/core/playwright_manager.py
Outdated
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}") |
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.
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" |
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.
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?
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.
made some minor tweaks. Well done .. looks gorgeous
No description provided.