[alpha] Non-interactive REPL front-end changes#1822
Merged
Conversation
* Implement Headless REPL Architecture with WASM and Shell V2 UI - Add `HeadlessRepl` to `eldritch-wasm` for input buffering and parsing. - Create `headless-adapter.ts` for frontend WASM/WebSocket integration. - Implement `/shellv2` page with xterm.js. - Add `/shellv2/ws` dummy backend route. - Fix WASM build dependencies in `eldritch` libraries. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com> * Implement Headless REPL with WASM, Shell V2 UI, Indentation, and Autocompletion - Add `HeadlessRepl` struct to `eldritch-wasm` with input buffering and fake library bindings for completion. - Create `HeadlessWasmAdapter` in frontend to bridge WASM and WebSocket. - Implement `/shellv2` page using xterm.js with support for indentation (Tab key) and autocompletion display. - Add dummy backend route `/shellv2/ws` in `tavern` for echo testing. - Update build scripts to deploy WASM artifacts to public assets. - Fix dependencies in `eldritch` libraries for WASM compatibility. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
…ndling (#1816) * Implement enhanced Shell V2 features: completion dropdown, history search, and resizing - Frontend: - Added `xterm-addon-fit` for responsive terminal resizing. - Implemented shell state management (input buffer, cursor, history). - Added key bindings: Ctrl+C (reset), Ctrl+L (clear), Ctrl+A/E (home/end), Ctrl+U/W (delete line/word). - Implemented Tab completion with a custom dropdown UI overlay. - Implemented Ctrl+R for basic reverse history search. - Updated `HeadlessWasmAdapter` to support `reset()` and structured completion results. - Backend (`eldritch-wasm`): - Added `HeadlessRepl::reset()` to clear the internal buffer. - Updated `HeadlessRepl::complete()` to return `{ suggestions: [...], start: usize }` instead of a flat list, enabling correct inline replacement. - Added tests for reset and completion structure. - Rebuilt WASM artifacts with `fake_bindings` feature. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com> * Fix Shell V2 cursor flicker, tab indent, and function termination - **Cursor Flicker:** Optimized `redrawLine` to avoid clearing the entire line (including prompt) and rewrite only the input buffer using `\r` + content + `\x1b[K`. Added fast-path logic in `onData` for appending characters or backspacing at the end of the line, bypassing `redrawLine` entirely for the most common typing scenarios. - **Tab Indenting:** Updated Tab handler to insert 4 spaces if the input buffer is empty or consists only of whitespace, enabling standard indentation behavior. - **Function Termination:** Ensured `state.prompt` is reset to `>>> ` when a command returns `"complete"` status, fixing an issue where the prompt would remain `.. ` after finishing a multi-line function definition. Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
- Fix duplicated prompt on Ctrl+L by using explicit ANSI clear+home sequence. - Implement multi-line history support by accumulating input blocks until complete. - Improve autocomplete: trigger on '.', allow typing while open, and fix looping index. - Refactor redrawLine to support multi-line buffers. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com>
Contributor
Summary
Previous Results
Insights
Slowest Tests
🎉 No failed tests in this run. | 🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
Cictrone
previously approved these changes
Feb 17, 2026
Cictrone
approved these changes
Feb 17, 2026
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.
Adds a new page that isn't linked to yet, configures x term and uses the WASM interpreter for smart client-side REPL features, removing reliance on running REPL features on the agent and enabling a better non-interactive (no gRPC stream) shell experience.