diff options
| author | adamdottv <[email protected]> | 2025-06-04 09:39:51 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-06-04 11:48:01 -0500 |
| commit | 31d6e303a60493cbb15f728e57f3f1a4f236fe50 (patch) | |
| tree | d4ea0765b42ed92ef0f0d92ac22ac6e05ae8fc63 | |
| parent | 199c42f72648e911a202368513214a88458a95ef (diff) | |
| download | opencode-31d6e303a60493cbb15f728e57f3f1a4f236fe50.tar.gz opencode-31d6e303a60493cbb15f728e57f3f1a4f236fe50.zip | |
wip: refactoring tui
| -rw-r--r-- | packages/tui/internal/components/chat/message.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go index a98586f52..99221144f 100644 --- a/packages/tui/internal/components/chat/message.go +++ b/packages/tui/internal/components/chat/message.go @@ -177,9 +177,7 @@ func renderToolInvocation(toolCall client.MessageToolInvocationToolCall, result if toolCall.ToolName == "opencode_edit" { filename := toolMap["filePath"].(string) title = styles.Padded().Render(fmt.Sprintf("%s: %s", toolName, filename)) - // oldString := toolMap["oldString"].(string) - // newString := toolMap["newString"].(string) - if finished { + if finished && metadata["diff"] != nil { patch := metadata["diff"].(string) formattedDiff, _ := diff.FormatDiff(patch, diff.WithTotalWidth(width)) body = strings.TrimSpace(formattedDiff) |
