From 9432b337f23d77e6dd29cf7a27f68f64b21e5661 Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Tue, 8 Jul 2025 18:47:51 +0200 Subject: [PATCH] fix: format files --- cmd/root.go | 2 +- internal/tui/components/chat/editor/editor.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 500909360407ccac25111acf33f28c692eeb8ffa..20c92f19357ed3350a36633c9b1be7bd91cd7ce0 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -120,7 +120,7 @@ to assist developers in writing, debugging, and understanding code directly from tea.WithAltScreen(), tea.WithKeyReleases(), tea.WithUniformKeyLayout(), - tea.WithMouseCellMotion(), // Use cell motion instead of all motion to reduce event flooding + tea.WithMouseCellMotion(), // Use cell motion instead of all motion to reduce event flooding tea.WithFilter(tui.MouseEventFilter), // Filter mouse events based on focus state ) diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index 0e23799f3345ef01618856129d56b5b7982d8e22..f4551ee7e97713610c882c89d4e1c601f4e92704 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -49,7 +49,7 @@ type editorCmp struct { currentQuery string completionsStartIndex int isCompletionsOpen bool - + // Debouncing for completions debounceTimer *time.Timer } @@ -153,10 +153,10 @@ func (m *editorCmp) debouncedCompletionFilter() tea.Cmd { if m.debounceTimer != nil { m.debounceTimer.Stop() } - + // Create new timer for debouncing m.debounceTimer = time.NewTimer(150 * time.Millisecond) - + return func() tea.Msg { <-m.debounceTimer.C return CompletionDebounceMsg{} @@ -290,7 +290,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } } } - + m.textarea, cmd = m.textarea.Update(msg) cmds = append(cmds, cmd) return m, tea.Batch(cmds...)