Submit
document.addEventListener(“DOMContentLoaded”, function () {
const form = document.getElementById(“aeva-form”);
const input = document.getElementById(“aeva-input”);
const output = document.getElementById(“aeva-output”);
const prompts = [
“Hi, I’m Aeva. How is your day going on a scale of 0 to 9?”,
“Can you give me one word that captures today’s feeling?”,
“Thank you. Let’s begin with that. How is it showing up in your voice or thoughts right now?”,
“Does this part feel clearer now, or is something still unresolved?”,
“What are you now ready to allow instead?”,
“Would you like to continue exploring, close this for now, reset and check something else, or overview what’s been resolved? (Type: continue, close, reset, overview)”
];
let step = 0;
let responses = [];
function showNextPrompt() {
if (step < prompts.length) {
output.innerHTML += "
Aeva: ” + prompts[step] + “
“;
}
}
form.addEventListener(“submit”, function (e) {
e.preventDefault();
const userInput = input.value.trim();
if (!userInput) return;
output.innerHTML += “
You: ” + userInput + “
“;
responses.push(userInput);
input.value = “”;
step++;
setTimeout(showNextPrompt, 300);
});
showNextPrompt();
});