Use dialoguer for the setup wizard, and add setup <agent> - #45
Merged
Merged
Conversation
The wizard's read-a-line prompts looked sad; swap them for dialoguer (default-features off) - arrow-key Select menus with a colour theme and Confirm for yes/no. The menu stays capability-aware (no "force OpenRouter" for native-only agents, no "log in" for OpenRouter-only ones, "reset" only when a non-default is set). `setup <agent>` configures a single agent - e.g. `setup grok` - scoping the OpenRouter key offer, the summary, and the test run to just that one; bare `setup` still does all. Terminal hygiene the library needs: the TTY guard also checks stderr (where dialoguer renders), a Ctrl-C handler restores the cursor dialoguer hides (console re-raises SIGINT, so the process would otherwise die with it hidden), and choices are saved after each agent so a mid-wizard cancel keeps what was already decided. The test run prints plan_run's real reason when nothing is runnable instead of guessing.
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.
The setup wizard's read-a-line prompts looked plain; swap them for dialoguer (default-features off) — arrow-key
Selectmenus with a colour theme,Confirmfor yes/no. Menus stay capability-aware (no "force OpenRouter" for native-only agents, no "log in" for OpenRouter-only ones, "reset" only when a non-default is set).setup <agent>configures a single agent — e.g.setup grok— scoping the OpenRouter key offer, the summary, and the test run to just that one; baresetupstill does all.Terminal hygiene the library needs (from two review passes):
setup 2>fileslips past and dies mid-promptplan_run's real reason when nothing is runnable, instead of guessingdialoguer 0.12(drops the straythiserror 1.x);ctrlcfor the handlerBuild + clippy clean; wizard verified through a pseudo-TTY.