AI Chat Bridge
Use the AI chat your company already allows — Microsoft 365 Copilot, ChatGPT, Gemini — to actually change your code in VS Code.
Many developers only have access to a web chat AI at work. It writes code, but you end up copying and pasting
snippets by hand. AI Chat Bridge closes that gap:
- Build a prompt with the files you selected, your project rules and a strict answer format. It goes to your clipboard.
- Paste it in your AI chat and copy the answer.
- Press
Ctrl+Alt+V: every change opens as a side-by-side diff. Pick what to apply. Ctrl+Z undoes it.
No API keys, no browser automation, no network access at all.
Features
- Edit, create and delete files. New files can live in new folders (they are created for you).
Deletes start unchecked and require an extra confirmation.
- Reviewable diffs for every change, with a checklist to choose what to apply.
- Fix errors loop (
Ctrl+Alt+M): sends compiler errors from the Problems panel and/or a stack trace you copied
from the terminal, together with the files involved, asking the AI for the smallest fix.
- Multi-turn: if the AI asks for more files, the extension builds the follow-up prompt.
- Tolerant parser: handles the usual chat copy artifacts (escaped markdown,
<br> instead of blank lines,
trailing whitespace) without ever applying an ambiguous patch.
- Big codebases: large prompts become an attachment file automatically (saved outside the repo, deleted afterwards). Large files are sent as an outline (class/method signatures with line numbers, from VS Code Outline); the AI can request the full file. Select code in the editor to send just that method in full plus the outline of the rest.
- Project rules: put conventions in
.ai-chat-bridge/rules.md and they go into every prompt.
Commands
| Command |
Shortcut |
Where |
| AI Chat Bridge: Build prompt for the AI chat |
— |
Explorer / editor context menu |
| AI Chat Bridge: Build prompt as attachment file |
— |
Explorer / editor context menu |
| AI Chat Bridge: Apply chat answer (clipboard) |
Ctrl+Alt+V |
Command Palette |
| AI Chat Bridge: Ask the AI to fix errors |
Ctrl+Alt+M |
Editor / terminal context menu |
| AI Chat Bridge: Show audit log |
— |
Command Palette |
Command titles are shown in Portuguese in this version.
Security
The extension is designed for corporate environments and treats the AI answer as untrusted input:
- No network, no telemetry, no runtime dependencies. It only reads/writes workspace files and the clipboard, when you run a command.
- Secrets never go into the prompt:
.env, keys, certificates and credential files are skipped; content is
scanned and masked (AWS/GitHub/Azure keys, connection strings, JWT, bearer tokens, passwords).
- Writes are confined to the workspace: absolute paths,
.., drive letters, UNC, alternate data streams,
Windows reserved names, symlinks and junctions are rejected.
- Protected folders:
.git, .vscode (tasks/launch can run commands), .idea, node_modules can't be read or written.
- Never executes anything from the answer.
- Refuses truncated answers (
// ... rest of code) that would delete real code.
- Checks the file did not change between the diff and the apply (SHA-256).
- Disabled in untrusted workspaces. No webviews.
Your code and the AI provider
AI Chat Bridge never sends your code anywhere — you paste it into a chat. Data protection depends on that chat:
with Microsoft 365 Copilot, enterprise data protection only applies when signed in with your work account.
Don't paste company code into personal/free AI accounts.
Settings
| Setting |
Default |
Description |
aiChatBridge.maxPromptChars |
16000 |
Warns when the prompt is larger than this (chats limit message size). |
aiChatBridge.maxFileBytes |
200000 |
Larger files are not included. |
aiChatBridge.outlineThresholdLines |
400 |
Files with more lines are sent as an outline. |
aiChatBridge.delivery |
auto |
auto (clipboard, attachment when too big), clipboard or file. |
aiChatBridge.extraBlockedGlobs |
[] |
Extra regexes (relative paths) that are never sent nor modified. |
Keyboard tip (ABNT2 / AltGr layouts): Ctrl+Alt+<letter> may type a character instead of firing the
shortcut. Rebind in File → Preferences → Keyboard Shortcuts if needed.
Português
Use o chat de IA que a sua empresa libera (Microsoft 365 Copilot, ChatGPT, Gemini) para alterar o código direto no VS Code:
Botão direito nos arquivos → Gerar prompt → descreva a tarefa. O prompt vai para a área de transferência.
Cole no chat e copie a resposta.
Ctrl+Alt+V: os diffs abrem e você marca o que aplicar (criar, editar, excluir).
Prompt grande vira arquivo anexo sozinho (fora do projeto): arraste o arquivo para o chat e cole a mensagem curta copiada. Arquivos grandes vão resumidos; selecione um trecho no editor para mandar só aquele método completo.
Deu erro? Ctrl+Alt+M envia os erros de compilação e/ou o stack trace copiado do terminal pedindo a correção.
Tudo local, sem rede. Com o Copilot da empresa, use sempre a conta corporativa.
Not affiliated with or endorsed by Microsoft, OpenAI or Google. "Microsoft 365 Copilot", "ChatGPT" and "Gemini" are trademarks of their respective owners.
| |