fix(mystery): improve mobile terminal and chips
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-05-10 05:53:32 -05:00
parent 29fd371b89
commit 33933b00d7
17 changed files with 122 additions and 18 deletions
+8
View File
@@ -49,6 +49,11 @@ if (!transcriptEl || !inputEl) {
function refreshChips(): void {
renderChips(computeChips(state, world), (command) => {
inputEl!.value = command
if (command.endsWith(' ')) {
inputEl!.focus()
inputEl!.setSelectionRange(command.length, command.length)
return
}
inputEl!.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter' }))
})
}
@@ -96,6 +101,9 @@ if (!transcriptEl || !inputEl) {
for (const line of lines) {
const el = document.createElement('div')
el.className = line.kind
if (line.kind === 'system' && line.text.includes('|_| |_|')) {
el.classList.add('ascii-art')
}
el.textContent = line.text
transcriptEl.appendChild(el)
}