diff options
Diffstat (limited to 'packages/tui/internal/components')
| -rw-r--r-- | packages/tui/internal/components/chat/editor.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go index f4e6ab2f9..071f22d0e 100644 --- a/packages/tui/internal/components/chat/editor.go +++ b/packages/tui/internal/components/chat/editor.go @@ -30,6 +30,7 @@ type EditorComponent interface { Content(width int) string Lines() int Value() string + Length() int Focused() bool Focus() (tea.Model, tea.Cmd) Blur() @@ -295,6 +296,10 @@ func (m *editorComponent) Value() string { return m.textarea.Value() } +func (m *editorComponent) Length() int { + return m.textarea.Length() +} + func (m *editorComponent) Submit() (tea.Model, tea.Cmd) { value := strings.TrimSpace(m.Value()) if value == "" { |
