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

Function searchFunction

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

Source from the content-addressed store, hash-verified

43 }));
44
45 const searchFunction = async (_answers: unknown, input = '') => {
46 const fuzzyResult = fuzzy.filter(input, searchItems, {
47 extract: (item: ProjectSearchItem) =>
48 `${item.organizationName} ${item.name} ${item.id}`,
49 });
50
51 return fuzzyResult.map((result: fuzzy.FilterResult<ProjectSearchItem>) => ({
52 name: result.original.displayText,
53 value: result.original,
54 }));
55 };
56
57 const { selectedProject } = (await inquirer.prompt([
58 {

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected