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
@@ -7,7 +7,7 @@ import {
|
||||
import { normalizeAgentId } from "../routing/session-key.js";
|
||||
import { helpText, parseCommand } from "./commands.js";
|
||||
import type { ChatLog } from "./components/chat-log.js";
|
||||
import { createSelectList, createSettingsList } from "./components/selectors.js";
|
||||
import { createSearchableSelectList, createSelectList, createSettingsList } from "./components/selectors.js";
|
||||
import type { GatewayChatClient } from "./gateway-chat.js";
|
||||
import { formatStatusSummary } from "./tui-status-summary.js";
|
||||
import type {
|
||||
@@ -72,7 +72,7 @@ export function createCommandHandlers(context: CommandHandlerContext) {
|
||||
label: `${model.provider}/${model.id}`,
|
||||
description: model.name && model.name !== model.id ? model.name : "",
|
||||
}));
|
||||
const selector = createSelectList(items, 9);
|
||||
const selector = createSearchableSelectList(items, 9);
|
||||
selector.onSelect = (item) => {
|
||||
void (async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user