fix crash when todo content is empty fixes #2622

This commit is contained in:
Dax Raad
2025-09-16 04:28:35 -04:00
parent 15df2710fa
commit 78d6b3a963

View File

@@ -641,7 +641,10 @@ func renderToolDetails(
if todos != nil { if todos != nil {
for _, item := range todos.([]any) { for _, item := range todos.([]any) {
todo := item.(map[string]any) todo := item.(map[string]any)
content := todo["content"].(string) content := todo["content"]
if content == nil {
continue
}
switch todo["status"] { switch todo["status"] {
case "completed": case "completed":
body += fmt.Sprintf("- [x] %s\n", content) body += fmt.Sprintf("- [x] %s\n", content)