Skip to content

Commit b0c40e3

Browse files
committed
refactor: change complete_subgoals_by_ids to use default_factory=list instead of None default
1 parent a14d737 commit b0c40e3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

minitap/mobile_use/agents/cortex/cortex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ async def __call__(self, state: State):
119119
update={
120120
"agents_thoughts": [agent_thought],
121121
"structured_decisions": response.decisions,
122-
"complete_subgoals_by_ids": response.complete_subgoals_by_ids or [],
122+
"complete_subgoals_by_ids": response.complete_subgoals_by_ids,
123123
"screen_analysis_prompt": response.screen_analysis_prompt,
124124
"latest_screenshot_base64": None,
125125
"latest_ui_hierarchy": None,

minitap/mobile_use/agents/cortex/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class CortexOutput(BaseModel):
1010
default=None,
1111
description="The reason for the goals completion, if there are any goals to be completed.",
1212
)
13-
complete_subgoals_by_ids: list[str] | None = Field(
14-
default=None, description="List of subgoal IDs to complete"
13+
complete_subgoals_by_ids: list[str] = Field(
14+
default_factory=list, description="List of subgoal IDs to complete"
1515
)
1616
screen_analysis_prompt: str | None = Field(
1717
default=None,

0 commit comments

Comments
 (0)