fix: always expose the free-text Other option in question prompts#1003
Conversation
🦋 Changeset detectedLatest commit: 918c3b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 142b535e9c
ℹ️ 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".
| // The AskUserQuestion tool promises "users always have an Other option" | ||
| // (see tools/builtin/collaboration/ask-user.md) and the TUI unconditionally | ||
| // renders a synthetic Other item. Mirror that on the wire unconditionally so | ||
| // web / protocol clients that honor `allow_other` stay in sync — otherwise | ||
| // the free-text option silently disappears whenever the tool omits |
There was a problem hiding this comment.
packages/agent-core/src/services/AGENTS.md requires comments in this subtree to be used only for non-obvious WHY, be "one short line max", and avoid narrating the diff. The new explanatory block beginning here spans six lines and restates the behavior change; please reduce it to a short invariant comment or move the background to the PR text.
Useful? React with 👍 / 👎.
The question adapter only set allow_other on the wire when the SDK item carried an otherLabel/otherDescription, but the AskUserQuestion tool never provides those fields. Web clients honor allow_other, so the free-text option silently disappeared in the web UI while the TUI (which renders it unconditionally) kept working. Set allow_other unconditionally to match the tool's 'users always have an Other option' contract.
142b535 to
918c3b5
Compare
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Related Issue
No prior issue — see Problem below.
Problem
The web version of the structured question prompt was missing the free-text "Other" option that the TUI always shows. The question adapter only set
allow_otheron the wire when the SDK question item carried anotherLabel/otherDescription, but the question tool never provides those fields. Web clients honorallow_other, so the free-text option silently disappeared in the web UI while the TUI (which renders it unconditionally) kept working.What changed
Set
allow_otherunconditionally in the question adapter so the wire always advertises the free-text option, matching the tool's "users always have an Other option" contract and keeping web clients in sync with the TUI. Added a unit test asserting the affordance is on even when the SDK item has nootherLabel.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.