Repository navigation
feat(chat): show an MCP form's choice and its optional note as one step - #80
Merged
Merged
Conversation
An MCP form elicitation whose single-select field is directly followed by an optional plain text field now renders as one step: the options above, the composer answering the text field. Both values are submitted under their own keys, so a server can read "option", "option with a note" or "text only". The choice question carries the text field as companionText; any other form shape keeps one question per field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An MCP form elicitation is shown one field per page. Skald's
plan.answerform sends an optional single-select and an optional free-text field, so the owner saw "1/2" and "2/2" and read the text field as a second, separate question. Skald is changing its side (ATLI-2472) so that one submission can carry an option, an option with a note, or only text, and the client must therefore send both values together.Change
companionTextinOrchestrationV2UserInputQuestionand the provider-runtimeUserInputQuestion. Without it, behaviour is unchanged.maxLength) are still enforced, now through a shareduserInputAnswersErrorthat the orchestrator calls.parseElicitationFormskips the paired text field as a separate question but still types and sends its answer. Thet3_pending_requesttool schema exposescompanionText.Scope and approval
This is a client-side rendering fix for a confusion the owner reported. Three independent UX reviews (rendering across clients, form and accessibility design, and an argued alternative) agreed that showing a form's fields together is the spec-faithful fix. The MCP spec leaves layout to the client.
Verification
mcpElicitationForm: 11/11, including pairing, content mapping (option only, option and text, text only, neither) and non-pair shapes (required text, a text field not adjacent, multi-select).elicitationForm: 7/7.pendingUserInput: 13/13.userInputConstraints: 5/5.pendingUserInput: 11/11.ClaudeMcpElicitation.integration: 8/8.RuntimeRequestServiceandThreadMessageIntake: 14/14.effect-tsgo tsrs --noEmitshows no errors in contracts, shared, client-runtime, provider-core, provider-acp, server, web and mobile.vp fmt --checkandvp lintpass on the changed files.Not checked: the
ComposerPendingUserInputPanelbrowser tests, and the UI itself. I have no before/after screenshots yet.Known limits:
AcpAdapterV2.test.tshad a "generic MCP form" fixture with a required choice followed by an optional note. It now pairs by design, so I updated the expectation.🤖 Generated with Claude Code (Claude Opus 5.5)