avante.nvim
avante.nvim copied to clipboard
feature: Enhanced Code Suggestion Response Options
Summary
Implement enhanced response options for code suggestions in avante.nvim, allowing users to respond with "yes", "all yes", "yes but", or "no" and provide additional feedback for each option.
Description
Currently, avante.nvim likely has basic approval/rejection options for suggested code. This feature request proposes enhancing this interaction with more nuanced response options:
-
Expanded Response Options:
yes: Accept a single suggestion as isall yes: Accept all suggestions as isyes but: Accept with modifications or additional instructionsno: Reject the suggestion
-
Additional Feedback for Each Option:
- When selecting
no: Display a text area/prompt for entering rejection reasons - When selecting
yes but: Display a text area/prompt for providing modification instructions- Example: "This looks good, but please modify the function to handle edge cases"
- When selecting
yes/all yes: Display an optional text area/prompt for providing instructions for the next steps- Example: "For the next implementation, I'm planning to add error handling, so please ensure this is compatible"
- When selecting
User Experience Flow
- avante.nvim suggests code
- User selects a response option (
yes/all yes/yes but/no) - Based on selection, a text input area appears
- User enters additional feedback as needed
- The next action executes based on the feedback
Expected Benefits
- Creates a more detailed feedback loop
- Allows for more accurate code generation aligned with user intent
- Reduces the number of interaction cycles, creating a more efficient development flow
- The "yes but" option particularly allows for accepting the general approach while requesting specific adjustments
Implementation Suggestions
- Implement keymappings for selecting each option
- Use popup or floating windows for text input
- Store feedback and instructions as context for future suggestions
- Consider different visual indicators for each response type
Related Existing Features
- Current code suggestion approval system
- Feedback loop mechanisms
This feature will make the development workflow more efficient and interactive, enabling higher-level collaboration between users and avante.nvim.