@kody-ade/kody-engine-lite 0.1.48 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +3 -2
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -3924,11 +3924,12 @@ ${srcEntries.join(", ")}
|
|
|
3924
3924
|
cwd,
|
|
3925
3925
|
stdio: ["pipe", "pipe", "pipe"]
|
|
3926
3926
|
}).trim();
|
|
3927
|
-
|
|
3927
|
+
const cleaned = output.replace(/^```(?:markdown|md)?\s*\n?/, "").replace(/\n?```\s*$/, "");
|
|
3928
|
+
if (!cleaned.includes("{{TASK_CONTEXT}}")) {
|
|
3928
3929
|
console.log(` \u26A0 ${stage}.md \u2014 AI dropped {{TASK_CONTEXT}}, using default template`);
|
|
3929
3930
|
fs21.writeFileSync(path20.join(stepsDir, `${stage}.md`), defaultPrompt);
|
|
3930
3931
|
} else {
|
|
3931
|
-
fs21.writeFileSync(path20.join(stepsDir, `${stage}.md`),
|
|
3932
|
+
fs21.writeFileSync(path20.join(stepsDir, `${stage}.md`), cleaned);
|
|
3932
3933
|
}
|
|
3933
3934
|
stepCount++;
|
|
3934
3935
|
console.log(` \u2713 ${stage}.md`);
|