Evir for Visual Studio Code
A clean, local-first AI agent and assistant for VS Code that runs on your own models. Ask about code, or let Agent read, search, edit files and run commands inside a trusted workspace — with an explicit approval before anything is written or executed. No Evir account, no credits, no middleman: your API key is stored in VS Code SecretStorage and requests go straight from your machine to the provider you configure.

Features
- Ask — streaming conversation about your code with cancellation and local history.
- Several model profiles — keep e.g. a fast model, a deep model and a local Ollama side by side; switch from the toolbar or Evir: Select Model, manage them in Evir: Manage Models. Each profile has its own key, reasoning effort (off / low / medium / high) and optional temperature, mapped to OpenAI
reasoning_effort, Responses reasoning.effort, Anthropic thinking, Gemini thinkingConfig and Ollama think.
- Settings dialog (⚙) — default mode, interface language (
auto / English / 中文), send shortcut (⌘/Ctrl+Enter or Enter), Agent step limit, tool activity visibility — and a Feedback box that files a GitHub issue (prefilled in your browser, or created directly when you paste a GitHub token with Issues: read and write).
- Add to Evir from the editor — select code and choose Evir: Add Selection to Chat (a
path:line reference with the snippet lands in the composer), or right-click a file in the editor title bar / Explorer and choose Evir: Add File to Chat (@path). Cmd/Ctrl+Shift+Y jumps to the input from anywhere.
- Permission level per conversation — in Agent mode pick Ask every time (default), Auto-edit files (commands still ask) or Read only; the choice sits in the composer next to the mode switch. 📎 adds workspace files to the message as
@path references.
- Enter sends, Shift+Enter breaks the line (⌘/Ctrl+Enter always sends;
evir.sendKey switches back). IME candidate confirmation never sends.
- Conversations with history — start a new conversation from the session bar (
+) or Evir: History, switch between saved ones, rename or delete them; each conversation keeps its own mode and model profile.
- Agent by default — the model decides when to read or edit files (every write and command still needs your approval). The first time in a workspace, Evir asks whether the model may read the folder and send content to your configured endpoint (again if the endpoint changes); declining keeps Ask. If Agent is not available (no workspace, untrusted or remote workspace, model not marked tool-capable) Evir falls back to Ask and shows the reason above the input; pick Ask yourself when you want answers without any file access.
- The composer stays put — the input and Send / Stop buttons are pinned to the bottom of the view no matter how long the conversation gets.
- Agent — in a trusted local workspace, a tool-capable model can list and read files, search the workspace, inspect Git, write files and run commands. Every write and every command needs a per-call approval; the safe choice (
Deny) is focused first.
- Bring your own model — OpenAI Chat Completions, OpenAI-compatible Chat (DeepSeek, Qwen, Moonshot, Zhipu GLM, OpenRouter, LM Studio, …), OpenAI Responses, Anthropic Messages, Gemini GenerateContent and Ollama. Pick a protocol, base URL, model ID and API key, test the connection, save.
- Undo the last write — the last file write keeps a local snapshot; Evir: Show Last Change opens a diff and Evir: Revert Last Change rolls it back.
- Stop means stop — stopping a task aborts the model request, the pending approval and any child process.
- Local-first — provider metadata and conversation history live in VS Code's local extension storage; the API key never leaves
SecretStorage.
Install
From the Visual Studio Marketplace, or download the VSIX attached to a GitHub release and run code --install-extension evir-<version>.vsix. Requires VS Code 1.96 or newer and a local (not remote) workspace for Agent mode.
Quick start
- Click the Evir icon in the Activity Bar (or run Evir: Open Assistant).
- Choose a protocol, Base URL, model ID and API key. Tick This model supports tool calling if you plan to use Agent.
- Test connection, then Save. Add more profiles later with Save as new (e.g. a cheap model for quick questions and a stronger one with reasoning on).
- Use Ask for conversation without workspace access — Ask does not read your project. Switch to Agent in a trusted local workspace (and a tool-calling model) to let Evir list, read, search and edit files. If Agent stays disabled, the reason is shown above the input (no workspace, untrusted workspace, remote workspace, or the model is not marked tool-capable).



Settings
The ⚙ button opens the settings dialog: default mode, language (auto follows the VS Code display language, Chinese for zh*; or force English / 中文), the send shortcut (⌘/Ctrl+Enter, or Enter with Shift+Enter for a new line), the Agent step limit, tool-activity visibility and the Feedback box. Everything is stored in VS Code settings under evir.*.

Feedback
The settings dialog has a Feedback box (or run Evir: Feedback): title, text, optional anonymized diagnostics (versions, OS, non-private settings — never keys, base URLs or conversations). Without a token it opens a prefilled GitHub issue in your browser; with a GitHub token that has Issues: read and write on this repository (stored in SecretStorage) the issue is created directly. Issues land at z-Zihan/Evir/issues with the feedback label.
Where the view opens
Evir lives in the Activity Bar by default. Drag its header anywhere, right-click it → Move To, or run Evir: Move View… to put it in the Secondary Side Bar or the bottom Panel. Evir: Open in Editor Tab shows the same conversation in an editor tab instead — state, history and approvals are shared, so you can keep a conversation open next to your code.
Agent safety
- Agent is unavailable without Workspace Trust and limited to opened local workspace folders, including symbolic-link boundary checks.
- File writes and command execution require explicit per-call approval.
- Commands run as a program plus an argument array; shell interpolation is disabled.
- The last file write has a local snapshot with a diff view and rollback.
- Workspace content read by Agent may be sent to the provider you configured. Evir never switches providers silently.

Saved models are never lost silently
Profiles are stored in a versioned blob. If it ever fails validation (schema change, manual edit), the view shows the error with a Reset profiles button and keeps the raw data instead of pretending nothing is configured. The pre-0.2 single configuration migrates automatically on first launch.
Current scope and limitations
VS Code Web, remote workspaces, Desktop conversation synchronization, MCP, Skills, browser automation and inline completion are not supported by the extension yet. The Tool Calling checkbox is a user declaration, not a capability probe.
Build from source
From the Evir repository root:
pnpm install
pnpm package:vscode # → extensions/vscode/artifacts/evir.vsix
Quality gate and visual QA:
pnpm --dir extensions/vscode check
pnpm --dir extensions/vscode test:host
node extensions/vscode/scripts/visual-qa.mjs
EVIR_QA_THEME=light node extensions/vscode/scripts/visual-qa.mjs
License
MIT
| |