-
Notifications
You must be signed in to change notification settings - Fork 28
feat: concurent permissions #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… queue and window
- Fix permission detection to check array length instead of nil comparison - Refactor permission keymap setup to be more robust and context-aware - Improve permission display with clearer action ordering and labels - Fix permission cleanup to properly remove keymaps when queue is empty - Update test expectations for new permission display format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request implements support for concurrent/multiple pending permissions, changing from a single current_permission state to a pending_permissions queue. The feature introduces a new permission_window module that manages a queue of permissions and displays them with numbered keybindings (e.g., a1, a2 for multiple permissions).
Key Changes
- Refactored state management from single
current_permissiontopending_permissionsarray - Added new
permission_window.luamodule to manage permission queue and keymaps - Updated rendering logic to display all pending permissions as a system message
- Modified API functions to accept optional permission parameter for targeted responses
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/opencode/ui/permission_window.lua | New module implementing permission queue management and display |
| lua/opencode/state.lua | Changed from single permission to permissions array |
| lua/opencode/ui/renderer.lua | Updated to append permissions display and handle queue |
| lua/opencode/ui/formatter.lua | Removed old permission formatting, added new display logic |
| lua/opencode/api.lua | Updated API functions to accept optional permission parameter |
| lua/opencode/core.lua | Updated to work with permission queue |
| lua/opencode/keymap.lua | Removed old permission keymap toggle function |
| lua/opencode/event_manager.lua | Updated type annotations for permission events |
| tests/unit/hooks_spec.lua | Updated tests for new permission model |
| tests/unit/keymap_spec.lua | Removed obsolete permission keymap tests |
| tests/data/*.json | Updated test expectations for new permission display format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.