DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix: align plugin consumers with shared UI exports
hairyf7148dd397ff0
diff --git a/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsx b/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsxindex 71fcde5f..a2c86729 100644--- a/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsx+++ b/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsx@@ -11,7 +11,7 @@import type { ReactElement } from 'react'import type { McpEditorMode, McpEditorState, McpImportItem, McpRow, McpTabProps } from '../types'import { Button, Modal, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'-import { IconMcp, IconRefresh } from 'dsh-tauri-ui/client'+import { ArrowRotateRight, Icon, PlugConnection } from 'dsh-tauri-ui/client'import { useEffect, useState } from 'react'import { MCP_RESTART_INITIAL_DELAY_MS, MCP_RESTART_POLL_INTERVAL_MS, MCP_RESTART_TIMEOUT_MS } from '../constants'import { useTimers } from '../hooks/use-timers'@@ -297,7 +297,7 @@ export function McpTab(props: McpTabProps): ReactElement {return (<div className="dpte-section"><div className="dpte-head">- <IconMcp />+ <Icon as={PlugConnection} /><h3>{t('mcpTitle')}</h3><span className="dpte-spacer" /><Button variant="ghost" size="sm" disabled={restarting} onClick={() => setRestartConfirm(true)}>{t('restart')}</Button>@@ -319,7 +319,7 @@ export function McpTab(props: McpTabProps): ReactElement {{servers !== null && <span className="dpte-count">{servers.length}</span>}<span className="dpte-spacer" /><button type="button" className="dpte-refresh" aria-label={t('view')} title={t('view')} disabled={busy} onClick={() => setReload(value => value + 1)}>- <IconRefresh />+ <Icon as={ArrowRotateRight} /></button></div>diff --git a/packages/dsh-tauri-panel-extension/src/client/components/skills-tab.tsx b/packages/dsh-tauri-panel-extension/src/client/components/skills-tab.tsxindex 9381efb1..f9f4f543 100644--- a/packages/dsh-tauri-panel-extension/src/client/components/skills-tab.tsx+++ b/packages/dsh-tauri-panel-extension/src/client/components/skills-tab.tsx@@ -9,7 +9,7 @@import type { ReactElement } from 'react'import type { OpenTarget, SkillEditorState, SkillRowView, SkillsTabProps } from '../types'import { Button, Modal, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'-import { IconGitHub, IconRefresh, IconSkill } from 'dsh-tauri-ui/client'+import { ArrowRotateRight, GraduationCap, Icon, LogoGithub } from 'dsh-tauri-ui/client'import { useEffect, useMemo, useState } from 'react'import { MarkdownPreview } from '../components/markdown'import { IMPORT_REFRESH_DELAYS_MS, SKILL_REFRESH_INTERVAL_MS, SKILL_REFRESH_TIMEOUT_MS, SOURCE_LOCALE_KEYS } from '../constants'@@ -194,7 +194,7 @@ export function SkillsTab({ t, injected, createSkill }: SkillsTabProps): ReactElreturn (<div className="dpte-section"><div className="dpte-head">- <IconSkill />+ <Icon as={GraduationCap} /><h3>{t('skillsTitle')}</h3><span className="dpte-spacer" /><Button variant="ghost" size="sm" onClick={() => void doOpen({ target: 'user-skills' })}>{t('openUserSkills')}</Button>@@ -230,7 +230,7 @@ export function SkillsTab({ t, injected, createSkill }: SkillsTabProps): ReactEl)}<span className="dpte-spacer" /><input className="dpte-search" type="search" placeholder={t('searchSkills')} aria-label={t('searchSkills')} value={query} onChange={event => setQuery(event.target.value)} />- <button type="button" className="dpte-refresh" aria-label={t('refresh')} title={t('refresh')} disabled={busy} onClick={() => void doRefresh()}><IconRefresh /></button>+ <button type="button" className="dpte-refresh" aria-label={t('refresh')} title={t('refresh')} disabled={busy} onClick={() => void doRefresh()}><Icon as={ArrowRotateRight} /></button></div>{sources.length > 1 && <div className="dpte-chips" role="group" aria-label={t('source')}>{[{ id: 'all', label: t('filterAll') }, ...sources.map(source => ({ id: source, label: t(SOURCE_LOCALE_KEYS[source] ?? 'sourceCustom') }))].map(chip => <button key={chip.id} type="button" className="dpte-chip" data-active={sourceFilter === chip.id ? 'true' : undefined} onClick={() => setSourceFilter(chip.id)}>{chip.label}</button>)}</div>}{skills === null && <p className="dpte-empty">{t('loading')}</p>}@@ -251,7 +251,7 @@ export function SkillsTab({ t, injected, createSkill }: SkillsTabProps): ReactEl{skill.policyEditable && <button type="button" className="dpte-switch" role="switch" aria-checked={skill.invocation.modelInvocable || skill.invocation.userInvocable} aria-label={t('toggleSkill')} title={t('toggleSkillHint')} disabled={busy} onClick={() => void doToggle(skill)}><span className="dpte-switchKnob" /></button>}{skill.dir && <button type="button" className="dpte-link" onClick={() => void doOpen({ target: 'skill', name: skill.name })}>{t('openFolder')}</button>}<span className="dpte-spacer" />- {skill.repository?.githubUrl && <a className="dpte-iconLink" href={skill.repository.githubUrl} target="_blank" rel="noreferrer" aria-label={t('githubRepository')} title={t('githubRepository')}><IconGitHub /></a>}+ {skill.repository?.githubUrl && <a className="dpte-iconLink" href={skill.repository.githubUrl} target="_blank" rel="noreferrer" aria-label={t('githubRepository')} title={t('githubRepository')}><Icon as={LogoGithub} /></a>}<Button variant="ghost" size="sm" disabled={busy} onClick={() => void openExisting(skill)}>{skill.editable ? t('edit') : t('view')}</Button>{skill.removable && <Button variant="ghost" size="sm" disabled={busy} onClick={() => setConfirmName(skill.name)}>{t('delete')}</Button>}</div>diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsxindex cbebb1c0..fc2e8cd3 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsx+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsx@@ -1,6 +1,7 @@+import type { IconComponent } from 'dsh-tauri-ui/client'import type { ReactElement } from 'react'import type { ScheduleForm, TaskFormState, TaskView, Translate } from '../types'-import { IconCalendar } from 'dsh-tauri-ui/client'+import { Calendar, Icon } from 'dsh-tauri-ui/client'import { SCHEDULER_CLASSES as K } from '../constants'import { applyCreateTask } from '../store'import { recommendationMatchesTask } from '../utils/recommendations'@@ -13,9 +14,7 @@ import { describeSchedule } from '../utils/schedule'* 仍用名称、计划和指令做兼容匹配。这样刷新页面或重新打开面板时,已添加项不会回到列表。*/-interface IconLike {- (props: { className?: string }): ReactElement-}+type IconLike = IconComponentexport interface Recommendation {id: string@@ -35,7 +34,7 @@ export const RECOMMENDATIONS: Recommendation[] = [promptKey: 'recReviewPrompt',schedule: { kind: 'weekly', weekdays: ['FR'], time: '16:00' },accent: '#8B6FF0',- icon: IconCalendar,+ icon: Calendar,form: t => ({ name: t('recReviewName'), schedule: { kind: 'weekly', weekdays: ['FR'], time: '16:00' }, prompt: t('recReviewPrompt'), workspaceId: '', permission: 'read-only', provider: '', model: '', reasoningEffort: '' }),},{@@ -44,7 +43,7 @@ export const RECOMMENDATIONS: Recommendation[] = [promptKey: 'recWeekdayBriefingPrompt',schedule: { kind: 'workdays', time: '08:00' },accent: '#3D9A80',- icon: IconCalendar,+ icon: Calendar,form: t => ({ name: t('recWeekdayBriefingName'), schedule: { kind: 'workdays', time: '08:00' }, prompt: t('recWeekdayBriefingPrompt'), workspaceId: '', permission: 'read-only', provider: '', model: '', reasoningEffort: '' }),},]@@ -81,7 +80,7 @@ export function Recommendations({ t, tasks }: RecommendationsProps): ReactElemen<li key={rec.id}><button type="button" className={K.recItem} onClick={() => void add(rec)}><span className={K.recIcon} style={{ color: rec.accent }}>- <rec.icon />+ <Icon as={rec.icon} /></span><span className={K.recBody}><span className={K.recName}>diff --git a/packages/dsh-tauri-panel-scheduler/src/client/register/panel.tsx b/packages/dsh-tauri-panel-scheduler/src/client/register/panel.tsxindex 3312ade9..d1b4148d 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/register/panel.tsx+++ b/packages/dsh-tauri-panel-scheduler/src/client/register/panel.tsx@@ -8,7 +8,7 @@import type { ClientContext } from 'dsh-tauri/client'import type { ReactElement } from 'react'import type { PanelProtocol, Translate } from '../types'-import { IconSchedule } from 'dsh-tauri-ui/client'+import { Calendar, Icon } from 'dsh-tauri-ui/client'import { SchedulerPanel } from '../components/scheduler-panel'import {LOCALE_NAMESPACE,@@ -45,7 +45,7 @@ export function installSchedulerPanel(ctx: ClientContext, t: Translate): void {}}/>)- const Action = (): ReactElement => <protocol.ActionItem id={PANEL_ID} icon={<IconSchedule />} onClick={() => protocol.renderPanelContent?.({ id: PANEL_ID, render: Content, locale: LOCALE_NAMESPACE })}>{t('scheduler')}</protocol.ActionItem>+ const Action = (): ReactElement => <protocol.ActionItem id={PANEL_ID} icon={<Icon as={Calendar} />} onClick={() => protocol.renderPanelContent?.({ id: PANEL_ID, render: Content, locale: LOCALE_NAMESPACE })}>{t('scheduler')}</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/src/client/components/sidebar.tsx b/packages/dsh-tauri-panel/src/client/components/sidebar.tsxindex 4bdc49a2..9f457446 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 } from 'dsh-tauri-ui/client'+import { ChatOutline, 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'@@ -108,7 +108,7 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar<SlotOutletslotKey="sidebar.brand.mark"ownerProps={{ size: 24 }}- opts={{ fallback: <FishMark size={24} /> }}+ opts={{ fallback: <Icon as={FishMark} size={24} /> }}/></span><span className={PANEL_CLASSES.brandName}>@@ -133,7 +133,7 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar<SlotOutletslotKey="sidebar.brand.mark"ownerProps={{ size: 24 }}- opts={{ fallback: <FishMark size={24} /> }}+ opts={{ fallback: <Icon as={FishMark} size={24} /> }}/></span>)}@@ -154,7 +154,7 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar}}}>- <span className={PANEL_CLASSES.menuItemIcon}><ChatOutline size={wide ? 14 : 18} /></span>+ <span className={PANEL_CLASSES.menuItemIcon}><Icon as={ChatOutline} 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-pet/src/client/components/pet-settings.tsx b/packages/dsh-tauri-pet/src/client/components/pet-settings.tsxindex 3909ea2a..64b8022c 100644--- a/packages/dsh-tauri-pet/src/client/components/pet-settings.tsx+++ b/packages/dsh-tauri-pet/src/client/components/pet-settings.tsx@@ -1,6 +1,6 @@import type { ChangeEvent, ReactElement } from 'react'import type { PetListItem, PetSettingsProps, PresetDownloadProgress, PresetPetItem } from '../types'-import { IconImport, IconPlus } from 'dsh-tauri-ui/client'+import { ArrowDownToLine, Icon, Plus } from 'dsh-tauri-ui/client'import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react'import { BUILTIN_PET_ID, PET_DEFAULT_SIZE, PET_SIZE_MAX, PET_SIZE_MIN, PET_SIZE_STEP } from '../constants'import { text, usePetLocale } from '../locales'@@ -458,7 +458,7 @@ export function PetSettings(props: PetSettingsProps): ReactElement {? (<><button type="button" className="dshpet-toolBtn" disabled={busy} onClick={() => { void createPet() }}>- <IconPlus />+ <Icon as={Plus} />{text('create')}</button><button type="button" className="dshpet-toolBtn" disabled={busy} onClick={() => { void toggleVisibility() }}>@@ -468,7 +468,7 @@ export function PetSettings(props: PetSettingsProps): ReactElement {): (<label className="dshpet-toolBtn" aria-disabled={busy}>- <IconImport />+ <Icon as={ArrowDownToLine} />{text('import')}<inputtype="file"diff --git a/packages/dsh-tauri-ui/src/client/components/icons.tsx b/packages/dsh-tauri-ui/src/client/components/icons.tsxindex 08f80ef6..d47b8ced 100644--- a/packages/dsh-tauri-ui/src/client/components/icons.tsx+++ b/packages/dsh-tauri-ui/src/client/components/icons.tsx@@ -13,6 +13,7 @@ export { default as CirclePlay } from '@gravity-ui/icons/CirclePlay'export { default as CircleTree } from '@gravity-ui/icons/CircleTree'export { default as Clock } from '@gravity-ui/icons/Clock'export { default as CommentPlus } from '@gravity-ui/icons/CommentPlus'+export { default as ChatOutline } from '@gravity-ui/icons/CommentPlus'export { default as Ellipsis } from '@gravity-ui/icons/Ellipsis'export { default as EllipsisVertical } from '@gravity-ui/icons/EllipsisVertical'export { default as FolderOpen } from '@gravity-ui/icons/FolderOpen'diff --git a/packages/dsh-tauri-ui/src/client/components/index.ts b/packages/dsh-tauri-ui/src/client/components/index.tsindex 4da631ab..432cb481 100644--- a/packages/dsh-tauri-ui/src/client/components/index.ts+++ b/packages/dsh-tauri-ui/src/client/components/index.ts@@ -1,7 +1,5 @@export { Icon } from './icon'export type { IconComponent, IconProps, SharedIconProps } from './icon'-export { MenuSelect } from './menu-select'-export { FishMark, IconPlaceholder, PanelLeftOutline, circleTreeSvg, clockSvg } from './special-icons'export {ArrowDownToLine,ArrowRight,@@ -11,6 +9,7 @@ export {CirclePlay,CircleTree,Clock,+ ChatOutline,CommentPlus,Ellipsis,EllipsisVertical,@@ -23,3 +22,5 @@ export {Puzzle,TrashBin,} from './icons'+export { MenuSelect } from './menu-select'+export { circleTreeSvg, clockSvg, FishMark, IconPlaceholder, PanelLeftOutline } from './special-icons'diff --git a/packages/dsh-tauri-ui/src/client/components/sidebar.tsx b/packages/dsh-tauri-ui/src/client/components/sidebar.tsxindex 6f975d3c..e0dc89c5 100644--- a/packages/dsh-tauri-ui/src/client/components/sidebar.tsx+++ b/packages/dsh-tauri-ui/src/client/components/sidebar.tsx@@ -45,8 +45,8 @@ import {settingsStore,useSettingsUi,} from '../store'-import { ArrowRight } from './icons'import { Icon } from './icon'+import { ArrowRight } from './icons'import { SettingsNavIcon } from './nav-icon'/**diff --git a/packages/dsh-tauri-ui/src/client/types/index.ts b/packages/dsh-tauri-ui/src/client/types/index.tsindex d5631deb..b1a0d76d 100644--- a/packages/dsh-tauri-ui/src/client/types/index.ts+++ b/packages/dsh-tauri-ui/src/client/types/index.ts@@ -43,12 +43,6 @@ export interface SettingsRow {/** Keys in the settings UI translation dictionary. */export type SettingsUiKey = 'back' | 'search' | 'settings' | 'noResults'-/** Common SVG props accepted by shared icon adapters. */-export interface IconProps {- size?: number- className?: string-}-/** One option displayed by the shared primitives Menu select. */export interface MenuSelectOption {id: string