Skip to content

Commit 97f3904

Browse files
add snapshots navigation to see history of interactions.
1 parent 4453a00 commit 97f3904

File tree

4 files changed

+208
-35
lines changed

4 files changed

+208
-35
lines changed

src/agentlab/agents/hitl_agent/generic_human_guided_agent.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ def get_action(self, obs):
206206
screenshot=(img_to_base_64(obs["screenshot"]) if "screenshot" in obs else ""),
207207
screenshots=[], # no overlay screenshots yet
208208
axtree=obs.get("axtree_txt", ""),
209-
history=[],
210209
hints=[],
211210
suggestions=[], # no suggestions yet
212211
)
@@ -241,7 +240,6 @@ def get_action(self, obs):
241240
screenshot=(img_to_base_64(obs["screenshot"]) if "screenshot" in obs else ""),
242241
screenshots=screenshots, # list of overlay screenshots for hover
243242
axtree=obs.get("axtree_txt", ""),
244-
history=[], # TODO: add history
245243
hints=step_hint,
246244
suggestions=suggestions,
247245
)

src/agentlab/agents/hitl_agent/hint_labelling.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pydantic import BaseModel, Field
1010

1111
logger = logging.getLogger(__name__)
12-
12+
1313
HINT_LABELING_DIR = resources.files("agentlab.agents.hitl_agent.hint_labelling_ui_files")
1414

1515

@@ -19,7 +19,6 @@ class HintLabelingInputs(BaseModel):
1919
screenshot: str # base64 screenshot (original/current)
2020
screenshots: List[str] = Field(default_factory=list) # list of base64 screenshots for hover
2121
axtree: str
22-
history: List[Dict[str, str]] = Field(default_factory=list)
2322
hints: List[str] = Field(default_factory=list)
2423
suggestions: List[Dict[str, str]] = Field(default_factory=list)
2524

@@ -74,7 +73,7 @@ def _route_submit(self, route: playwright.sync_api.Route, request: playwright.sy
7473
body = json.loads(request.post_data or "{}")
7574
except Exception:
7675
body = {}
77-
# Map UI payload -> your step shape
76+
# Map UI payload -> your step shape
7877
msg = {
7978
"type": "step",
8079
"payload": {
@@ -97,7 +96,6 @@ def _to_ui_bootstrap(self, ctx: HintLabelingInputs) -> dict:
9796
"screenshot": ctx.screenshot,
9897
"screenshots": ctx.screenshots, # list of screenshots for hover
9998
"axtree": ctx.axtree,
100-
"history": ctx.history,
10199
"hints": ctx.hints,
102100
"suggestions": ctx.suggestions,
103101
}

0 commit comments

Comments
 (0)