Skip to content

Commit

Permalink
Merge pull request EmergenceAI#72 from EmergenceAI/dev
Browse files Browse the repository at this point in the history
merge dev into master
  • Loading branch information
teaxio authored Jul 3, 2024
2 parents 9c2c163 + 896d23c commit 47ccfe3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
4 changes: 3 additions & 1 deletion ae/core/agents/browser_nav_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def __init__(self, config_list, browser_nav_executor: autogen.UserProxyAgent): #
llm_config={
"config_list": config_list,
"cache_seed": None,
"temperature": 0.0
"temperature": 0.0,
"top_p": 0.001,
"seed":12345
},
)
self.__register_skills()
Expand Down
4 changes: 3 additions & 1 deletion ae/core/agents/high_level_planner_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def __init__(self, config_list, user_proxy_agent:ConversableAgent): # type: igno
llm_config={
"config_list": config_list,
"cache_seed": None,
"temperature": 0.0
"temperature": 0.0,
"top_p": 0.001,
"seed":12345
},
)

Expand Down
10 changes: 5 additions & 5 deletions ae/core/playwright_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,17 +322,17 @@ async def highlight_element(self, selector: str, add_highlight: bool):
try:
page: Page = await self.get_current_page()
if add_highlight:
# Add the 'pulsate' class to the element
# Add the 'agente-ui-automation-highlight' class to the element. This class is used to apply the fading border.
await page.eval_on_selector(selector, '''e => {
let originalBorderStyle = e.style.border;
e.classList.add('ui_automation_pulsate');
e.classList.add('agente-ui-automation-highlight');
e.addEventListener('animationend', () => {
e.classList.remove('ui_automation_pulsate')
e.classList.remove('agente-ui-automation-highlight')
});}''')
logger.debug(f"Applied pulsating border to element with selector {selector} to indicate text entry operation")
else:
# Remove the 'pulsate' class from the element
await page.eval_on_selector(selector, "e => e.classList.remove('ui_automation_pulsate')")
# Remove the 'agente-ui-automation-highlight' class from the element.
await page.eval_on_selector(selector, "e => e.classList.remove('agente-ui-automation-highlight')")
logger.debug(f"Removed pulsating border from element with selector {selector} after text entry operation")
except Exception:
# This is not significant enough to fail the operation
Expand Down
12 changes: 12 additions & 0 deletions ae/ui/injectOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ function injectOveralyStyles() {
}
}
@keyframes automation_highlight_fadeout_animation {
0% { border-color: rgba(128, 0, 128, 1); }
50% { border-color: rgba(128, 0, 128, 1); }
100% { border-color: rgba(128, 0, 128, 0); }
}
.agente-ui-automation-highlight {
border-width: 2px !important;
border-style: solid !important;
animation: automation_highlight_fadeout_animation 5s linear 1 forwards !important;
}
.agente-processing{
background: linear-gradient(90deg,
rgba(255, 0, 255, 1) 0%, /* Bright Magenta */
Expand Down

0 comments on commit 47ccfe3

Please sign in to comment.