@@ -216,8 +216,10 @@ func (f *ModelsList) VisibleItems() []list.Item {
218 matches := fuzzy.Find(query, names)
218 matches := fuzzy.Find(query, names)
220+ // Sort by original index to preserve order within the group
219 sort.SliceStable(matches, func(i, j int) bool {
221 sort.SliceStable(matches, func(i, j int) bool {
220− return matches[i].Score > matches[j].Score
222+ return matches[i].Index < matches[j].Index
223 for _, match := range matches {
225 for _, match := range matches {