Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>My_AINew to Visual Studio Code? Get it now.
My_AI

My_AI

Nicolas Gouy

|
45 installs
| (1) | Free
Agentic chat with your self-hosted My_AI assistant: read, edit, create files, run commands and search your workspace. The local LLM stays on your host PC; everything travels over an end-to-end encrypted tunnel. The conversation also shows on the Code page of My_AI and on your phone.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

My_AI Relay — VS Code Extension

English · Français

Agentic chat with your self-hosted My_AI assistant from VS Code, over an end-to-end encrypted tunnel, running on the local LLM on your own machine.

The extension is a remote client. The LLM, history, and file processing live on the PC that hosts My_AI; the extension delegates filesystem and shell operations on the workspace side, scoped to your VS Code workspace by default. This means you can run a beefy LLM on a desktop at home and use it from any laptop, anywhere, and the existing mobile web UI still works exactly as before.


Highlights

  • 🤖 Agentic mode — the model can read, edit, and create files, run shell commands, and search the workspace via nine built-in tools. Each reply is one bubble, in narration order: its text, then the tool calls it makes (one line each, with their status; input and captured output on click), then the text that follows.
  • 🛡️ Workspace sandbox — all paths are resolved against the open workspace folder. Out-of-workspace access requires an explicit modal approval per path, never auto-approvable.
  • ✋ Approval flow — read-only tools run silently; write_file, edit_file, and run_command ask for confirmation, with options to allow once, allow for the same file, or allow the tool for the rest of the session.
  • 🔁 One conversation, three places — the chat also shows on the Code page of My_AI on the host PC and in the Code view of its phone page. A message typed there lands here and acts in your workspace, the reply streams everywhere, and a write or a command it needs can be approved from any of the three. The phone's regular chat never shows here.
  • ⏹️ Stop & Clear — while a reply is being written, wherever its message was typed, the send button turns into Stop: it stops the model and any pending tool call, and the text freezes at once. Clear starts a new conversation (in VS Code, on the PC and on the phone) and stops a reply in progress.
  • 🌍 12 languages — the chat, notifications and prompts speak the language chosen in My_AI (French, English, Spanish, German, Italian, Portuguese, Dutch, Russian, Chinese, Japanese, Korean, Arabic, right to left), and follow it when it changes. Command titles and settings follow VS Code's display language.
  • 🔐 End-to-end encryption — AES-256-GCM over the public tunnel. The tunnel server (Cloudflare, localhost.run) only ever sees ciphertext.
  • 🔑 Access code — when you connect, the extension asks for the 6-digit code shown under the QR code in the host's Relay panel. It isn't part of the connection string, so a leaked string alone doesn't connect. Five wrong codes lock the Relay until it restarts.
  • 🌐 Multi-tunnel failover — cloudflared and localhost.run (plus serveo, if enabled) run in parallel on the host; the extension picks the first reachable one and falls over automatically when one drops.
  • 💾 Persistent connection — credentials stay encrypted in VS Code SecretStorage. The extension reconnects automatically when the host Relay comes back online, and disconnects when it shuts down.
  • 📎 @ mentions & @codebase — type @ in the chat to attach a workspace file or folder as persistent @codebase context (indexed on the host, kept in scope for every question). Browse into folders, drill in with @src/utils/, or fuzzy-find any file by name.
  • 🧩 Workspace integration
    • Auto-attach the active editor file to every message (toggle).
    • "Send selection to My_AI" (Command Palette and editor context menu).
    • "Send active file to My_AI".
    • One-click Insert at cursor / Copy on every code block in replies.

Requirements

  • VS Code ≥ 1.85.
  • A My_AI host PC running the Relay (any machine where you can launch My_AI). The Relay button is in the GUI's left sidebar.
  • An Internet connection on both ends (the encrypted tunnel goes through Cloudflare or localhost.run).

Quick start

1. Start the Relay on the host PC

  1. Launch My_AI on the PC where the model runs.
  2. Click Relay at the bottom of the sidebar (or press Ctrl+R).
  3. Wait until at least one tunnel is "active" (status turns green).

2. Copy the connection string

In the same Relay panel, click Copy next to the link: the connection string is the QR code's link, the one the phone opens. Before a tunnel answers, that field shows the PC's local address instead, which the extension can't use. The string copied looks like:

https://gonicolas12.github.io/My_AI/router.html#d=…

It contains the list of public tunnels, the auth token, and the AES-256-GCM key — all in the URL fragment, so nothing leaks to the tunnel server. Treat it like a password. On its own it doesn't connect, though: the extension also asks for the access code shown under the QR code (step 3).

3. Connect from VS Code

  1. Install the My_AI Relay extension.
  2. Open the My_AI Relay view in the Activity Bar (the small assistant icon, by default on the left). On first activation the extension will ask if you want to move the chat to the Secondary Side Bar (right side, like GitHub Copilot Chat) — accept and VS Code will remember the placement.
  3. Click Paste connection string… (or run My_AI Relay: Connect from the Command Palette) and paste the string from step 2.
  4. Enter the access code shown under the QR code in the host's Relay panel (6 digits, new at each Relay start).

The chat is now live. The same conversation is visible on the host's GUI and on any mobile that has scanned the QR code.

Tip — moving the chat later. VS Code's extension API only allows custom views to be contributed to the Activity Bar or Panel; the Secondary Side Bar is reserved for user-driven layout. If you missed the initial prompt, run My_AI Relay: Move Chat to Secondary Side Bar from the Command Palette, or right-click the My_AI Relay icon → "Move To" → "Secondary Side Bar".

Agentic mode

When the extension connects, it tells the Relay it is a VS Code client. From that point on, every prompt goes through an agentic loop on the host: the local LLM can emit tool calls, the extension executes them inside your workspace, and the result is fed back to the model until it gives a final answer.

Available tools

Tool Description
read_file Read a workspace file (with offset / limit for big files).
write_file Create or overwrite a file. Auto-creates parent folders. ⚠
edit_file Exact-match replace inside an existing file (replace_all optional). ⚠
list_dir List the entries of a workspace folder.
glob Find files matching a glob (**/*.ts, src/**/index.*, …).
grep Search file contents with ripgrep, falls back to a JS scan.
run_command Run a shell command in the workspace. ⚠
get_active_editor Read the currently open file and the user's selection.
open_file Open a workspace file in the editor (and reveal an optional line).

⚠ = requires explicit user approval (modal dialog, or buttons in the tool card for a message typed on the PC or the phone).

Sandbox & approvals

  • Workspace-scoped by default. Any path is resolved against the first workspace folder. A path that escapes the root triggers a modal asking for one-shot permission — there is no "remember" option for out-of- workspace access.
  • Read-only tools (read_file, list_dir, glob, grep, get_active_editor, open_file) run silently.
  • Mutating tools (write_file, edit_file, run_command) prompt for approval. The dialog offers three options besides denial:
    • Allow once — single-call exception.
    • Allow for this file — auto-approves the same tool on the same path for the rest of the session (not available for run_command).
    • Allow all this session — auto-approves the tool everywhere until disconnect/reconnect.
  • Asked where you are. For a message typed in VS Code, the modal dialog asks. For a message typed on the Code page of My_AI or on the phone, you may be away from VS Code: the same choices appear as buttons under the tool call — in this chat, on the PC and on the phone — and the first answer counts. Until then the tool waits, without timing out; Stop cancels it.
  • Approvals reset on every reconnect.

Tool calls in the reply

A reply is a single bubble: the text of each pass of the model and, between two passes, the tool calls it makes, grouped one line each — Reading src/app.py, Command: npm test… Their icon gives their state:

  • Spinner — running.
  • Lock — awaiting approval (with its buttons for a message typed on the PC or the phone).
  • Tool icon — completed.
  • Red alert — failed.
  • Gray — denied or stopped.

Click a line to expand its input (JSON args) and its output (stdout/stderr for shell commands, result of an edit, etc.). The bottom of the bubble says when the reply was stopped or failed, with its time and how long it took. Code blocks show their language, with Copy and Insert (at the cursor of the active editor) buttons in their header. The phone's Code view draws replies the same way: both use the same files (turn.js, markdown.js, thread.css).

Conversation memory

The conversation lives on the host, shared by VS Code, the Code page of My_AI and the phone. You can say "now edit the file you just read" and the model will remember the previous tool calls, even after a reconnection or a restart of My_AI. Clear starts a fresh conversation everywhere. When it grows past the model's context window, its oldest exchanges are dropped.

Workspace features

  • Auto-attach active file — toggle in the chat header. Every message you send will silently upload the currently active editor file before delivery. Useful when you want the model to keep up with what you're working on.
  • Send selection — Command Palette → My_AI Relay: Send Selection to My_AI, or right-click in the editor. Fences the selection with the current language for clean rendering.
  • Send active file — Command Palette → My_AI Relay: Send Active File to My_AI. Uploads the whole file as an attachment (PDF, DOCX, PowerPoint, code, image…).
  • Insert at cursor / Copy — every code block in an AI reply gets these two buttons on hover.
  • @ mentions — type @ in the message box to open an autocomplete menu of the current workspace's files and folders. Selecting a folder browses into it (sub-folders + files); use the 📎 attach this folder entry to attach it as a persistent @codebase context. Selecting a file indexes that single file into the same context. Type @src/utils/ to drill into a path, or just type a file name to fuzzy-find it anywhere. Indexing is incremental, .gitignore-aware, and excludes heavy folders (node_modules, …). All attachments from one VS Code project share a single host context.
  • Attach folder as @codebase — Command Palette → My_AI Relay: Attach Folder as @codebase, or right-click a folder in the Explorer. Re-index @codebase Folder refreshes an already-attached folder.

Commands

Command Description
My_AI Relay: Connect Paste a connection string and start a session.
My_AI Relay: Disconnect Close the current session (keeps credentials).
My_AI Relay: Forget Saved Connection Delete credentials from SecretStorage.
My_AI Relay: Send Selection to My_AI Send the editor selection as a message.
My_AI Relay: Send Active File to My_AI Upload and send the current file.
My_AI Relay: Attach Folder as @codebase Index a workspace folder as persistent RAG context.
My_AI Relay: Re-index @codebase Folder Refresh the index of an attached folder.
My_AI Relay: Toggle Auto-Attach Active File Toggle the auto-attach feature.
My_AI Relay: Open Chat View Reveal the chat panel.
My_AI Relay: Move Chat to Secondary Side Bar Open VS Code's "Move View" picker pre-selected on the chat view.

Settings

Setting Default Description
myaiRelay.openInSecondarySidebar true On first activation, offer to move the chat to the Secondary Side Bar.
myaiRelay.healthCheckIntervalSeconds 10 Polling interval for tunnel health.
myaiRelay.autoReconnect true Reconnect automatically when the host Relay restarts.
myaiRelay.requestTimeoutSeconds 15 Per-request HTTP timeout.

Security model

  • The connection string contains the AES key. Anyone with it can decrypt every message of that Relay session. Don't share it.
  • Access code. The host only serves a session opened with the 6-digit code shown under its QR code, which the connection string doesn't contain. The code travels inside the AES-GCM envelope. After five wrong codes the Relay accepts none until it restarts; sessions already open keep working. The session is stored with the credentials, so reloading VS Code doesn't ask for the code again while the Relay runs.
  • Credentials are persisted in VS Code's SecretStorage — encrypted by the OS keychain, scoped per machine + user.
  • The tunnel server (Cloudflare / localhost.run) sees ciphertext only, and the tunnel names don't reveal your host's IP address. serveo, off by default, puts your network's public IP address in its tunnel names.
  • Stopping the Relay on the host PC invalidates the encryption key and the tunnels. The extension detects this within ~30 s and shows "offline".
  • Workspace isolation. The agentic mode runs all tools client-side inside the VS Code extension. The host's full PC access (the local MCPs used by the desktop GUI and the mobile UI) is not reachable from the VS Code chat. The model can only touch files reachable through the workspace tools, which are themselves bounded by the workspace root and guarded by the approval flow.

Troubleshooting

  • "No tunnel reachable" — the host PC is offline, the Relay was stopped, or your local network blocks every tunnel provider. Try restarting the Relay.
  • "E2EE decrypt failed" — the connection string is from a previous Relay session (the AES key is regenerated on every Relay start). Copy a fresh string and reconnect.
  • "Too many wrong access codes" — five wrong codes locked the Relay. Restart it on the host PC, copy the new connection string and enter the new code. If you didn't type those codes, someone else has your connection string or QR link: the restart makes it useless.
  • "Access code required" — the saved connection has no access code session (saved by a version older than 1.5.0). Click New connection, paste the connection string and enter the code.
  • Health check too sensitive — raise myaiRelay.healthCheckIntervalSeconds if you have a flaky link.

Development

cd vscode_extension
npm install
npm run watch       # esbuild in watch mode
# Press F5 in VS Code to launch an extension host

Package a VSIX:

npm run package

License

MIT © gonicolas12

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft