Formatting

This commit is contained in:
Chris Rickman
2026-03-05 02:41:26 -08:00
parent 7608005dd7
commit 1428286bd1
2 changed files with 5 additions and 1 deletions
@@ -37,6 +37,7 @@ public enum MessageGroupKind
/// </remarks>
ToolCall,
#pragma warning disable IDE0001 // Simplify Names
/// <summary>
/// A summary message group produced by a compaction strategy (e.g., <c>SummarizationCompactionStrategy</c>).
/// </summary>
@@ -45,5 +46,6 @@ public enum MessageGroupKind
/// They are identified by the <see cref="MessageGroup.SummaryPropertyKey"/> metadata entry
/// on the underlying <see cref="Microsoft.Extensions.AI.ChatMessage"/>.
/// </remarks>
#pragma warning restore IDE0001 // Simplify Names
Summary,
}
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Microsoft.Extensions.AI;
@@ -97,7 +98,8 @@ public sealed class MessageIndex
/// </remarks>
public static MessageIndex Create(IList<ChatMessage> messages, Tokenizer? tokenizer = null)
{
MessageIndex instance = new(new List<MessageGroup>(), tokenizer);
Debug.WriteLine("COMPACTION: Creating index x{messages.Count} messages");
MessageIndex instance = new([], tokenizer);
instance.AppendFromMessages(messages, 0);
return instance;
}