feat(tui): add fuzzy search to model picker
- Add SearchableSelectList component with fuzzy filtering - Integrate with /models command for quick model search - Support up/down navigation while typing - Uses pi-tui's fuzzyFilter for intelligent matching
This commit is contained in:
committed by
Peter Steinberger
parent
c639b386da
commit
de44e0ad33
@@ -5,6 +5,7 @@ import type {
|
||||
SettingsListTheme,
|
||||
} from "@mariozechner/pi-tui";
|
||||
import chalk from "chalk";
|
||||
import type { SearchableSelectListTheme } from "../components/searchable-select-list.js";
|
||||
|
||||
const palette = {
|
||||
text: "#E8E3D5",
|
||||
@@ -92,3 +93,14 @@ export const editorTheme: EditorTheme = {
|
||||
borderColor: (text) => fg(palette.border)(text),
|
||||
selectList: selectListTheme,
|
||||
};
|
||||
|
||||
export const searchableSelectListTheme: SearchableSelectListTheme = {
|
||||
selectedPrefix: (text) => fg(palette.accent)(text),
|
||||
selectedText: (text) => chalk.bold(fg(palette.accent)(text)),
|
||||
description: (text) => fg(palette.dim)(text),
|
||||
scrollInfo: (text) => fg(palette.dim)(text),
|
||||
noMatch: (text) => fg(palette.dim)(text),
|
||||
searchPrompt: (text) => fg(palette.accentSoft)(text),
|
||||
searchInput: (text) => fg(palette.text)(text),
|
||||
matchHighlight: (text) => chalk.bold(fg(palette.accent)(text)),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user