Skip to content

DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.

chore: css-render 内联配置与 pet/UI 图标微调

hairyf9f2b7dfce383
diff --git a/docs/AGENTS.plugins.md b/docs/AGENTS.plugins.md
index 7f01a9fb..4ad4cc2c 100644
--- a/docs/AGENTS.plugins.md
+++ b/docs/AGENTS.plugins.md
@@ -249,7 +249,7 @@ ctx.slots.register(
## 构建与部署约定
- 每个包经 `dsh-tauri-tsdown` 的 `defineDshConfig()` 构建:host entry = `src/index.ts`,client entry = `src/client/index.ts`(CJS + ModuleLoader factory)。
-- client bundle 必须把 `unstorage` / `hookable` / `ofetch` / `pathe` 内联(`noExternal`,见 dsh-tauri-tsdown),否则 loader 模块表找不到会报 "missed the module table";host bundle 保持 external(运行时按依赖解析)。
+- client bundle 必须把 `unstorage` / `hookable` / `ofetch` / `pathe` / `css-render` / `@css-render/plugin-bem`(以及 `@gravity-ui/icons`)内联(`noExternal`,见 dsh-tauri-tsdown 的 `dshClientInline`),否则 loader 模块表找不到会报 "missed the module table";host bundle 保持 external(运行时按依赖解析)。
- 桌面端通过 `pnpm build`(prebuild 部署插件到 `src-tauri/resources`)消费各包 dist;不要提交 dist 与部署产物(已被 gitignore)。
## 退级策略
diff --git a/packages/dsh-tauri-pet/package.json b/packages/dsh-tauri-pet/package.json
index 8ea65ffe..7dfb069a 100644
--- a/packages/dsh-tauri-pet/package.json
+++ b/packages/dsh-tauri-pet/package.json
@@ -71,7 +71,6 @@
"@deepseek-ai/dsh-client-ui-layout": "catalog:dsh",
"@deepseek-ai/dsh-client-ui-renderer": "catalog:dsh",
"@deepseek-ai/dsh-client-ui-slots": "catalog:dsh",
- "css-render": "catalog:ui",
"dsh-tauri-tsdown": "workspace:*",
"react": "catalog:runtime",
"tsdown": "catalog:cli"
diff --git a/packages/dsh-tauri-pet/src/client/styles/index.cssr.ts b/packages/dsh-tauri-pet/src/client/styles/index.cssr.ts
index d346196a..eacac332 100644
--- a/packages/dsh-tauri-pet/src/client/styles/index.cssr.ts
+++ b/packages/dsh-tauri-pet/src/client/styles/index.cssr.ts
@@ -63,11 +63,11 @@ export default c([
// 激活态绿色小圆点(右上角),未激活时隐藏。
c('.dshp-pet__icon-dot', {
position: 'absolute',
- top: '2px',
- right: '2px',
- width: '8px',
- height: '8px',
- borderRadius: '50%',
+ top: '6px',
+ right: '6px',
+ width: '4px',
+ height: '4px',
+ borderRadius: '100%',
background: 'var(--dsw-alias-state-success-primary, #3ddc84)',
display: 'none',
}),
diff --git a/packages/dsh-tauri-session/src/client/components/archive-panel.tsx b/packages/dsh-tauri-session/src/client/components/archive-panel.tsx
index 4cf5adb5..51d076b7 100644
--- a/packages/dsh-tauri-session/src/client/components/archive-panel.tsx
+++ b/packages/dsh-tauri-session/src/client/components/archive-panel.tsx
@@ -264,7 +264,7 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {
aria-expanded={openGroupMenu === group.id}
onClick={() => setOpenGroupMenu(openGroupMenu === group.id ? null : group.id)}
>
- <Icon as={Ellipsis} />
+ <Icon size={12} as={Ellipsis} />
</button>
)}
/>
diff --git a/packages/dsh-tauri-tsdown/src/index.ts b/packages/dsh-tauri-tsdown/src/index.ts
index b31d6bf8..5ebeb154 100644
--- a/packages/dsh-tauri-tsdown/src/index.ts
+++ b/packages/dsh-tauri-tsdown/src/index.ts
@@ -49,7 +49,7 @@ export const dshExternal: Array<string | RegExp> = [
]
/**
- * 需要内联进 client bundle 的依赖(UnJS 工具库 + date-fns)。
+ * 需要内联进 client bundle 的依赖(UnJS 工具库 + date-fns + css-render 系列)。
*
* client bundle 在 DSH Web ModuleLoader(dsh-client-modules)的 factory 里运行,
* 其模块表只认识平台种子词(react / @deepseek-ai/*)与已加载的链接模块
@@ -60,10 +60,18 @@ export const dshExternal: Array<string | RegExp> = [
* 因此 client entry 必须把它们内联;host entry 保持 external(Node 运行时按
* 插件 dependencies 解析)。子路径(unstorage/drivers/*)一并覆盖。
* date-fns 仅作为构建期 devDependency,并按实际使用导出 tree-shake 后内联。
+ *
+ * css-render / @css-render/plugin-bem 与 @gravity-ui/icons 同类:纯 client UI 库,
+ * 只被插件 client 样式代码消耗,声明为 dependencies 时会被 tsdown 默认 external,
+ * 使 loader 模块表查不到;凡在 client 里直接 import 必须内联。统一经
+ * dsh-tauri-ui/client 提供 cssr 实例的插件不应再单独内联(它们是共享实例的
+ * 消费者),只有真正直接 import 这两个包的 client bundle 才需要内联。
*/
const dshClientInline: Array<string | RegExp> = [
/^(unstorage|hookable|ofetch|pathe|date-fns)([/-].*)?$/,
/^@gravity-ui\/icons([/-].*)?$/,
+ /^css-render([/-].*)?$/,
+ /^@css-render\/plugin-bem([/-].*)?$/,
]
export function defineDshConfig(options: DshConfigOptions = {}) {
diff --git a/packages/dsh-tauri-ui/src/client/components/special-icons.tsx b/packages/dsh-tauri-ui/src/client/components/special-icons.tsx
index d681941d..e29ae430 100644
--- a/packages/dsh-tauri-ui/src/client/components/special-icons.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/special-icons.tsx
@@ -28,7 +28,7 @@ export function IconPlaceholder({ width = 24, height = 24, ...props }: SVGProps<
)
}
-const CIRCLE_TREE_PATH = 'M2.327.504A.75.75 0 0 1 3 1.25V2a1.5 1.5 0 0 0 1.5 1.5h2.588A3.25 3.25 0 0 1 10.25 1l.167.004A3.25 3.25 0 0 1 13.5 4.25l-.004.167A3.25 3.25 0 0 1 10.25 7.5l-.167-.004A3.25 3.25 0 0 1 7.088 5H4.5c-.547 0-1.058-.15-1.5-.405V10a1.5 1.5 0 0 0 1.5 1.5h2.588a3.25 3.25 0 1 1 0 1.5H4.5a3 3 0 0 1-3-3V1.25A.75.75 0 0 1 2.25.5zM10.25 10.5a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5m0-8a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0-3.5'
+const CIRCLE_TREE_PATH = 'M2.327.504A.75.75 0 0 1 3 1.25V2a1.5 1.5 0 0 0 1.5 1.5h2.588A3.25 3.25 0 0 1 10.25 1l.167.004A3.25 3.25 0 0 1 13.5 4.25l-.004.167A3.25 3.25 0 0 1 10.25 7.5l-.167-.004A3.25 3.25 0 0 1 7.088 5H4.5c-.547 0-1.058-.15-1.5-.405V10a1.5 1.5 0 0 0 1.5 1.5h2.588a3.25 3.25 0 1 1 0 1.5H4.5a3 3 0 0 1-3-3V1.25A.75.75 0 0 1 2.25.5zM10.25 10.5a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5m0-8a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5'
export function clockSvg(size: number): string {
return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 16 16" fill="none"><path fill="currentColor" fill-rule="evenodd" d="M13.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 1 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0M8.75 4.5a.75.75 0 0 0-1.5 0V8a.75.75 0 0 0 .3.6l2 1.5a.75.75 0 1 0 .9-1.2l-1.7-1.275z" clip-rule="evenodd"/></svg>`
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 54fe5288..40013acf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -693,9 +693,6 @@ importers:
'@deepseek-ai/dsh-client-ui-slots':
specifier: catalog:dsh
version: 0.1.2-alpha.3(@deepseek-ai/[email protected])
- css-render:
- specifier: catalog:ui
- version: 0.15.14
dsh-tauri-tsdown:
specifier: workspace:*
version: link:../dsh-tauri-tsdown