MCPcopy Create free account
hub / github.com/Noumena-Network/code / findMatchingFiles

Function findMatchingFiles

src/hooks/fileSuggestions.ts:689–697  ·  view source on GitHub ↗
(
  fileIndex: FileIndex,
  partialPath: string,
)

Source from the content-addressed store, hash-verified

687 */
688const MAX_SUGGESTIONS = 15
689function findMatchingFiles(
690 fileIndex: FileIndex,
691 partialPath: string,
692): SuggestionItem[] {
693 const results = fileIndex.search(partialPath, MAX_SUGGESTIONS)
694 return results.map(result =>
695 createFileSuggestionItem(result.path, result.score),
696 )
697}
698
699/**
700 * Starts a background refresh of the file index cache if not already in progress.

Callers 1

generateFileSuggestionsFunction · 0.85

Calls 2

createFileSuggestionItemFunction · 0.85
searchMethod · 0.80

Tested by

no test coverage detected