Darren Zheng41 downloadsArchive LLM texts as scrollable, format-safe cards.
English · 中文
Paste AI conversations into Obsidian as a scrollable, format-safe card.
We're entering a phase where more of what we want to keep is conversations with AI — a Q&A, a brainstorm, a debugging session. These conversations are themselves worth saving, the way we used to save articles, web pages, book notes.
But pasting them straight into Obsidian breaks immediately:
## heading inside the reply becomes a level-2 heading in your note, its lists merge into your lists, its ``` fences can even cut off your other blocks. Paste a few conversations and the whole note's hierarchy is scrambled — you can no longer tell what's your note and what's the AI's answer.LLM Content Block gives AI conversations their own container, fixing all three:
In one line: make AI-generated content a self-contained, collectible, format-safe block in Obsidian — like a callout is a container for emphasis, this is a container for AI conversations.
Write a fenced code block with language aicard and paste the conversation:
```aicard
source: Claude
You: What's the difference between RSC and SSR?
Claude: The essence is **where it renders and when it hydrates**… (markdown, code, LaTeX all fine)
```
source: (optional): the model — click the pill at the card's top-right to switch or type any name (presets: GPT / Gemini / Claude / DeepSeek / Qwen / ERNIE / Kimi / Doubao / Gemma / GLM / Grok / Llama, plus custom).Role: split into left/right bubbles: me/you/user → right, Claude/GPT/AI/assistant → left; other roles get a neutral bubble.$...$ / $$...$$), callouts, wiki links.If the conversation itself contains ``` code blocks, use **4 backticks**
````aicardfor the outer fence to avoid truncation. There's also a command Insert AI chat block: with text selected → wrap it into a card; no selection → insert a skeleton. Bind a hotkey in Settings → Hotkeys.
Reading view renders perfectly. In Live Preview, very long blocks may need scrolling near the block's end to trigger rendering — for archived content, read in Reading view for the best experience.
npm install
npm run build # type-check + bundle
npm run build:deploy # bundle + deploy to vault
npm run dev # watch
The deploy target is set via env var or a local file (the repo itself contains no personal path):
export OBSIDIAN_VAULT=/path/to/your/vault # option 1
echo /path/to/your/vault > .deploy-vault # option 2 (.deploy-vault is gitignored)
MIT License — see LICENSE.
English · 中文
把和 AI 的对话装进 Obsidian 里一张可滚动、不破坏格式的卡片。
我们正进入这样一个阶段:日常获取、并想收藏下来的内容,越来越多是和 AI 的对话——一次问答、一段头脑风暴、一个解题或写代码的过程。这些对话本身就是值得保存的知识,就像从前收藏文章、网页、书摘。
但把它们直接粘进 Obsidian,会立刻出问题:
## 标题 变成笔记的二级标题,AI 的列表嵌进笔记的列表,AI 的 ``` 代码块还可能截断笔记的其它围栏。粘几段对话,整篇笔记的层级和格式就全乱了,再也分不清"哪段是我的笔记、哪段是 AI 的回答"。LLM Content Block 给 AI 对话一个独立容器,一次解决这三点:
一句话:让 AI 生成的内容,成为 Obsidian 里一个自包含、可收藏、不破坏格式的块——就像 callout 是"强调"的容器,它是"AI 对话"的容器。
写一个 fenced code block,语言填 aicard,把对话粘进去:
```aicard
source: Claude
你: RSC 和 SSR 什么区别?
Claude: 本质区别在于**在哪里渲染、何时 hydrate**……(可含 markdown、代码块、LaTeX)
```
source:(可选):来源模型,点击卡片右上角胶囊可切换或直接输入(预置 GPT / Gemini / Claude / DeepSeek / Qwen / ERNIE / Kimi / Doubao / Gemma / GLM / Grok / Llama,也可自定义)。角色: 开头的行分成左右气泡:我/你/user 靠右,Claude/GPT/AI/助手 靠左;其它角色走中性气泡。$...$ / $$...$$)、callout、wiki link 等。对话里如果自带 ``` 代码块,外层围栏用 **4 个反引号**
````aicard防止截断。 也可以用命令「插入 AI 对话块」:选中已有文本→包成卡片;没选中→插入骨架。在设置→快捷键里给它绑个键。
阅读视图完美渲染。Live Preview 下超长对话可能需要滚到块尾附近才触发渲染——归档后主要在阅读视图查看,体验最佳。
npm install
npm run build # 类型检查 + 打包
npm run build:deploy # 打包 + 部署到 vault
npm run dev # 监听打包
部署目标通过环境变量或本地文件指定(仓库本身不含任何个人路径):
export OBSIDIAN_VAULT=/path/to/your/vault # 方式一
echo /path/to/your/vault > .deploy-vault # 方式二(.deploy-vault 已 gitignore)
MIT License,详见 LICENSE。