aboutsummaryrefslogtreecommitdiffstats
path: root/pi-ext/input-frame.ts (follow)
Commit message (Collapse)AuthorAge
* chrome: indent the input behind a ❯ prompt glyphuser2026-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* input-frame: remove header rule and rails, plain separatoruser2026-08-12
| | | | | | | | | | | | | | The input box now renders as bare text: no top header (the "╭─ ❯ ───╮" rule is dropped), no side rails, and the bottom is a plain edge-to-edge rule rather than a ├──┤ divider, so nothing around the input reads as a box. Content is laid out at the real full width and passed through verbatim, which keeps the cursor/IME marker exactly where the editor put it. Scroll indicators ("↑ N more") still render, since they carry information rather than chrome; set KEEP_SCROLL_INDICATOR to false to drop those too. Removed the now-dead corner constants and railWrap, and renamed buildBorder to buildRule to match what it emits.
* sl0p-footer + attached input boxuser2026-08-12
| | | | | | | | | | | | | | | | | | | | | Add sl0p-footer.ts: replace the built-in 2-3 line footer with one dense single line via ctx.ui.setFooter — ↑/↓ tokens, context %/window (pressure colored), cwd (+git branch), and model + thinking effort right-aligned. Data via the live extension context (sessionManager/model/getContextUsage) and footerData; repaints on branch/model/thinking changes. Make the footer look attached to the input box: - input-frame.ts now ends its box in a divider (├──┤) instead of a closing corner, so the footer reads as a continuation. - the footer wraps its line in matching side rails + the real closing bottom (╰──╯), content inset to align with the input. - footer frame is colored with theme.getThinkingBorderColor(level), tracked via thinking_level_select (seeded from the branch/model default), so the seam matches the input box border at every thinking level. Bash-mode border color is the one unmirrored case (editor state not exposed to extensions). Two stacked components styled to look like one box — no cross-component theme/state sharing, and the autocomplete menu is left to render between them.
* input-frame: wrap the input editor in a real rounded boxuser2026-08-12
pi's input area is just two full-width horizontal rules (no side rails) drawn by the pi-tui Editor. Add input-frame.ts, which patches CustomEditor.prototype.render (the only Editor subclass, and the class the main input uses, so extension/selector editors keep native chrome) to lay content out at the inner width and wrap it in a rounded, side-railed box: ╭─ ❯ ───────╮ │ input ... │ ╰───────────╯ - content laid out at width-4 so word-wrap / lastWidth / cursor nav match - cursor/IME marker stays aligned: the TUI derives the column from visibleWidth(textBeforeMarker), and the uniform "│ " prefix shifts it by the same 2 cols as the visible cursor; content lines are padded, never truncated, so the marker is never dropped - scroll indicators keep their "↑/↓ N more" text with rounded end caps - autocomplete/slash menu (lines after the bottom rule) left as-is, indented to align under the box interior - reuses the instance borderColor, so bash-mode / thinking-level colors carry - idempotent/reload-safe, feature-detected, falls back to native render on any error, restores original on shutdown