Skip to content

Conversation

@westey-m
Copy link
Contributor

Motivation and Context

#3194

Description

  • Make properties on all context parameter classes for ChatMessageStore and AIContextProvider settable, so that a filter clause can be written without needing to clone the entire context.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings January 13, 2026 11:32
@github-actions github-actions bot changed the title Make ChatMessageStore and AIContextProvider context props settable .NET: Make ChatMessageStore and AIContextProvider context props settable Jan 13, 2026
Copy link
Contributor

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 makes properties on context parameter classes settable to enable filter clauses without requiring full context cloning. The change supports the existing ChatMessageStoreMessageFilter pattern where filter functions need to modify context properties.

Changes:

  • Made RequestMessages property settable on InvokingContext classes in both ChatMessageStore and AIContextProvider
  • Made RequestMessages and ChatMessageStoreMessages properties settable on ChatMessageStore.InvokedContext
  • Made RequestMessages and AIContextProviderMessages properties settable on AIContextProvider.InvokedContext

Reviewed changes

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

File Description
dotnet/src/Microsoft.Agents.AI.Abstractions/ChatMessageStore.cs Changed 3 properties from get-only to get/set to enable filter modifications
dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs Changed 3 properties from get-only to get/set to enable filter modifications

Copy link
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@westey-m westey-m added this pull request to the merge queue Jan 13, 2026
Merged via the queue into microsoft:main with commit c063fc7 Jan 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants