Skip to content

robertpiosik/CodeWebChat

Repository files navigation

Code Web Chat

Get from Visual Studio Code Marketplace Get from Open VSX Registry License: GPL-3.0

Code Web Chat is a community-driven, free and open-source (FOSS) AI coding tool that initializes your favorite chatbot with code and instructions, hands-free!

Supports popular chatbots—ChatGPT, Claude, Gemini, AI Studio, DeepSeek, and 10+ more
Applies chat responses—seamless integration of AI-generated code blocks

Available in VS Code, Cursor, and other forks.

Walkthrough

⭐️ Guiding principles

  • Privacy first—operate locally, don't collect any data
  • Initialize chatbots—don't scrape responses
  • Free forever—community effort

⭐️ The workflow

Select folders and files for context, enter prompt, and pick your favorite chatbot—to continue in the browser, or call a model provider of choice—to stay in the editor.

The extension then constructs an XML-formatted message that consists of your prompt, edit format instructions, and the selected context:

Implement a subtract function.
<system>
Whenever proposing a new or updated file use the Markdown Code Block syntax. Each code block should be a diff patch. Don't use XML for files.
</system>
<files>
<file path="src/calculator.ts">
<![CDATA[
export const addNumbers = (a: number, b: number) => a + b;
]]>
</file>
</files>
Implement a subtract function.
<system>
Whenever proposing a new or updated file use the Markdown Code Block syntax. Each code block should be a diff patch. Don't use XML for files.
</system>

The prompt and edit format instructions are repeated after the context for better accuracy.

The generated response can then be applied to the codebase using advanced built-in parsers.

Chatbot initialization

Install the Connector browser extension and never copy & paste again.

Supported chatbots (A-Z)

  • AI Studio
  • ChatGPT
  • Claude
  • DeepSeek
  • Doubao
  • Gemini
  • Grok
  • Kimi
  • Mistral
  • Open WebUI
  • OpenRouter Chat
  • Perplexity
  • Qwen
  • Together
  • Yuanbao
  • Z

Chat-initializing interactions in the chatbot interface are handled by the content script.

Legal disclaimer: The placed Apply response with CWC button is not a means of automatic output extraction, it's an alias for the original copy to clipboard button. Changes integration process uses clipboard-stored chat response text.

API Tools

Anything CWC can do in the connected browser, it can do calling a model provider directly in the editor. Get started with a generous free tier from Google via AI Studio / API Keys.

🛠️ Edit Context
Modify, create or delete files based on natural language instructions.

🛠️ Code Completions
Get accurate code-at-cursor from state-of-the-art reasoning models.

🛠️ Intelligent Update
Integrate truncated code blocks and fix malformed diffs.

🛠️ Commit Messages
Generate meaningful summaries of changes adhering to your style.

Commands

Handling chat responses

  • Code Web Chat: Apply Chat Response - Integrate with the codebase a copied to clipboard overall chat response or a single code block.
  • Code Web Chat: Refactor Current File - Use Intelligent Update API tool for the active editor, without context. Accepts clipboard text or instructions.
  • Code Web Chat: Undo Last Changes - Revert applied AI-suggested edits.

Code completions

  • Code Web Chat: Code Completion - Get code-at-cursor using API tool.
  • Code Web Chat: Code Completion using... - ...with configuration selection.
  • Code Web Chat: Code Completion with Instructions - ...with instructions.
  • Code Web Chat: Code Completion with Instructions using... - ...with instructions and configuration selection.

Enterprise security

Code Web Chat operates exclusively on your machine. All your code and instructions are sent directly to chatbots via editor-browser communication channel run on local Websockets. Model providers for API tools are called directly.

The tool does not collect telemetry.

Community

If you have a question, or want to help others, you're always welcome in our community.

Donations

If you enjoy using Code Web Chat, buying a $3 coffee is a great way to show your support for the project.

BTC: bc1qfzajl0fc4347knr6n5hhuk52ufr4sau04su5te

ETH: 0x532eA8CA70aBfbA6bfE35e6B3b7b301b175Cf86D

XMR: 84whVjApZJtSeRb2eEbZ1pJ7yuBoGoWHGA4JuiFvdXVBXnaRYyQ3S4kTEuzgKjpxyr3nxn1XHt9yWTRqZ3XGfY35L4yDm6R

Contributing

All contributions are welcome. Feel free to submit pull requests, feature requests and bug reports.


Copyright © 2025 Robert Piosik
E-mail: robertpiosik@gmail.com
Telegram: @robertpiosik

Sponsor this project

Contributors 8