This guide will help you quickly test the GitLab AI Assistant extension.
- ✅ Dependencies installed (
npm installcompleted) - ✅ TypeScript compiled (
npm run compilecompleted) - ✅ No lint errors
# Package the extension
npm run package
# This creates a .vsix file
# Install it via VS Code: Extensions → ... → Install from VSIXPress Cmd+Shift+P and run: GitLab AI: Configure Settings
Or manually set in VS Code settings:
{
"gitlabAI.gitlabUrl": "https://gitlab.com",
"gitlabAI.gitlabToken": "YOUR_GITLAB_TOKEN",
"gitlabAI.llmProvider": "openai",
"gitlabAI.llmApiKey": "YOUR_OPENAI_KEY",
"gitlabAI.llmModel": "gpt-4"
}Instead of packaging, you can test directly:
- Open this folder in VS Code
- Press
F5to start debugging - A new VS Code window will open with the extension loaded
- Open a Git repository in that window
- Test the commands
Cmd+Shift+P → GitLab AI: Configure Settings → Test Configuration
Expected: ✅ GitLab and LLM connections verified
Cmd+Shift+P → GitLab AI: Create New Branch
Description: "add user login feature"
Type: feature
Expected: Branch feature/XXX-add-user-login-feature created
- Make a small code change
Cmd+Shift+P → GitLab AI: Commit Changes with AI Message- Review the generated commit message Expected: Conventional commit message generated
- Make some changes (don't commit)
Cmd+Shift+P → GitLab AI: Review Current Changes- Check Problems panel Expected: AI review comments appear
If you don't want to use paid APIs:
- Install Ollama: https://ollama.ai
- Start Ollama and pull a model:
ollama serve ollama pull llama2
- Configure:
{ "gitlabAI.llmProvider": "ollama", "gitlabAI.llmApiUrl": "http://localhost:11434", "gitlabAI.llmModel": "llama2" }
npm install
npm run compile- Check your GitLab token has
apiscope - Verify GitLab URL includes
https://
- Verify API key is correct
- Check you have credits/quota
- For Ollama, ensure
ollama serveis running
# 1. Make changes to src/
vim src/commands/createBranch.ts
# 2. Compile
npm run compile
# 3. Test in debug mode
# Press F5 in VS Code
# 4. Check for errors
npm run lintOnce basic testing works:
- Test the full workflow command
- Create a business context file
- Test MR creation (requires GitLab repo)
- Test code review with business context
# Create installable .vsix
npm run package
# Share the .vsix file or publish to marketplace- Check Output panel: View → Output → Select "GitLab AI Assistant"
- Use Developer Tools: Help → Toggle Developer Tools
- Enable verbose logging in extension settings
- Test with a simple repository first
✅ Extension activates without errors
✅ Configuration test passes
✅ Can create a branch with AI naming
✅ Can generate commit messages
✅ Code review generates suggestions
✅ No TypeScript compilation errors
✅ No ESLint errors (warnings OK)
For detailed documentation, see README.md