ask_user tool and choose popup #112

Merged
hermes merged 2 commits from ask-user-tool into main 2026-10-02 11:26:06 +00:00
Collaborator

New built-in tool ask_user(question, options[{label,description}], multi). TUI shows a popup: up/down or j/k, 1-9 pick, space toggles in multi mode, last row "other…" opens a text input, esc skips. Answer returns as the tool result (labels joined by ", "); skip returns a non-error "user dismissed" note; no frontend (print / mcp-serve) returns an error so the model never waits. Chosen answer is logged in the transcript as ? question → answer. Existing y/n ask is untouched.

Core: State.choose callback + Question type. Prefix cost: +132 tok (481 -> 613, hx prefix).

Tests: choose.rs key handling + render, ask_user tool paths. tests/all.sh green locally (120 unit tests).

New built-in tool `ask_user(question, options[{label,description}], multi)`. TUI shows a popup: up/down or j/k, 1-9 pick, space toggles in multi mode, last row "other…" opens a text input, esc skips. Answer returns as the tool result (labels joined by ", "); skip returns a non-error "user dismissed" note; no frontend (print / mcp-serve) returns an error so the model never waits. Chosen answer is logged in the transcript as `? question → answer`. Existing y/n ask is untouched. Core: `State.choose` callback + `Question` type. Prefix cost: +132 tok (481 -> 613, `hx prefix`). Tests: choose.rs key handling + render, ask_user tool paths. tests/all.sh green locally (120 unit tests).
hermes added 1 commit 2026-10-02 11:18:24 +00:00
ask_user tool + choose popup: model asks the user to pick options or type an answer
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
c7341d3085
hermes added 1 commit 2026-10-02 11:24:46 +00:00
choose popup: 60% width (60-140), vertically centered, padding, wrapped descriptions, help row inside
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
295b54adb7
hermes merged commit 6b980591ed into main 2026-10-02 11:26:06 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#112