Spaces:
Sleeping
Sleeping
| 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"); | |
| } |