(projectRoot: string)
| 79 | |
| 80 | /** Count trajectories recorded for a project (for the /flywheel status command). */ |
| 81 | export async function countTrajectories(projectRoot: string): Promise<number> { |
| 82 | try { |
| 83 | const full = trajectoryPath(projectRoot); |
| 84 | const content = await fs.readFile(full, 'utf-8'); |
| 85 | return content.split('\n').filter(l => l.trim().length > 0).length; |
| 86 | } catch { |
| 87 | return 0; |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | /** Absolute path to a project's trajectory dataset (for export / fine-tune tooling). */ |
| 92 | export function getTrajectoryDatasetPath(projectRoot: string): string { |
no test coverage detected