fix: Todo-Liste parst nur letzte ID korrekt (\r\n-Problem)

Backend: sb.AppendLine() durch sb.Append()+\n ersetzt für
konsistente Zeilenenden auf allen Plattformen.

Frontend: \r defensiv entfernen vor Regex-Matching, da
JS-Regex (.+)$ kein \r matcht und nur letzte Zeile geparsed wurde.
This commit is contained in:
Meleki committed 2026-03-09 18:53:25 +01:00
1 parent d6d7b6c04f
commit fa947c82ed
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -562,7 +562,7 @@ public class ToolService
var priority = todo.TryGetProperty("priority", out var prio) ? prio.GetString() : null;
var icon = status switch { "completed" => "✅", "in_progress" => "🔄", _ => "⬜" };
var prioTag = priority != null ? $" [{priority}]" : "";
sb.AppendLine($"{icon} [{id}]{prioTag} {content}");
sb.Append($"{icon} [{id}]{prioTag} {content}\n");
}
return sb.Length == 0 ? "(leere Todo-Liste)" : sb.ToString().TrimEnd();
}