Skip to content

feat(tui): render answer options as selectable choices - #196

Merged
its-janghoon merged 1 commit into
developfrom
feat/tui-answer-options
Oct 28, 2026
Merged

its-janghoon merged 1 commit into
developfrom
feat/tui-answer-options

Conversation

@its-janghoon

Copy link
Copy Markdown
Member

The engine lets models end a reply with [OPTIONS: a | b | c], but the TUI printed it raw. Now the newest finished reply shows them as a numbered list: click to send, or alt+1..5 when the prompt is empty. Bare OPTIONS: lines (no brackets) are accepted too; lines inside a code fence are ignored; 2-5 choices.

Checked: tui typecheck (no new errors; 11 existing in dialog-move-session on develop), bun test answeroptions 6/6.

The engine lets a model end a reply with `[OPTIONS: a | b | c]`, but the
TUI showed that line raw. Parse the last line of a finished reply (with or
without brackets, 2 to 5 choices, never inside an unclosed code fence),
hide it from the markdown, and list the choices under the newest reply
until the user sends anything. Clicking a choice sends it; alt+1..alt+5
send choice N while the prompt is empty.
@its-janghoon
its-janghoon merged commit e99c7f2 into develop Oct 28, 2026
12 checks passed
@its-janghoon
its-janghoon deleted the feat/tui-answer-options branch October 28, 2026 10:00
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