refactor(worker): remove MessageParser (replaced by StreamAnalyzer)

This commit is contained in:
Mika Kuns
2026-04-14 14:12:21 +02:00
parent 03728c8e4a
commit c1c4c75979
26 changed files with 3978 additions and 88 deletions

View File

@@ -1,33 +0,0 @@
using System.Text.Json;
namespace ClaudeDo.Worker.Runner;
public static class MessageParser
{
public static bool TryExtractResult(string ndjsonLine, out string? result)
{
result = null;
if (string.IsNullOrWhiteSpace(ndjsonLine))
return false;
try
{
using var doc = JsonDocument.Parse(ndjsonLine);
var root = doc.RootElement;
if (root.TryGetProperty("type", out var typeProp) &&
typeProp.GetString() == "result" &&
root.TryGetProperty("result", out var resultProp))
{
result = resultProp.GetString();
return true;
}
}
catch (JsonException)
{
// Malformed JSON — not a result line.
}
return false;
}
}