Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.
This repository was archived by the owner on May 24, 2026. It is now read-only.

Add Elicitation / Structured Input UI #687

@PureWeen

Description

@PureWeen

Summary

When the agent needs specific structured input (e.g., "Pick a framework", "Choose options"), the CLI renders structured forms via the Elicitation API. PolyPilot falls back to plain text input.

SDK API

  • SessionConfig.OnElicitationRequestElicitationHandler callback (v0.2.1)
  • session.Rpc.Ui.ElicitationAsync(message, schema) — request structured input
  • Events: ElicitationRequestedEvent (includes RequestedSchema), ElicitationCompletedEvent (includes Action, Content)

Proposed Implementation

  1. Dynamic form rendering when elicitation is requested:
    • Dropdown/select for choice lists
    • Checkboxes for multi-select
    • Text fields with validation
    • Radio buttons for single-select
  2. Schema-driven UI — render based on the RequestedSchema from the event
  3. Inline rendering in the chat flow (like a card/modal within the conversation)
  4. Fallback to text input if schema can't be rendered

Value

Much better UX than "Type 1, 2, or 3" in a text box. Makes agent interactions feel native and polished.

Priority: 🟡 MEDIUM

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions