MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / searchFunction

Function searchFunction

admin/src/commands/lookup-client.ts:50–60  ·  view source on GitHub ↗
(_answers: unknown, input = '')

Source from the content-addressed store, hash-verified

48 }));
49
50 const searchFunction = async (_answers: unknown, input = '') => {
51 const fuzzyResult = fuzzy.filter(input, searchItems, {
52 extract: (item: ClientSearchItem) =>
53 `${item.organizationName} ${item.projectName || ''} ${item.name} ${item.id}`,
54 });
55
56 return fuzzyResult.map((result: fuzzy.FilterResult<ClientSearchItem>) => ({
57 name: result.original.displayText,
58 value: result.original,
59 }));
60 };
61
62 const { selectedClient } = (await inquirer.prompt([
63 {

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected