LLeMbas: Sign In / Sign Out run the CLI's own sign-in and say whose it replaces. The chat page tells a screen reader what happens and is operable with the keyboard. New tests: the vscode API used against engines.vscode, signing in against a stand-in lembas, and the LLeMbas CLI itself when its source is at hand. The READMEs, the Neovim help (helptags in the install recipe) and the changelog say what changed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
9.5 KiB
LLeMbas for VS Code and VSCodium
LLeMbas in the editor: an agentic chat beside your files, questions and plans as interactive cards,
rewriting and generating code as inline diffs, session resume, @file and /command completion,
and tunable inline autocomplete.
The extension is a client of the LLeMbas CLI. The CLI is
the agent: it holds the sign-in to your LLeMbas server, the models, the tools and the permissions.
The extension starts lembas serve --stdio and talks to it over the Agent Client Protocol. Nothing
about a server or a model is set in the editor, only which command starts the CLI.
What you need
- VS Code or VSCodium 1.85 or newer.
- The LLeMbas CLI, 2.0.0-beta.16 or newer, on the same computer. An older one is said once, with how
to update it (
lembas update), and what it lacks is off. - The CLI signed in to your LLeMbas server: LLeMbas: Sign In in the editor, or
lembas login <address>in a terminal. It is the same sign-in — the CLI keeps one for the whole computer, which the terminal and the linked service use too.
Install
Build the package (needs only Node 18 or newer — no npm install, no packaging tool):
scripts/package-vscode.sh # writes dist/llembas-<version>.vsix
Then install it:
codium --install-extension dist/llembas-<version>.vsix # VSCodium
code --install-extension dist/llembas-<version>.vsix # VS Code
or in the editor: Extensions → … → Install from VSIX….
If the editor does not find lembas (an editor started from the desktop does not always have your
shell's PATH) it also looks in ~/.local/bin, where the CLI's installer puts it; anywhere else,
set LLeMbas: Command to the program's full path.
The extension is off in a folder you have not trusted (Restricted Mode): it starts an agent that works in that folder.
What it does
Chat. The LLeMbas icon in the activity bar opens the chat. The header shows the connection
status, session title, mode (switchable live mid-turn), session model, Tune (autocomplete
settings drawer), Compact, History (resume previous sessions), and New. Enter sends
(or steers mid-run), Shift+Enter starts a new line, @ searches project files and folders, and /
completes slash commands and skills. Approval cards open edited files in the diff view first;
question cards support single/multi-select, recommended markers, custom answers, and skip; plan
cards render formatted Markdown with Approve (Edit/Manual), Revise, and Dismiss actions.
What a model writes is drawn as text through the extension's own Markdown reader: paragraphs,
headings, lists, task checklists, quotes, real GFM tables (in horizontally scrollable wrappers),
strikethrough, fenced code blocks with Copy and Insert buttons, and clickable file:line
references. HTML in a reply stays text, pictures in a reply are not loaded, and links open only for
http, https and mailto. Replies over 400,000 characters are shown as written. Tool calls show
status, kind, duration, clickable changed files, and expandable output; thinking blocks collapse
cleanly.
Ask, Explain, Fix, Generate & Rewrite. Ask about or explain a selection, fix reported warnings and errors in the active file, generate code at the cursor, or rewrite selected lines as proposed hunks with Accept / Reject CodeLenses and a side-by-side diff view. Nothing is written until you accept, and hunks whose lines you edited meanwhile are dropped safely.
Tunable Autocomplete. Inline suggestions appear as you type and on Alt+\ (Tab accepts, Escape
dismisses). Use the Tune drawer in the chat header (or Settings) to slide Max Tokens from a
few words up to a full file (0..4096), pick a prediction scope preset (Auto, Few words,
Single line, Function / block, Large / file), and add custom Autocomplete instructions.
Two model settings. LLeMbas: Models (Autocomplete and Main) — also the LLeMbas item in the status bar — shows both the autocomplete model and the main model (chat and rewriting), saved in your account or switched for this window only.
Files the agent shows. Pictures appear inline in the chat. Other files appear with Open (only
for display-only kinds whose bytes match their filename) or Show in folder for anything else. Files
over 64 MB are refused (llembas.media.maxMegabytes).
Unsaved text. The agent reads open files from your editor buffers (saved or not), and writes open files back through the document so undo and disk stay in sync. A document keeps its own line ends (CRLF stays CRLF).
Signing in. LLeMbas: Sign In asks for your server's address (nothing is predefined), runs the
CLI's own sign-in, shows the code to approve and opens the approval page in your browser; the
notification's Cancel stops waiting. When it is approved the agent starts anew and the open chat
works at once. If the computer is signed in to another server already, the extension says which and
asks first: the new sign-in replaces it, for the terminal and the linked service too. For a server
with a private certificate authority set llembas.login.caFile; with it the CLI always makes a new
sign-in. LLeMbas: Sign Out signs the computer out, after asking.
When something is wrong. A CLI that is not found, is too old, is not signed in, stops or does not answer is said in the chat in words, with what to do; a turn that failed says why. What the CLI wrote on stderr is in the LLeMbas channel of the Output panel. LLeMbas: Stop the Agent ends a stuck one; the next message starts it again.
Commands and keys
| Command | Key | |
|---|---|---|
| LLeMbas: Open the Chat | Ctrl+Alt+L |
|
| LLeMbas: Ask About the Selection | Ctrl+Alt+K |
also in editor context menu |
| LLeMbas: Explain the Selection | editor context menu | |
| LLeMbas: Fix Problems in This File | editor context menu | |
| LLeMbas: Generate Code at Cursor | editor context menu | |
| LLeMbas: Rewrite the Selection | Ctrl+Alt+E |
also in editor context menu |
| LLeMbas: Suggest a Completion Here | Alt+\ |
|
| LLeMbas: Toggle Autocomplete as You Type | ||
| LLeMbas: Accept All Proposed Changes in This File | Ctrl+Alt+Enter |
while changes are proposed |
| LLeMbas: Reject All Proposed Changes in This File | Ctrl+Alt+Backspace |
while changes are proposed |
| LLeMbas: Accept / Reject the Proposed Change at the Cursor | or CodeLenses above each change | |
| LLeMbas: Show the Proposed Changes as a Diff | ||
| LLeMbas: Open File from Project Index / Add File to Chat | asks for part of the file's name | |
| LLeMbas: New Session / Resume a Previous Session | ||
| LLeMbas: Compact Session Context | ||
| LLeMbas: Stop the Running Turn | ||
| LLeMbas: Choose the Mode / Choose This Session's Model | ||
| LLeMbas: Models (Autocomplete and Main) | also status bar item | |
| LLeMbas: Choose the Autocomplete Model / the Main Model | ||
| LLeMbas: Stop the Agent | starts again when needed | |
| LLeMbas: Sign In / Sign Out | the CLI's one sign-in for this computer |
On macOS the keys use Cmd in place of Ctrl.
Settings
| Setting | Default | |
|---|---|---|
llembas.command |
lembas |
the LLeMbas CLI, or its full path (machine-scoped) |
llembas.login.caFile |
the CA file of a server with a private certificate authority, for Sign In (machine-scoped) | |
llembas.chat.sendEditorContext |
on | send active file, cursor, selection, diagnostics and open files |
llembas.chat.showThinking |
off | show collapsible model thinking blocks |
llembas.chat.startMode |
initial mode for a new session (machine-scoped) | |
llembas.complete.auto |
on | suggest as you type; off: only on Alt+\ |
llembas.complete.debounce |
250 | pause in milliseconds before requesting a completion |
llembas.complete.maxTokens |
0 | max tokens to predict (0: server default or preset; up to 4096) |
llembas.complete.length |
auto |
prediction scope preset (auto, words, line, block, file) |
llembas.complete.instructions |
"" |
custom instructions sent with autocomplete requests |
llembas.rewrite.openDiff |
on | open diff view beside the file when a rewrite is proposed |
llembas.media.maxMegabytes |
64 | largest shown file accepted from the agent |
Not there yet
- Sound, video, PDF and 3D files are not rendered inline in the chat: they appear with Open.
- An edit the agent asks about in a chat is allowed or denied as a whole, not change by change.
- No marketplace listing: install from the
.vsix. - A question card has no "ask back" answer, and a plan card no editing of the plan in place.
- It has been tested against a stand-in for the editor and against the LLeMbas CLI itself, not yet in a release of VS Code by these tests: tell us what you see.
How it is made
Plain JavaScript, no bundler, no dependencies, nothing fetched from the network, no telemetry.
extension.js is the only file that talks to the editor; everything else is in src/ and runs
without one. The chat page (media/chat.js) builds elements with createElement and textContent
only, under a strict Content-Security-Policy (no remote resource, no inline script or style); every
colour comes from VS Code's theme variables. What the page sends back is checked again by the
extension before anything is opened. The page says what happens to a screen reader (a turn began or
ended, something waits for your answer) and everything in it can be reached with the keyboard.
Tests
scripts/test-vscode.sh # needs Node 18+ and python3