on main help sign in
fix(editor): better sorting of files when completing with / (#733)

* fix(editor): better sorting of files when completing with / basically, show shorter paths first Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * Update internal/tui/components/chat/editor/editor.go Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com> --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>

commit39ede6e4db414bbda4674131a56ac80537b614c6 authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateTue 12 Aug 2025, 14:17 (1 year ago) parentb550c69
1 file changed+1
internal/tui/components/chat/editor/editor.go+1
internal/tui/components/chat/editor/editor.go+1
@@ -481,6 +481,7 @@ func (m *editorCmp) SetPosition(x, y int) tea.Cmd {
481481
482482func (m *editorCmp) startCompletions() tea.Msg {
483483 files, _, _ := fsext.ListDirectory(".", nil, 0)
484+ slices.Sort(files)
484485 completionItems := make([]completions.Completion, 0, len(files))
485486 for _, file := range files {
486487 file = strings.TrimPrefix(file, "./")