Skip to content

Cortex AI VS Code Extension - Installation Guide

Version: 0.1.0 (Internal Beta)
Last Updated: 2026-02-12
Audience: EMSHVAC Development Team

Prerequisites

  • VS Code 1.85.0 or later
  • Network access to cortex.emshvac.internal (VPN required if remote)
  • Zitadel account (for authenticated access)

Quick Install

# Download the extension package
scp root@192.168.11.132:/opt/cortex/cortex-vscode/cortex-ai-0.1.0.vsix ~/Downloads/

# Install in VS Code
code --install-extension ~/Downloads/cortex-ai-0.1.0.vsix

Option 2: Build from Source

cd /path/to/cortex/cortex-vscode
npm install
npm run package
code --install-extension cortex-ai-0.1.0.vsix

Configuration

After installation, configure the extension:

  1. Open VS Code Settings (Cmd+, / Ctrl+,)
  2. Search for "Cortex AI"
  3. Configure the following:
Setting Value Description
cortexAI.apiUrl https://cortex.emshvac.internal API server URL
cortexAI.enableCompletion true Enable inline completions
cortexAI.completionDelay 300 Delay before requesting completion (ms)
cortexAI.enableFeedback true Enable feedback collection

Settings JSON (Alternative)

Add to your settings.json:

{
  "cortexAI.apiUrl": "https://cortex.emshvac.internal",
  "cortexAI.enableCompletion": true,
  "cortexAI.completionDelay": 300,
  "cortexAI.maxContextLines": 100,
  "cortexAI.enableStreaming": true,
  "cortexAI.model": "qwen2.5-coder:7b",
  "cortexAI.enableFeedback": true
}

Verify Installation

  1. Look for the Cortex icon in the Activity Bar (left sidebar)
  2. Check the status bar (bottom right) - should show ✓ Cortex when connected
  3. Open Command Palette (Cmd+Shift+P) and type "Cortex" to see available commands

Connection Status

Status Meaning
✓ Cortex (green) Connected and healthy
⚠ Cortex (yellow) Connection issues
✗ Cortex (red) Disconnected

Features

Inline Code Completion

  • Start typing and wait 300ms for ghost text suggestions
  • Press Tab to accept, Escape to dismiss

Chat Panel

  • Cmd+Shift+A / Ctrl+Shift+A to open
  • Ask questions about your codebase
  • Context-aware responses

Code Actions

  • Select code, then:
  • Cmd+Shift+E - Explain selection
  • Command Palette → "Cortex AI: Generate Tests"
  • Command Palette → "Cortex AI: Refactor Selection"
  • Command Palette → "Cortex AI: Search Codebase"
  • Semantic + keyword hybrid search
  • Results appear in the Cortex sidebar

Troubleshooting

"Disconnected" Status

  1. Check VPN connection
  2. Verify API is running: curl https://cortex.emshvac.internal/health
  3. Check VS Code Output panel (View → Output → select "Cortex AI")

No Completions Appearing

  1. Ensure cortexAI.enableCompletion is true
  2. Check that you're typing in a supported file type
  3. Wait for the completion delay (default 300ms)

Slow Responses

  • The first request may be slow (model loading)
  • Subsequent requests should be faster (cached)
  • Check network latency to API server

Feedback

Your feedback improves Cortex! The extension automatically collects: - Which search results you click (implicit feedback) - Thumbs up/down ratings (explicit feedback)

This data feeds into our continuous improvement pipeline.

Support

  • Slack: #cortex-ai
  • GitLab Issues: https://gitlab.com/emshvac/cortex/-/issues
  • Documentation: https://wiki.emshvac.co/cortex

Uninstall

code --uninstall-extension emshvac.cortex-ai