The open source coding agent.
TypeScript
wip: refactoring tui
adamdottv10ddd654cff9
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.goindex e9414e49ad1..2e89a7db4da 100644--- a/packages/tui/internal/components/chat/editor.go+++ b/packages/tui/internal/components/chat/editor.go@@ -270,6 +270,8 @@ func (m *editorComponent) View() string {)textarea = styles.BaseStyle().Width(m.width).+ PaddingTop(1).+ PaddingBottom(1).Background(t.BackgroundElement()).Border(lipgloss.ThickBorder(), false, true).BorderForeground(t.BackgroundSubtle()).@@ -307,7 +309,7 @@ func (m *editorComponent) SetSize(width, height int) tea.Cmd {m.width = widthm.height = heightm.textarea.SetWidth(width - 5) // account for the prompt and padding right- m.textarea.SetHeight(height - 2) // account for info underneath+ m.textarea.SetHeight(height - 4) // account for info underneathreturn nil}diff --git a/packages/tui/internal/components/chat/messages.go b/packages/tui/internal/components/chat/messages.goindex a5432e9139f..8ab11a54a90 100644--- a/packages/tui/internal/components/chat/messages.go+++ b/packages/tui/internal/components/chat/messages.go@@ -245,7 +245,7 @@ func (m *messagesComponent) header() string {base := styles.BaseStyle().Rendermuted := styles.Muted().RenderheaderLines := []string{}- headerLines = append(headerLines, toMarkdown("# "+m.app.Session.Title, width-4, t.BackgroundElement()))+ headerLines = append(headerLines, toMarkdown("# "+m.app.Session.Title, width-4, t.Background()))if m.app.Session.Share != nil && m.app.Session.Share.Url != "" {headerLines = append(headerLines, muted(m.app.Session.Share.Url))} else {@@ -256,7 +256,7 @@ func (m *messagesComponent) header() string {header = styles.BaseStyle().Width(width).PaddingLeft(2).- Background(t.BackgroundElement()).+ // Background(t.BackgroundElement()).BorderLeft(true).BorderRight(true).BorderBackground(t.Background()).diff --git a/packages/tui/internal/page/chat.go b/packages/tui/internal/page/chat.goindex a26fa3a649b..a117e80f55e 100644--- a/packages/tui/internal/page/chat.go+++ b/packages/tui/internal/page/chat.go@@ -139,7 +139,7 @@ func (p *chatPage) View() string {layoutView = layout.PlaceOverlay(editorX,- editorY-lipgloss.Height(overlay)+1,+ editorY-lipgloss.Height(overlay)+2,overlay,layoutView,)@@ -169,7 +169,7 @@ func NewChatPage(app *app.App) layout.ModelWithView {layout.WithDirection(layout.FlexDirectionVertical),layout.WithPaneSizes(layout.FlexPaneSizeGrow,- layout.FlexPaneSizeFixed(5),+ layout.FlexPaneSizeFixed(6),),),}