mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
- Updated roster.json based on prompt directory scan. - Regenerated daily and weekly scheduler markdown tables. - Added run artifacts and task log. Co-authored-by: PR0M3TH3AN <[email protected]>
33 lines
917 B
JavaScript
33 lines
917 B
JavaScript
import fs from 'fs';
|
|
|
|
const fix = (filePath) => {
|
|
let content = fs.readFileSync(filePath, 'utf8');
|
|
const header = '| # | Agent Name | Prompt File |\n|---|------------|-------------|';
|
|
|
|
const parts = content.split(header);
|
|
if (parts.length < 2) return; // Should not happen
|
|
|
|
const pre = parts[0];
|
|
const post = parts[1];
|
|
|
|
const lines = post.split('\n');
|
|
const tableLines = [];
|
|
let i = 0;
|
|
|
|
// Skip initial empty lines if any (though usually generateTable doesn't add them at start)
|
|
while(i < lines.length && lines[i].trim() === '') i++;
|
|
|
|
// Capture rows
|
|
while(i < lines.length && lines[i].trim().startsWith('|')) {
|
|
tableLines.push(lines[i]);
|
|
i++;
|
|
}
|
|
|
|
const newContent = pre + header + '\n' + tableLines.join('\n') + '\n';
|
|
fs.writeFileSync(filePath, newContent);
|
|
console.log(`Fixed ${filePath}`);
|
|
};
|
|
|
|
fix('src/prompts/daily-scheduler.md');
|
|
fix('src/prompts/weekly-scheduler.md');
|