summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/components/chat/editor.go
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-06-15 15:07:00 -0500
committeradamdottv <[email protected]>2025-06-15 15:07:05 -0500
commit77a6b3bdd6f68fe6ae5a69611b100b413e57473c (patch)
tree2b3ce77f3973189d281880c25b03c909152b65bf /packages/tui/internal/components/chat/editor.go
parent7effff56c0305965ca9bea56c3165c5d02f5d2eb (diff)
downloadopencode-77a6b3bdd6f68fe6ae5a69611b100b413e57473c.tar.gz
opencode-77a6b3bdd6f68fe6ae5a69611b100b413e57473c.zip
fix: background color rendering issues
Diffstat (limited to 'packages/tui/internal/components/chat/editor.go')
-rw-r--r--packages/tui/internal/components/chat/editor.go20
1 files changed, 7 insertions, 13 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go
index 293f18f05..81b125df8 100644
--- a/packages/tui/internal/components/chat/editor.go
+++ b/packages/tui/internal/components/chat/editor.go
@@ -258,8 +258,8 @@ func (m *editorComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
func (m *editorComponent) View() string {
t := theme.CurrentTheme()
- base := styles.BaseStyle().Render
- muted := styles.Muted().Render
+ base := styles.BaseStyle().Background(t.Background()).Render
+ muted := styles.Muted().Background(t.Background()).Render
promptStyle := lipgloss.NewStyle().
Padding(0, 0, 0, 1).
Bold(true).
@@ -281,7 +281,7 @@ func (m *editorComponent) View() string {
BorderBackground(t.Background()).
Render(textarea)
- hint := base("enter") + muted(" send ") + base("shift") + muted("+") + base("enter") + muted(" newline")
+ hint := base("enter") + muted(" send ")
if m.app.IsBusy() {
hint = muted("working") + m.spinner.View() + muted(" ") + base("esc") + muted(" interrupt")
}
@@ -292,18 +292,12 @@ func (m *editorComponent) View() string {
}
space := m.width - 2 - lipgloss.Width(model) - lipgloss.Width(hint)
- spacer := lipgloss.NewStyle().Width(space).Render("")
+ spacer := lipgloss.NewStyle().Background(t.Background()).Width(space).Render("")
- info := lipgloss.JoinHorizontal(lipgloss.Left, hint, spacer, model)
- info = styles.Padded().Render(info)
+ info := hint + spacer + model
+ info = styles.Padded().Background(t.Background()).Render(info)
- content := lipgloss.JoinVertical(
- lipgloss.Top,
- // m.attachmentsContent(),
- "",
- textarea,
- info,
- )
+ content := strings.Join([]string{"", textarea, info}, "\n")
return content
}