Skip to content

feat: agent user choice component for interactive decision making#30

Open
LIlGG wants to merge 5 commits into
halo-dev:mainfrom
LIlGG:feat/agent-user-choice
Open

feat: agent user choice component for interactive decision making#30
LIlGG wants to merge 5 commits into
halo-dev:mainfrom
LIlGG:feat/agent-user-choice

Conversation

@LIlGG

@LIlGG LIlGG commented May 21, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

增加用户选择的 Agent tools,允许 Agent 为用户展示多个想法,供用户在多个想法中选择一项。

Does this PR introduce a user-facing change?

增加用户选择的 Agent tools 以允许 Agent 列出多种备选方案。

LIlGG added 5 commits May 20, 2026 16:15
Add requestUserChoice tool that allows the Agent to present multiple
options to the user during page generation. The user can select via
single choice (radio), multiple choice (checkbox), or custom text input.

Backend:
- New requestUserChoice tool in page-builder-tools.ts
- writeUserChoiceEvent data stream handler in chat runtime
- System prompt updated with usage rules
- Guardrail to prevent multiple choice requests per turn

Frontend:
- New UserChoiceCard component with single/multi/custom selection modes
- Chat input disabled while awaiting user choice
- Choice results sent as user messages with choiceData metadata
- Completed state rendering for historical choices

Openspec:
- Full proposal, design, specs, and task tracking
@f2c-ci-robot f2c-ci-robot Bot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 21, 2026
@f2c-ci-robot

f2c-ci-robot Bot commented May 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign johnniang for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant