summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/components/chat
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tui/internal/components/chat')
-rw-r--r--packages/tui/internal/components/chat/editor.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go
index 46d160478..154d3c370 100644
--- a/packages/tui/internal/components/chat/editor.go
+++ b/packages/tui/internal/components/chat/editor.go
@@ -80,7 +80,7 @@ func (m *editorComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
} else {
existingValue := m.textarea.Value()
modifiedValue := strings.Replace(existingValue, msg.SearchString, msg.CompletionValue, 1)
- m.textarea.SetValue(modifiedValue)
+ m.textarea.SetValue(modifiedValue + " ")
return m, nil
}
}
@@ -152,11 +152,11 @@ func (m *editorComponent) SetSize(width, height int) tea.Cmd {
}
func (m *editorComponent) Value() string {
- return strings.TrimSpace(m.textarea.Value())
+ return m.textarea.Value()
}
func (m *editorComponent) Submit() (tea.Model, tea.Cmd) {
- value := m.Value()
+ value := strings.TrimSpace(m.Value())
m.textarea.Reset()
if value == "" {
return m, nil