MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / countTrajectories

Function countTrajectories

src/agent/trajectory.ts:81–89  ·  view source on GitHub ↗
(projectRoot: string)

Source from the content-addressed store, hash-verified

79
80/** Count trajectories recorded for a project (for the /flywheel status command). */
81export 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). */
92export function getTrajectoryDatasetPath(projectRoot: string): string {

Callers 2

handleSlashCommandFunction · 0.85

Calls 1

trajectoryPathFunction · 0.85

Tested by

no test coverage detected