* Creates a file suggestion item
( filePath: string, score?: number, )
| 601 | * Creates a file suggestion item |
| 602 | */ |
| 603 | function createFileSuggestionItem( |
| 604 | filePath: string, |
| 605 | score?: number, |
| 606 | ): SuggestionItem { |
| 607 | return { |
| 608 | id: `file-${filePath}`, |
| 609 | displayText: filePath, |
| 610 | metadata: score !== undefined ? { score } : undefined, |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | /** |
| 615 | * Find matching files and folders for a given query using the TS file index |