MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / exampleSymbolOf

Function exampleSymbolOf

graph-ui/src/search/command-examples.ts:91–102  ·  view source on GitHub ↗
(symbols: readonly ExampleSymbol[])

Source from the content-addressed store, hash-verified

89 * nichts geladen ist: dann gibt es keine Beispiele.
90 */
91export function exampleSymbolOf(symbols: readonly ExampleSymbol[]): string | undefined {
92 const usable = symbols
93 .filter((symbol) => /^[A-Za-z_][A-Za-z0-9_]*$/.test(symbol.name))
94 .filter((symbol) => symbol.name.length >= EXAMPLE_SEARCH_LETTERS)
95 .filter((symbol) => !NOT_AN_EXAMPLE.includes(symbol.name))
96 .sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
97 if (usable.length === 0) {
98 return undefined;
99 }
100 const callable = usable.find((symbol) => CALLABLE_KINDS.includes(symbol.kind));
101 return (callable ?? usable[0]).name;
102}
103
104/**
105 * Die drei Beispiele zu einem Namen.

Callers 2

ProjectWindowViewFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected