Eval8 for VS Code
Chat with chat.eval8.ai without leaving the editor.
The sidebar is the same chat the website gives you — the same chats, the same
models, the same effort levels — reading and writing through the same API.
It can also work on your real project, through your own GitHub repository.
The whole of that design is one rule: Eval8 only ever touches a branch called
eval8/work. Your main is never written to.
What is in it
- A sidebar: an Eval8 icon in the activity bar, and a chat under it.
- Chat: the message list, the box, streamed replies with the live step
line, and the model and effort pickers.
- Chat history: the hamburger in the panel's header lists your chats,
newest first; click one to open it, the cross to delete it.
- One-click sign-in through your browser, with a pasted token as the
fallback (see below).
- A status bar item saying whether it is connected, thinking, offline, or
waiting for a token. Clicking it does whatever that state needs.
- Your project, if you connect it — see below.
Working on your project
Connect the open folder to a chat and the session works on the real thing: it
can grep it, run its tests, change several files at once. Nothing is uploaded
file by file; it goes through your own GitHub repository.
your machine the server
──────────── ──────────
1 everything you have, committed ───► clone or fetch that branch
to eval8/work and pushed
2 Eval8 works, commits, pushes
3 pull eval8/work ◄───
4 you read the diff, and you merge it to main yourself
Why it is safe to let it:
- Your
main is never written to. One branch, always the same one.
- Nothing of yours moves. The commit we push is built in a copy of your
index, so your branch, your staged work and your files are untouched — you
do not have to commit or stash first. There is no
reset, checkout,
clean, stash or force-push anywhere in this extension.
- Nothing can conflict, because both sides only ever move one branch
forward. Every push is a fast-forward; if the branch moved, you are told.
- You see everything it did as a normal VS Code diff before any of it goes
near your
main — and if you hate it, delete the branch.
- GitHub access is your editor's own. VS Code asks GitHub for a token, the
same sign-in your Source Control panel uses. No Personal Access Token to
paste and nothing of GitHub's stored on our server.
Connect this project is in the panel's header. The first clone of a large
repository takes a few minutes; after that it is a fetch. There is a 500 MB
limit, and it says so rather than silently filling the disk.
Signing in
Press Sign in with Eval8 in the panel, or run Eval8: Sign In. A browser
tab opens on the website, it asks whether this editor may sign in as you, and
when you press Allow the tab hands you back to the editor, signed in.
Nothing to copy, nothing to paste.
The token never travels through the browser. The tab carries a code that is
single use, lasts two minutes and is worthless on its own; the editor swaps
that code for the real token over HTTPS, proving as it does so — with a secret
that never leaves your machine — that it is the same editor that started. A
bearer token for something that runs shell commands has no business being in an
address bar, a browser history or the OS log of custom-scheme links. The whole
protocol is in eval8-chat/docs/EDITOR_AUTH.md.
Pasting a token instead
Still there, still works, and it is the fallback whenever the one-click flow
cannot be used — an editor whose vscode://-style scheme the website will not
redirect to, a remote window where no browser can be opened, or a machine where
you would rather not have a browser involved at all:
- Open https://chat.eval8.ai and sign in as usual.
- Under your account, make a token for an editor.
- Run Eval8: Set Token and paste it, or press Paste a token instead in
the panel.
Either way the token goes into the OS keychain through VS Code's
SecretStorage, not into settings.json. There is an eval8.apiToken setting
for anybody who has already put one there; it is moved into the keychain the
next time the extension starts, and taken out of the file.
Eval8: Sign Out forgets it on this machine. Revoking it properly is done on
the website, which is also where you can see when it was last used.
Settings
|
|
eval8.serverUrl |
Where the server is. Default https://chat.eval8.ai. A trailing /api is taken off for you, so either form works. |
eval8.apiToken |
Not recommended — use Eval8: Set Token. |
eval8.model |
The model a new chat starts on. Empty means the server's own default. |
eval8.effort |
low, medium, high, xhigh or max. Empty means the server's default. |
eval8.sendOnEnter |
On: Enter sends, Shift+Enter makes a new line. Off: the other way round. |
eval8.requestTimeoutSeconds |
How long an ordinary call may take. Default 30. |
eval8.streamIdleTimeoutSeconds |
How long a reply may go silent before the connection is treated as dead. Default 120; the server pings every 15 seconds. |
eval8.pushBeforeSend |
On by default: before each message, what is in your folder is committed to eval8/work and pushed, so Eval8 works on what you can see — uncommitted changes included. Your own branch is never written to and nothing in your folder is moved. Off, and it works on whatever was last pushed. |
eval8.syncTimeoutMinutes |
How long to wait for the server to clone or fetch. Default 15. The first clone of a big repository takes minutes; after that it is a fetch. |
The environment variable EVAL8_API_TOKEN is read as a last resort, for a dev
box where exporting a variable beats clicking.
Commands
|
|
| Eval8: New Chat |
Start a chat and put the cursor in the box. |
| Eval8: Open Panel |
Bring the sidebar to the front. |
| Eval8: Sign In |
Sign in through the browser: one tab, one Allow. |
| Eval8: Set Token |
Paste a token instead. |
| Eval8: Sign Out (forget the token) |
Forget the token on this machine. |
| Eval8: Open the Website |
Open the server in a browser. |
| Eval8: Reconnect |
Try the server again after a wobble. |
| Eval8: Connect this Project |
Point the open folder's repository at this chat. |
| Eval8: Disconnect this Project |
Stop working on it, and delete the server's clone. |
| Eval8: Pull Eval8's Changes |
Bring what it committed onto your eval8/work. |
| Eval8: Show What Eval8 Changed |
Open the diff again. |
| Eval8: Set GitHub Token |
Use a token you paste instead of the editor's GitHub sign-in. |
| Eval8: Forget the GitHub Token |
Drop that pasted token and go back to the editor's own. |
The API it uses
Every route is one the chat server already answers, with
Authorization: Bearer <token> added:
GET /api/auth/me who the token belongs to
GET /api/models the models and efforts this account has
GET /api/chats the chat list
POST /api/chats a new chat
GET /api/chats/:id one chat and its messages
DELETE /api/chats/:id delete a chat
POST /api/chats/:id/message the reply, as server-sent events
GET /api/chats/:id/project which repository, and is it ready
POST /api/chats/:id/project connect one
POST /api/chats/:id/project/sync clone or fetch - the slow one
POST /api/chats/:id/project/push commit and push
DELETE /api/chats/:id/project disconnect and delete the clone
and one route that carries no token, because it is where a token comes from:
POST /api/editor-auth/claim swap the browser's code for the token
The project routes also carry X-GitHub-Token, which the server hands to git
for one call and never writes down.
Two answers to that last one are not the event stream and are both normal: a
JSON {suggestion}, which is the server asking whether a cheaper model would
do before it spends anything, and a JSON refusal — 409 another turn is already
running, 429 out of allowance, 403 an effort this account may not use.
Things worth knowing
- One turn at a time. The server runs a single Claude session, so while
somebody's message is being answered everyone else gets "another message is
still being answered". That is the server, not the extension.
- Stop stops watching, not working. There is no route that cancels a turn,
so Stop drops the connection and says so. The turn finishes on the
server; reopen the chat to see what it said.
- Fenced code becomes a real code block — monospace, the language on it,
scrolling sideways rather than wrapping, and a Copy button. The rest of a
reply is shown as plain text; nothing else in it is parsed as Markdown, and
nothing in a reply is ever turned into markup.
- Attachments and artifacts are not in the panel yet. Both exist in the
web app; neither is wired up here.
- A
pre-push hook of your own will run when the extension pushes, as it
would for any push you make. --no-verify is deliberately not used.
Developing it
npm install
npm test # node --test, nothing touches the network
npm run lint
npx @vscode/vsce package
Press F5 in this folder to open an Extension Development Host with the
extension loaded (.vscode/launch.json is set up for it). The sidebar appears
under the Eval8 icon in the activity bar.
The mark is the company's own: images/icon.png is the 128px logo, and
media/activity.svg and the panel's gate screen draw the same four vector
paths as the website, in currentColor so the editor can tint them.
How it is laid out
|
|
extension.js |
commands, the status bar, and the one place that knows both the API and the panel |
src/api.js |
the chat.eval8.ai routes |
src/http.js |
one request, over node's own http module |
src/sse.js |
the event-stream parser |
src/urls.js |
what somebody typed into the server URL box |
src/tokens.js |
tidying, masking and choosing a token |
src/authflow.js |
"Sign in with Eval8": the state, the PKCE pair, the callback |
src/status.js |
what the status bar says |
src/html.js |
the webview's page |
src/panel.js |
the webview: the pipe between it and the extension |
src/settings.js |
settings and the keychain (the vscode half) |
src/git.js |
your own git: the snapshot commit, the push, the pull |
src/repo.js |
the project routes, GitHub sign-in, and the diff |
media/ |
the webview's own CSS and JS, and the activity bar icon |
Everything under src/ except panel.js and settings.js runs without VS
Code, which is why it can be tested with node --test and no editor. The two
that cannot are covered anyway: test/dom-stub.js runs media/panel.js
against the real page, and test/vscode-stub.js activates the whole extension
against a stub editor and a stub server on 127.0.0.1. 302 tests, no network.
npm run test:integration is the other half: it downloads a real VS Code and
runs the extension inside it, against a real chat server on 127.0.0.1 - the
real CSP, the real keychain, a real turn over the wire. 17 tests.
node tools/shots.js renders the panel at 200, 240, 320 and 480 px in five of
VS Code's themes, reading the real theme colours out of the installed editor,
and writes them to shots/.