Skip to content

feat: revamp elicitation forms for free-text input - #30

Merged
william0wang merged 2 commits into
mainfrom
chore/free-text
Jul 27, 2026
Merged

feat: revamp elicitation forms for free-text input#30
william0wang merged 2 commits into
mainfrom
chore/free-text

Conversation

@william0wang

Copy link
Copy Markdown
Owner

Summary

Reworks the elicitation form rendering so users can enter custom free-text
answers alongside the model-suggested dropdown, instead of being restricted
to enum-only options.

Problem

ACP/MCP elicitation string fields are EITHER an enum (restricted dropdown) OR
free text — the spec forbids a single field that is both. The previous
rendering used a plain enum for each question, so users could only pick
from the model's suggestions with no way to type their own answer.

Changes

AskUserQuestion — dual-field rendering

Each question becomes two fields:

  • q_<i>: enum dropdown (now oneOf/anyOf with {const, title}) + a
    trailing "Skip this question" option (sentinel __skip__).
  • q_<i>_other: free-text companion. Non-empty value overrides the dropdown
    (single-select) or is appended to the picks (multi-select, deduped).

No field is required; blank = skip just that question.

ExitPlanMode — single feedback field

Replaced approve/reject enum with one feedback text field:

  • submit empty → approve
  • submit with text → reject, text becomes the decline reason
  • cancel button → plain reject

Docs & tests

  • docs/PROTOCOL.md updated with the new form shapes.
  • tests/interaction.test.ts expanded (free-text override,

@william0wang
william0wang merged commit 4b3b15e into main Jul 27, 2026
1 check passed
@william0wang
william0wang deleted the chore/free-text branch July 27, 2026 10:44
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.

1 participant