feat(desktop): embed BoosAPI Desktop client as a subproject

Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as
a monorepo subdirectory under desktop/. Source only — node_modules,
dist, Cargo target and the upstream .git history are excluded.

desktop/ keeps its own independent Cargo workspace (desktop/src-tauri
with crates/*); it is not part of the backend boosapi crate, so a
`cargo check` at the metapi root still compiles only the backend. Build
the desktop app from desktop/src-tauri per desktop/README.md.

Note: app icons are still placeholder assets pending the final BoosAPI
logo. The updater signing keys live outside the repo and are not
included.
This commit is contained in:
boos
2026-06-22 11:32:57 +08:00
parent d9c78ecc73
commit e0a5f57793
2305 changed files with 449355 additions and 0 deletions
@@ -0,0 +1,25 @@
# Add A Trusted Custom Tag
Use when you want an assistant to add `thinking`-style custom tags to Markdown.
## 中文模板
```text
请为这个仓库增加一个可信的 Markdown 自定义标签:[填写 thinking / answer-box / 其他标签名]。
使用 `customHtmlTags` + scoped `setCustomComponents`,不要直接走全局覆盖。
如果标签内部还包含 Markdown,请在自定义组件里继续渲染 `node.content`,并保持流式输出友好。
如果需要嵌套标签,请保证重复和嵌套场景都能稳定工作。
只有在 `customHtmlTags` 明显不够时,才升级到 parser hooks。
最后给出最小验证方式。
```
## English template
```text
Add a trusted custom Markdown tag to this repository: [fill in thinking / answer-box / another tag].
Use `customHtmlTags` plus scoped `setCustomComponents`, not a global override.
If the tag body contains Markdown, render `node.content` inside a nested renderer and keep the implementation streaming-friendly.
Make repeated and nested tag cases stable.
Only move to parser hooks if `customHtmlTags` is clearly insufficient.
End with the smallest useful validation step.
```
@@ -0,0 +1,23 @@
# Audit A Markstream Integration
Use when Markstream is already present but something feels off.
## 中文模板
```text
请审计这套 Markstream 接入。
重点检查:包和 peers 是否匹配、CSS 顺序是否正确、Tailwind/UnoCSS layer 是否安全、KaTeX CSS 是否缺失、Monaco / Mermaid / D2 是否在正确的客户端边界内初始化。
同时判断这里应该继续用 `content`,还是应该改成 `nodes` + `final`。
如果已经存在自定义组件覆盖,请检查是否应该改成 scoped `custom-id`。
最后给出最小修复集,而不是泛泛建议。
```
## English template
```text
Audit this Markstream integration.
Check whether the package and peers match the actual features, whether CSS order and Tailwind or UnoCSS layers are safe, whether KaTeX CSS is missing, and whether Monaco, Mermaid, or D2 are initialized behind the correct client-only boundaries.
Also decide whether this surface should stay on `content` or move to `nodes` plus `final`.
If custom overrides already exist, review whether they should be scoped with `custom-id`.
Finish with the smallest concrete fix set instead of general advice.
```
@@ -0,0 +1,27 @@
# Install Markstream
Use when you want an AI coding assistant to add Markstream to an existing repository with the smallest safe dependency set.
## 中文模板
```text
请把 Markstream 接入到这个仓库。
先识别当前框架和版本,然后选择正确的包:markstream-vue、markstream-vue2、markstream-react 或 markstream-angular。
只安装满足这些能力所需的最小 peer 依赖:[填写 Monaco / Mermaid / D2 / KaTeX / Shiki]。
结合现有 CSS 技术栈处理样式顺序:[填写 Tailwind / UnoCSS / reset / design system]。
补一个最小可运行示例,并说明这里应该用 `content` 还是 `nodes`。
如果需要做组件覆盖,请默认使用带 `custom-id` 的 scoped 方式。
最后运行最小可行验证,并汇报安装了哪些 peers、CSS 放在哪里、还有哪些人工确认点。
```
## English template
```text
Add Markstream to this repository.
Detect the current framework and version first, then choose the correct package: markstream-vue, markstream-vue2, markstream-react, or markstream-angular.
Install only the smallest peer-dependency set needed for these features: [fill in Monaco / Mermaid / D2 / KaTeX / Shiki].
Handle CSS order safely with the current stack: [fill in Tailwind / UnoCSS / reset / design system].
Add one minimal working example and explain whether this repo should use `content` or `nodes`.
If renderer overrides are needed, keep them scoped with `custom-id`.
Run the smallest useful validation step and report installed peers, CSS placement, and remaining manual checks.
```
@@ -0,0 +1,25 @@
# Migrate From react-markdown
Use when you want an assistant to audit and migrate a React codebase from `react-markdown` to `markstream-react`.
## 中文模板
```text
请把这个 React 项目从 react-markdown 迁移到 markstream-react。
先审计所有 react-markdown 用法,并区分:直接替换、带自定义渲染器、plugin-heavy、security-heavy。
先完成最安全的 renderer swap,再把 HTML tag 风格的自定义渲染迁到 node-type + scoped `setCustomComponents`。
如果存在 rehype / remark / allow-list / skipHtml / urlTransform 之类没有 1:1 对应的行为,请明确列出,不要假装完全等价。
只有在项目确实是流式输出场景时,再建议升级到 `nodes`。
最后运行最小可行验证并列出剩余 TODO。
```
## English template
```text
Migrate this React project from react-markdown to markstream-react.
Audit every react-markdown usage and classify each one as direct swap, renderer-custom, plugin-heavy, or security-heavy.
Do the safest renderer swap first, then convert HTML-tag-style custom renderers into node-type overrides with scoped `setCustomComponents`.
If the codebase depends on rehype, remark, allow-lists, skipHtml, or urlTransform behavior that has no 1:1 match, call that out explicitly instead of claiming parity.
Only recommend moving to `nodes` if the app is actually streaming content.
Run the smallest useful validation step and list remaining TODOs.
```
@@ -0,0 +1,25 @@
# Override Built-in Components
Use when you want an assistant to replace built-in Markstream renderers such as `image`, `link`, `code_block`, or `mermaid`.
## 中文模板
```text
请在这个仓库里覆盖 Markstream 的内置组件。
目标节点是:[填写 image / link / code_block / mermaid / d2 / infographic / inline_code / 其他]。
默认使用 scoped `setCustomComponents(customId, mapping)`,不要直接做全局覆盖,除非有明确理由。
如果只是 Mermaid / D2 / infographic 需要修改,请只覆盖对应 key,不要影响所有代码块。
保留必要 props(如 `node`、`loading`、`customId`、`isDark`),并说明这个 override 会影响哪些页面或组件。
最后运行最小可行验证。
```
## English template
```text
Override built-in Markstream components in this repository.
The target node types are: [fill in image / link / code_block / mermaid / d2 / infographic / inline_code / other].
Prefer scoped `setCustomComponents(customId, mapping)` instead of a global override unless there is a clear reason not to.
If only Mermaid, D2, or infographic behavior changes, override those specific keys instead of all code blocks.
Preserve required props such as `node`, `loading`, `customId`, and `isDark`, and explain which pages or surfaces the override affects.
Run the smallest useful validation step at the end.
```