Skip to content

The AI Code Assistant is a powerful extension for Visual Studio Code that leverages advanced language models to enhance developer productivity.

License

rayaran1000/Cody

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cody : AI Code Assistant extension for Visual Studio Code

image

Overview

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.

Features

  • 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.

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/ai-code-assistant.git
  2. Navigate to the extension directory:
    cd ai-code-assistant
  3. Install dependencies:
    npm install
  4. Compile the TypeScript code:
    npm run compile
  5. Open the project in Visual Studio Code and press F5 to start debugging the extension.

Usage

Commands

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

Keybindings

  • 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)

Configuration

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

Development

Code Structure

  • Extension Entry Point: src/extension.ts
  • Inline Completion Provider: src/extension.ts
    startLine: 40
    endLine: 80
  • Refactoring Service: backend/app/services/refactoring_service.py
    startLine: 54
    endLine: 89

Testing

To test the extension, run the following command:

npm test

This will execute the test suite located in src/test.ts.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

The AI Code Assistant is a powerful extension for Visual Studio Code that leverages advanced language models to enhance developer productivity.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published