Repository navigation
Conversation
ACP lets an agent ask the user for structured input instead of guessing, but the client never advertised the capability, so the request was refused before it reached anyone. The client now advertises elicitation form support during initialize and renders an incoming request in the chat. A question with a single choice property becomes a row of buttons, so one click answers it. Anything else becomes a small form, with text, number, checkbox and multi select controls built from the schema, and Send stays disabled until every required field has a value. Declining and closing the chat view are reported back as decline and cancel. URL mode is not implemented and is declined, which matches the capability the client sends. Signed-off-by: moep90 <volleyballlive@googlemail.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
ACP lets an agent ask the user for structured input instead of guessing, through
session/create_elicitation. The client never advertised the capability and never implemented the method, so a question was refused before it reached anyone. For a user the agent simply proceeds on an assumption.Related: this is the gap described in zed-industries/zed#48784 and zed-industries/zed#48038, where option payloads arrive but never turn into something clickable.
Change
initializenow advertiseselicitation: { form: {} }, andAcpClientImpl.unstable_createElicitationroutes the request into the chat.A question with a single choice property becomes a row of buttons, so one click answers it. Anything else becomes a small form built from the schema, with text, number, checkbox and multi select controls. Send stays disabled until every property listed in
requiredhas a value. Declining answersdecline, and closing the chat view answerscancelso the agent is never left waiting on a view that is gone.URL mode is declined, which is why the capability advertises
formonly.Testing
npm run lint,npm testandnpm run packagepass locally on Linux. Three JSDOM tests cover the one click answer and its payload, a form that unlocks Send once the required field is filled and then reports text, number and boolean together, and a declined question that locks the card against further clicks.Note on overlap
The test file brings its own JSDOM harness and adds jsdom to the dev dependencies, as #56 and #64 do. Whichever lands first, I am happy to rebase onto it and drop the duplicate harness.