diff options
| author | Dax Raad <[email protected]> | 2025-09-16 04:28:35 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-09-16 04:28:35 -0400 |
| commit | 78d6b3a9637b33f80f29ef43a54fc053e42ac1f0 (patch) | |
| tree | 2181fd0a9d4847264796dbb9cea9d9efd0a24d53 | |
| parent | 15df2710fabebb70662e94a39b74dae419dc30d6 (diff) | |
| download | opencode-78d6b3a9637b33f80f29ef43a54fc053e42ac1f0.tar.gz opencode-78d6b3a9637b33f80f29ef43a54fc053e42ac1f0.zip | |
fix crash when todo content is empty fixes #2622
| -rw-r--r-- | packages/tui/internal/components/chat/message.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go index ca1a2a536..fc5a21ad1 100644 --- a/packages/tui/internal/components/chat/message.go +++ b/packages/tui/internal/components/chat/message.go @@ -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) |
