You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything is OK—the changes have been pushed to branch copilot/dotnet-port-api-compaction-history-provider-fdbbd9f2ce32e8b7. Please review the changes, including any protected files, before creating the pull request.
Add a compaction-backed history provider in agent/compaction so Go agents can apply reducer-triggered history compaction directly on the history-provider surface instead of only through a separate context provider. The change adds the new provider, covers compacted persistence and summary replay in tests, updates the additional-context sample to use the new API, and refreshes the parity doc to reflect the reduced .NET chat-history gap.
The live upstream-agent-framework/main fetch was blocked in this environment, so this PR ports the documented chat-history parity gap as a narrow Go realignment instead of tying the change to a freshly inspected upstream PR.
Other broader chat-history/storage parity gaps remain out of scope for this PR.
Note
GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch copilot/dotnet-port-api-compaction-history-provider-fdbbd9f2ce32e8b7 and are ready to review.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (49 of 382 lines)
From 1681aba4204460f1c46f2bd66efdd44915c5e54b Mon Sep 17 00:00:00 2001
X-GH-AW-Base-Commit: de821aaf3899669a99a730f66f25ebad31cba62c
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Fri, 11 Sep 2026 05:37:42 +0000
Subject: [PATCH] [dotnet-port-api] Add compaction-backed history provider
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
agent/compaction/doc.go | 6 +-
agent/compaction/historyprovider.go | 188 ++++++++++++++++++
agent/compaction/historyprovider_test.go | 103 ++++++++++
docs/dotnet-go-sdk-feature-comparison.md | 2 +-
.../step17_additional_ai_context/main.go | 11 +-
5 files changed, 305 insertions(+), 5 deletions(-)
create mode 100644 agent/compaction/historyprovider.go
create mode 100644 agent/compaction/historyprovider_test.go
diff --git a/agent/compaction/doc.go b/agent/compaction/doc.go
index d4280fe..6b4abab 100644
--- a/agent/compaction/doc.go+++ b/agent/compaction/doc.go@@ -1,7 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Package compaction reduces conversation history to fit a model's context
-// window. It provides a context provider and composable strategies — sliding-// window, truncation, summarization, tool-result eviction, and context-window-// sizing — selected by triggers evaluated over a message index.+// window. It provides history and context providers plus composable strategies+// — sliding window, truncation, summarization, tool-result eviction, and+// context-window sizing — selected by triggers evaluated over a message index.
package compaction
diff --git a/agent/compaction/historyprovider.go b/agent/compaction/historyprovider.go
new file mode 100644
index 0000000..7fcc9db
--- /dev/null+++ b/agent/compaction/historyprovider.go@@ -0,0 +1,188 @@+// Copyright (c) Microsoft. All rights reserved.++package compaction++import (+ "cmp"+ "context"+ "log/slog"+ "runtime"+ "slices"+ "sync
... (truncated)
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.com
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
Tip
Your pull request is ready to create! 🎉 ✅
Everything is OK—the changes have been pushed to branch
copilot/dotnet-port-api-compaction-history-provider-fdbbd9f2ce32e8b7. Please review the changes, including any protected files, before creating the pull request.Create the pull request
The original pull request description is below.
Summary
Add a compaction-backed history provider in
agent/compactionso Go agents can apply reducer-triggered history compaction directly on the history-provider surface instead of only through a separate context provider. The change adds the new provider, covers compacted persistence and summary replay in tests, updates the additional-context sample to use the new API, and refreshes the parity doc to reflect the reduced .NET chat-history gap.Ported .NET PRs
5996105a1bf2726918101adc6e9c9857b7f68b98, with workflow/test delta previously checked through6a0773ba2180e8036d138dbb9794ae64ec2d978b.Breaking Changes
No.
Tests and Examples
go test ./agent ./agent/compaction ./examples/02-agents/agents/step17_additional_ai_contextagent/compaction/historyprovider_test.goexamples/02-agents/agents/step17_additional_ai_context/main.goNotes
upstream-agent-framework/mainfetch was blocked in this environment, so this PR ports the documented chat-history parity gap as a narrow Go realignment instead of tying the change to a freshly inspected upstream PR.Note
GitHub Actions is not permitted to create or approve pull requests in this repository.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (49 of 382 lines)
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.