Skip to content

Conversation

@DavdGao
Copy link
Member

@DavdGao DavdGao commented Nov 3, 2025

AgentScope Version

[The version of AgentScope you are working on, e.g. import agentscope; print(agentscope.__version__)]

Description

[Please describe the background, purpose, changes made, and how to test this PR]

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with pre-commit run --all-files command
  • All tests are passing
  • Docstrings are in Google style
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@DavdGao DavdGao requested a review from Copilot November 3, 2025 08:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the plan module's serialization capabilities by exposing previously excluded fields (id, created_at, state, finished_at, outcome) in the model serialization, implements plan state management through a refresh_plan_state() method, and adds comprehensive test coverage for plan lifecycle serialization/deserialization. Additionally, it refactors the Word reader module to use TYPE_CHECKING for conditional imports to avoid runtime import overhead.

  • Removed exclude=True from several Plan and SubTask model fields to enable full serialization
  • Added refresh_plan_state() method to automatically update plan state based on subtask states
  • Extended test coverage to verify serialization/deserialization throughout the complete plan lifecycle

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/agentscope/plan/_plan_model.py Removed field exclusions and added refresh_plan_state() method for automatic plan state management
src/agentscope/plan/_plan_notebook.py Integrated plan state refresh into subtask state updates
src/agentscope/plan/_in_memory_storage.py Added serialization/deserialization support for historical plans storage
tests/plan_test.py Added comprehensive test coverage for plan serialization throughout the lifecycle
src/agentscope/rag/_reader/_word_reader.py Refactored imports to use TYPE_CHECKING for conditional type imports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DavdGao DavdGao added Bug Something doesn't work Ready for Review RAG labels Nov 3, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

src/agentscope/rag/_reader/_word_reader.py:1

  • The Args section is missing the type annotation for the 'table' parameter. According to the project's docstring template, it should be table (DocxTable): or the full qualified type name.
# -*- coding: utf-8 -*-

src/agentscope/rag/_reader/_word_reader.py:1

  • The Args section is missing the type annotation for the 'para' parameter. According to the project's docstring template, it should be para (DocxParagraph): or the full qualified type name.
# -*- coding: utf-8 -*-

@DavdGao DavdGao requested a review from qbc2016 November 3, 2025 12:19
Copy link
Member

@qbc2016 qbc2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@DavdGao DavdGao merged commit 58a4858 into agentscope-ai:main Nov 3, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something doesn't work RAG Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants