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

Function createFileSuggestionItem

src/hooks/fileSuggestions.ts:674–683  ·  view source on GitHub ↗

* Creates a file suggestion item

(
  filePath: string,
  score?: number,
)

Source from the content-addressed store, hash-verified

672 * Creates a file suggestion item
673 */
674function createFileSuggestionItem(
675 filePath: string,
676 score?: number,
677): SuggestionItem {
678 return {
679 id: `file-${filePath}`,
680 displayText: filePath,
681 metadata: score !== undefined ? { score } : undefined,
682 }
683}
684
685/**
686 * Find matching files and folders for a given query using the TS file index

Callers 1

findMatchingFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected