MAXZOFT Codex
AI Chat sidebar for VS Code powered by the Claude Code CLI. Part of the
MAXZOFT Codex project (extension-first; no fork of Code-OSS required to run).
Features (current)
- AI Chat sidebar — Claude-style panel: in-app header (title, 🕐 history,
➕ new session, ⚙️ settings), welcome screen, rounded composer with an
animated working border, model + context-window usage line, and a spinning
MAXZOFT mark with live elapsed time + token count while the agent works.
- Claude Code bridge — streams replies from the local
claude CLI via
--print --output-format stream-json, with conversation continuity
(--resume, with auto-recovery if a resumed session is gone).
- Chat / Agent modes — Chat answers only; Agent can edit files and run
commands. Default mode is configurable; the choice is remembered.
- Tool cards — Read / Edit / Write / Bash / Grep calls render inline with
status (running / done / error) and expandable input + result.
- Review changes (Keep / Revert) — after the agent edits files, a card lets
you Compare (native diff), Keep, or Revert each file — works with git
checkpoints or a snapshot fallback (no git required).
- Inline edit — select code, press the edit shortcut, type an instruction;
the selection is rewritten in place (undoable).
- Context references — attach code via
@file autocomplete, the +
button, Add Selection to Chat, right-click Add to MAXZOFT Codex in the
editor / Explorer / terminal, or paste / drag-drop images & files.
- Context engine — index the workspace into Qdrant and inject the top-K
relevant snippets into each prompt; the context card lists the snippets and
opens them on click. Embeddings via OpenAI, Voyage, or Ollama (local, no
key). Opt-in via
maxzoft.context.enabled.
- Inline completion (Tab) — ghost-text autocomplete; backend is the
claude CLI or Ollama FIM (local code model, e.g. qwen2.5-coder —
fast, recommended). Status-bar indicator + a Test Inline Completion
command. Edit-aware: follows your recent edits.
- Background tasks — run dev servers / watchers (auto-detected from
package.json, Cargo, go.mod, …) as managed terminals with Show / Stop; the
agent can also start them itself.
- Chat history — every session is saved per workspace; reopen, rename, or
delete from the in-app history modal. New session runs in the background
so a previous turn keeps going.
- In-app settings — configure everything (provider, API keys, Qdrant,
Ollama, modes) from the ⚙️ panel, including a live index status.
Context engine (Phase 3) setup
- Start Qdrant (from the repo root):
docker compose up -d # serves http://localhost:6333
- Set an embedding API key in settings (or env):
maxzoft.openaiApiKey (or OPENAI_API_KEY), or
maxzoft.embeddingProvider: voyage + maxzoft.voyageApiKey.
- Run MAXZOFT Codex: Index Workspace from the command palette.
- Enable
maxzoft.context.enabled. Each prompt now retrieves the top-K
relevant snippets and prepends them as <workspace-context>.
Retrieval degrades gracefully: if Qdrant is down, the key is missing, or the
workspace isn't indexed yet, chat still works without context.
Requirements
- Claude Code CLI installed
and authenticated (
claude on your PATH, or set maxzoft.claudePath).
- Node 18+ to build.
Develop
npm install
npm run build # one-off build
npm run watch # rebuild on change
Then press F5 in VS Code (with this folder open) to launch an Extension
Development Host. Open the MAXZOFT Codex icon in the activity bar.
Ship to your team (.vsix)
Build a shareable package:
npm install
npm run vsix # -> maxzoft-0.0.1.vsix
Teammates install it (no source needed):
code --install-extension maxzoft-0.0.1.vsix
# or: VS Code → Extensions → ··· → Install from VSIX…
Each teammate needs on their machine:
- Claude Code CLI — installed and logged in (
claude). Required for chat /
agent / Cmd+K. Set maxzoft.claudePath if it isn't on PATH.
- Ollama (optional) — for local inline completion + embeddings, no API key.
ollama pull qwen2.5-coder:1.5b (Tab complete) and ollama pull nomic-embed-text (context).
- Qdrant (optional) —
docker compose up -d for the context engine.
Ship shared defaults by committing a workspace .vscode/settings.json (e.g.
maxzoft.inlineCompletion.provider: ollama). To update the team, bump
version in package.json, re-run npm run vsix, redistribute.
Settings
| Setting |
Description |
maxzoft.claudePath |
Explicit path to claude (default: auto-detect). |
maxzoft.model |
Model alias, e.g. opus / sonnet. |
maxzoft.permissionMode |
default / acceptEdits / plan / bypassPermissions. |
Architecture
webview (React) ──postMessage──> ChatViewProvider ──spawn──> claude CLI
^ │ │
└────────── HostToWebview ─────────┴──── stream-json lines ───┘
See src/shared/protocol.ts for the message contract.
Roadmap
- ✅ Phase 1: AI Chat Sidebar
- ✅ Phase 2: file edits + terminal execution (Agent mode + tool cards)
- ✅ Phase 3: Qdrant-backed context engine + semantic search
- ✅ Phase 4: Cmd+K inline edit, Cmd+L add-selection, Add File to Chat
(terminal references deferred — no stable VS Code API to read terminal output)
- Phase 5: MCP integrations
| |