* Format files as a flat list
(files: { path: string; language: string; nodeCount: number }[], includeMetadata: boolean)
| 6581 | * Format files as a flat list |
| 6582 | */ |
| 6583 | private formatFilesFlat(files: { path: string; language: string; nodeCount: number }[], includeMetadata: boolean): string { |
| 6584 | const lines: string[] = [`**Files (${files.length})**`, '']; |
| 6585 | |
| 6586 | for (const file of files.sort((a, b) => a.path.localeCompare(b.path))) { |
| 6587 | if (includeMetadata) { |
| 6588 | lines.push(`- ${file.path} (${file.language}, ${file.nodeCount} symbols)`); |
| 6589 | } else { |
| 6590 | lines.push(`- ${file.path}`); |
| 6591 | } |
| 6592 | } |
| 6593 | |
| 6594 | return lines.join('\n'); |
| 6595 | } |
| 6596 | |
| 6597 | /** |
| 6598 | * Format files grouped by language |