Update meeting summary agent UI

This commit is contained in:
2026-07-01 10:30:28 +02:00
parent 4787bf8cec
commit 92e359646b
18 changed files with 731 additions and 101 deletions
@@ -42,6 +42,99 @@ public sealed class LiteLlmResponsesChatClientTests
Assert.Equal("gpt-5.5-2026-04-23", response.ModelId);
}
[Fact]
public async Task ClientReportsVisibleReasoningSummariesSeparatelyFromResponseText()
{
var handler = new SequencedHttpMessageHandler(
new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent("""
{
"output": [
{
"type": "reasoning",
"summary": [
{
"type": "summary_text",
"text": "Checked the configured rules file."
},
{
"type": "summary_text",
"text": "Prepared a targeted update."
}
]
},
{
"type": "message",
"content": [
{
"type": "output_text",
"text": "Done."
}
]
}
]
}
""")
});
var reasoningSummaries = new List<string>();
using var client = CreateClient(
handler,
reconnectionAttempts: 0,
reasoningSummaryChanged: reasoningSummaries.Add);
var response = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "update rules")]);
Assert.Equal("Done.", response.Text);
Assert.Equal(
[
"Checked the configured rules file.",
"Prepared a targeted update."
],
reasoningSummaries);
}
[Fact]
public async Task ClientDoesNotFailResponseWhenReasoningSummaryCallbackFails()
{
var handler = new SequencedHttpMessageHandler(
new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent("""
{
"output": [
{
"type": "reasoning",
"summary": [
{
"type": "summary_text",
"text": "Checked the configured rules file."
}
]
},
{
"type": "message",
"content": [
{
"type": "output_text",
"text": "Done."
}
]
}
]
}
""")
});
using var client = CreateClient(
handler,
reconnectionAttempts: 0,
reasoningSummaryChanged: _ => throw new InvalidOperationException("UI failed"));
var response = await client.GetResponseAsync([new ChatMessage(ChatRole.User, "update rules")]);
Assert.Equal("Done.", response.Text);
}
[Fact]
public void ParserReadsFunctionCalls()
{
@@ -306,7 +399,8 @@ public sealed class LiteLlmResponsesChatClientTests
HttpMessageHandler handler,
int reconnectionAttempts,
LiteLlmResponsesCompactionOptions? compactionOptions = null,
Action? retrying = null)
Action? retrying = null,
Action<string>? reasoningSummaryChanged = null)
{
return new LiteLlmResponsesChatClient(
new HttpClient(handler)
@@ -320,7 +414,8 @@ public sealed class LiteLlmResponsesChatClientTests
reconnectionAttempts,
TimeSpan.Zero,
compactionOptions,
retrying: retrying);
retrying: retrying,
reasoningSummaryChanged: reasoningSummaryChanged);
}
private sealed class SequencedHttpMessageHandler : HttpMessageHandler