* Creates a file suggestion item
( filePath: string, score?: number, )
| 672 | * Creates a file suggestion item |
| 673 | */ |
| 674 | function 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 |