apparently making a function public

hems created

Change summary

internal/tui/components/chat/editor/editor.go | 10 ++++------
internal/tui/page/chat/chat.go                |  4 ++--
2 files changed, 6 insertions(+), 8 deletions(-)

Detailed changes

internal/tui/components/chat/editor/editor.go 🔗

@@ -37,7 +37,7 @@ type Editor interface {
 	SetSession(session session.Session) tea.Cmd
 	IsCompletionsOpen() bool
 	Cursor() *tea.Cursor
-	SendMessage() tea.Cmd
+	Send() tea.Cmd
 }
 
 type FileCompletionItem struct {
@@ -130,7 +130,7 @@ func (m *editorCmp) Init() tea.Cmd {
 	return nil
 }
 
-func (m *editorCmp) send() tea.Cmd {
+func (m *editorCmp) Send() tea.Cmd {
 	if m.app.CoderAgent == nil {
 		return util.ReportError(fmt.Errorf("coder agent is not initialized"))
 	}
@@ -267,7 +267,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 				m.textarea.SetValue(value[:len(value)-1])
 			} else {
 				// Otherwise, send the message
-				return m, m.send()
+				return m, m.Send()
 			}
 		}
 	}
@@ -443,9 +443,7 @@ func (c *editorCmp) IsCompletionsOpen() bool {
 	return c.isCompletionsOpen
 }
 
-func (c *editorCmp) SendMessage() tea.Cmd {
-	return c.send()
-}
+
 
 func New(app *app.App, initialPrompt string) Editor {
 	t := styles.CurrentTheme()

internal/tui/page/chat/chat.go 🔗

@@ -165,7 +165,7 @@ func (p *chatPage) Init() tea.Cmd {
 		
 		// If we have an initial prompt, automatically send it
 		if p.initialPrompt != "" {
-			cmds = append(cmds, p.editor.SendMessage())
+			cmds = append(cmds, p.editor.Send())
 		}
 	}
 
@@ -295,7 +295,7 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 		
 		// If we have an initial prompt, automatically send it after onboarding completes
 		if p.initialPrompt != "" {
-			return p, tea.Batch(p.SetSize(p.width, p.height), p.editor.SendMessage())
+			return p, tea.Batch(p.SetSize(p.width, p.height), p.editor.Send())
 		}
 		
 		return p, p.SetSize(p.width, p.height)