Added settings for chat compression, with a model of its own (#1241)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-27 16:35:51 +01:00
1 parent 899139c88b
commit 1fbc1f4796
71 files changed
+3023 -797

No files matched your search

@@ -259,6 +259,21 @@ public sealed class ChatCompressionTests
}
}
[Test]
public void WithinTheSameChatTheMessageBeingWrittenStays()
{
var chat = Chat(
Block(ChatRole.USER, "First question", 1),
Block(ChatRole.AI, "First answer", 2),
Block(ChatRole.USER, "Second question", 3),
Block(ChatRole.AI, "Second answer", 4));
chat.Draft.SetText("The message being written");
ChatCompression.TurnIntoContinuation(chat, 0, ChatCompressionTarget.SAME_CHAT, "The summary", ChatRestrictions.NONE, "provider-1");
Assert.That(chat.Draft.Text, Is.EqualTo("The message being written"), "A chat compressed before sending sends this message right afterward.");
}
[Test]
public void TheLastMessageFollowsTheSummaryUnchanged()
{