---
id: 18276
lang: en
title: "FS-XML: How a Browser AI Chat Edits Your Project Code in One Click, With No Token Bills"
published_at: "2026-11-26 04:26:45"
source_name: "Хабр: Машинное обучение"
source_url: "https://habr.com/ru/articles/1112488/?utm_campaign=1112488&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18276"
categories: ["llm", "autonomous"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# FS-XML: How a Browser AI Chat Edits Your Project Code in One Click, With No Token Bills

> **Краткая суть (BLUF):** FS-XML is a local app that teaches an ordinary browser chat with Gemini or Claude to edit your project. It bundles your files into a single dump and applies the XML patches from the model's reply ("find this block, replace it with this one") to your code in one click. Tokens are not counted on the free chat tiers, and file permissions and rollback stay in your hands. The author claims development sped up several times over. The approach of targeted replacement plus checking every step can be adopted even without the app.  - File permissions: Writable, Read-Only, or Unmarked (the model does not know about them) - Shell and bash do not run: you run tests in your own IDE - Rollback checks the file against the disk and warns about manual edits

You ask a chat with Gemini or Claude to fix a couple of lines, and it sends back the entire file, muddles neighboring modules, and invents functions. Autonomous agents such as Cursor address this pain, but they burn through tokens and require moving to a different IDE. A developer proposed a third path and called it FS-XML. It is a local desktop app: it bundles the project's files into one text dump for a browser chat, and it applies the model's reply, written as XML patches ("in this file, find this block and replace it with that one"), to the code in one click, so there is no manual copying into an editor. The free chat tiers do not charge by tokens, which is where "free" in the headline comes from: you do not have to pay for an API.

Most developers have long worked in browser chats: Gemini in Google AI Studio, Claude, ChatGPT, DeepSeek, Qwen. Their context windows are huge, and their limits are often free or counted per message. The downside is that the chat cannot see your disk. IDE agents such as Cursor, Cline, or Aider decide for themselves what to read, re-read half the repository at every step, get stuck in retry loops, and may "fix the button" by rewriting a neighboring module. On top of that, they require a fork of VS Code if you are used to PyCharm or Neovim.

The author states plainly that FS-XML is not a "Cursor killer" or a "Claude Code killer," and not an agent with bash access. It is a bridge between the chat and the disk, with a human in the middle.

## How It Works

In the project profile, you mark up the files: Writable (can be changed), Read-Only (read only), or Unmarked (the model does not know about them). The app assembles the context dump into a single file. You attach it to the chat and set the task. The model replies with XML blocks: the file path, the original fragment, and what to replace it with. Then the edits are applied in one click, you run the tests, and you move to the next step.

The author did not arrive at this format right away. At first, models returned whole files, and the context clogged up with "walls" of code. Then he switched to the scheme "original block → replacement." Errors dropped, and the dialogue acquired a natural change history: "added a button → painted it → made it round." The last step was automation: since the model already writes the path and the blocks, why transfer them into PyCharm by hand?

Why XML and not unified diff or JSON. Models are bad at counting line numbers: after the first edit in a file, the numbers for the second and third edits drift, and `git apply` rejects the patch. Here, addressing is done by content. JSON tool calls do not work in a browser chat, because there is no tool-calling runtime. The reply arrives as plain Markdown text, where JSON breaks on escaping and on quotes inside code. The `fs_` tag prefix almost never appears in real markup, so the parser does not get confused by HTML, Vue, or JSX.

## Money and Control

If you work within the free limits of Google AI Studio, DeepSeek, Qwen, or ChatGPT Free, or with a local model, you pay nothing for tokens at all. For local models, trimming the context matters: a compact model hallucinates less when it gets three relevant files instead of the whole repository. If you already have a $20-a-month subscription, the web chat counts messages, not every re-read megabyte of code. In Cursor, agentic loops quickly eat through the quota or lead to extra charges.

Control is built through module isolation. A finished and tested module is locked with Read-Only permissions, and the model is given only the file with its exports. It cannot see the internal implementation and cannot break it. If the model goes off track, you notice after one step, not after 25 iterations and a million tokens.

## What's Inside

The stack: a Python core, a local FastAPI server with SQLite in WAL mode, a Vue 3, TypeScript, and TailwindCSS interface inside a PyWebView window, plus a native Windows launcher in C#. Among the engineering decisions, these are useful:

- **Parser.** It does not break if the code itself contains the string `/fs_edit`: it ignores tags inside quotes and matches pairs while accounting for nesting.
- **Patching.** There is a fallback line-by-line pass that accounts for trailing whitespace. An empty search block is rejected (otherwise the code would silently be inserted at the top of the file), and CRLF or LF line endings are preserved as in the original.
- **Sandbox.** It blocks absolute paths and paths escaping the project root, and forbids writes to Read-Only files. There is no shell execution at all; this was done deliberately.
- **Context hygiene.** A two-level `.fsignore` strips secrets and junk, and binary files are skipped.
- **Rollback.** Before rolling back, the server compares the file on disk with the snapshot in SQLite and warns about manual edits. There are snapshots along with the permission markup, and profiles can be exported to JSON.
- **Failures.** If part of a patch did not apply, clicking the error copies the failed block and the current file to the clipboard, so the model can produce a fix.

In version 2.0, the model can change permissions and the dump's composition itself through control commands, but these are disabled by default.

## Limitations

The speed figures ("several times faster," an MVP in an hour) are the author's observations; there are no independent measurements. He has used the first version for about four months, and several dozen other developers have offered feedback. The tool does not replace an agent where tests and commands need to run in a loop: you do that yourself. But for those who care about predictable bills and control over every change, the "human in the loop plus targeted replacements" approach can be adopted even without the app. The "old block → new block" format and discipline around file permissions are enough.

---
- **Первоисточник:** [Хабр: Машинное обучение](https://habr.com/ru/articles/1112488/?utm_campaign=1112488&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18276
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
