Skip to content

feat: add interactive menu for single select elicitations - #9763

Closed
panyamkeerthana wants to merge 1 commit into
aaif-goose:mainfrom
panyamkeerthana:add-interactive-menu-select
Closed

feat: add interactive menu for single select elicitations#9763
panyamkeerthana wants to merge 1 commit into
aaif-goose:mainfrom
panyamkeerthana:add-interactive-menu-select

Conversation

@panyamkeerthana

Copy link
Copy Markdown
Contributor

Adds support for single property schemas with oneOf/enum options, rendering them as an interactive menu using cliclack::select. Users can navigate options with arrow keys instead of manual input.

Screenshots/Demos (for UX changes)

Screenshot 2026-06-12 at 11 23 29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ac2c6bd1e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +51 to +53
match cliclack::select("Select option")
.items(&items)
.interact()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve empty/default handling for single-select fields

In this single-property enum path, the select prompt is created without applying the field's default and then returns before the existing empty-input handling can run. For a schema such as one enum field with default: "b" where "b" is not the first item, pressing Enter now submits the first highlighted option instead of the schema default; optional single enum fields also can no longer be accepted as unset because accepting the menu always inserts a value.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the selection can be navigated to any option with arrow keys the additional logic for default/optional handling would add complexity

@panyamkeerthana
panyamkeerthana force-pushed the add-interactive-menu-select branch from 6ac2c6b to e3c2d85 Compare June 12, 2026 15:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3c2d857d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +26 to +30
.filter_map(|opt| {
let value = opt.get("const")?.as_str()?;
let title = opt.get("title").and_then(|t| t.as_str()).unwrap_or(value);
Some((value.to_string(), title.to_string()))
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not drop non-const oneOf branches

For a single-field schema whose oneOf mixes fixed choices with another valid branch, e.g. {const: "skip"} plus {type: "string", title: "Custom"}, this filter_map silently omits the non-const branch but the caller still switches to the select menu as soon as any option remains. That skips the old free-form prompt and makes valid non-const/custom responses impossible to enter, so only use the menu when all oneOf alternatives are represented or fall back to manual input.

Useful? React with 👍 / 👎.

@panyamkeerthana panyamkeerthana changed the title add interactive menu for single select elicitations feat: add interactive menu for single select elicitations Jun 12, 2026
Adds support for single property schemas with oneOf/enum options,
rendering them as an interactive menu using cliclack::select.
Users can navigate options with arrow keys instead of manual input.

Signed-off-by: Keerthana Panyam <panyam.k@northeastern.edu>
@DOsinga

DOsinga commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution, and sorry for the slow turnaround here.

I'm going to close this one for now. The two Codex review comments raise real issues that aren't fully resolved: the single-select path bypasses the field's default and the existing empty-input handling (so a non-first default gets silently overridden and optional fields can no longer be left unset), and the oneOf path silently drops non-const branches while still forcing the menu, making free-form/custom responses impossible to enter. The "would add complexity" reply doesn't really address the behavior loss. Per our contributing guide we ask that review comments are either fixed or answered with why they don't apply: https://github.com/aaif-goose/goose/blob/main/CONTRIBUTING.md#ai-code-reviews

The branch has also drifted from main — the elicitation code now returns ElicitationInput structs rather than Option<HashMap<..>>, so this would need a rebase to even compile.

If you'd like to address the Codex points and rebase, feel free to reopen — happy to take another look. The underlying idea (arrow-key menus for enum/oneOf elicitations) is nice.

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.

2 participants