The AI Code Assistant is a powerful extension for Visual Studio Code that leverages advanced language models to enhance developer productivity. It provides features such as code analysis, debugging, documentation, refactoring, and inline code completion, all integrated seamlessly into the IDE.
- Code Analysis and Debugging: Automatically analyze code for potential issues and provide debugging suggestions.
- Automated Documentation: Generate detailed documentation for your code, including function descriptions and usage examples.
- Refactoring Suggestions: Receive suggestions for code improvements, such as simplification and renaming.
- Inline Code Completion: Get real-time code suggestions as you type, enhancing coding speed and accuracy.
- Integration with Multiple LLM Providers: Supports various leading language model providers for flexible and powerful code analysis.
- Clone the repository:
git clone https://github.com/yourusername/ai-code-assistant.git
- Navigate to the extension directory:
cd ai-code-assistant - Install dependencies:
npm install
- Compile the TypeScript code:
npm run compile
- Open the project in Visual Studio Code and press
F5to start debugging the extension.
The extension provides several commands that can be accessed via the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS):
- Generate Code:
extension.generateCode - Explain Code:
extension.explainCode - Refactor Code:
extension.refactorCode - Debug Code:
codeAssistant.debugCode - Document Code:
codeAssistant.documentCode - Trigger Inline Completion:
codeAssistant.triggerInlineCompletion
- Trigger Inline Completion:
Alt+\(Windows/Linux),Cmd+\(macOS) - Accept Inline Completion:
Tab - Show Next Inline Completion:
Alt+](Windows/Linux),Cmd+](macOS) - Show Previous Inline Completion:
Alt+[(Windows/Linux),Cmd+[(macOS)
The extension can be configured via the settings in settings.json:
- Enable/Disable Inline Completion:
aiCodeAssistant.inlineCompletion.enabled - Trigger Characters for Inline Completion:
aiCodeAssistant.inlineCompletion.triggerCharacters - Delay Before Showing Inline Completion:
aiCodeAssistant.inlineCompletion.delay
- Extension Entry Point:
src/extension.ts - Inline Completion Provider:
src/extension.tsstartLine: 40 endLine: 80
- Refactoring Service:
backend/app/services/refactoring_service.pystartLine: 54 endLine: 89
To test the extension, run the following command:
npm testThis will execute the test suite located in src/test.ts.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.