AI-Square Agent VS Code Extension
The AI-Square Agent extension by Paysyslabs integrates Ollama's AI-powered open-source models into Visual Studio Code. With this extension, developers can interact with AI to generate code, analyze files, and perform other AI-driven tasks all within VS Code.
Features
- Model Selection: Choose from a variety of open-source models from Ollama through a dropdown menu in the AI-Square panel.
- Code Generation: Automatically generate code based on comments or descriptions.
- File Analysis: Perform AI-powered analysis on files to identify issues or suggest improvements.
- Interactive Chat with AI: Access a chat interface for direct communication with the AI.
- Bug Fixing: Use AI to suggest fixes for buggy functions or code segments.
- Download New Models: Easily download additional models via the terminal.
Pre-Requisites For Windows:
Before using the extension, make sure to run the following setup steps only once:
Install Ollama (install_ollama.bat)
Run the install_ollama.bat
file to set up the required environment and dependencies. (Recommended)
OR
run this command in terminal: winget install ollama
Download Models (modelPull.bat)
When install_ollama.bat ran successfully and finished. Now run the modelPull.bat
file to download the open-source models from Ollama for offline use.
Pre-Requisites For Mac OS:
Download and Install ollama from here: [https://ollama.com/download/mac]
Pre-Requisites For Linux:
run this command in terminal:
curl -fsSL https://ollama.com/install.sh | sh
After complete installation run these following commands:
- ollama serve
- ollama pull qwen2.5-coder:3b
- ollama pull deepseek-r1:1.5b
Once these steps are complete, you can start using the extension.
Installation
- Install the Extension:
- Open Visual Studio Code.
- Go to the Extensions view (Ctrl+Shift+X).
- Search for AISquareAgent and click Install.
Commands & Usage
1. Access the AI-Square Panel
- On the left side of VS Code, you will see a Paysys logo. Click on it to open the AI-Square panel.
- This panel contains a dropdown for Model Selection where you can choose the model you'd like to use.
2. Interact with AI via Chat
- In the AI-Square panel, you can start a conversation with the AI. This allows you to ask questions, get suggestions, or interact with the model based on your project's context.
3. Analyze Files with AI
- Right-click on any file in the Explorer pane.
- Select Analyze with AI from the context menu.
- The AI will analyze the file for issues, suggest improvements, and provide insights.
5. Download New Models
- To download new open-source models, you can run the following command in your terminal:
ollama pull <model-name>
Replace <model-name>
with the name of the open-source model you want to download.
6. Additional Features
- Explain Selected Code: Select a block of code and use the Explain Code command to get a description of what the code does.
- Fix Buggy Code: If you encounter a buggy function or code, use the Fix Buggy Function with AI command to get AI-suggested fixes.
Troubleshooting
If you encounter any issues during setup or usage, try the following:
- Check the Models: Ensure that you've run the setup batch files (
install_ollama.bat
and modelPull.bat
) correctly and that models are downloaded.
- Restart VS Code: After installation, try restarting VS Code to ensure the extension loads properly.
- Check Model Selection: If no models appear in the model dropdown, verify that you've successfully pulled the models using the
ollama pull
command.
- Reinstall Extension: If issues persist, try uninstalling and reinstalling the extension.
For further assistance, please contact support at [taaha.iqbal@paysyslabs.com].
Contributing
We welcome contributions! If you have suggestions, bug fixes, or improvements, feel free to share your thoughts with us.
Thank you for using AI-Square Agent! We hope this extension helps streamline your development process with AI-powered assistance. Enjoy coding with AI!