Local-first AI compression for VSCode. Compress images, text, conversations, and documents locally via Ollama before sending to cloud LLMs. Save ~80% on token costs.
Features
Compress Images — Right-click any image → LatentGate compresses it to ~150 tokens
Compress Text — Select text → Ctrl+Shift+Alt+C to compress
Cost Dashboard — Activity bar panel showing token savings and stats
MCP Integration — Auto-configures MCP server for Copilot Chat
Status Bar — Live token savings counter
Prerequisites
Python 3.10+ with latent-gate installed:
pip install latent-gate[all]
Ollama running with required models:
ollama pull llava:7b
ollama pull llama3:8b
Commands
Command
Description
Shortcut
LatentGate: Compress Image
Compress an image file
Right-click menu
LatentGate: Compress Selected Text
Compress selected text
Ctrl+Shift+Alt+C
LatentGate: Compress Document
Compress entire document
Command Palette
LatentGate: Show Cost Dashboard
Open cost dashboard
Ctrl+Shift+Alt+D
LatentGate: Show Session Stats
Show token savings
Command Palette
LatentGate: Check Ollama Health
Verify Ollama is running
Command Palette
LatentGate: Configure MCP Server
Setup MCP for Copilot
Command Palette
Configuration
Open VSCode Settings → search latentGate to configure:
latentGate.visionModel — Vision model (default: llava:7b)
latentGate.predictorModel — Text model (default: llama3:8b)
latentGate.remoteProvider — Remote LLM provider
latentGate.remoteModel — Remote model name
latentGate.selectiveDecoding — Skip API calls for unchanged scenes
MCP Server
The extension auto-configures the MCP server for VSCode Copilot Chat. This enables Copilot to use LatentGate's compression tools automatically.