fix: update input flow

This commit is contained in:
2026-06-25 19:55:00 +05:00
parent 9a7d793d7e
commit 0928eba0e3
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -42,6 +42,7 @@ function initKeyboardBridge() {
const line = buffer; const line = buffer;
buffer = ""; buffer = "";
InputModule.submitLocal(line); InputModule.submitLocal(line);
InputModule.updateLocalDisplay("");
} else if (e.key === "Escape") { } else if (e.key === "Escape") {
buffer = ""; buffer = "";
InputModule.clear(); InputModule.clear();
+2 -2
View File
@@ -3,7 +3,7 @@ const InputModule = {
localBuffer: "", localBuffer: "",
submitLine(text, username) { submitLine(text, username) {
const line = text.trim().toLowerCase(); const line = text.trim().toLowerCase().split(/\s+/)[0];
if (!line) return; if (!line) return;
if (introPlaying) return; if (introPlaying) return;
@@ -25,7 +25,7 @@ const InputModule = {
}, },
submitLocal(text) { submitLocal(text) {
const line = text.trim().toLowerCase(); const line = text.trim().toLowerCase().split(/\s+/)[0];
if (!line) return; if (!line) return;
if (introPlaying) return; if (introPlaying) return;