VSLLama
A privacy-first VS Code extension that connects to local Ollama and cloud AI providers (OpenAI, Anthropic, Gemini, NVIDIA NIM, Perplexity, Ollama Cloud, llama.cpp) for chat and coding help.
MCP integration is optional (can be enabled/disabled).
Features (v2.4.0)
- Agentic Mode: Autonomous multi-step task execution with MCP tool calling, repetition circuit breakers, and interactive diff approval.
- Planning Mode: Generate and manage structured architectural implementation plans (
.vsllama/plans/).
- Smart Model Routing: Automatically switch between reasoning models (planning) and coding models (execution).
- Expanded AI Providers: Stream responses from Ollama, OpenAI, Anthropic, Gemini, NVIDIA NIM, Perplexity, Ollama Cloud, and llama.cpp.
- Dynamic MCP Configuration & Watcher: Live reload of MCP tool definitions across
stdio, sse, and streamable-http transports without restarting VS Code.
- Dark / Light Theme System: Dynamic theme toggle button (
🌓) with persistent local preference storage.
- WCAG Accessibility & ARIA Support: Full
aria-label coverage on all interactive controls, high-contrast focus outlines, and an aria-live polite status announcer for screen readers.
- Interactive Error Recovery: One-click error card dismissal and
↩️ Undo Last Message to quickly step back conversation turns.
- Visual Tool Call Classification: Type-specific icons and colored borders for tool calls (📖 Read, ✏️ Write, 🚀 Exec, 🗑️ Delete) with interactive diffs.
- Real BPE Token Estimation & Accounting: Precise Byte-Pair Encoding token counts powered by
gpt-tokenizer, tracked across chat and inline code completions.
- Security Hardened: Path traversal protection, binary asset guardrails, 10MB file size safety limits, and workspace-bound audit logging (
system_events/audit.log).
- AI-Driven Critique Loop: Optional post-change self-verification using the project's own build system/test tooling to auto-detect and resolve errors.
- Code Autocomplete: AI-powered inline ghost text suggestions.
- Interactive Onboarding: Guided setup for first-time users.
- Smart Git Commits: Context-aware commit message generation from staged/unstaged diffs.
- CI / CD Pipeline: GitHub Actions CI workflow covering type checks, linting, builds, and security audits.
Requirements
- VS Code
^1.107.0
- An active AI provider (e.g. Ollama running locally at http://localhost:11434, or an API Key for OpenAI, Anthropic, Gemini, NVIDIA NIM, Perplexity, or Ollama Cloud)
Usage & Workflows
- Agent Mode: Ask the agent to implement complex changes (e.g.
"Refactor auth service to use JWT"). The agent analyzes files, proposes edits with a side-by-side visual diff, and waits for your confirmation before writing.
- Plan Mode: Request an architectural plan (e.g.
"Plan migration to Postgres"). Review and approve the generated plan before the agent starts executing.
- Chat Mode: Standard conversational assistance and explanations without autonomous tool execution.
- Theme Toggle: Click the
🌓 icon in the top header to toggle between Dark and Light UI themes.
- MCP Tool Servers: Click the
MCP icon in the chat header to add or manage Model Context Protocol servers (stdio, sse, streamable-http).
- Code Actions: Highlight code and right-click to access "Explain", "Fix", and "Generate" tools.
- Git Commits: Generate context-aware commit messages from the Source Control view.
- Code Autocomplete: Get AI-powered inline code suggestions as you type (enabled via settings).
For detailed instructions, see the
User guide: https://github.com/vijaytank/vsllama-docs/blob/Develop/USER_GUIDE.md
Install (VSIX)
- Install from Marketplace (https://marketplace.visualstudio.com/items?itemName=VijayTank.vsllama)
Configuration
Access settings (Ctrl+,) and search for VSLLama to configure:
provider: AI Provider to use (ollama, openai, anthropic, gemini, nvidianim, perplexity, ollamacloud, llamacpp).
model: Default LLM to use (defaults to auto).
defaultMode: Default chat mode (agent, chat, plan).
planningModel: Optional specific model for the planning phase.
executionModel: Optional specific model for the execution phase.
mcpServers: Definitions for MCP tool servers.
autocompleteEnabled: Toggle inline ghost text code completions.
autocompleteDelay: Milliseconds to wait before triggering autocomplete (default: 800ms).
rateLimiting.enabled: Globally enable sliding-window rate limiting (default: true).
rateLimiting.<provider>.maxRequests: Maximum requests allowed in the window for a provider (e.g. 50 for OpenAI).
rateLimiting.<provider>.windowMs: Rate limit window in milliseconds for a provider (e.g. 60000 for OpenAI).
critiqueLoop.enabled: Enable AI self-verification of changes using local build tools (default: true).
critiqueLoop.maxRetries: Maximum retry correction attempts allowed (default: 2).
Note: You can easily switch providers, set API Keys, and toggle themes directly from the VSLLama chat view.
Development
npm install
- Press
F5 to start the Extension Development Host
- Run tests & validation:
npm run check-types && npm run lint && npm run pretest
License
MIT © Vijay Tank
| |