Phase 1: v1 single-bot roleplay engine #1
@@ -78,7 +78,11 @@ document.querySelector('.drawer-toggle')?.addEventListener('click', (e) => {
|
||||
function unlock() {
|
||||
isStreaming = 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');
|
||||
if (stop) stop.remove();
|
||||
}
|
||||
@@ -128,7 +132,10 @@ document.querySelector('.drawer-toggle')?.addEventListener('click', (e) => {
|
||||
form.addEventListener('submit', () => {
|
||||
isStreaming = 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')) {
|
||||
const stopBtn = document.createElement('button');
|
||||
stopBtn.type = 'button';
|
||||
|
||||
Reference in New Issue
Block a user