feat(repl): blank-line gutter between the submitted prompt and model output - #206
Merged
Conversation
…output After Enter, readline wrote a single CRLF so the model's first output line butted directly against the submitted prompt, making it hard to see where the response started. Emit a second newline so there is a clear blank-line gutter. TUI half only; the GUI transcript renderer needs the same gutter to not diverge (tracked in #205). Co-Authored-By: blackfloofie <265516171+blackfloofie@users.noreply.github.com>
Drives the real REPL in a pseudo-terminal (reusing scripts/pty_harness.py), submits a local /help, and asserts the rendered transcript has a blank line immediately before the command output — the gutter added in 2bf68dd. Anchored on the output line (not a fixed index) and rendered rather than raw, so it's robust to echo-redraw timing and ONLCR. Deterministic across repeated runs; the existing scripts/test-pty-repl.py still passes against the same binary. Co-Authored-By: blackfloofie <265516171+blackfloofie@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After Enter,
readlinewrote a single CRLF so the model's first output line butteddirectly against the submitted prompt, making it hard to see where the response
started. It now emits a second newline so there is a clear blank-line gutter.
Test
scripts/test-pty-gutter.pydrives the real REPL in a pseudo-terminal, submits alocal
/help, and asserts the rendered transcript has a blank line immediatelybefore the command output. Anchored on the output line (robust to echo-redraw
timing) and rendered rather than raw (independent of ONLCR). Deterministic across
repeated runs; the existing
scripts/test-pty-repl.pystill passes.Scope
TUI half only. Per the TUI-first rule the GUI transcript renderer needs the same
gutter to not diverge — tracked in #205, which stays open for that mirror.
Refs #205