diff options
| author | adamdottv <[email protected]> | 2025-06-18 15:51:21 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-06-18 15:51:26 -0500 |
| commit | 87d1d3fb62c45684d38c29f075d0742b9546ee28 (patch) | |
| tree | 6312f54201442c707362051b5aeca5e5470b3264 /packages/tui/internal/components/chat | |
| parent | e054454109140883ef52c00d833d560896361f6c (diff) | |
| download | opencode-87d1d3fb62c45684d38c29f075d0742b9546ee28.tar.gz opencode-87d1d3fb62c45684d38c29f075d0742b9546ee28.zip | |
fix(tui): file completion quirks
Diffstat (limited to 'packages/tui/internal/components/chat')
| -rw-r--r-- | packages/tui/internal/components/chat/editor.go | 6 |
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 |
