Skip to content

smith: add PTY prompt flag default-on; gate EditorState; fix duplicate insertion; WIP isearch to follow#392

Merged
edwin-zvs merged 5 commits into
mainfrom
smith-pty-prompt-readline
Jun 7, 2026
Merged

smith: add PTY prompt flag default-on; gate EditorState; fix duplicate insertion; WIP isearch to follow#392
edwin-zvs merged 5 commits into
mainfrom
smith-pty-prompt-readline

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

This PR makes the smith PTY line editor/UI behave better in interactive PTY mode and lays groundwork for incremental isearch:

  • Introduce CONSTRUCT_SMITH_PTY_PROMPT (default on) and emit the initial prompt; keep TUI/editor gated in PTY mode
  • Fix duplicate character insertion by always redrawing after inserts; recompute slash-ghost each edit
  • Normalize CRs on submit so multi-line prompts round-trip
  • Cap history at 10,000 entries and de-dup consecutive identical lines
  • Ctrl-L now only clears/redraws the bottom prompt/completions region
  • Add reset_history(), tighten history navigation and queued recall behavior

Follow-ups:

  • Incremental search (C-r) for history; buffered UTF-8 input decoding for non-ASCII

Testing:

  • Manually exercised PTY keystrokes (Enter, Ctrl-L, arrows, Home/End, Backspace, Del, Tab-complete)
  • cargo build on macOS (debug) across the workspace; adapter-smith compiles cleanly

Notes:

  • Only crates/adapter-smith is functionally changed in this PR; CLI/daemon warnings are pre-existing.

edwin-zvs added 5 commits June 7, 2026 11:50
… prompt, gate EditorState in PTY mode; history 10k, Ctrl-L bottom-only
…sertion; cap history to 10k; normalize CRs; Ctrl-L clears bottom only; add reset_history; fix compile
@edwin-zvs
edwin-zvs merged commit cee35f3 into main Jun 7, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the smith-pty-prompt-readline branch June 7, 2026 20:40
edwin-zvs added a commit that referenced this pull request Jun 8, 2026
* Revert "smith: fix editor-state handling in PTY tool runs (#393)"

This reverts commit e85e3e1.

* Revert "smith: add PTY prompt flag default-on; gate EditorState; fix duplicate insertion; WIP isearch to follow (#392)"

This reverts commit cee35f3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant