mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 02:04:22 +01:00
fix crash when todo content is empty fixes #2622
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user