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

No-cost AI coding in free chatbots for VS Code, Cursor and Windsurf.

🌐 Initializes web chats—ChatGPT, Claude, Gemini, DeepSeek, and more
🪄 Applies responses—multi-file changes integration with confidence
🔋 Batteries included—code completions, checkpoints, and more
🥊 Beats agents—accurate and fast edits without tool calling
🫶 Open-source—released under the GPL-3.0 license

Walkthrough

✍️ Guiding principles

  • Don't scrape chat responses
  • Operate 100% locally
  • Respect user privacy
  • Stay free forever

🤌 CWC is non-agentic, but why?

Large language models (LLMs) are trained on vast datasets targeting many use cases. For code generation, a model's training involves analyzing millions of simulated problem-solving flows, such as arriving at an accepted answer from a StackOverflow question. For the purpose of agentic coding, models are trained on an additional layer of data that simulates gathering context and planning next steps.

Because the model is only as smart as examples it has seen in its pre-training, the possible coverage of real-world coding scenarios when approached at a high level is fundamentally limited.

Therefore, CWC is designed to align with LLMs' true capabilities—that is, code generation in a controlled signal-to-noise ratio environment. Controlled by you, the engineer.

💅 The workflow

Select folders and files for context, enter prompt, pick edit format and send message via...

  • new chat—to continue in the connected browser
  • API call—to use a model provider of choice

Constructed message consists of the user's prompt, edit format instructions, and the selected context, as shown in the example:

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>

Note

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

Once the response is generated, a built-in parser extracts code blocks with suggested edits for one-click multi-file changes integration.

Chatbot initialization

Install the open-source Connector in your browser and never copy & paste again.

Supported chatbots (A-Z)

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

Note

All web page interactions of submitting the message are handled by the content script.

Tip

With the browser extension you can include markdown-parsed websites in context! Go to target website, click the extension's icon in the browser's toolbar and click Enable for context. The website will appear in the context panel immediately, ready for selection like any other folder or file in the workspace.

Important

Legal disclaimer: The placed Apply response button is not a means of automatic output extraction, it's an alias for the original copy to clipboard button. The extension's sole purpose of chat initialization is complete once the first message is submitted.

API Tools

Anything CWC can do in chatbots, it can do calling model providers directly from the editor.

Tip

Get started with generous free tiers from Google, Mistral or Cerebras.

🛠️ 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
Handle the compact "truncated" edit format and malformed diffs.

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

Commands

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.

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: Undo Last Changes - Revert applied edits.

Checkpoints

  • Code Web Chat: Checkpoints - Restore the overall workspace state to the saved checkpoint.
  • Code Web Chat: Create New Checkpoint - Save the current state of the workspace.

Context

  • Code Web Chat: Save Current Context - Save the currently checked files as a named context for easy reuse.
  • Code Web Chat: Apply Context - Apply a saved context to either replace or merge with the currently checked files.

Enterprise security

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

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: [email protected]
Telegram: @robertpiosik

Sponsor this project

Contributors 8