CodeOracle Client
CodeOracle is an AI-powered VSCode extension that provides intelligent code suggestions, auto-completion, and code testing. It integrates with several AI platforms, including OpenAI, Anthropic, Cohere, Hugging Face, and more. The extension offers a seamless development experience by providing suggestions and code completions directly in VSCode, and a sidebar for interacting with the AI.
Features
- AI-Powered Code Suggestions: Get code suggestions and completions from multiple AI platforms (OpenAI, Anthropic, Cohere, Hugging Face, etc.).
- Natural Language Queries: Ask questions and get code generation directly from the AI in natural language.
- Project File Scanning: Automatically scans project files to provide context-aware suggestions based on your codebase.
- Auto-Code Testing: The extension can generate, run, and test the code automatically.
- Configurable Sidebar: Interact with the AI through a VSCode sidebar.
- Multiple AI Platform Support: Select your preferred AI platform from OpenAI, Anthropic, Cohere, Hugging Face, Azure OpenAI, or Ollama.
Installation
Prerequisites
- Visual Studio Code (v1.93.0 or later)
- Node.js (v14.x or later)
- NPM (v6.x or later)
Steps to Install
Clone the Repository:
git clone https://github.com/redoracle/CodeOracle.git
cd CodeOracle/client
Install Dependencies:
Run the following command to install the necessary dependencies:
npm install
Build the Extension:
Compile the extension by running:
npm run compile
Launch the Extension:
Open the CodeOracle client folder in VSCode, then press F5 to launch a new VSCode window with the extension loaded.
Configuration
Available Settings
CodeOracle provides several configuration options, which can be modified in the VSCode settings under the CodeOracle section.
Usage
Code Suggestions:
- Simply type in your editor, and CodeOracle will provide context-aware suggestions based on the AI platform you're using.
Natural Language Queries:
- Use the sidebar to ask natural language questions like "How do I implement a binary search in Python?" and get responses with code snippets.
Auto-Testing:
- CodeOracle can generate code, compile, and test it automatically. It will provide sample values where needed and run the tests directly in the VSCode terminal.
Commands
CodeOracle: Hello World
- Command:
codeoracle.helloWorld
- Description: A demo command to test the extension installation.
Ask AI:
- Command:
codeoracle.askAI
- Description: Ask AI to provide code snippets or suggestions based on natural language input.
Development
If you'd like to contribute or customize the extension, follow these steps:
Clone the Repository:
git clone https://github.com/redoracle/CodeOracle.git
cd CodeOracle/client
Install Dependencies:
npm install
Development Mode:
Open the client folder in VSCode and press F5 to open a new window with the extension loaded in development mode.
Build the Extension:
Run:
npm run compile
Troubleshooting
Dependency Issues:
- If you encounter missing dependencies, ensure you've run
npm install in both the client and server directories.
AI API Key Errors:
- Ensure you have configured the correct API key for the AI platform you are using (OpenAI, Anthropic, etc.).
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
We welcome contributions! Feel free to open issues, submit pull requests, or suggest improvements.
| |