This commit is contained in:
@@ -146,6 +146,22 @@ def test_ai_planner_forwards_tools_screenshot_and_timeout_to_client() -> None:
|
||||
assert "send a message" in call["user_prompt"]
|
||||
|
||||
|
||||
def test_ai_planner_includes_device_platform_from_task_context() -> None:
|
||||
client = FakeToolCallingClient(
|
||||
ToolCallDecision(tool_name="tap", arguments={"x": 1, "y": 2})
|
||||
)
|
||||
planner = AIPlanner(client=client)
|
||||
context = TaskContext(
|
||||
task_id="task-1",
|
||||
goal="send a message",
|
||||
device_platform="android",
|
||||
)
|
||||
|
||||
planner.plan(goal="send a message", scene=_scene(), context=context)
|
||||
|
||||
assert "Device type: android" in client.calls[0]["user_prompt"]
|
||||
|
||||
|
||||
def test_ai_planner_populates_step_prompt_from_user_prompt() -> None:
|
||||
"""PlannedStep.prompt should carry the actual user prompt sent to the LLM,
|
||||
not the bare task goal."""
|
||||
|
||||
Reference in New Issue
Block a user