diff options
Diffstat (limited to 'packages/tui/internal/components/chat')
| -rw-r--r-- | packages/tui/internal/components/chat/editor.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go index de74b4895..efbc08349 100644 --- a/packages/tui/internal/components/chat/editor.go +++ b/packages/tui/internal/components/chat/editor.go @@ -344,6 +344,12 @@ func (m *editorComponent) Submit() (tea.Model, tea.Cmd) { if value == "" { return m, nil } + + switch value { + case "exit", "quit", "q", ":q": + return m, tea.Quit + } + if len(value) > 0 && value[len(value)-1] == '\\' { // If the last character is a backslash, remove it and add a newline m.textarea.ReplaceRange(len(value)-1, len(value), "") |
