Skip to content

Inline arrow-key prompts for interactive CLI commands - #792

Open
martian56 wants to merge 9 commits into
PrimeIntellect-ai:mainfrom
martian56:inline-questionary-prompts
Open

Inline arrow-key prompts for interactive CLI commands#792
martian56 wants to merge 9 commits into
PrimeIntellect-ai:mainfrom
martian56:inline-questionary-prompts

Conversation

@martian56

@martian56 martian56 commented Jul 15, 2026

Copy link
Copy Markdown

The interactive prompts across the CLI are plain text today — type a number to pick from a numbered list, y/N to confirm, and so on. This swaps them for inline arrow-key prompts (via questionary), so choosing a coding agent, a team, a GPU config, or which teammates to share a pod with works the way people expect from a modern CLI: arrow keys to move, space to toggle in multi-selects, enter to confirm.

It started with prime lab setup — picking coding agents was the roughest spot, a flat comma-separated list where you had to type names — and once that was arrow-key driven the rest felt inconsistent, so I brought the whole CLI in line.

What changed

  • A small shared prompt layer in utils/prompt.py (confirm, select_item_interactive / require_selection, prompt_for_value) now backs onto questionary, so most commands pick it up for free.
  • Lab agent picker: a checkbox list that shows each agent's install status; the first pick is treated as primary.
  • The hand-rolled numbered menus become single-selects — team selection in login and switch, the feedback category, and the remote-owner picker in the verifiers bridge.
  • Pod creation: GPU type / provider / configuration / image / node are selects, team members are a checkbox multi-select, and the disk/vCPU/memory prompts validate inline instead of erroring out and exiting.
  • Confirmations and text/password prompts across config, deployments, rl, logout, images, secrets, env, and sandbox.
  • Adds questionary to the dependencies.

Testing

Interactive tests drive questionary through a prompt_toolkit pipe — there's a keys fixture in tests/conftest.py that queues keystrokes (keys.select(), keys.confirm(), keys.text(), keys.check()), so the existing CliRunner flows keep working without real TTY input.

The suite passes locally except for failures that predate this change and are unrelated to it — Unix-only fcntl, a few symlink/path assertions, and the textual TUI tests — all of which fail the same way on main on Windows.

Before

image

After

image

Before

image

After

image

Before

image

After

image

Before

image

After

image

Before

image

After

image

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

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