This commit is contained in:
@@ -24,6 +24,32 @@ class DummySkill(ClickthroughSkill):
|
||||
],
|
||||
}
|
||||
|
||||
def plan_with_planner(
|
||||
self,
|
||||
grid_id: str,
|
||||
preferred_label: str | None = None,
|
||||
action: str = "click",
|
||||
text: str | None = None,
|
||||
comment: str | None = None,
|
||||
) -> Dict[str, Any]:
|
||||
cells = ["dummy-grid-1", "dummy-grid-2"]
|
||||
if preferred_label == "target":
|
||||
target = "dummy-grid-2"
|
||||
else:
|
||||
target = cells[len(cells) // 2]
|
||||
plan = {
|
||||
"grid_id": grid_id,
|
||||
"target_cell": target,
|
||||
"action": action,
|
||||
"text": text,
|
||||
"comment": comment,
|
||||
}
|
||||
return {
|
||||
"plan": plan,
|
||||
"result": {"success": True, "detail": "preview"},
|
||||
"descriptor": {"grid_id": grid_id},
|
||||
}
|
||||
|
||||
def plan_action(self, plan: ActionPlan) -> Dict[str, Any]:
|
||||
self.last_plan = plan
|
||||
return {"success": True, "target_cell": plan.target_cell}
|
||||
|
||||
Reference in New Issue
Block a user