Move game log processing into SCUM companion

This commit is contained in:
npc0-hue
2026-09-02 10:18:27 +08:00
parent 7d9c1b7e9e
commit 40ac46ba17
14 changed files with 328 additions and 232 deletions
@@ -49,7 +49,7 @@ func ParseConsoleRecords(serverID string, records []ConsoleRecord, correlationSe
records = records[:100]
}
for _, record := range records {
if record.ServerID != serverID || (record.Stream != "stdout" && record.Stream != "stderr") || record.Sequence == 0 || record.OccurredAt.IsZero() || len(record.Text) > 1024 {
if record.ServerID != serverID || strings.TrimSpace(record.Stream) == "" || len(record.Stream) > 64 || record.Sequence == 0 || record.OccurredAt.IsZero() || len(record.Text) > 1024 {
batch.Diagnostics = appendDiagnostic(batch.Diagnostics, EventDiagnostic{ServerID: serverID, Sequence: record.Sequence, Code: "invalid-console-record"})
continue
}