Skip to content

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

docs(ui): 组件层补引用源/版本/类名标签,并把 .types.ts 收敛进组件内部

hairyf1c96c7967000
diff --git a/packages/dsh-tauri-ui/src/client/components/button.tsx b/packages/dsh-tauri-ui/src/client/components/button.tsx
index 05cbecd6..2e85544a 100644
--- a/packages/dsh-tauri-ui/src/client/components/button.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/button.tsx
@@ -1,10 +1,29 @@
-import type { ReactElement } from 'react'
-import type { ButtonProps, ButtonSize } from './button.types'
+// 引用源 @deepseek-ai/dsh-client-ui-primitives · packages/client/ui-primitives/src/Button.tsx ; @deepseek-ai/dsh-client-ui-sidebar · packages/client/ui-sidebar/src/client/SidebarRoot.module.css ; @deepseek-ai/dsh-client-ui-plugin-manager · packages/client/ui-plugin-manager/src/client/PluginManagerPage.module.css · 版本 0.1.7-alpha.1(≥0.1.5-rc.1)· hash 官方原样(无 refork 类) elevated=newSession add=addButton addGhost=addButton danger=danger
+import type { ButtonHTMLAttributes, ReactElement, ReactNode } from 'react'
import { Button as PrimitiveButton } from '@deepseek-ai/dsh-client-ui-primitives'
import { compact } from 'dsh-tauri/client'
import { useMountStyle } from '../hooks/use-mount-style'
import buttonStyle from './button.cssr'
+export type ButtonVariant
+ = | 'primary'
+ | 'ghost'
+ | 'outline'
+ | 'toolbar'
+ | 'elevated'
+ | 'add'
+ | 'addGhost'
+ | 'danger'
+
+export type ButtonSize = 'sm' | 'md'
+
+export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
+ variant?: ButtonVariant
+ size?: ButtonSize
+ icon?: ReactNode
+ children?: ReactNode
+}
+
const BUTTON_STYLE_ID = 'dsh-tauri-ui-button-styles'
function isLocalVariant(variant: ButtonProps['variant']): variant is 'elevated' | 'add' | 'addGhost' | 'danger' {
diff --git a/packages/dsh-tauri-ui/src/client/components/button.types.ts b/packages/dsh-tauri-ui/src/client/components/button.types.ts
deleted file mode 100644
index 2617ad19..00000000
--- a/packages/dsh-tauri-ui/src/client/components/button.types.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import type { ButtonHTMLAttributes, ReactNode } from 'react'
-
-export type ButtonVariant
- = | 'primary'
- | 'ghost'
- | 'outline'
- | 'toolbar'
- | 'elevated'
- | 'add'
- | 'addGhost'
- | 'danger'
-
-export type ButtonSize = 'sm' | 'md'
-
-export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
- variant?: ButtonVariant
- size?: ButtonSize
- icon?: ReactNode
- children?: ReactNode
-}
diff --git a/packages/dsh-tauri-ui/src/client/components/checkbox.tsx b/packages/dsh-tauri-ui/src/client/components/checkbox.tsx
index f9664faa..77845f85 100644
--- a/packages/dsh-tauri-ui/src/client/components/checkbox.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/checkbox.tsx
@@ -1,8 +1,16 @@
-import type { ReactElement } from 'react'
-import type { CheckboxProps } from './checkbox.types'
+import type { ReactElement, ReactNode } from 'react'
import { useMountStyle } from '../hooks/use-mount-style'
import checkboxStyle from './checkbox.cssr'
+export interface CheckboxProps {
+ 'checked': boolean
+ 'disabled'?: boolean
+ 'onChange': (next: boolean) => void
+ 'children'?: ReactNode
+ 'aria-label'?: string
+ 'title'?: string
+}
+
export const CHECKBOX_STYLE_ID = 'dsh-tauri-ui-checkbox-styles'
export function Checkbox({ checked, disabled, onChange, children, 'aria-label': ariaLabel, title }: CheckboxProps): ReactElement {
diff --git a/packages/dsh-tauri-ui/src/client/components/checkbox.types.ts b/packages/dsh-tauri-ui/src/client/components/checkbox.types.ts
deleted file mode 100644
index bb1f3b9e..00000000
--- a/packages/dsh-tauri-ui/src/client/components/checkbox.types.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { ReactNode } from 'react'
-
-export interface CheckboxProps {
- 'checked': boolean
- 'disabled'?: boolean
- 'onChange': (next: boolean) => void
- 'children'?: ReactNode
- 'aria-label'?: string
- 'title'?: string
-}
diff --git a/packages/dsh-tauri-ui/src/client/components/chip.tsx b/packages/dsh-tauri-ui/src/client/components/chip.tsx
index e5a21844..89f220de 100644
--- a/packages/dsh-tauri-ui/src/client/components/chip.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/chip.tsx
@@ -1,9 +1,20 @@
-import type { ReactElement } from 'react'
-import type { ChipProps } from './chip.types'
+// 引用源 @deepseek-ai/dsh-client-ui-agent-preset · packages/client/ui-agent-preset/src/client/AgentPresetSeat.module.css ; @deepseek-ai/dsh-client-ui-permission-presets · packages/client/ui-permission-presets/src/client/PermissionSelect.module.css ; @deepseek-ai/dsh-client-ui-permission-presets · packages/client/ui-permission-presets/src/client/PermissionRow.module.css · 版本 0.1.7-alpha.1(≥0.1.5-rc.1)· hash seat=seat composerTrigger=trigger selector=selector
+import type { ButtonHTMLAttributes, ReactElement, ReactNode } from 'react'
import { compact } from 'dsh-tauri/client'
import { useMountStyle } from '../hooks/use-mount-style'
import chipStyle from './chip.cssr'
+export type ChipVariant = 'seat' | 'composerTrigger' | 'selector'
+
+export interface ChipProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
+ variant: ChipVariant
+ icon?: ReactNode
+ badge?: ReactNode
+ chevron?: ReactNode
+ open?: boolean
+ children?: ReactNode
+}
+
const CHIP_STYLE_ID = 'dsh-tauri-ui-chip-styles'
export function Chip({ variant, icon, badge, chevron, open, className, children, ...rest }: ChipProps): ReactElement {
diff --git a/packages/dsh-tauri-ui/src/client/components/chip.types.ts b/packages/dsh-tauri-ui/src/client/components/chip.types.ts
deleted file mode 100644
index 9f406842..00000000
--- a/packages/dsh-tauri-ui/src/client/components/chip.types.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { ButtonHTMLAttributes, ReactNode } from 'react'
-
-export type ChipVariant = 'seat' | 'composerTrigger' | 'selector'
-
-export interface ChipProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
- variant: ChipVariant
- icon?: ReactNode
- badge?: ReactNode
- chevron?: ReactNode
- open?: boolean
- children?: ReactNode
-}
diff --git a/packages/dsh-tauri-ui/src/client/components/goal-bar.tsx b/packages/dsh-tauri-ui/src/client/components/goal-bar.tsx
index dfa342d1..52897a39 100644
--- a/packages/dsh-tauri-ui/src/client/components/goal-bar.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/goal-bar.tsx
@@ -1,9 +1,23 @@
-import type { ReactElement } from 'react'
-import type { GoalBarActionProps, GoalBarProps } from './goal-bar.types'
+// 引用源 @deepseek-ai/dsh-client-ui-goal · packages/client/ui-goal/src/client/GoalBar.module.css · 版本 0.1.7-alpha.1(≥0.1.5-rc.1)· hash bar=bar action=iconBtn
+import type { ButtonHTMLAttributes, HTMLAttributes, ReactElement, ReactNode } from 'react'
import { compact } from 'dsh-tauri/client'
import { useMountStyle } from '../hooks/use-mount-style'
import goalBarStyle from './goal-bar.cssr'
+export interface GoalBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
+ glyph?: ReactNode
+ label?: ReactNode
+ objective?: ReactNode
+ error?: ReactNode
+ actions?: ReactNode
+ children?: ReactNode
+}
+
+export interface GoalBarActionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
+ iconOnly?: boolean
+ children?: ReactNode
+}
+
const GOAL_BAR_STYLE_ID = 'dsh-tauri-ui-goal-bar-styles'
export function GoalBar({
diff --git a/packages/dsh-tauri-ui/src/client/components/goal-bar.types.ts b/packages/dsh-tauri-ui/src/client/components/goal-bar.types.ts
deleted file mode 100644
index 34423609..00000000
--- a/packages/dsh-tauri-ui/src/client/components/goal-bar.types.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react'
-
-export interface GoalBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
- glyph?: ReactNode
- label?: ReactNode
- objective?: ReactNode
- error?: ReactNode
- actions?: ReactNode
- children?: ReactNode
-}
-
-export interface GoalBarActionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
- iconOnly?: boolean
- children?: ReactNode
-}
diff --git a/packages/dsh-tauri-ui/src/client/components/icon-button.tsx b/packages/dsh-tauri-ui/src/client/components/icon-button.tsx
index fd1281a6..f5d95661 100644
--- a/packages/dsh-tauri-ui/src/client/components/icon-button.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/icon-button.tsx
@@ -1,3 +1,4 @@
+// 引用源 @deepseek-ai/dsh-client-ui-workspace · packages/client/ui-workspace/src/client/rows/WorkspaceBrowser.module.css ; @deepseek-ai/dsh-client-ui-plugin-manager · packages/client/ui-plugin-manager/src/client/PluginManagerPage.module.css ; @deepseek-ai/dsh-client-ui-settings-models · packages/client/ui-settings-models/src/client/ModelsSection.module.css ; @deepseek-ai/dsh-client-ui-sidebar · packages/client/ui-sidebar/src/client/SidebarRoot.module.css ; @deepseek-ai/dsh-client-ui-workspace · packages/client/ui-workspace/src/client/rows/Rows.module.css ; @deepseek-ai/dsh-client-ui-primitives · packages/client/ui-primitives/src/settings-form/fields.module.css ; @deepseek-ai/dsh-client-ui-chat · packages/client/ui-chat/src/client/chat/MessageIconActions.module.css · 版本 0.1.7-alpha.1(≥0.1.5-rc.1)· hash search=searchButton toolbar=iconButton model=iconButton round=iconButton row=iconButton help=helpButton action=action
import type { ButtonHTMLAttributes, ReactElement, ReactNode } from 'react'
import { compact } from 'dsh-tauri/client'
diff --git a/packages/dsh-tauri-ui/src/client/components/icon.tsx b/packages/dsh-tauri-ui/src/client/components/icon.tsx
index 3c26f5ac..980c8226 100644
--- a/packages/dsh-tauri-ui/src/client/components/icon.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/icon.tsx
@@ -1,5 +1,13 @@
-import type { ReactElement } from 'react'
-import type { IconProps } from './icon.types'
+import type { ComponentType, ReactElement, SVGProps } from 'react'
+
+export type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
+
+export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'as'> {
+ as: IconComponent
+ size?: number
+}
+
+export type SharedIconProps = Omit<SVGProps<SVGSVGElement>, 'as'> & { size?: number }
export function Icon({ as: Component, size = 16, ...props }: IconProps): ReactElement {
return <Component {...props} width={size} height={size} />
diff --git a/packages/dsh-tauri-ui/src/client/components/icon.types.ts b/packages/dsh-tauri-ui/src/client/components/icon.types.ts
deleted file mode 100644
index df99e27b..00000000
--- a/packages/dsh-tauri-ui/src/client/components/icon.types.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import type { ComponentType, SVGProps } from 'react'
-
-export type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
-
-export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'as'> {
- as: IconComponent
- size?: number
-}
-
-export type SharedIconProps = Omit<SVGProps<SVGSVGElement>, 'as'> & { size?: number }
diff --git a/packages/dsh-tauri-ui/src/client/components/icons.tsx b/packages/dsh-tauri-ui/src/client/components/icons.tsx
index f3a0c663..19eab327 100644
--- a/packages/dsh-tauri-ui/src/client/components/icons.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/icons.tsx
@@ -1,3 +1,4 @@
+// 引用源 @gravity-ui/icons · 逐名转发 @gravity-ui/icons/<Name> · 版本 未记录(registry.ts 无该条目)· hash 未记录(registry.ts 无该条目)
export { default as Alarm } from '@gravity-ui/icons/Alarm'
export { default as ArrowLeft } from '@gravity-ui/icons/ArrowLeft'
export { default as ArrowRight } from '@gravity-ui/icons/ArrowRight'
diff --git a/packages/dsh-tauri-ui/src/client/components/index.ts b/packages/dsh-tauri-ui/src/client/components/index.ts
index 6c4dae32..ccf7606b 100644
--- a/packages/dsh-tauri-ui/src/client/components/index.ts
+++ b/packages/dsh-tauri-ui/src/client/components/index.ts
@@ -1,17 +1,10 @@
export * from './button'
-export type * from './button.types'
export * from './checkbox'
-export type * from './checkbox.types'
export * from './chip'
-export type * from './chip.types'
export * from './goal-bar'
-export type * from './goal-bar.types'
export * from './icon'
export * from './icon-button'
-export type * from './icon.types'
export * from './icons'
export * from './official'
export * from './registry'
-export type * from './registry.types'
export * from './tag'
-export type * from './tag.types'
diff --git a/packages/dsh-tauri-ui/src/client/components/official.tsx b/packages/dsh-tauri-ui/src/client/components/official.tsx
index f221e6ce..532ad71d 100644
--- a/packages/dsh-tauri-ui/src/client/components/official.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/official.tsx
@@ -1,3 +1,4 @@
+// 引用源 @deepseek-ai/dsh-client-ui-primitives · packages/client/ui-primitives/src/ · 版本 0.1.7-alpha.1(≥0.1.5-rc.1)· hash 官方原样(无 refork 类)
/**
* 官方 `@deepseek-ai/dsh-client-ui-primitives` 的直通转发层。
*
diff --git a/packages/dsh-tauri-ui/src/client/components/registry.ts b/packages/dsh-tauri-ui/src/client/components/registry.ts
index a6363cb5..52dbf4a0 100644
--- a/packages/dsh-tauri-ui/src/client/components/registry.ts
+++ b/packages/dsh-tauri-ui/src/client/components/registry.ts
@@ -1,4 +1,19 @@
-import type { UiComponentEntry, UiComponentSource } from './registry.types'
+export interface UiComponentSource {
+ kind: 'reexport' | 'refork'
+ component: string
+ variant?: string
+ package: string
+ version: string
+ availableAt: readonly string[]
+ upstreamPath: string
+ mappedClass?: string
+}
+
+export interface UiComponentEntry {
+ id: string
+ title: string
+ source: UiComponentSource
+}
const PRIMITIVES = '@deepseek-ai/dsh-client-ui-primitives'
const VERSION = '0.1.7-alpha.1'
diff --git a/packages/dsh-tauri-ui/src/client/components/registry.types.ts b/packages/dsh-tauri-ui/src/client/components/registry.types.ts
deleted file mode 100644
index efb5c47f..00000000
--- a/packages/dsh-tauri-ui/src/client/components/registry.types.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-export interface UiComponentSource {
- kind: 'reexport' | 'refork'
- component: string
- variant?: string
- package: string
- version: string
- availableAt: readonly string[]
- upstreamPath: string
- mappedClass?: string
-}
-
-export interface UiComponentEntry {
- id: string
- title: string
- source: UiComponentSource
-}
diff --git a/packages/dsh-tauri-ui/src/client/components/tag.tsx b/packages/dsh-tauri-ui/src/client/components/tag.tsx
index a0ff449d..f684b892 100644
--- a/packages/dsh-tauri-ui/src/client/components/tag.tsx
+++ b/packages/dsh-tauri-ui/src/client/components/tag.tsx
@@ -1,10 +1,20 @@
-import type { ReactElement } from 'react'
-import type { TagProps } from './tag.types'
+// 引用源 @deepseek-ai/dsh-client-ui-primitives · packages/client/ui-primitives/src/Tag.tsx ; @deepseek-ai/dsh-client-ui-plugin-manager · packages/client/ui-plugin-manager/src/client/PluginManagerPage.module.css · 版本 0.1.7-alpha.1(≥0.1.5-rc.1)· hash 官方原样(无 refork 类) version=versionTag status=statusTag
+import type { HTMLAttributes, ReactElement, ReactNode } from 'react'
import { Tag as PrimitiveTag } from '@deepseek-ai/dsh-client-ui-primitives'
import { compact } from 'dsh-tauri/client'
import { useMountStyle } from '../hooks/use-mount-style'
import tagStyle from './tag.cssr'
+export type TagVariant = 'default' | 'version' | 'status'
+
+export type TagTone = 'outline' | 'solid' | 'neutral' | 'quiet' | 'success' | 'info' | 'warning' | 'danger'
+
+export interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
+ variant?: TagVariant
+ tone?: TagTone
+ children?: ReactNode
+}
+
const TAG_STYLE_ID = 'dsh-tauri-ui-tag-styles'
function LocalTag({ variant, tone = 'outline', className, children, ...rest }: TagProps & { variant: 'version' | 'status' }): ReactElement {
diff --git a/packages/dsh-tauri-ui/src/client/components/tag.types.ts b/packages/dsh-tauri-ui/src/client/components/tag.types.ts
deleted file mode 100644
index 92b3a4e4..00000000
--- a/packages/dsh-tauri-ui/src/client/components/tag.types.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import type { HTMLAttributes, ReactNode } from 'react'
-
-export type TagVariant = 'default' | 'version' | 'status'
-
-export type TagTone = 'outline' | 'solid' | 'neutral' | 'quiet' | 'success' | 'info' | 'warning' | 'danger'
-
-export interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
- variant?: TagVariant
- tone?: TagTone
- children?: ReactNode
-}
diff --git a/packages/dsh-tauri-ui/src/client/ui/nav-icon.tsx b/packages/dsh-tauri-ui/src/client/ui/nav-icon.tsx
index 0d1a9275..8fa6a6b0 100644
--- a/packages/dsh-tauri-ui/src/client/ui/nav-icon.tsx
+++ b/packages/dsh-tauri-ui/src/client/ui/nav-icon.tsx
@@ -1,12 +1,13 @@
import type { ReactElement } from 'react'
-import type { IconComponent } from '../components/icon.types'
+import type { IconComponent } from '../components/icon'
import { get } from 'dsh-tauri/client'
import { Icon } from '../components/icon'
import { Database, Gear, Person, Puzzle } from '../components/icons'
-const SETTINGS_NAV_ICON_STYLE_ID = 'dsh-tauri-ui-settings-nav-icon-styles'
import { useMountStyle } from '../hooks/use-mount-style'
import settingsNavIconStyle from './nav-icon.cssr'
+const SETTINGS_NAV_ICON_STYLE_ID = 'dsh-tauri-ui-settings-nav-icon-styles'
+
const NAV_ICONS: Record<string, IconComponent> = {
'models': Database,
'agent-presets': Person,