# How I built lossless in-place AI chat -> Obsidian sync in Chrome MV3 (zero cloud, no <all_urls>)

> Source: <https://dev.to/jackieboomboomboom/how-i-built-lossless-in-place-ai-chat-obsidian-sync-in-chrome-mv3-zero-cloud-no--b6g>
> Published: 2026-11-30 05:38:26+00:00

**Recommendation:** Before rewriting AI chat math delimiters, split Markdown by top-level, blockquote-nested, and list-nested code fences so fenced code stays byte-identical, and key synced notes by conversation_id to merge only new turns.
More in the playbook "Verifying model output": <https://wpnews.pro/playbooks/output-verification>

If you use Obsidian as a local Markdown workspace (`raw/` -> `wiki/` or alongside `obsidian-skills`), bringing web conversations from ChatGPT, Claude, Perplexity, or DeepSeek into your vault usually hits three walls:

`[[backlinks]]` (or creates `Note (1).md` duplicates).`\( ... \)` and `\[ ... \]` math delimiters mangles literal `$` or parentheses inside fenced code blocks.
Here is how I solved all three 100% locally inside the browser in **KeepThread** (`v1.4.5` live on Chrome Web Store; also on Microsoft Edge Add-ons)—using the File System Access API with **zero backend servers** and **no `<all_urls>` permission**:

`conversation_id`
Instead of overwriting `.md` files, each synced note wraps the AI transcript inside HTML comment boundaries while keeping handwritten blocks (`<!-- keepthread:notes:start/end -->` and trailing notes) plus user-added YAML keys and `#tags` intact. Even if you rename the note inside your synced folder, KeepThread locates it by `conversation_id` and merges only the new turns.

Before normalizing ChatGPT/Claude/DeepSeek math delimiters (`\[ \]` -> `$$ $$`, `\( \)` -> `$ $`) or remapping Perplexity/Gemini footnotes into `## Sources`, the parser splits Markdown by top-level, blockquote-nested, and list-nested code fences so code snippets stay 100% untouched.

*(If you just want a free, zero-install tool for fixing broken AI math delimiters & `<think>` tags in the browser, I extracted that parser into a standalone page here: [Free AI LaTeX to Obsidian Fixer](https://keepthread.jianlanzhiwei.com/tools/fix-ai-latex.html))*

On long virtualized threads, KeepThread compares turn signatures against your existing archive—flagging partial open-tab captures under **Needs Full Capture** (`v1.4.5`) instead of letting a shifted scroll window wipe earlier turns. Every `FileSystemDirectoryHandle.queryPermission()` check is also wrapped in a bounded timeout so Windows Chrome handle hangs never cause infinite spinners.

`v1.4.5` Live)
Single-thread Markdown & offline image `.zip` exports are free forever (optional $19 one-time Lifetime Pro, no subscription). Happy to answer any questions about Chrome's File System Access API or Obsidian `.base` / YAML edge cases!
