3
43
Fork
You've already forked opencode.el
16

Add transient-based question UI with multi-select support #22

Manually merged
sczi merged 1 commit from avph/opencode.el:MoreQuestions into main 2026年03月27日 18:23:08 +01:00
Contributor
Copy link

Replaces the completion-based question prompt with a transient popup
that supports single-select (radio), multi-select (checkbox), and custom
text input modes, providing a more flexible and user-friendly interface
for answering server questions.

Signed-off-by: Arthur Heymans arthur@aheymans.xyz

Replaces the completion-based question prompt with a transient popup that supports single-select (radio), multi-select (checkbox), and custom text input modes, providing a more flexible and user-friendly interface for answering server questions. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Replaces the completion-based question prompt with a transient popup
that supports single-select (radio), multi-select (checkbox), and custom
text input modes, providing a more flexible and user-friendly interface
for answering server questions.
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Owner
Copy link

Thanks, I wasn't thrilled with the completing-read question interface it was just the easiest way to get something working. This looks nicer. But the transient menu is broken for me (emacs 30.2), keys or mouse don't toggle anything. I don't have time to debug it now but opus claims "The transient is invoked before recursive-edit, so it gets set up in the parent command loop context, not inside the recursive edit's command loop. This causes the transient's key-handling machinery to malfunction." And indeed without the recursive-edit the transient menu works fine, but then doesn't return the result. Maybe the simplest solution would be to just have transient-exit-hook call the reject-question api, and opencode-question--do-confirm call the reply api, and then not need the whole recursive-edit to try and block for the result?

Thanks, I wasn't thrilled with the completing-read question interface it was just the easiest way to get something working. This looks nicer. But the transient menu is broken for me (emacs 30.2), keys or mouse don't toggle anything. I don't have time to debug it now but opus claims "The transient is invoked before recursive-edit, so it gets set up in the parent command loop context, not inside the recursive edit's command loop. This causes the transient's key-handling machinery to malfunction." And indeed without the recursive-edit the transient menu works fine, but then doesn't return the result. Maybe the simplest solution would be to just have transient-exit-hook call the reject-question api, and opencode-question--do-confirm call the reply api, and then not need the whole recursive-edit to try and block for the result?
Author
Contributor
Copy link

@sczi wrote in #22 (comment):

Thanks, I wasn't thrilled with the completing-read question interface it was just the easiest way to get something working. This looks nicer. But the transient menu is broken for me (emacs 30.2), keys or mouse don't toggle anything. I don't have time to debug it now but opus claims "The transient is invoked before recursive-edit, so it gets set up in the parent command loop context, not inside the recursive edit's command loop. This causes the transient's key-handling machinery to malfunction." And indeed without the recursive-edit the transient menu works fine, but then doesn't return the result. Maybe the simplest solution would be to just have transient-exit-hook call the reject-question api, and opencode-question--do-confirm call the reply api, and then not need the whole recursive-edit to try and block for the result?

done. It seems to work well now

@sczi wrote in https://codeberg.org/sczi/opencode.el/pulls/22#issuecomment-10507758: > Thanks, I wasn't thrilled with the completing-read question interface it was just the easiest way to get something working. This looks nicer. But the transient menu is broken for me (emacs 30.2), keys or mouse don't toggle anything. I don't have time to debug it now but opus claims "The transient is invoked before recursive-edit, so it gets set up in the parent command loop context, not inside the recursive edit's command loop. This causes the transient's key-handling machinery to malfunction." And indeed without the recursive-edit the transient menu works fine, but then doesn't return the result. Maybe the simplest solution would be to just have transient-exit-hook call the reject-question api, and opencode-question--do-confirm call the reply api, and then not need the whole recursive-edit to try and block for the result? done. It seems to work well now
sczi referenced this pull request from a commit 2026年03月27日 18:23:06 +01:00
sczi manually merged commit 1b4c7b8562 into main 2026年03月27日 18:23:08 +01:00
Owner
Copy link

thanks, I made a little change to make it a bit faster to use for single choice questions, selecting an option immediately answers the question, and C-c C-c to respond is only used for multiple choice questions, and updated the question tool section of the readme and merged

thanks, I made a little change to make it a bit faster to use for single choice questions, selecting an option immediately answers the question, and `C-c C-c` to respond is only used for multiple choice questions, and updated the question tool section of the readme and merged
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sczi/opencode.el!22
Reference in a new issue
sczi/opencode.el
No description provided.
Delete branch "avph/opencode.el:MoreQuestions"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?