* Format files as a flat list
(files: { path: string; language: string; nodeCount: number }[], includeMetadata: boolean)
| 4490 | * Format files as a flat list |
| 4491 | */ |
| 4492 | private formatFilesFlat(files: { path: string; language: string; nodeCount: number }[], includeMetadata: boolean): string { |
| 4493 | const lines: string[] = [`**Files (${files.length})**`, '']; |
| 4494 | |
| 4495 | for (const file of files.sort((a, b) => a.path.localeCompare(b.path))) { |
| 4496 | if (includeMetadata) { |
| 4497 | lines.push(`- ${file.path} (${file.language}, ${file.nodeCount} symbols)`); |
| 4498 | } else { |
| 4499 | lines.push(`- ${file.path}`); |
| 4500 | } |
| 4501 | } |
| 4502 | |
| 4503 | return lines.join('\n'); |
| 4504 | } |
| 4505 | |
| 4506 | /** |
| 4507 | * Format files grouped by language |