SAGE AI Assistant - VS Code Extension
A VS Code extension that brings CirrusLabs' SAGE AI Assistant directly into your development environment.
Features
- 🤖 AI-Powered Chat: Interact with SAGE AI directly in VS Code
- 💬 Conversation Management: Save and organize your chat history
- 🔒 Secure Authentication: Enterprise-grade login system
- 📝 Code Context: Ask questions about your code with full context
- 🚀 Multiple AI Models: Choose from Claude 3.7 Sonnet, Claude 4 Sonnet, and Claude 4 Opus
Installation & Setup
Prerequisites
- VS Code 1.74.0 or higher
- Node.js 16.x or higher
- Access to CirrusLabs SAGE backend
Development Setup
Clone/Create the extension directory:
mkdir sage-vscode-extension
cd sage-vscode-extension
Initialize the project:
npm init -y
Install dependencies:
npm install --save-dev @types/vscode@^1.74.0 @types/node@16.x typescript@^4.9.4
npm install axios@^1.6.0
Create the directory structure:
sage-vscode-extension/
├── src/
│ ├── extension.ts
│ ├── services/
│ │ └── sageApiService.ts
│ └── providers/
│ ├── chatProvider.ts
│ ├── conversationProvider.ts
│ └── loginProvider.ts
├── .vscode/
│ ├── launch.json
│ └── tasks.json
├── package.json
├── tsconfig.json
└── README.md
Copy the provided code files into their respective locations
Compile TypeScript:
npm run compile
Test the extension:
- Press
F5 in VS Code to open a new Extension Development Host window
- The extension will be loaded and ready to use
Usage
Authentication
- Open the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P )
- Run "SAGE: Login to SAGE"
- Enter your CirrusLabs credentials:
- Email:
your.email@cirruslabs.io
- Password: Your assigned password
Chat Interface
- Click on the SAGE icon in the Activity Bar (left sidebar)
- Click "Open Chat Window" to start chatting
- Type your questions and press Enter or click Send
Conversation Management
- View past conversations in the "Conversations" panel
- Click any conversation to load it
- Right-click conversations to delete them
- Start new conversations anytime
Commands Available
SAGE: Open Chat - Opens the chat interface
SAGE: Login to SAGE - Authenticate with your credentials
SAGE: Logout from SAGE - Sign out
SAGE: New SAGE Conversation - Start a fresh conversation
Configuration
You can customize the extension through VS Code settings:
{
"sage.apiUrl": "https://sage-cl-536066708327.europe-west1.run.app",
"sage.model": "claude-3.7-sonnet"
}
Available Models
claude-3.7-sonnet (default)
claude-4-sonnet
claude-4-opus
Features Roadmap
- [ ] File upload support (PDF, DOCX, images)
- [ ] Code context integration
- [ ] Syntax highlighting for code responses
- [ ] Dark/Light theme support
- [ ] Conversation export
- [ ] Multi-language support
Troubleshooting
Authentication Issues
- Verify your credentials are correct
- Check internet connectivity
- Ensure the API URL is accessible
Chat Not Loading
- Try refreshing with
SAGE: Refresh Conversations
- Restart VS Code if issues persist
- Check the Output panel for error messages
Connection Problems
- Verify the backend URL in settings
- Check if the SAGE backend is running
- Look for firewall/proxy blocking requests
Development
Building
npm run compile
Watching for Changes
npm run watch
Testing
Press F5 in VS Code to launch the Extension Development Host
Packaging
npm install -g vsce
vsce package
Support
For issues and questions:
- Create an issue in the repository
- Contact CirrusLabs support
- Check the VS Code Developer Console for error messages
Enjoy using SAGE AI Assistant in VS Code! 🚀
| |