From 6b079f0a095ed402ab3c6f8f9b601e1cc42713ee Mon Sep 17 00:00:00 2001 From: DoodleBear Date: Fri, 9 Oct 2026 14:35:00 +0900 Subject: [PATCH] Stop committing generated guide pages so they cannot drift sync-docs generates the Share a Bot and Update DeepSeekBot guide pages from docs/*.md, but unlike every other generated guide they were committed. #1224 changed the Share a Bot sources without regenerating them, so the committed pair went stale, and the in-place astro build in changelog-public-surfaces.test.ts rewrote them on every full test run. Untrack and ignore the four outputs, and fail a test whenever any sync-docs page output is tracked. Issue: #1255 Agent-Task: claude/local/docs-generated-drift Co-Authored-By: Claude Opus 5.5 --- .gitignore | 4 + .../src/content/docs-zh/docs/share-bot.mdx | 101 ------------------ .../docs-zh/docs/update-deepseekbot.mdx | 72 ------------- apps/docs/src/content/docs/docs/share-bot.mdx | 101 ------------------ .../content/docs/docs/update-deepseekbot.mdx | 72 ------------- .../test/generated-pages-untracked.test.ts | 26 +++++ 6 files changed, 30 insertions(+), 346 deletions(-) delete mode 100644 apps/docs/src/content/docs-zh/docs/share-bot.mdx delete mode 100644 apps/docs/src/content/docs-zh/docs/update-deepseekbot.mdx delete mode 100644 apps/docs/src/content/docs/docs/share-bot.mdx delete mode 100644 apps/docs/src/content/docs/docs/update-deepseekbot.mdx create mode 100644 apps/docs/test/generated-pages-untracked.test.ts diff --git a/.gitignore b/.gitignore index 6ea71cadac..7a3bd57a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,10 @@ apps/docs/src/content/docs/docs/soul-and-core-memory.mdx apps/docs/src/content/docs-zh/docs/soul-and-core-memory.mdx apps/docs/src/content/docs/docs/bot-zip.mdx apps/docs/src/content/docs-zh/docs/bot-zip.mdx +apps/docs/src/content/docs/docs/share-bot.mdx +apps/docs/src/content/docs-zh/docs/share-bot.mdx +apps/docs/src/content/docs/docs/update-deepseekbot.mdx +apps/docs/src/content/docs-zh/docs/update-deepseekbot.mdx # Generated Channel sidebar guide chapter /apps/docs/src/content/docs/docs/channel-sidebar/ diff --git a/apps/docs/src/content/docs-zh/docs/share-bot.mdx b/apps/docs/src/content/docs-zh/docs/share-bot.mdx deleted file mode 100644 index 6792e6e32b..0000000000 --- a/apps/docs/src/content/docs-zh/docs/share-bot.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "分享 Bot 到 Bot 市场" -description: "把 Bot 的 Memory 发布到 GitHub,并收录进 Bot 市场。" -sidebar: - order: 26 ---- - -分享 Bot,就是把它的 Memory Repository 发布成一个公开的 GitHub 仓库。别人在 Bot 市场里找到它、点 **安装**,会克隆这个仓库,得到一个带同样记忆的新 Bot。你的 Bot 本身、聊天记录、工作区授权和 IM 连接都不会被分享,之后在你这边的对话也不会自动同步过去。 - -## 不想公开?直接发 zip - -如果只想把 Bot 交给认识的人,或者搬到另一台电脑,不需要发布到 GitHub:在 Bot 资料页右上角点 **分享** 导出 zip,对方用 **从 zip 导入** 就能得到一个新的 Bot。见[导出与导入 Bot](/zh/docs/bot-zip)。 - -## 发布前:检查会公开的内容 - -公开仓库任何人都能看到,包括 Git 历史里已经删掉的文件。Memory 里可能有你告诉 Bot 的个人信息、密钥或私人对话的摘要,发布前先看一遍: - -1. 打开 **Bot 私聊 → Channel sidebar → 记忆文件**,逐个打开文件查看。 -2. 打开 **记忆演化**,看历史提交里是否出现过不该公开的内容。 - -![记忆文件里能看到将要公开的全部文件,包括 .botharness/bot.json](/guides/share-bot/01-memory-files-zh.webp) - -如果历史里出现过敏感内容,只删除文件不够。下面的提示词里写了处理办法:只推送一个不带历史的新提交。 - -## 方式一:让 Bot 自己发布(推荐) - -前提:运行 DeepSeekBot 的电脑(Host)装了 [GitHub CLI](https://cli.github.com/),并已经运行过 `gh auth login`。Bot 执行命令前会请你审批,每一步你都能看到。 - -复制下面这段,在要分享的 Bot 的私聊里发给它: - -```text -请把你的 Memory 仓库分享到 BotHarness 的 Bot 市场,按下面的步骤做,每一步做完告诉我结果: - -1. 列出 Memory 里的所有文件,并检查文件内容和 Git 历史里有没有密码、token、私人信息或我不想公开的内容。把发现的问题列给我,等我确认后再继续,确认前不要推送任何东西。 -2. 如果还没有 README.md,写一份简短的介绍:你是谁、擅长什么、适合怎么用。 -3. 确认 .botharness/bot.json 存在(DeepSeekBot 通常已经自动生成)。没有就创建,写上你的名称、1 到 3 个标签和一句话简介,格式是 {"name": "名称", "tags": ["标签"], "bio": "一句话简介"};已经有了就保持不变。 -4. 用 gh 在我的 GitHub 账号下创建一个公开仓库并推送当前分支。仓库名用你的名称的英文或拼音,先告诉我你打算用的名字。如果第 1 步发现历史里有不该公开的内容,就只推送一个不带历史的新提交。 -5. 给仓库加上 botharness-bot 话题:gh repo edit --add-topic botharness-bot -6. 把仓库地址发给我。 -``` - -![把提示词发给要分享的 Bot](/guides/share-bot/02-prompt-zh.webp) - -Bot 会先列出检查结果并等你确认。确认后它会创建仓库、推送并加上话题,最后把地址发给你。 - -## 方式二:自己用命令发布 - -在 **设置 → 工作区授权** 里找到这个 Bot 的 Memory Repository 路径,然后在终端执行(把 `<路径>` 和 `<仓库名>` 换成你自己的): - -```bash -cd <路径> -gh repo create <仓库名> --public --source . --push -gh repo edit --add-topic botharness-bot -``` - -也可以在 GitHub 网页上新建一个空的公开仓库,用 `git remote add origin` 和 `git push -u origin HEAD` 推送,然后在仓库首页右侧的 **About → Topics** 里加上 `botharness-bot`。 - -## 让它出现在 Bot 市场 - -收录需要仓库是公开的,并且带有 `botharness-bot` 话题。满足条件的仓库每天会被自动收录一次;想马上出现,点 DeepSeekBot 侧栏消息列表上方的 **+(新建)→ Bot 市场**,在顶部贴入仓库地址,点 **收录**: - -![在 Bot 市场贴入仓库地址,立即收录](/guides/share-bot/03-market-paste-zh.webp) - -收录后,它会出现在 DeepSeekBot 的 Bot 市场和 [官网 Bot 市场](https://deepseekbot.botharness.ai/market) 里,显示 README、Star 数、更新时间和话题。之后你每次推送,市场会在一小时内更新到最新提交。 - -![收录后在官网 Bot 市场看到的样子](/guides/share-bot/04-site-market-zh.webp) - -收录失败时,Bot 市场会说明原因: - -| 提示 | 下一步 | -| --------------------------------- | ---------------------------------------------------------- | -| 找不到这个仓库 / 这个仓库是私有的 | 确认地址正确,并在 GitHub 把仓库设为 Public。 | -| 缺少 botharness-bot 话题 | 在仓库首页 **About → Topics** 加上 `botharness-bot` 再试。 | -| 这个仓库刚刚收录过 | 同一个仓库 5 分钟内只抓取一次,稍后再试。 | -| 这个仓库已被屏蔽或因举报隐藏 | 可以在 GitHub 上给 BotHarness 开 Issue 联系我们。 | - -## 设置名称、标签、简介和头像:`.botharness/bot.json` - -DeepSeekBot 会自动在每个 Bot 的 Memory 里生成 `.botharness/bot.json`,并保持更新:创建 Bot 时写入,之后每次在 **编辑资料** 里改名称、标签、简介,或者改头像,都会同步。之前创建的 Bot 会在 DeepSeekBot 下次启动时补上这个文件。市场和安装后的 Bot 都读它,所以显示的名称、标签、简介和头像和你侧栏里的一致。上传的头像图片会存为旁边的 `.botharness/avatar.png`(或 `.jpg`、`.webp`)。 - -也可以手动编辑这个文件。你加的其他字段会保留;手动改的内容会一直保留,直到你下次在 DeepSeekBot 里改名称、标签、简介或头像: - -```json -{ - "name": "BotPixel 像素画师", - "tags": ["像素画", "头像设计"], - "bio": "把一句话描述画成像素头像。", - "avatar": { "image": "assets/avatar.png" } -} -``` - -| 字段 | 说明 | -| -------- | --------------------------------------------------------------------------------------------------------------- | -| `name` | 在市场里显示的名称,最多 60 个字。 | -| `tags` | 标签,最多 8 个,每个不超过 32 个字。旧文件里的 `roles` 仍会当作标签读取。 | -| `bio` | 一句话简介,最多 160 个字。没有时市场显示 GitHub 仓库的描述。 | -| `avatar` | 头像:`{ "image": "仓库里的图片路径" }`,PNG、JPEG 或 WebP,最大 128 KiB;或者 `{ "recipe": … }` 像素头像配方。 | - -所有字段都可以省略。文件格式不对时整个文件会被忽略,市场改用仓库名和自动生成的像素头像。 - -相关:[记忆文件](/zh/docs/channel-sidebar/memory-files)、[记忆演化](/zh/docs/channel-sidebar/memory-evolution)。 diff --git a/apps/docs/src/content/docs-zh/docs/update-deepseekbot.mdx b/apps/docs/src/content/docs-zh/docs/update-deepseekbot.mdx deleted file mode 100644 index 25420fda96..0000000000 --- a/apps/docs/src/content/docs-zh/docs/update-deepseekbot.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "更新 DeepSeekBot" -description: "在 Bot 设置里安装新版本 DeepSeekBot,并重启 DSH。" -sidebar: - order: 27 ---- - -DeepSeekBot 会在 **设置 → Bot 设置 → DeepSeekBot 版本** 里显示当前版本,并检查 npm 上有没有新版本。有新版本时,可以直接在这里安装,再一键重启 DSH,不需要打开终端。 - -> 一键更新和一键重启从 DeepSeekBot 1.0.2 之后的版本开始提供。还在用 1.0.2 或更早版本时,先按下面的「手动更新」升级一次,以后就可以在设置里完成。 - -## 查看版本 - -打开 **设置 → Bot 设置**,滚动到 **DeepSeekBot 版本**。这里会显示正在运行的版本;点击 **检查更新** 会重新查询 npm,点击 **更新日志** 会打开官网的[更新日志](https://deepseekbot.botharness.ai/changelog/)。 - -![Bot 设置里的 DeepSeekBot 版本](/guides/update/01-settings-zh.webp) - -## 一键更新 - -1. 有新版本时会出现 **可以更新到 x.y.z** 卡片。想先看改了什么,点 **查看新版本内容**。 -2. 点 **立即更新**。DeepSeekBot 会通过 DSH 的插件管理下载并安装新版本,期间不要关闭 DSH。安装完成后页面可能会自动刷新一次,这是正常的。 - -![可以更新时的卡片和「立即更新」按钮](/guides/update/02-update-now-zh.webp) - -3. 安装好后,卡片会变成 **已更新到 x.y.z,重启 DSH 后生效**。新版本要等 DSH 重启后才会加载,在这之前运行的仍是旧版本。 - -## 重启 DSH - -### Web(dsh web) - -点 **立即重启**。DSH 会停止当前进程,并在同一个终端里用同样的参数重新启动,页面几秒后会自动刷新并重新连接,不需要重新登录。 - -![安装完成后的「立即重启」按钮](/guides/update/03-restart-now-zh.webp) - -![重启过程中,页面会自动重新连接](/guides/update/04-restarting-zh.webp) - -- 重启会中断正在运行的任务和会话,最好在没有 Bot 正在工作时再点。 -- 重启后终端里会再打印一个新的登录链接;已经打开的页面不用理会它。 -- 停止 DSH 的方式不变:在运行 `dsh web` 的终端按 Ctrl+C。 - -### DSH Desktop - -桌面版里没有 **立即重启** 按钮。请完全退出 DSH Desktop(macOS 上按 ⌘Q;只关闭窗口可能不会退出),再重新打开。 - -### 确认更新成功 - -重启后回到 **Bot 设置**,版本一行会显示 **当前版本 x.y.z,已是最新版本**。进入 Bot 模式时,还会弹出这次更新的内容。 - -![重启后显示已是最新版本](/guides/update/05-current-zh.webp) - -## 手动更新 - -没有 **立即更新** 按钮,或者一键更新失败时,可以在运行 DSH 的电脑上用终端更新: - -```bash -dsh plugin --profile web add deepseekbot@<版本号> -``` - -把 `<版本号>` 换成要安装的版本,例如 `deepseekbot@1.0.3`;设置页的卡片里会给出可以直接复制的完整命令。命令完成后重启 DSH:Web 版在终端按 Ctrl+C,再用原来的命令运行一次 `dsh web`(保留启动时带的参数,例如 `--port`);桌面版完全退出后重新打开。 - -DSH 自带的插件页目前不能升级已经安装的插件。桌面版需要手动更新时,同样用上面的命令,把 `web` 换成桌面版使用的 Profile 名,也就是 DSH 数据目录(默认 `~/.dsh`)下 `profiles/` 里的文件夹名。 - -## 常见问题 - -| 提示 | 处理方式 | -| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| 无法从 npm 下载新版本 | 检查网络后重试。DeepSeekBot 会先试 npm 官方源,失败后自动换 npmmirror。仍然失败时用手动更新。 | -| 新版本与当前 DSH 版本不兼容 | 先升级 DSH,再更新 DeepSeekBot。 | -| 安装需要批准依赖的构建脚本 | 到 DSH 的插件页批准,或用手动更新。 | -| 更新失败 | 卡片里会显示错误信息和完整日志的路径。把日志发给我们排查前,请先检查并删除其中的 API Key、Token 等敏感信息;同时可以先用手动更新。 | -| 没能自动重启 | 按卡片里的说明手动重启:在终端按 Ctrl+C,再用原来的命令和参数运行一次 `dsh web`。 | -| 重启后页面一直没有恢复 | 手动刷新页面。如果提示需要登录,打开终端里最新打印的登录链接。 | diff --git a/apps/docs/src/content/docs/docs/share-bot.mdx b/apps/docs/src/content/docs/docs/share-bot.mdx deleted file mode 100644 index b70e2d388d..0000000000 --- a/apps/docs/src/content/docs/docs/share-bot.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "Share a Bot to the Bot Marketplace" -description: "Publish a Bot’s Memory to GitHub and list it in the Bot Marketplace." -sidebar: - order: 26 ---- - -Sharing a Bot publishes its Memory Repository as a public GitHub repository. When someone finds it in the Bot Marketplace and clicks **Install**, the repository is cloned into a new Bot with the same memory. Your Bot itself, its chats, Workspace grants and IM connections are not shared, and later conversations on your side are not synced to installed copies. - -## Not ready to go public? Send a zip - -To hand a Bot to someone you know, or move it to another computer, you don't need GitHub: export a zip with **Share** at the top right of the Bot profile, and the other person uses **Import from zip** to get a new Bot. See [Export and import a Bot](/docs/bot-zip). - -## Before publishing: check what becomes public - -Anyone can read a public repository, including files deleted earlier in its Git history. Memory may hold personal details you told the Bot, keys, or summaries of private conversations. Look through it first: - -1. Open **Bot DM → Channel sidebar → Memory files** and open each file. -2. Open **Memory evolution** and check the commit history for anything that should stay private. - -![Memory files shows every file that will become public, including .botharness/bot.json](/guides/share-bot/01-memory-files-zh.webp) - -Deleting a file is not enough if sensitive content appears in the history. The prompt below handles that by pushing a single new commit without history. - -## Option 1: let the Bot publish itself (recommended) - -The computer running DeepSeekBot (the Host) needs the [GitHub CLI](https://cli.github.com/), signed in with `gh auth login`. The Bot asks for your approval before each command, so you see every step. - -Copy this and send it in the DM of the Bot you want to share: - -```text -Please share your Memory repository to the BotHarness Bot Marketplace. Follow these steps and tell me the result after each one: - -1. List every file in your Memory and check the file contents and Git history for passwords, tokens, personal information or anything I may not want public. List what you find and wait for my confirmation before going on. Do not push anything before I confirm. -2. If there is no README.md, write a short one: who you are, what you are good at, and how to use you. -3. Check that .botharness/bot.json exists (DeepSeekBot normally creates it). If it is missing, create it with your name, 1 to 3 tags and a one-sentence bio, as {"name": "Name", "tags": ["Tag"], "bio": "One sentence"}; if it exists, leave it as is. -4. Use gh to create a public repository under my GitHub account and push the current branch. Name it after you in English, and tell me the name before creating it. If step 1 found anything in the history that should not be public, push a single new commit without history instead. -5. Add the botharness-bot topic: gh repo edit --add-topic botharness-bot -6. Send me the repository URL. -``` - -![Sending the prompt to the Bot you want to share](/guides/share-bot/02-prompt-zh.webp) - -The Bot lists what it found and waits for you. After you confirm, it creates the repository, pushes, adds the topic and sends you the URL. - -## Option 2: publish it yourself - -Find the Bot's Memory Repository path under **Settings → Workspace grants**, then run (replace `` and ``): - -```bash -cd -gh repo create --public --source . --push -gh repo edit --add-topic botharness-bot -``` - -You can also create an empty public repository on GitHub, push with `git remote add origin` and `git push -u origin HEAD`, and add `botharness-bot` under **About → Topics** on the repository page. - -## Get it into the Bot Marketplace - -A repository is listed when it is public and has the `botharness-bot` topic. Matching repositories are picked up once a day. To list it right away, click **+ (New) → Bot Marketplace** above the message list in the DeepSeekBot sidebar, paste the repository URL at the top and click **List**: - -![Paste the repository URL in the Bot Marketplace to list it now](/guides/share-bot/03-market-paste-zh.webp) - -Once listed, it appears in the DeepSeekBot Bot Marketplace and on the [Bot Marketplace website](https://deepseekbot.botharness.ai/en/market) with its README, stars, update date and topics. After each push, the Marketplace moves to the latest commit within an hour. - -![The listed Bot on the Bot Marketplace website](/guides/share-bot/04-site-market-zh.webp) - -When listing fails, the Bot Marketplace says why: - -| Message | Next step | -| -------------------------------------------------- | ------------------------------------------------------------------ | -| Repository not found / repository is private | Check the URL and make the repository Public on GitHub. | -| Missing the botharness-bot topic | Add `botharness-bot` under **About → Topics** and retry. | -| This repository was just listed | One repository is fetched at most once per 5 minutes; retry later. | -| This repository is blocked or hidden after reports | Open an Issue on the BotHarness repository to contact us. | - -## Name, tags, bio and avatar: `.botharness/bot.json` - -DeepSeekBot writes `.botharness/bot.json` into every Bot's Memory and keeps it up to date: when you create a Bot, and each time you change its name, tags, bio or avatar in **Edit profile**. Bots created before this get the file the next time DeepSeekBot starts. The Marketplace and the installed Bot read it, so they show the same name, tags, bio and avatar as your sidebar. An uploaded avatar image is saved next to it as `.botharness/avatar.png` (or `.jpg`, `.webp`). - -You can also edit the file by hand. DeepSeekBot keeps any other keys you add, and keeps your edits until you next change the name, tags, bio or avatar in DeepSeekBot: - -```json -{ - "name": "BotPixel", - "tags": ["Pixel art", "Avatar design"], - "bio": "Turns a one-line description into a pixel avatar.", - "avatar": { "image": "assets/avatar.png" } -} -``` - -| Field | Meaning | -| -------- | ------------------------------------------------------------------------------------------------------------------ | -| `name` | Name shown in the Marketplace, up to 60 characters. | -| `tags` | Tags, up to 8, each up to 32 characters. Older files that use `roles` are still read as tags. | -| `bio` | A short introduction, up to 160 characters. Without it the Marketplace shows the GitHub repository description. | -| `avatar` | `{ "image": "path in the repository" }` (PNG, JPEG or WebP, at most 128 KiB), or a pixel avatar `{ "recipe": … }`. | - -Every field is optional. An invalid file is ignored as a whole, and the Marketplace falls back to the repository name and a generated pixel avatar. - -Related: [Memory files](/docs/channel-sidebar/memory-files), [Memory evolution](/docs/channel-sidebar/memory-evolution). diff --git a/apps/docs/src/content/docs/docs/update-deepseekbot.mdx b/apps/docs/src/content/docs/docs/update-deepseekbot.mdx deleted file mode 100644 index 9dae138b6f..0000000000 --- a/apps/docs/src/content/docs/docs/update-deepseekbot.mdx +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: "Update DeepSeekBot" -description: "Install a new DeepSeekBot release from Bot settings and restart DSH." -sidebar: - order: 27 ---- - -**Settings → Bot settings → DeepSeekBot version** shows the version you are running and checks npm for a newer one. When an update is out, you can install it there and restart DSH with one click, without opening a terminal. - -> One-click update and restart ship in the releases after DeepSeekBot 1.0.2. If you are on 1.0.2 or earlier, update once by hand as described under "Update by hand" below; after that, Settings does it for you. - -## Check your version - -Open **Settings → Bot settings** and scroll to **DeepSeekBot version**. It shows the running version. **Check for updates** queries npm again, and **Changelog** opens the [changelog](https://deepseekbot.botharness.ai/en/changelog/) on the website. - -![DeepSeekBot version in Bot settings](/guides/update/01-settings-zh.webp) - -## Update in one click - -1. When a new version is out, an **Update to x.y.z** card appears. Click **See what's new** to read the changes first. -2. Click **Update now**. DeepSeekBot downloads and installs the new version through the DSH Plugin Manager; keep DSH running meanwhile. The page may reload once when the install finishes. That is expected. - -![The update card with Update now](/guides/update/02-update-now-zh.webp) - -3. When the install is done, the card reads **Updated to x.y.z. Restart DSH to finish**. DSH keeps running the old version until it restarts. - -## Restart DSH - -### Web (dsh web) - -Click **Restart now**. DSH stops and starts again in the same terminal with the same options. The page reloads and reconnects a few seconds later; you stay signed in. - -![Restart now after the install](/guides/update/03-restart-now-zh.webp) - -![The page reconnects on its own while DSH restarts](/guides/update/04-restarting-zh.webp) - -- Restarting stops running tasks and sessions, so restart when no Bot is busy. -- After the restart the terminal prints a new sign-in link. Pages you already have open do not need it. -- You still stop DSH with Ctrl+C in the terminal running `dsh web`. - -### DSH Desktop - -The desktop app has no **Restart now** button. Quit DSH Desktop completely (⌘Q on macOS; closing the window may leave it running), then open it again. - -### Confirm the update - -After the restart, go back to **Bot settings**. The version row reads **Version x.y.z, up to date**, and Bot mode shows what is new in this release. - -![Up to date after the restart](/guides/update/05-current-zh.webp) - -## Update by hand - -If there is no **Update now** button, or the one-click update fails, run this in a terminal on the computer that runs DSH: - -```bash -dsh plugin --profile web add deepseekbot@ -``` - -Replace `` with the version to install, for example `deepseekbot@1.0.3`. The update card in Settings shows the full command ready to copy. Then restart DSH: for the web app, press Ctrl+C in its terminal and run the same `dsh web` command again, keeping any options you started it with, such as `--port`; for the desktop app, quit it completely and open it again. - -The DSH Plugins page cannot upgrade an installed plugin yet. To update the desktop app by hand, use the same command with `web` replaced by the desktop profile name: the folder name under `profiles/` in the DSH data directory (`~/.dsh` by default). - -## Troubleshooting - -| Message | What to do | -| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Could not download the new version from npm | Check your network and retry. DeepSeekBot tries the npm registry first and falls back to npmmirror. If it still fails, update by hand. | -| The new version does not support this DSH version | Update DSH first, then DeepSeekBot. | -| The install needs dependency build scripts approved | Approve them on the DSH Plugins page, or update by hand. | -| The update failed | The card shows the error and the path to the full log. Before you send us the log, check it for API keys, tokens or other secrets and remove them. Update by hand meanwhile. | -| DSH could not restart itself | Restart by hand as the card shows: Ctrl+C in the terminal, then run the same `dsh web` command again with its original options. | -| The page does not come back after a restart | Reload the page. If it asks you to sign in, open the newest sign-in link in the terminal. | diff --git a/apps/docs/test/generated-pages-untracked.test.ts b/apps/docs/test/generated-pages-untracked.test.ts new file mode 100644 index 0000000000..eac0d4d3f9 --- /dev/null +++ b/apps/docs/test/generated-pages-untracked.test.ts @@ -0,0 +1,26 @@ +import { execFileSync } from "node:child_process"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +import { describe, expect, it } from "vitest"; + +import { PAGES } from "../../../scripts/sync-docs.mjs"; + +const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "../../.."); + +describe("generated guide pages", () => { + it("are never committed", () => { + const outputs = PAGES.flatMap((page) => [ + `apps/docs/src/content/docs/${page.slug}.mdx`, + `apps/docs/src/content/docs-zh/${page.slug}.mdx`, + ]); + const tracked = execFileSync("git", ["ls-files", "--", ...outputs], { + cwd: ROOT, + encoding: "utf8", + }) + .split("\n") + .filter(Boolean); + + expect(tracked).toEqual([]); + }); +});