File size: 1,503 Bytes
ef987bb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Continuous keyboard follow-ups
Fix the supplied demo-1001 prompt page in `/app/index.html`. Clicking “Write, press ..” opens the first composer. After sending the first question, the new follow-up input must receive focus automatically so the user can type and submit immediately. Keep focus on an editable follow-up after subsequent submissions. The page runs offline.
## Interaction contract
Plain Enter in the follow-up input submits exactly once. Shift+Enter and Enter during IME composition do not submit. Display each submitted question as plain text in the prompt area, preserving literal HTML characters rather than interpreting them as markup. There is no requirement to repeat the question in the reply.
Preserve the starter hooks, including `write-trigger`, `prompt-input`, `send-button`, `prompt-area` and `followup-input`. Expose `window.__getSubmissions()`, returning a copy of the submitted texts in order for both button and keyboard submissions. Mutating the returned array must not affect stored submissions.
## Acceptance Checklist
- The first send creates and focuses the visible follow-up. Typing immediately goes into it without another click.
- Across at least five consecutive follow-ups, a plain Enter submits the exact input once, preserves focus and updates the ordered submission history. Shift+Enter and IME Enter do not submit.
- First and later submissions remain visible as literal text, and changing a returned history array cannot alter the page's history.
|