Skip to content

Conversation

@sudo-tee
Copy link
Owner

@sudo-tee sudo-tee commented Jan 9, 2026

No description provided.

- 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
Copy link
Contributor

Copilot AI left a 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_permission to pending_permissions array
  • Added new permission_window.lua module 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.

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.

2 participants