mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 18:24:21 +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 {
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user