wip
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user