feat(tui): even better model selector
This commit is contained in:
@@ -43,7 +43,7 @@ func (c *CommandCompletionProvider) getCommandCompletionItem(
|
||||
Title: title,
|
||||
Value: value,
|
||||
ProviderID: c.GetId(),
|
||||
})
|
||||
}, dialog.WithBackgroundColor(t.BackgroundElement()))
|
||||
}
|
||||
|
||||
func (c *CommandCompletionProvider) GetChildEntries(
|
||||
@@ -91,7 +91,7 @@ func (c *CommandCompletionProvider) GetChildEntries(
|
||||
}
|
||||
|
||||
// Find fuzzy matches
|
||||
matches := fuzzy.RankFind(query, commandNames)
|
||||
matches := fuzzy.RankFindFold(query, commandNames)
|
||||
|
||||
// Sort by score (best matches first)
|
||||
sort.Sort(matches)
|
||||
|
||||
@@ -30,7 +30,7 @@ func (cg *filesContextGroup) GetEmptyMessage() string {
|
||||
func (cg *filesContextGroup) getGitFiles() []dialog.CompletionItemI {
|
||||
t := theme.CurrentTheme()
|
||||
items := make([]dialog.CompletionItemI, 0)
|
||||
base := styles.NewStyle().Background(t.BackgroundPanel())
|
||||
base := styles.NewStyle().Background(t.BackgroundElement())
|
||||
green := base.Foreground(t.Success()).Render
|
||||
red := base.Foreground(t.Error()).Render
|
||||
|
||||
@@ -55,7 +55,7 @@ func (cg *filesContextGroup) getGitFiles() []dialog.CompletionItemI {
|
||||
ProviderID: cg.GetId(),
|
||||
Raw: file,
|
||||
},
|
||||
dialog.WithBackgroundColor(t.BackgroundPanel()),
|
||||
dialog.WithBackgroundColor(t.BackgroundElement()),
|
||||
)
|
||||
items = append(items, item)
|
||||
}
|
||||
@@ -103,7 +103,7 @@ func (cg *filesContextGroup) GetChildEntries(
|
||||
ProviderID: cg.GetId(),
|
||||
Raw: file,
|
||||
},
|
||||
dialog.WithBackgroundColor(theme.CurrentTheme().BackgroundPanel()),
|
||||
dialog.WithBackgroundColor(theme.CurrentTheme().BackgroundElement()),
|
||||
)
|
||||
items = append(items, item)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user