on main help sign in
fix: format files
9432b33Raphael Amorim
cmd/root.go+1−1
@@ -120,7 +120,7 @@ to assist developers in writing, debugging, and understanding code directly from
120 tea.WithAltScreen(),
120 tea.WithAltScreen(),
121 tea.WithKeyReleases(),
121 tea.WithKeyReleases(),
122 tea.WithUniformKeyLayout(),
122 tea.WithUniformKeyLayout(),
123− tea.WithMouseCellMotion(), // Use cell motion instead of all motion to reduce event flooding
123+ tea.WithMouseCellMotion(), // Use cell motion instead of all motion to reduce event flooding
124 tea.WithFilter(tui.MouseEventFilter), // Filter mouse events based on focus state
124 tea.WithFilter(tui.MouseEventFilter), // Filter mouse events based on focus state
125 )
125 )
126
126
internal/tui/components/chat/editor/editor.go+4−4
@@ -49,7 +49,7 @@ type editorCmp struct {
49 currentQuery string
49 currentQuery string
50 completionsStartIndex int
50 completionsStartIndex int
51 isCompletionsOpen bool
51 isCompletionsOpen bool
52−
52+
53 // Debouncing for completions
53 // Debouncing for completions
54 debounceTimer *time.Timer
54 debounceTimer *time.Timer
55}
55}
@@ -153,10 +153,10 @@ func (m *editorCmp) debouncedCompletionFilter() tea.Cmd {
153 if m.debounceTimer != nil {
153 if m.debounceTimer != nil {
154 m.debounceTimer.Stop()
154 m.debounceTimer.Stop()
155 }
155 }
156−
156+
157 // Create new timer for debouncing
157 // Create new timer for debouncing
158 m.debounceTimer = time.NewTimer(150 * time.Millisecond)
158 m.debounceTimer = time.NewTimer(150 * time.Millisecond)
159−
159+
160 return func() tea.Msg {
160 return func() tea.Msg {
161 <-m.debounceTimer.C
161 <-m.debounceTimer.C
162 return CompletionDebounceMsg{}
162 return CompletionDebounceMsg{}
@@ -290,7 +290,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
290 }
290 }
291 }
291 }
292 }
292 }
293−
293+
294 m.textarea, cmd = m.textarea.Update(msg)
294 m.textarea, cmd = m.textarea.Update(msg)
295 cmds = append(cmds, cmd)
295 cmds = append(cmds, cmd)
296 return m, tea.Batch(cmds...)
296 return m, tea.Batch(cmds...)