fix crash when todo content is empty fixes #2622

pull/2490/merge
Dax Raad 2025-09-16 04:28:35 -04:00
parent 15df2710fa
commit 78d6b3a963
1 changed files with 4 additions and 1 deletions

View File

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