diff options
| author | Dax Raad <[email protected]> | 2025-07-19 19:25:15 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-07-19 19:25:15 -0400 |
| commit | 87d21ebf2bab0a07602b600271cace49731ec86e (patch) | |
| tree | 71b740bc55e8e059a28a4af9c9cb1b8d82d0731a /packages/tui/internal/components/chat | |
| parent | a524fc545c94a9af335e0a618bd53f0e2c5acd9c (diff) | |
| download | opencode-87d21ebf2bab0a07602b600271cace49731ec86e.tar.gz opencode-87d21ebf2bab0a07602b600271cace49731ec86e.zip | |
Revert "fix: prevent sparse spacing in hyphenated words (#1102)"
This reverts commit 2b44dbdbf105f1c5d1cd34b7ae86925ff41e4c79.
Diffstat (limited to 'packages/tui/internal/components/chat')
| -rw-r--r-- | packages/tui/internal/components/chat/message.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/packages/tui/internal/components/chat/message.go b/packages/tui/internal/components/chat/message.go index 6199e9bf2..5539687f3 100644 --- a/packages/tui/internal/components/chat/message.go +++ b/packages/tui/internal/components/chat/message.go @@ -196,8 +196,6 @@ func renderText( case opencode.UserMessage: ts = time.UnixMilli(int64(casted.Time.Created)) base := styles.NewStyle().Foreground(t.Text()).Background(backgroundColor) - - // Process @ mentions and styling with hyphen preservation words := strings.Fields(text) for i, word := range words { if strings.HasPrefix(word, "@") { @@ -206,14 +204,9 @@ func renderText( words[i] = base.Render(word + " ") } } - styledText := strings.Join(words, "") - - // Apply word wrapping with hyphen preservation - frameSize := util.GetMessageContainerFrame() - wrappedText := util.ProcessTextWithHyphens(styledText, func(t string) string { - return ansi.WordwrapWc(t, width-frameSize, " ") - }) - content = base.Width(width - frameSize).Render(wrappedText) + text = strings.Join(words, "") + text = ansi.WordwrapWc(text, width-6, " -") + content = base.Width(width - 6).Render(text) } timestamp := ts. @@ -715,4 +708,5 @@ func renderDiagnostics( // if !ok { // return "" // } + } |
