Skip to content

Commit 85d601e

Browse files
authored
fix(models): remove active_browser_element / available_browser_elements
1 parent d9a21f8 commit 85d601e

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

openadapt/models.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,6 @@ def to_prompt_dict(self) -> dict[str, Any]:
492492
Returns:
493493
dictionary containing relevant properties from the ActionEvent.
494494
"""
495-
if self.active_browser_element:
496-
import ipdb
497-
498-
ipdb.set_trace()
499495
action_dict = deepcopy(
500496
{
501497
key: val
@@ -518,6 +514,9 @@ def to_prompt_dict(self) -> dict[str, Any]:
518514
action_dict["available_segment_descriptions"] = (
519515
self.available_segment_descriptions
520516
)
517+
518+
# TODO:
519+
"""
521520
if self.active_browser_element:
522521
action_dict["active_browser_element"] = str(self.active_browser_element)
523522
if self.available_browser_elements:
@@ -526,11 +525,7 @@ def to_prompt_dict(self) -> dict[str, Any]:
526525
action_dict["available_browser_elements"] = str(
527526
self.available_browser_elements
528527
)
529-
530-
if self.active_browser_element:
531-
import ipdb
532-
533-
ipdb.set_trace()
528+
"""
534529
return action_dict
535530

536531
@property

openadapt/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,9 +961,11 @@ def wrapper_retry(*args: tuple, **kwargs: dict[str, Any]) -> Any:
961961
logger.warning(exc)
962962
exceptions.append(str(exc))
963963
retries += 1
964+
last_exception = exc
965+
# Raise the final exception with a detailed message and keep its traceback
964966
raise RuntimeError(
965967
f"Failed after {max_retries} retries with exceptions: {exceptions}"
966-
)
968+
) from last_exception
967969

968970
return wrapper_retry
969971

0 commit comments

Comments
 (0)