DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix: restore sidebar browser in desktop web profiles (#1110)
Hairye0afa90ecd96
diff --git a/packages/dsh-tauri/cordis.patch.yml b/packages/dsh-tauri/cordis.patch.ymlindex d11b6bb0..cafd7266 100644--- a/packages/dsh-tauri/cordis.patch.yml+++ b/packages/dsh-tauri/cordis.patch.yml@@ -1,3 +1,5 @@+- id: ui-sidebar-browser+ disabled: false- insert:- id: dsh-tauriname: dsh-tauridiff --git a/test/plugin-patch-targets.test.ts b/test/plugin-patch-targets.test.tsindex 791d3cd2..b63cb38d 100644--- a/test/plugin-patch-targets.test.ts+++ b/test/plugin-patch-targets.test.ts@@ -2,16 +2,8 @@ import { existsSync, readdirSync } from 'node:fs'import { describe, expect, it } from 'vitest'import { readSource } from './setup/read-source'-/**- * issue #763:插件包内的 `cordis.patch.yml` 用顶层 `- id: <官方 id>` 关掉官方入口,- * 但该 id 一旦随核心移除就成了死目标——loader 只在启动日志里告警跳过,静默留痕。- *- * 下面这份字面量是「当前确实仍需禁用的官方入口」的独立来源:`ui-settings-models`- * 由核心 `@deepseek-ai/dsh-client-ui-settings-models` 提供(0.2.0-rc.1 仍在),- * `dsh-tauri-model` 是它的完整 fork、注册同一个 `settings.section/models`,故必须禁用。- * 已被核心移除的 `ui-settings-unarchive-sessions` 不得再回到任何 patch 层。- */-const OFFICIAL_ROW_DISABLES = [+const OFFICIAL_ROW_TARGETS = [+ 'dsh-tauri → ui-sidebar-browser','dsh-tauri-model → ui-settings-models','dsh-tauri-scheduler → schedule','dsh-tauri-scheduler → ui-schedule',@@ -31,7 +23,7 @@ function packageNames(): string[] {}/** 顶层 `- id:` 才是 patch 目标;`insert:` 内缩进的 `id` 是插入的插件自身条目。 */-function disabledRowIds(source: string): string[] {+function patchTargetIds(source: string): string[] {return source.split('\n').flatMap((line) => {const match = /^- id: (\S+)\s*$/.exec(line)return match === null ? [] : [match[1]]@@ -39,6 +31,10 @@ function disabledRowIds(source: string): string[] {}describe('插件 patch 层的官方目标', () => {+ it('桌面桥接 bundle 为 web 档案启用官方侧栏浏览器', () => {+ expect(readPatchLayer('dsh-tauri')).toMatch(/^- id: ui-sidebar-browser\r?\n {2}disabled: false$/m)+ })+it('定时任务插件明确禁用完整官方调度栈且插入唯一实现', () => {const source = readPatchLayer('dsh-tauri-scheduler')expect(source).toMatch(/^- id: schedule\r?\n {2}disabled: true$/m)@@ -47,15 +43,15 @@ describe('插件 patch 层的官方目标', () => {})it('只把核心仍在提供的官方入口列为 patch 目标', () => {- const actual = packageNames().flatMap(pkg => disabledRowIds(readPatchLayer(pkg)).map(id => `${pkg} → ${id}`))+ const actual = packageNames().flatMap(pkg => patchTargetIds(readPatchLayer(pkg)).map(id => `${pkg} → ${id}`))- expect(actual).toEqual(OFFICIAL_ROW_DISABLES)+ expect(actual).toEqual(OFFICIAL_ROW_TARGETS)})it('dsh-tauri-archive 的 patch 层只插入插件自身', () => {const source = readPatchLayer('dsh-tauri-archive')- expect(disabledRowIds(source)).toEqual([])+ expect(patchTargetIds(source)).toEqual([])expect(source).toContain('- insert:')expect(source).toContain('- id: dsh-tauri-archive')expect(source).toContain('name: dsh-tauri-archive')