-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat(commands): unify user commands into Aider
user command
#45
Open
GeorgesAlkhouri
wants to merge
12
commits into
main
Choose a base branch
from
35-dont-create-user-commands
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
🔍 Improves plugin architecture by moving user command definitions from init.lua to the standard plugin/nvim_aider.lua location. This follows Neovim plugin best practices for automatic loading. ✨ Enhances command completion to better handle subcommands 🧪 Updates tests to create proper buffer environment for testing ♻️ Changes API method calls to use direct requires for better modularity
The automatic setup of tree-related commands has been removed from the plugin initialization process. This change: • 🧩 Makes tree functions public so they can be called directly • 🛠️ Fixes nil reference bugs in neo-tree integration • 📝 Changes invalid command error level from ERROR to INFO • 🧪 Updates tests to call API functions directly rather than vim.cmd This creates a more explicit API and prevents unnecessary command registration when the related tree plugins are not installed.
✨ This change refactors how text is sent to the Aider terminal: - 🔀 Renamed 'terminal' command to 'toggle' for better clarity - 📤 Moved text handling logic from plugin to API function - 🎮 Enhanced send_to_terminal to handle visual and normal modes - 💬 Added interactive prompts for sending text with optional input The terminal interaction is now more consistent and follows a cleaner architecture with logic properly encapsulated in the API module.
Reorganize the command structure to support hierarchical subcommands: - Move `readonly` command to become a subcommand of `add` - Enhance menu display to properly indent and format subcommands - Update command completion to intelligently suggest subcommands - Improve command execution to properly handle subcommand paths This change makes the command interface more organized and extensible, allowing for better structured command grouping while maintaining an intuitive user experience.
🛠️ Add proper error notification when an invalid subcommand is passed to a valid command. ✅ Add comprehensive test suite for command menu functionality that covers: - Command registration and verification - Command execution flow for both top-level and subcommands - Input handling with various scenarios - Error handling for invalid commands and subcommands
Aider
user command
🔍 Capture original buffer before creating the picker menu 🛠️ Wrap command implementations to restore proper buffer context 🔄 Ensure subcommands maintain correct buffer references This fixes an issue where commands executed from the picker would operate on the picker's buffer rather than the original editing buffer where the menu was invoked. The implementation now properly preserves the user's context when selecting and executing commands from the menu.
9268d04
to
6cb31c5
Compare
c792a5d
to
372bd57
Compare
🧪 Add new test block to verify command menu structure: - Validate all top-level commands are present - Verify subcommands are correctly displayed 🔍 Ensures the menu presents the expected hierarchy of commands to users and maintains consistency with the actual command implementation. ♻️ Also removed unused variables in api_methods_spec.lua
099ac26
to
d69e2c3
Compare
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.
No description provided.