@@ -41,6 +41,7 @@ type Editor interface {
4141 SetSession(session session.Session) tea.Cmd
4242 IsCompletionsOpen() bool
4343 HasAttachments() bool
44+ IsEmpty() bool
4445 Cursor() *tea.Cursor
4546}
4647
@@ -261,7 +262,7 @@ func (m *editorCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
261262 curIdx := m.textarea.Width()*cur.Y + cur.X
262263 switch {
263264 // Open command palette when "/" is pressed on empty prompt
264− case msg.String() == "/" && len(strings.TrimSpace(m.textarea.Value())) == 0:
265+ case msg.String() == "/" && m.IsEmpty():
265266 return m, util.CmdHandler(dialogs.OpenDialogMsg{
266267 Model: commands.NewCommandDialog(m.session.ID),
267268 })
@@ -542,6 +543,10 @@ func (c *editorCmp) HasAttachments() bool {
542543 return len(c.attachments) > 0
543544}
544545
546+func (c *editorCmp) IsEmpty() bool {
547+ return strings.TrimSpace(c.textarea.Value()) == ""
548+}
549+
545550func normalPromptFunc(info textarea.PromptInfo) string {
546551 t := styles.CurrentTheme()
547552 if info.LineNumber == 0 {