Phase 1: v1 single-bot roleplay engine #1

Merged
dohertj2 merged 45 commits from phase-1 into main 2026-04-26 19:59:30 -04:00
Showing only changes of commit f0742dd4f9 - Show all commits
+9 -2
View File
@@ -78,7 +78,11 @@ document.querySelector('.drawer-toggle')?.addEventListener('click', (e) => {
function unlock() { function unlock() {
isStreaming = false; isStreaming = false;
if (sendBtn) sendBtn.disabled = false; if (sendBtn) sendBtn.disabled = false;
if (textarea) textarea.disabled = false; if (textarea) {
textarea.readOnly = false;
textarea.value = '';
textarea.focus();
}
const stop = shell.querySelector('.stop-streaming'); const stop = shell.querySelector('.stop-streaming');
if (stop) stop.remove(); if (stop) stop.remove();
} }
@@ -128,7 +132,10 @@ document.querySelector('.drawer-toggle')?.addEventListener('click', (e) => {
form.addEventListener('submit', () => { form.addEventListener('submit', () => {
isStreaming = true; isStreaming = true;
if (sendBtn) sendBtn.disabled = true; if (sendBtn) sendBtn.disabled = true;
if (textarea) textarea.disabled = true; // readOnly (not disabled) — disabled fields are excluded from the
// form submission, which would send prose="" and trigger the
// server's empty-prose 400.
if (textarea) textarea.readOnly = true;
if (!shell.querySelector('.stop-streaming')) { if (!shell.querySelector('.stop-streaming')) {
const stopBtn = document.createElement('button'); const stopBtn = document.createElement('button');
stopBtn.type = 'button'; stopBtn.type = 'button';