Skip to content

Conversation

@westey-m
Copy link
Contributor

Motivation and Context

#295

Sample to follow if we are happy with this approach.

Description

  • Update InMemoryChatMessageStore to optionally support IChatReducer
  • Make InMemoryChatMessageStore public, so that users can create it with a chat reducer and provide it to the agentthread factory on ChatClientAgent.

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
  • I didn't break anyone 😄

Copilot AI review requested due to automatic review settings August 21, 2025 12:58
@github-actions github-actions bot changed the title Add support for IChatReducer to InMemoryChatMessageStore .NET: Add support for IChatReducer to InMemoryChatMessageStore Aug 21, 2025
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 adds optional IChatReducer support to InMemoryChatMessageStore, allowing message reduction at configurable trigger points.

  • Adds IChatReducer interface with ReduceAsync method for message reduction
  • Updates InMemoryChatMessageStore to support optional chat reducer with configurable trigger events
  • Makes InMemoryChatMessageStore public to enable user instantiation with custom reducers

Reviewed Changes

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

File Description
IChatReducer.cs Adds new interface defining chat message reduction capability
InMemoryChatMessageStore.cs Adds reducer support with trigger events and makes class public
InMemoryChatMessageStoreTests.cs Adds comprehensive test coverage for new reducer functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@crickman
Copy link
Contributor

Have you seen this update: dotnet/extensions#6666 ?

@stephentoub
Copy link
Member

cc: @MackinnonBuck

@westey-m westey-m added this pull request to the merge queue Sep 11, 2025
Merged via the queue into microsoft:main with commit 3c0926b Sep 11, 2025
14 checks passed
ReubenBond pushed a commit to ReubenBond/agent-framework that referenced this pull request Oct 28, 2025
…soft#462)

* Add support for IChatReducer to InMemoryChatMessageStore

* Fix typos.
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.

6 participants