aboutsummaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-11 22:32:25 +0200
committeruser <user@clank>2026-08-12 19:34:35 +0200
commit28bf22e07222d908fe9760a84578631141c2ad19 (patch)
tree68d0cc8566a628d9ea9973c89b3cec8cbbc6bf2e /cli/src
parentchrome: reframe user prompts as a labelled chip + rail (diff)
downloadsl0ppi-28bf22e07222d908fe9760a84578631141c2ad19.tar.gz
sl0ppi-28bf22e07222d908fe9760a84578631141c2ad19.tar.xz
sl0ppi-28bf22e07222d908fe9760a84578631141c2ad19.zip
chrome: indent the input behind a ❯ prompt glyph
Rhymes with the ❯ chip user-prompt-frame stamps on the message once it is submitted, so what you type and what it becomes read as the same object: ❯ your input text that wraps here ────────────────────────────────────────────── The file's own comment warned that content lines must pass through verbatim or the cursor desyncs. That is true but fixable: the TUI derives the cursor column as visibleWidth(line.slice(0, markerIndex)) from the FINAL rendered line, so a prefix inserted BEFORE the marker shifts the reported column by exactly its own width -- which is where the text moved to. Verified against native: the same text reports col 11 unpatched and col 13 patched, and empty input parks the cursor at col 2, against the glyph. Nothing may ever be inserted after the marker. Layout now runs at (width - INDENT_W) instead of the full width, otherwise the editor wraps two columns too late and the indent pushes every line past the terminal edge. The rules it draws at that width are still discarded and rebuilt at full width. The glyph is suppressed when the input is scrolled: the first VISIBLE line is then not the first line of the prompt, so the glyph would lie about where the input begins. A scroll indicator in the top rule is exactly that condition. Glyph uses the instance's own borderColor, so it keeps reflecting bash-mode and thinking-level like the rule does. The slash/autocomplete menu is left at column 0 (INDENT_MENU): it draws full-width selection bars that would otherwise sit offset against the rule above them.
Diffstat (limited to 'cli/src')
0 files changed, 0 insertions, 0 deletions