This commit is contained in:
2026-06-23 15:22:00 +02:00
parent a3b4cc530d
commit 241dc2b987
4 changed files with 459 additions and 96 deletions
+5
View File
@@ -8,6 +8,8 @@ namespace AnotherReplayReader.Utils
{
internal static class AIAnalyzeUI
{
public static List<StringBuilder> Debug { get; } = [];
public record AIAnalyzeProgressData(AIAnalyze.AIChunk Delta, DateTimeOffset? TimeStamp, bool IsExtra);
public class EmaSpeed
@@ -74,10 +76,13 @@ namespace AnotherReplayReader.Utils
public static Action<AIAnalyze.AIChunk> BuildAIChunkReader(Action<AIAnalyzeProgressData> newContent)
{
var sb = new StringBuilder();
Debug.Add(sb);
void OnAIChunk(AIAnalyze.AIChunk c)
{
if (c.Type == AIAnalyze.AIChunkType.Json)
{
sb.AppendLine(c.Text);
return;
}
newContent(new(Delta: c, TimeStamp: DateTimeOffset.UtcNow, IsExtra: false));