Skip to content

Adding a factory for the 'to' property of SuggestedActions - #370

Merged
Rodrigo Brandão (rodrigobr-msft) merged 1 commit into
mainfrom
users/robrandao/suggested-actions-list-factory
Apr 16, 2026
Merged

Adding a factory for the 'to' property of SuggestedActions#370
Rodrigo Brandão (rodrigobr-msft) merged 1 commit into
mainfrom
users/robrandao/suggested-actions-list-factory

Conversation

@rodrigobr-msft

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the SuggestedActions activity model to avoid a shared mutable default for the to field by switching it to a pydantic.Field(default_factory=list) default, which ensures each model instance gets its own list.

Changes:

  • Replace to: list[...] = [] with to: list[...] = Field(default_factory=list).
  • Add the required Field import from pydantic.

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

@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) merged commit 2908ee3 into main Apr 16, 2026
15 checks passed
@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) deleted the users/robrandao/suggested-actions-list-factory branch April 16, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SuggestedActions uses a common list as a default value for the to field

3 participants