Skip to main content

Using it in VS Code

The Imaginne extension (nnumbers.imaginne) brings the agent into the editor: it reads your workspace, proposes edits as reviewable diffs, and runs tests and reviews without you leaving VS Code. Under the hood, the extension spins up the local CLI (imaginne serve) — so the imaginne binary needs to be installed. To install, see Install VS Code; for the dry reference of commands and settings, see VS Code commands.

Prerequisite: the local CLI

The extension does not talk to the model directly — it talks to the Engine the CLI spins up locally. If you see "Engine disconnected" or "cloud API key is required for model nnumbers", run Imaginne: Run Health Check, do /login, and, if needed, point imaginne.binaryPath at the executable. See Troubleshooting.

The chat panel​

Open the chat with Ctrl/Cmd+Shift+I. The panel has:

  • a status bar with the autonomy picker (Ask / Fix / Agent / Bypass), the Retry / Retry+ / Stop buttons, and the active model badge;
  • the context pills (what was attached to this message);
  • the input field "Ask Imaginne… (@file, /command)".

Focus the input field with Ctrl/Cmd+Shift+L.

Slash commands in the chat​

CommandWhat it does
/new · /clearNew conversation / clear.
/status · /compactSession state / compact context.
/modelShows the active model.
/cancelCancels the run.
/autonomyAdjusts the autonomy level.
/login · /logout · /whoamiIdentity.
/helpHelp.

Action directives (equivalent to the palette commands): /fix, /explain, /test, /refactor, /review, /plan.

Smart context​

By default, the extension attaches context automatically to each message so the agent understands your code without you pasting anything:

  • the workspace root;
  • the active file (the whole file when there's no selection, up to ~32 KB);
  • the current selection;
  • the diagnostics (errors/warnings);
  • the open tabs and ranked neighboring files;
  • the git diff (optional, off by default).

The context pills show exactly what was attached and clear themselves each turn. To check before sending, use Imaginne: Preview Context.

@file and pins​

  • @file — type it in the input field to inject the contents of a specific file.
  • Pins — pin a file or selection into context persistently with Pin Active File / Pin Selection (limits of 8 items, 16 KB per item, and 64 KB total). Manage them with Unpin / Show Pinned Context / Clear Pinned Context.

Main commands​

All commands live under the "Imaginne:" category in the palette (Ctrl/Cmd+Shift+P). The most used:

CommandWhat it's forWhere it lives
Open ChatOpen the chat panelPalette · Ctrl/Cmd+Shift+I
Ask / Fix / Explain / Refactor SelectionAct on the selected snippetPalette · editor context menu
Explain FileExplain the whole filePalette
Generate TestsGenerate testsPalette
Run Test for File · Run Test at CursorRun testsExplorer / editor menu
Review Current Changes · Review Staged ChangesReview changesPalette · SCM menu
Review Branch vs Base · Review FileReview a branch or filePalette · Explorer
Generate Commit MessageDraft the commit messageSCM menu
Explain DiffExplain a diffPalette
Pin Active File / SelectionPin contextPalette · context menus
Start / Stop / Resume Agent TaskAutonomous task modePalette
Run Health CheckDiagnose the connection to the EnginePalette
Login · Logout · WhoamiIdentityPalette
Configure Binary PathPoint to the CLIPalette

The extension registers about 50 commands in total; the full list is in VS Code commands.

Shortcuts​

ShortcutAction
Ctrl/Cmd+Shift+IOpen the chat
Ctrl/Cmd+Shift+LFocus the input field
EscCancel the run (with the sidebar visible)
Ctrl/Cmd+LClear the chat

Proposed Changes (Composer)​

This is the centerpiece of the extension: every proposed edit goes through the Composer before touching disk. You review each change and decide what to apply.

In the Proposed Changes panel you have:

  • Apply All / Discard All — apply or discard everything at once;
  • per file: Diff (view the change), Apply, Reject, and Hunks (apply/reject hunk by hunk).

Each file shows a state badge — pending, applied, rejected, or conflict — and the origin of the change (from failing test, from review, from task).

Conflict guard

If a file changed on disk since the proposal was generated, the extension flags a conflict and won't blindly overwrite — you review before applying. This is the "see the diff first" mechanism for VS Code described in Autonomy & permissions.

Permission modals​

Before a sensitive action, the extension asks for explicit confirmation:

  • "Imaginne wants to modify: <path>" — Accept / Reject;
  • "Imaginne wants to run: <tool>" — Allow / Deny.

Fix with Imaginne​

On any diagnostic (error/warning underline), open the code actions (the 💡 light bulb) and choose Fix with Imaginne. The extension sends a /fix already carrying the error context, and the fix comes back as a Proposed Change for you to review.

Autonomy​

The extension has four levels, in the status bar picker:

LevelBehavior
AskOnly reads and answers; changes nothing.
Fix (default)Proposes changes and confirms each one.
AgentConfirms each one, with Apply All available and a one-click command allowlist.
BypassAuto-applies within the workspace; destructive actions still confirm. Expires after 30 min and on switch/close.

Regardless of the level, there's a fixed denylist — rm -rf, sudo, curl|sh, and so on never run — and writing outside the workspace always asks for confirmation. See Autonomy & permissions.

Panels: Tests, Review, and Task Mode​

  • Tests — test results, with rerun and fix for the ones that failed (the fixes come in as Proposed Changes).
  • Review — the findings of a review grouped by severity, with "Copy & fill SCM" to take the suggested commit message straight to the source-control panel.
  • Task Mode — an autonomous task: Start Agent Task generates a plan, runs it step by step, and delivers a report. Control it with Stop, Continue, and Apply & Continue.
Remote task is experimental

There's a Remote Task feature behind a flag (loopback), off by default. Treat it as experimental only.

Model​

The extension has no model picker: the model is decided by the Engine/organization, and the status bar just shows the active one. See Models.

Useful settings​

The extension exposes about 23 settings. The most relevant:

SettingDefaultWhat it's for
imaginne.binaryPath—Path to the CLI, if it's not on the PATH.
imaginne.platformUrl—Platform URL.
imaginne.context.smarttrueTurns on smart context.
imaginne.context.includeGitDifffalseIncludes the git diff in context.
imaginne.context.includeDiagnosticstrueIncludes errors/warnings.
imaginne.context.includeOpenTabstrueIncludes the open tabs.
imaginne.autonomy.defaultLevelfixInitial autonomy level.
imaginne.autonomy.allowApplyAlltrueEnables Apply All.
imaginne.autonomy.requireConfirmationForDestructivetrueAlways confirms the destructive.
imaginne.autonomy.commandAllowlist—Commands cleared without confirmation.
imaginne.autonomy.commandDenylist—Commands always blocked.
imaginne.autonomy.bypassTimeoutMinutes30Duration of Bypass mode.
imaginne.extraArgs—Extra arguments for the CLI.

The full table is in VS Code commands.

See also​