DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(dsh-tauri-ui): endpoint 探测把设置查找失败归一为 502;CI 插件 e2e 回到 0.1.5-rc 基线
hairyfa1d3f741953c
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex b5d6670d..665dc323 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -111,7 +111,9 @@ jobs:mkdir -p "$RUNNER_TEMP/dsh-cli"cd "$RUNNER_TEMP/dsh-cli"npm init -y >/dev/null- npm install --no-audit --no-fund @deepseek-ai/[email protected]+ # 插件 L2 用例的文案/分区断言按 0.1.5-rc 基线写就(也是本文档声明的最低兼容基线);+ # 0.1.7 的 e2e 文案漂移(设置侧栏「内置插件」、未分组 chip 等)尚未回归,另行适配。+ npm install --no-audit --no-fund @deepseek-ai/[email protected]- name: Plugin L2 testenv:diff --git a/packages/dsh-tauri-ui/src/host/service/endpoint-models.ts b/packages/dsh-tauri-ui/src/host/service/endpoint-models.tsindex 81ead080..8e7396ef 100644--- a/packages/dsh-tauri-ui/src/host/service/endpoint-models.ts+++ b/packages/dsh-tauri-ui/src/host/service/endpoint-models.ts@@ -49,10 +49,23 @@ async function resolveApiKey(ref: string | undefined, typed: string | undefined)}}+/**+ * 读取设置命名空间。两代内核的 `settings.get` 严格程度不同:0.1.7 对未知命名空间会抛,+ * 而本路由的契约是「没有 endpoint 就 502」,所以这里必须把查找失败归一成 `undefined`。+ */+function readSection(ns: string): unknown {+ try {+ const settings = getCurrentHostInstance().get('settings') as SettingsService | undefined+ return settings?.get(ns)+ }+ catch {+ return undefined+ }+}+export const endpointModels = defineService({async list(input: EndpointModelsInput): Promise<EndpointModelsResult> {- const settings = getCurrentHostInstance().get('settings') as SettingsService | undefined- const section = settings?.get(input.ns)+ const section = readSection(input.ns)const path = parseProfilePath(input.profilePath)const profile = path.length === 0 ? section : getPath(section, path)const baseURL = endpointOf(profile, input.baseURL)