Files
LLeMbas-IDE/vscode
HomerandClaude Fable 5.2 b87cfa15ce VS Code: the panel written up; a refused change goes back; only a listed mode or model is passed on
- README and CHANGELOG: the views, the rule for whole or beside the conversation,
  what stays outside the panel and why, how the settings' levels work.
- A setting change the extension refused puts the field back to what is in force.
- A session's mode and model from the page are passed on only when the session or
  the server listed them; "Choose the Mode" opens a session first so its list is there.
- The Status view looks up who is signed in the first time it is asked for.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 19:26:31 +00:00
..
2026-12-02 19:20:54 +00:00

LLeMbas for VS Code and VSCodium

LLeMbas in the editor, in one side panel: 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, tunable inline autocomplete — and, in the same frame, the sessions, the models, every setting, the sign-in and the agent's status. Nothing sends you to a Quick Pick, an input box, a notification that wants an answer, or the editor's Settings page.

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: the panel's Account view (LLeMbas: Sign In), 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 the program's full path in the panel under Settings → Program (llembas.command).

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

One panel. The LLeMbas icon in the activity bar opens it. A strip of tabs runs along its top — Chat, Sessions, Models, Autocomplete, Settings, Account, Status — icons in a narrow side bar (each with its name as a tooltip and for a screen reader), icons with their names in a wide one. The arrow keys walk the strip, Home and End go to its ends, and the view that is open is the one you find again after closing the panel or reloading the window, with what you were typing.

Whole, or beside the conversation. One rule decides how a view opens:

  • A tab opens its view in the whole frame, and so does a command that is about how LLeMbas is set up (Models, Settings, Sign In, Status). The Chat tab is the way back.
  • Anything reached from the conversation opens beside it — the model button and History in the chat's header, a note's Sign in or Status button, and the commands that are about the conversation in progress (Resume a Previous Session, Choose This Session's Model, Open File from Project Index). The conversation stays where it is: the view takes the lower half of the panel, or the right half when the panel is 640 px wide or more. Esc or Close puts it away and gives the keyboard back to where it was; the composer's text and the place you had scrolled to are untouched.

Something in the conversation that waits for your answer while another view fills the frame marks the Chat tab; it does not pull you away from what you are doing.

Chat. The header shows the connection status, the session's title, the mode (switchable live mid-turn), the session's model (a button: the models open beside the conversation), Compact, History 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.

Sessions. The earlier sessions of this folder, with a filter. A press resumes one; Delete (where the CLI can delete a session) asks again in the row before anything goes.

Models. Three lists from your server, the one in force marked: the model of this conversation, the chat and rewrite model new sessions start with, and the autocomplete model. The last two are kept saved in your account (every editor you sign in from uses it) or for this window only (a quick switch, saved nowhere) — chosen next to each list.

Settings, in the panel. Every llembas.* setting has a field in the panel: autocomplete's in Autocomplete, the certificate file in Account, the rest in Settings. They are the editor's own settings underneath, so settings.json, Settings Sync and policies work as ever. Each field says where the value in force comes from (the default, your User settings, the Workspace, a folder), lets you choose the level your change is written to (User or Workspace; what starts a program is User only) and has a Reset for that level. A change made anywhere else — the editor's Settings page, settings.json — shows in the panel at once. A small link at the foot of Settings opens the editor's own Settings page; nothing needs it.

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 the Selection attaches the selection to your next message and puts the keyboard in the composer. Explain and Fix Problems send at once. Generate and Rewrite ask for their instruction in the panel, above the composer (Enter sends it, Esc puts it away, and the keyboard goes back to your text); while the model writes, the same place shows how far it is, with Cancel. The result is proposed hunks in the file, with Accept / Reject CodeLenses and a side-by-side diff view — and, in the panel, Accept all, Reject all and Show as a diff. 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). The panel's Autocomplete view holds all of it: on or off as you type, how much to suggest (Auto, a few words, one line, a function or block, a large part of the file), the most tokens (0..4096), the pause before asking, and your own instructions for suggestions.

In the status bar. The LLeMbas item says which autocomplete model is in use and whether suggestions are on, for when the panel is closed; a press opens the panel on Models (or, when there are no suggestions because no model is chosen or nobody is signed in, where that is put right).

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. The Account view says who this computer is signed in as. Type your server's address (nothing is predefined) and press Sign in: the CLI's own sign-in runs, the view shows the code to approve and where, with Open the approval page (your browser is opened when you press it, never by itself) and Cancel. 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 view 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, the certificate file is a field of the same view (llembas.login.caFile); with it the CLI always makes a new sign-in. Sign out signs the computer out, after asking in the view.

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 a button to where it is put right; a turn that failed says why. The Status view has the agent's state, the program that is started and its version, the oldest version this needs, what your server asks for, what went wrong lately, what the agent last wrote on stderr (kept after it is gone), and Restart the agent. The same lines go to the LLeMbas channel of the Output panel.

What stays outside the panel, and why

  • Inline suggestions (ghost text at the cursor) — they are about the text you are typing.
  • A rewrite's changes: the marks in the file, the Accept / Reject CodeLenses above each change, and the editor's own diff view — a change is judged where the code is.
  • The diff of an edit the agent asks about, in the editor's diff view (the question itself is a card in the chat).
  • The editor context menu, the keys and the command palette — every command is still there, so keys can be bound to them; each one opens the panel where it belongs or does its work in the file.
  • The status bar item — one glance when the panel is closed; a press opens the panel.
  • A line of the editor's own (a notification with no button) when a command could not start in the editor: nothing selected, a rewrite already under way in that file.

Commands and keys

Command Key
LLeMbas: Open the Chat Ctrl+Alt+L the panel on Chat, the keyboard in the composer
LLeMbas: Ask About the Selection Ctrl+Alt+K also in editor context menu; type the question in the composer
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; the instruction is typed in the panel
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 a search beside the conversation
LLeMbas: Add File to Chat an @ in the composer, with the project's files listed under it
LLeMbas: New Session
LLeMbas: Resume a Previous Session the Sessions view, beside the conversation
LLeMbas: Compact Session Context
LLeMbas: Stop the Running Turn
LLeMbas: Choose the Mode the keyboard on the mode list of the chat's header
LLeMbas: Choose This Session's Model the Models view, beside the conversation
LLeMbas: Models (Autocomplete and Main) the Models view; also the status bar item
LLeMbas: Choose the Autocomplete Model / the Main Model the Models view, on that list
LLeMbas: Settings (in the Panel) the Settings view
LLeMbas: Status of the Agent the Status view
LLeMbas: Stop the Agent starts again when needed
LLeMbas: Sign In / Sign Out the Account view; the CLI's one sign-in for this computer

On macOS the keys use Cmd in place of Ctrl.

Settings

Each has a field in the panel (the view is named in the last column), and is an ordinary setting of the editor underneath.

Setting Default
llembas.command lembas the LLeMbas CLI, or its full path (User level only) — Settings
llembas.login.caFile the CA file of a server with a private certificate authority, for signing in (User level only) — Account
llembas.chat.sendEditorContext on send active file, cursor, selection, diagnostics and open files — Settings
llembas.chat.showThinking off show collapsible model thinking blocks — Settings
llembas.chat.startMode initial mode for a new session (User level only) — Settings
llembas.complete.auto on suggest as you type; off: only on Alt+\ — Autocomplete
llembas.complete.debounce 250 pause in milliseconds before requesting a completion — Autocomplete
llembas.complete.maxTokens 0 max tokens to predict (0: server default or preset; up to 4096) — Autocomplete
llembas.complete.length auto prediction scope preset (auto, words, line, block, file) — Autocomplete
llembas.complete.instructions "" custom instructions sent with autocomplete requests — Autocomplete
llembas.rewrite.openDiff on open diff view beside the file when a rewrite is proposed — Settings
llembas.media.maxMegabytes 64 largest shown file accepted from the agent — Settings

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.
  • The effort of a conversation is shown (in Models) and cannot be changed from the editor: the CLI does not tell an editor which levels a model has.
  • A setting a folder of a multi-root workspace holds is shown as coming from that folder, and is changed there: the panel writes the User and the Workspace level.
  • In VS Code 1.85 itself, fields that stand side by side in a wide panel do not share their rows (its browser has no subgrid yet); from 1.86 they do. In a narrow side bar fields are stacked either way.
  • 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 panel's page (src/webview.js, 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, and high-contrast themes and "reduce motion" are respected.

  • The settings come from one table (src/settings.js) made from the manifest: a setting that is contributed cannot be missing from the panel, and a test fails when the table and the manifest differ.
  • What the page sends is checked against a schema (src/messages.js) — type, shapes, lengths, enumerations — before anything is done. A setting is written only when it is one of the table, with a value of its declared type and range, at a level it has; a model or a session only when the server or the CLI listed it. A path typed in the panel is stored, never run: the CLI is started as one list of arguments, and a server's address is refused when the program would read it as an option.
  • Forms line up by construction: a field is always its four parts — label, control, hint, level — on the rows of the form it is in (subgrid), so two fields side by side keep their parts on the same lines whatever the text does; a track gives up its minimum before a 240 px side bar scrolls sideways; what is pressed is 28 px high.
  • The page says what happens to a screen reader (a turn began or ended, something waits for your answer, which view is in front), labels are tied to their controls, and everything in it can be reached with the keyboard.

Tests

scripts/test-vscode.sh       # needs Node 18+ and python3