feat(ui): add question tool support#177
Merged
sudo-tee merged 9 commits intosudo-tee:mainfrom Jan 12, 2026
Merged
Conversation
- Add API client methods for question endpoints (list, reply, reject) - Add question event types (question.asked, question.replied, question.rejected) - Add question picker UI that shows full question as notification and uses short header as prompt to avoid truncation - Support single-select and multi-select questions with 'Other' option - Add question icon to icon presets - Wire up question.asked event handler in renderer This enables opencode.nvim to handle the mcp_question tool that allows the AI to ask users questions during execution.
- add support for multi-selection with confirmation action - introduce dynamic input handling for "Other" responses - refactor user feedback notifications for better context - utilize base_picker for streamlined option formatting and selection Closes sudo-tee#123
sudo-tee
reviewed
Jan 12, 2026
sudo-tee
reviewed
Jan 12, 2026
sudo-tee
reviewed
Jan 12, 2026
sudo-tee
reviewed
Jan 12, 2026
sudo-tee
reviewed
Jan 12, 2026
sudo-tee
reviewed
Jan 12, 2026
sudo-tee
reviewed
Jan 12, 2026
sudo-tee
requested changes
Jan 12, 2026
Owner
sudo-tee
left a comment
There was a problem hiding this comment.
This is great.
I didn't even know it was possible. Opencode moves so fast it's hard to follow.
I left a couple of notes about AI comments. I am not a fan of adding comments for obvious things.
I encountered an issue where if I hit escape after a question The plugin ends up in infinite Thinking...
A part from that code loooks clean
- add logic to ensure callbacks are invoked when selections are made - handle cases where selection is cancelled to call callback with nil - update multiple UI components (telescope, mini_pick, snacks) for consistency - improve user experience by managing selection states effectively
- clarify that comments should explain *why* something is done, not *what* - emphasize avoiding obvious comments that restate code functionality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the
mcp_questiontool which allows the AI to ask users questions during execution. Previously, when OpenCode used the question tool, the UI would just hang.Changes
list_questions,reply_question,reject_question)question.asked,question.replied,question.rejected)question.askedevent handler in rendererHow it works
question.askedeventbase_pickervim.notifynotification (for visibility, may auto-dismiss)Bug fix
Fixed an issue in
base_pickerwhere Snacks picker wouldn't close after confirming a multi-select action. Custom actions now properly collect selected items before closing the picker.Features
vim.ui.input