(sessionID)
| 799 | |
| 800 | async function buildPrompt(directory, job) { |
| 801 | if (isGoalJob(job)) return await buildGoalPrompt(directory, job) |
| 802 | const sections = [] |
| 803 | if (job.promptFile) { |
| 804 | const text = await readSmallTextFile(path.resolve(directory, job.promptFile)) |
| 805 | if (text.trim()) sections.push(`Instructions from ${job.promptFile}:\n${text.trim()}`) |
| 806 | else sections.push(`Prompt file ${job.promptFile} was requested but could not be read. Continue from the regular action instead.`) |
| 807 | } |
| 808 | if (job.action) sections.push(decoratePrompt(job)) |
| 809 | for (const file of job.includeFiles || []) { |
| 810 | const text = await readSmallTextFile(path.resolve(directory, file), 80_000) |
| 811 | if (text.trim()) sections.push(`Context from ${file}:\n${text.trim().slice(0, 20_000)}`) |
no test coverage detected