TrueRows Local Chat
Chat with and edit code using a model running on your own machine (Ollama, LM Studio,
llama.cpp). Free, no account, nothing leaves your computer.
Not affiliated with Ollama, LM Studio, llama.cpp or Microsoft.
What is sent, and where
The only network traffic is to the server address in localChat.serverUrl (default
http://127.0.0.1:11434, your own machine). There is no telemetry, no analytics, no update check
and no other request.
- When the view opens, and when you choose a model:
GET /api/tags (Ollama), or GET /v1/models
if that fails (LM Studio, llama.cpp). This sends nothing of yours.
- When you send a message:
POST /api/chat (Ollama) or POST /v1/chat/completions (OpenAI-compatible)
with the model name, the system prompt, the chat so far, any file or selection you attached, and the temperature.
- When you use "Edit Selection with Local Model": the same POST, with your instruction and the selected code.
If you point serverUrl at a computer that is not this one, the extension asks once per host
("Prompts and code will be sent to ...") and remembers a yes. Chats are stored in VS Code's
workspace storage on your machine only.
Use
- Install and start a local model server. For Ollama:
ollama serve and ollama pull qwen2.5-coder:7b.
- Click the Local Chat icon in the Activity Bar (or run "Local Chat: Open"), pick a model, type, press Enter.
Shift+Enter adds a line. Stop cancels a reply.
- Select code, right-click, "Local Chat: Ask About Selection" to attach it (the whole file if nothing is
selected, up to
localChat.contextChars characters), then ask.
- Right-click, "Edit Selection with Local Model" (or the current line if nothing is selected), type an
instruction. The change is one edit, so Ctrl+Z undoes it; the notice offers Undo and Show Diff.
Code blocks in replies have Copy and Insert (puts the code at the cursor). Thinking from
reasoning models (<think> blocks or Ollama's thinking field) is kept in a collapsed section.
Commands
| Command |
|
| Local Chat: Open |
Show the chat view |
| Local Chat: New Chat |
Start a fresh chat (the old one stays in History) |
| Local Chat: Select Model |
Pick from the models the server lists |
| Local Chat: Ask About Selection |
Attach the selection or file, focus the chat |
| Local Chat: Edit Selection with Local Model |
Rewrite the selection from an instruction |
| Local Chat: Stop |
Cancel the reply that is streaming |
Settings
| Setting |
Default |
|
localChat.serverUrl |
http://127.0.0.1:11434 |
LM Studio uses http://127.0.0.1:1234 |
localChat.api |
auto |
auto, ollama or openai |
localChat.model |
empty |
empty = the last one you used, or the first listed |
localChat.temperature |
0.2 |
|
localChat.contextChars |
20000 |
most characters of an attached file or selection |
localChat.systemPrompt |
a coding assistant |
|
Where it works
- VS Code on the desktop (Windows, macOS, Linux): works out of the box with a default Ollama install.
Requests come from the extension's Node process, and browser cross-origin rules do not apply.
- vscode.dev and github.dev: you must allow them in Ollama. There the extension runs in a browser
worker, and Ollama refuses requests from origins it does not know (it answers 403; the chat shows
"Cannot reach the model server"). Set
OLLAMA_ORIGINS to the origin the browser reports for the
blocked request (the browser console shows it), for example OLLAMA_ORIGINS=https://vscode.dev,
and restart Ollama. LM Studio has a matching "Enable CORS" switch in its server settings.
No models, or a server that is not running
The chat says what is wrong: start Ollama (ollama serve) or LM Studio's server, or pull a model
(ollama pull qwen2.5-coder:7b).
| |