Skip to content

cli/Prompt: select cannot render without its message line #7255

Description

@filipfalcon

What is the problem this feature would solve?

SelectOptions.message is required and the select renderer prints the ? message › header unconditionally. A CLI that has already asked the question elsewhere (banner, surrounding prose) cannot render just the choice list — the only options are repeating the question or rebuilding the entire select on Prompt.custom.

What is the feature you are proposing to solve the problem?

Make message optional in SelectOptions (and ideally the other prompt option types), skipping the header line entirely when it is absent — the prompt renders only the choice list, while submission, clearing, and quit behaviour stay unchanged.

Alternatively (or additionally): export the choice-list rendering used by renderSelectChoices, so custom prompts built on Prompt.custom can reuse it instead of duplicating it.

What alternatives have you considered?

  • Repeating the question in the select's message — duplicates a line the user has already read.
  • Passing an empty message — still renders the ? › header with stray symbols.
  • Rebuilding the select on Prompt.custom with Data.taggedEnum<Prompt.ActionDefinition>() — works (this is the workaround we use), but duplicates the built-in's cursor movement, wrap-around, and frame-clearing mechanics, which then drift as the built-in evolves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions