Skip to content

Use dialoguer for the setup wizard, and add setup <agent> - #45

Merged
eirikb merged 1 commit into
mainfrom
feature/eirikb/setup-prompt-ui
Jul 2, 2026
Merged

eirikb merged 1 commit into
mainfrom
feature/eirikb/setup-prompt-ui

Conversation

@eirikb

@eirikb eirikb commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The setup wizard's read-a-line prompts looked plain; swap them for dialoguer (default-features off) — arrow-key Select menus with a colour theme, Confirm for 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; bare setup still does all.

Terminal hygiene the library needs (from two review passes):

  • TTY guard also checks stderr (where dialoguer renders), or setup 2>file slips past and dies mid-prompt
  • a Ctrl-C handler restores the cursor dialoguer hides (console re-raises SIGINT, so the process would otherwise exit with it hidden)
  • settings saved after each agent, so a mid-wizard cancel keeps prior choices
  • the test run prints plan_run's real reason when nothing is runnable, instead of guessing
  • dialoguer 0.12 (drops the stray thiserror 1.x); ctrlc for the handler

Build + clippy clean; wizard verified through a pseudo-TTY.

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.
@eirikb
eirikb merged commit 4c4b3cd into main Jul 2, 2026
@eirikb
eirikb deleted the feature/eirikb/setup-prompt-ui branch July 2, 2026 12:43
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