Skip to content

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

fix: normalize shared UI consumer compatibility

hairyf76cd1034d0ca
diff --git a/packages/dsh-tauri-panel-extension/src/client/register/extension-panel.tsx b/packages/dsh-tauri-panel-extension/src/client/register/extension-panel.tsx
index 7270ef8b..069fe711 100644
--- a/packages/dsh-tauri-panel-extension/src/client/register/extension-panel.tsx
+++ b/packages/dsh-tauri-panel-extension/src/client/register/extension-panel.tsx
@@ -8,7 +8,7 @@
import type { ClientContext } from 'dsh-tauri/client'
import type { ReactElement } from 'react'
import type { ExtensionRuntimeContext, McpInjected, PanelProtocol, SkillsInjected, Translate } from '../types'
-import { IconExtension } from 'dsh-tauri-ui/client'
+import { Icon, Puzzle } from 'dsh-tauri-ui/client'
import { compat } from 'dsh-tauri/client'
import { ExtensionPanel } from '../components/extension-panel'
import { pendingPrefills } from '../config'
@@ -48,7 +48,7 @@ export function installExtensionPanel(ctx: ClientContext, t: Translate, skills:
runtime.sessions.open(sessionId)
}
const Content = (): ReactElement => <ExtensionPanel t={t} skills={skills} mcp={mcp} createSkill={createSkill} />
- const Action = (): ReactElement => <protocol.ActionItem id={PANEL_ID} icon={<IconExtension />} onClick={() => protocol.renderPanelContent?.({ id: PANEL_ID, render: Content, locale: LOCALE_NAMESPACE })}>{t('extension')}</protocol.ActionItem>
+ const Action = (): ReactElement => <protocol.ActionItem id={PANEL_ID} icon={<Icon as={Puzzle} />} onClick={() => protocol.renderPanelContent?.({ id: PANEL_ID, render: Content, locale: LOCALE_NAMESPACE })}>{t('extension')}</protocol.ActionItem>
registration = ctx.slots.register({ name: PANEL_SLOT_NAME, id: PANEL_ACTION_ID, registrant: PLUGIN_ID, order: PANEL_ACTION_ORDER, priority: PANEL_ACTION_PRIORITY, locale: LOCALE_NAMESPACE, inject: () => ({}) } as never, Action)
if (retryTimer !== undefined) {
window.clearInterval(retryTimer)
diff --git a/packages/dsh-tauri-panel-placeholder/src/client/components/panel.tsx b/packages/dsh-tauri-panel-placeholder/src/client/components/panel.tsx
index d43db570..97fa6e4f 100644
--- a/packages/dsh-tauri-panel-placeholder/src/client/components/panel.tsx
+++ b/packages/dsh-tauri-panel-placeholder/src/client/components/panel.tsx
@@ -1,6 +1,6 @@
import type { ReactElement } from 'react'
import type { PlaceholderPanelProps } from '../types'
-import { IconPlaceholder } from 'dsh-tauri-ui/client'
+import { Icon, IconPlaceholder } from 'dsh-tauri-ui/client'
import { LOCALE_NAMESPACE, PANEL_ID, PANEL_LOCALE_KEY } from '../constants'
import { Content } from './content'
@@ -17,7 +17,7 @@ export function PlaceholderPanel(props: PlaceholderPanelProps): ReactElement {
}
return (
- <ActionItem id={PANEL_ID} icon={<IconPlaceholder />} onClick={onClick}>
+ <ActionItem id={PANEL_ID} icon={<Icon as={IconPlaceholder} />} onClick={onClick}>
{t(PANEL_LOCALE_KEY)}
</ActionItem>
)
diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/model-picker.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/model-picker.tsx
index 326f7767..be00da1e 100644
--- a/packages/dsh-tauri-panel-scheduler/src/client/components/model-picker.tsx
+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/model-picker.tsx
@@ -7,7 +7,8 @@
*/
import type { ModelCatalogFailure, ModelOption, ModelTranslate } from '../types'
-import { IconCheckOutline16, IconChevronDownOutline14 } from '@deepseek-ai/dsh-client-ui-primitives'
+import { IconCheckOutline16 as Check, IconChevronDownOutline14 as ChevronDown } from '@deepseek-ai/dsh-client-ui-primitives'
+import { Icon } from 'dsh-tauri-ui/client'
import { useEffect, useState } from 'react'
import { SCHEDULER_CLASSES as K } from '../constants'
import { MenuPopup, MenuRow, useMenuState } from './menu'
@@ -103,7 +104,7 @@ export function ModelPicker({
>
<span>{trigger}</span>
{effortLabel !== undefined && <span className={K.modelTriggerEffort}>{effortLabel}</span>}
- <IconChevronDownOutline14 className={`${K.modelTriggerChevron}${menu.open ? ` ${K.modelTriggerChevronOpen}` : ''}`} />
+ <Icon as={ChevronDown} className={`${K.modelTriggerChevron}${menu.open ? ` ${K.modelTriggerChevronOpen}` : ''}`} />
</button>
<MenuPopup open={menu.open} anchor={menu.root} menuRef={menu.menu} up end className={`${K.modelSelectMenu} is-up is-end`} ariaLabel={modelT('menu.aria')}>
{pane === 'root' && (
@@ -152,7 +153,7 @@ export function ModelPicker({
<span className={K.modelName}>{item.label}</span>
{item.description !== undefined && <span className={K.modelDescription}>{item.description}</span>}
</span>
- <span className={K.modelCheck}>{value === modelKey && <IconCheckOutline16 />}</span>
+ <span className={K.modelCheck}>{value === modelKey && <Icon as={Check} />}</span>
</button>
)
})}
@@ -172,7 +173,7 @@ export function ModelPicker({
onClick={() => selectEffort('none')}
>
<span className={K.modelOptionCopy}><span className={K.modelName}>{modelT('effort.providerDefault')}</span></span>
- <span className={K.modelCheck}>{reasoningEffort === 'none' && <IconCheckOutline16 />}</span>
+ <span className={K.modelCheck}>{reasoningEffort === 'none' && <Icon as={Check} />}</span>
</button>
)}
{reasoning.efforts.map(item => (
@@ -188,7 +189,7 @@ export function ModelPicker({
<span className={K.modelName}>{item.name}</span>
{item.description !== undefined && <span className={K.modelDescription}>{item.description}</span>}
</span>
- <span className={K.modelCheck}>{effectiveEffort === item.id && <IconCheckOutline16 />}</span>
+ <span className={K.modelCheck}>{effectiveEffort === item.id && <Icon as={Check} />}</span>
</button>
))}
{reasoning.efforts.length === 0 && reasoning.defaultEffort !== undefined && <div className={K.modelEmpty}>{modelT('empty.efforts')}</div>}
diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/task-card.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/task-card.tsx
index df90a079..b9322a63 100644
--- a/packages/dsh-tauri-panel-scheduler/src/client/components/task-card.tsx
+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/task-card.tsx
@@ -9,7 +9,7 @@
import type { MenuEntry } from '@deepseek-ai/dsh-client-ui-primitives'
import type { ReactElement } from 'react'
import type { TaskView, Translate } from '../types'
-import { IconWarningOutline16, Menu, Modal, Toast } from '@deepseek-ai/dsh-client-ui-primitives'
+import { Menu, Modal, Toast, IconWarningOutline16 as Warning } from '@deepseek-ai/dsh-client-ui-primitives'
import { CirclePause, CirclePlay, EllipsisVertical, Icon, TrashBin } from 'dsh-tauri-ui/client'
import { useRef, useState } from 'react'
import { SCHEDULER_CLASSES as K } from '../constants'
@@ -163,7 +163,7 @@ export function TaskCard({ task, t, describe, nextRun, paused, onEdit }: TaskCar
<Toast
key={toast.seq}
text={toast.text}
- icon={<IconWarningOutline16 />}
+ icon={<Icon as={Warning} />}
anchor={cardRef.current}
onDone={() => setToast(null)}
/>
diff --git a/packages/dsh-tauri-panel/src/client/components/sidebar.tsx b/packages/dsh-tauri-panel/src/client/components/sidebar.tsx
index 9f457446..09c6d100 100644
--- a/packages/dsh-tauri-panel/src/client/components/sidebar.tsx
+++ b/packages/dsh-tauri-panel/src/client/components/sidebar.tsx
@@ -1,7 +1,7 @@
import type { CSSProperties, ReactElement } from 'react'
import type { SidebarRootProps } from '../types'
import { SlotOutlet } from '@deepseek-ai/dsh-client-ui-renderer'
-import { ChatOutline, FishMark, Icon } from 'dsh-tauri-ui/client'
+import { CommentPlus, FishMark, Icon } from 'dsh-tauri-ui/client'
import { useEffect, useRef, useState } from 'react'
import { COLLAPSE_SETTLE_MS, PANEL_CLASSES, PANEL_DATA_ATTRIBUTES, SCROLLBAR_LINGER_MS } from '../constants'
@@ -154,7 +154,7 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar
}
}}
>
- <span className={PANEL_CLASSES.menuItemIcon}><Icon as={ChatOutline} size={wide ? 14 : 18} /></span>
+ <span className={PANEL_CLASSES.menuItemIcon}><Icon as={CommentPlus} size={wide ? 14 : 18} /></span>
<span className={PANEL_CLASSES.menuItemLabel}>{t('session.new')}</span>
</button>
<SlotOutlet slotKey="sidebar.panel.action" ownerProps={{ wide }} />
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 ffaff460..97ba8fb5 100644
--- a/packages/dsh-tauri-session/src/client/components/archive-panel.tsx
+++ b/packages/dsh-tauri-session/src/client/components/archive-panel.tsx
@@ -246,7 +246,7 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {
items={[{
id: 'delete',
label: text('deleteProjectChats'),
- icon: <IconTrashBin />,
+ icon: <Icon as={TrashBin} />,
danger: true,
} satisfies MenuEntry]}
portal
@@ -288,7 +288,7 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {
disabled={busy}
onClick={() => setConfirm({ kind: 'single', sessionId: row.sessionId })}
>
- <IconTrashBin />
+ <Icon as={TrashBin} />
</button>
<Button
type="button"
diff --git a/packages/dsh-tauri-ui/src/client/components/index.ts b/packages/dsh-tauri-ui/src/client/components/index.ts
index 432cb481..d7bf288b 100644
--- a/packages/dsh-tauri-ui/src/client/components/index.ts
+++ b/packages/dsh-tauri-ui/src/client/components/index.ts
@@ -9,7 +9,6 @@ export {
CirclePlay,
CircleTree,
Clock,
- ChatOutline,
CommentPlus,
Ellipsis,
EllipsisVertical,
diff --git a/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx b/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx
index 8d37f4a0..ceec1fef 100644
--- a/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx
+++ b/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx
@@ -1,8 +1,7 @@
import type { ReactElement } from 'react'
import type { ModeSelectProps } from '../types'
-import { IconChevronDownOutline14, Menu } from '@deepseek-ai/dsh-client-ui-primitives'
-
-import { CircleTreeIcon } from 'dsh-tauri-ui/client'
+import { IconChevronDownOutline14 as ChevronDown, Menu } from '@deepseek-ai/dsh-client-ui-primitives'
+import { CircleTree, Icon } from 'dsh-tauri-ui/client'
/**
* mode-select.tsx — 「标准模式」右侧的会话工作模式选择器。
*
@@ -221,10 +220,10 @@ function WorktreeModeControl({ sessionId, useInput, inputActions, sessionsRuntim
className={open ? `${MODE_SELECT_CLASSES.trigger} ${MODE_SELECT_CLASSES.triggerOpen}` : MODE_SELECT_CLASSES.trigger}
>
<span className={MODE_SELECT_CLASSES.icon}>
- <CircleTreeIcon size={13} />
+ <Icon as={CircleTree} size={13} />
</span>
<span>{activeLabel}</span>
- <IconChevronDownOutline14 className={MODE_SELECT_CLASSES.chevron} />
+ <Icon as={ChevronDown} className={MODE_SELECT_CLASSES.chevron} />
</button>
)
diff --git a/packages/dsh-tauri-worktree/src/client/components/surface.tsx b/packages/dsh-tauri-worktree/src/client/components/surface.tsx
index a5364c48..42815bad 100644
--- a/packages/dsh-tauri-worktree/src/client/components/surface.tsx
+++ b/packages/dsh-tauri-worktree/src/client/components/surface.tsx
@@ -1,6 +1,6 @@
import type { ReactElement } from 'react'
import type { SurfaceBarProps } from '../types'
-import { CircleTreeIcon } from 'dsh-tauri-ui/client'
+import { CircleTree, Icon } from 'dsh-tauri-ui/client'
/**
* surface.tsx — 聊天框正上方、仅会话内容区内的工作树状态条。
*
@@ -34,7 +34,7 @@ export function WorktreeSurface({ sessionId }: SurfaceBarProps): ReactElement |
return (
<div className={worktreeStyles.surface}>
<div className={worktreeStyles.surfaceBar} data-dsh-worktree-surface={sessionId}>
- <CircleTreeIcon size={14} />
+ <Icon as={CircleTree} size={14} />
<div className={worktreeStyles.surfaceContent}>
<span className={worktreeStyles.surfaceLabel}>
{label}
diff --git a/packages/dsh-tauri/src/client/apis/client.ts b/packages/dsh-tauri/src/client/apis/client.ts
index 9cd3d2b3..55a0465b 100644
--- a/packages/dsh-tauri/src/client/apis/client.ts
+++ b/packages/dsh-tauri/src/client/apis/client.ts
@@ -51,7 +51,9 @@ function withJsonContentType(headersInit: HeadersInit | undefined, body: unknown
}
/** 模块级 ofetch 实例(关闭自动重试;重试策略由各插件显式决定)。 */
-const jsonFetch = createFetch({ defaults: { retry: 0 } })
+const jsonFetch = createFetch({
+ defaults: { retry: 0 }
+})
/**
* 发起同源 JSON 请求并返回解析后的响应体。