The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
perf(webapp): join a host terminal input run once instead of growing it frame by frame
unsupportedpastelseda711a5e2f4
diff --git a/hermes_cli/web_host_terminal_sessions.py b/hermes_cli/web_host_terminal_sessions.pyindex 39b4119a880..88d9d59d4d2 100644--- a/hermes_cli/web_host_terminal_sessions.py+++ b/hermes_cli/web_host_terminal_sessions.py@@ -435,19 +435,20 @@ async def _write_while_open(session: PtySession, ws: WebSocket, data: bytes, fendef _input_runs(frames: list[dict], resize_re):"""``frames`` in order: consecutive keystrokes joined into one run, resizes as ``(cols, rows)``."""- run = b""+ run: list[bytes] = [] # joined once: a batch can hold megabytes of pasted inputfor msg in frames:raw = _frame_payload(msg)match = resize_re.fullmatch(raw) if raw else Noneif match is None:- run += raw+ if raw:+ run.append(raw)continueif run:- yield run- run = b""+ yield b"".join(run)+ run = []yield int(match[1]), int(match[2])if run:- yield run+ yield b"".join(run)async def _resize(session: PtySession, ws: WebSocket, size: tuple[int, int], undo):