const fs = require('fs') const p = 'C:/Users/ASUS/Documents/deepseek-harness/default-workspace/desktop-pet/README.md' let text = fs.readFileSync(p, 'utf8') const section = `## 平台支持 | 平台 | 状态 | 仓库 | |---|---|---| | Windows 10/11 | 官方版本,本仓库 | 就是这里 | | Linux(X11 / Wayland) | 社区移植版(XWayland + KDE 全局光标桥接 + 安装脚本) | [git.hinomori-minori.com/deepseek/SodiumPet](https://git.hinomori-minori.com/deepseek/SodiumPet) | > **Linux 版说明**:由社区基于本仓库移植,新增 Linux 桌面支持——默认通过 XWayland 保留透明置顶 / 拖拽 / 鼠标穿透,KDE Plasma 下用 KWin 脚本桥接全局光标,附 \`scripts/linux/install.sh\` 一键安装与自启动。本仓库保持 Windows 官方版本;Linux 相关问题请到该移植仓库提 issue。 > > 欢迎把自己的移植 / 分支告诉我,我会加进这张表(请注明基于的 commit 与许可)。 ` if (!text.includes('## 平台支持')) { const idx = text.indexOf('## 功能一览') if (idx < 0) { console.error('anchor not found') process.exit(1) } text = text.slice(0, idx) + section + text.slice(idx) fs.writeFileSync(p, text, 'utf8') console.log('platform section added') } else { console.log('already present') }