FEAT: implement temp version of main tooling feedback loop

This commit is contained in:
William Jeynes
2026-02-09 20:25:36 +00:00
parent 5841e8a922
commit cd2c8621e8
13 changed files with 119 additions and 72 deletions
+6 -3
View File
@@ -1,9 +1,12 @@
import fs from "fs";
export function hydratePrompt(path: string, replacement: string) {
export function hydratePrompt(path: string, state: any) {
// TODO: expand into full context-based replacement engine
let raw = fs.readFileSync("prompts/" + path, "utf-8");
return raw.replace("###", replacement)
}
raw = raw.replace("###TITLE###", state.disinformationTitle);
raw = raw.replace("###LM###", state.messages.at(-1).content);
return raw;
}