Skip to content

Commit 45c63bf

Browse files
authored
fix(plan): fix the error that won't save the subtask state in session management (agentscope-ai#863)
1 parent 9d4cefa commit 45c63bf

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/agentscope/plan/_plan_model.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class SubTask(BaseModel):
3939
state: Literal["todo", "in_progress", "done", "abandoned"] = Field(
4040
description="The state of the subtask.",
4141
default="todo",
42-
exclude=True,
4342
)
4443
created_at: str = Field(
4544
description="The time the subtask was created.",

tests/plan_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,14 @@ async def test_serialization(self) -> None:
326326
"name": "1",
327327
"description": "1",
328328
"expected_outcome": "1",
329+
"state": "todo",
329330
"created_at": subtasks[0].created_at,
330331
},
331332
{
332333
"name": "2",
333334
"description": "2",
334335
"expected_outcome": "2",
336+
"state": "todo",
335337
"created_at": subtasks[1].created_at,
336338
},
337339
],

0 commit comments

Comments
 (0)