diff options
| author | adamdottv <[email protected]> | 2025-07-03 10:42:27 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-07-03 10:42:27 -0500 |
| commit | c389e0ed439c741781c9fa321a7773dd608c83d4 (patch) | |
| tree | 118c62e6844bbacb07e82f0b9a94e5e5e22e8cb9 | |
| parent | 204801052aa539cf7ca741c71e8c6510ed9591cf (diff) | |
| download | opencode-c389e0ed439c741781c9fa321a7773dd608c83d4.tar.gz opencode-c389e0ed439c741781c9fa321a7773dd608c83d4.zip | |
fix(tui): redundant tool calls in each message in collapsed mode
| -rw-r--r-- | packages/tui/internal/components/chat/messages.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/tui/internal/components/chat/messages.go b/packages/tui/internal/components/chat/messages.go index 1b2389926..52288078e 100644 --- a/packages/tui/internal/components/chat/messages.go +++ b/packages/tui/internal/components/chat/messages.go @@ -174,12 +174,16 @@ func (m *messagesComponent) renderView(width int) { orphanedToolCalls = make([]opencode.ToolInvocationPart, 0) } + remaining := true for _, part := range remainingParts { + if !remaining { + break + } switch part := part.AsUnion().(type) { case opencode.TextPart: // we only want tool calls associated with the current text part. // if we hit another text part, we're done. - break + remaining = false case opencode.ToolInvocationPart: toolCallParts = append(toolCallParts, part) if part.ToolInvocation.State != "result" { |
