CodexReflexGuard / script.js
LordXido's picture
Create script.js
ef103a7 verified
raw
history blame contribute delete
565 Bytes
async function triggerReflex() {
const input = document.getElementById("scenarioInput").value;
const logWindow = document.getElementById("logWindow");
if (!input) {
logWindow.textContent += "\n[Error]: Please enter a scenario description.";
return;
}
const response = await fetch("/run", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({ scenario: input })
});
const data = await response.json();
logWindow.textContent += "\n" + data.logs.join("\n");
}