DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(plugin): move preinstall preset entry into the plugins header
hairyfcb96737b311c
diff --git a/src/components/config-debug.tsx b/src/components/config-debug.tsxindex a33df275..711e31ad 100644--- a/src/components/config-debug.tsx+++ b/src/components/config-debug.tsx@@ -1,5 +1,5 @@-import { ArrowRotateRight, ArrowUpRightFromSquare, ChevronRight, CircleInfo, Copy, Folder, Power, TrashBin } from '@gravity-ui/icons'-import { Button, Chip, Description, Input, Link, ListBox, Select, Spinner, Surface, Switch, Tooltip } from '@heroui/react'+import { ArrowRotateRight, ArrowUpRightFromSquare, ChevronRight, Copy, Folder, Power, TrashBin } from '@gravity-ui/icons'+import { Button, Chip, Description, Input, Link, ListBox, Select, Spinner, Surface, Switch } from '@heroui/react'import { useMutation, useQuery } from '@tanstack/react-query'import { invoke } from '@tauri-apps/api/core'import { useState } from 'react'@@ -37,7 +37,7 @@ export interface AppConfig {export function ConfigDebug() {const { t, i18n } = useTranslation()- const { serviceRunning, busyAction, preinstall } = useStore(store.harness)+ const { serviceRunning, busyAction } = useStore(store.harness)const { updateInfo } = useStore(store.harnessUpdater)const [port, setPort] = useState<number>(3080)@@ -281,34 +281,6 @@ export function ConfigDebug() {</Button></div></div>- <div className="flex items-center justify-between gap-2">- <div className="flex items-center gap-2 flex-1">- <span className="text-xs font-medium text-ink">{t('preinstall.settings_title')}</span>- </div>- <Tooltip delay={0}>- <Button- isIconOnly- size="sm"- className="rounded-md text-xs size-6 text-muted"- variant="ghost"- >- <CircleInfo />- </Button>- <Tooltip.Content>- <p>{t('preinstall.settings_hint')}</p>- </Tooltip.Content>- </Tooltip>- <Button- size="sm"- variant="primary"- className="rounded-md"- onPress={store.harness.openPreinstall}- isDisabled={busyAction !== null || preinstall.installing}- >- {t('preinstall.open_preset')}- </Button>- </div>-<div className="flex items-center justify-between"><span className="text-xs font-medium text-ink">{t('ui.language')}</span><Selectdiff --git a/src/components/config-plugin.tsx b/src/components/config-plugin.tsxindex f40b5386..b1e6de08 100644--- a/src/components/config-plugin.tsx+++ b/src/components/config-plugin.tsx@@ -1,11 +1,12 @@import { CircleExclamation } from '@gravity-ui/icons'-import { Button, Chip, Label, Spinner, Tooltip } from '@heroui/react'+import { Button, Chip, Label, Spinner, Tooltip, Typography } from '@heroui/react'import { useOverlay } from '@overlastic/react'import { useMutation, useQueryClient } from '@tanstack/react-query'import { invoke } from '@tauri-apps/api/core'import { useState } from 'react'import { useTranslation } from 'react-i18next'import { If } from 'react-if-lite'+import { useStore } from 'valtio-define'import { store } from '@/store'import { toast } from '@/utils'import { useDshPlugins } from '../hooks/use-dsh-plugins'@@ -31,6 +32,7 @@ export function ConfigPlugin() {const { t } = useTranslation()const queryClient = useQueryClient()const { plugins, loading, error } = useDshPlugins()+ const { preinstall } = useStore(store.harness)const [dialogHolder, openDialog] = useOverlay(Modal, { type: 'holder' })@@ -119,7 +121,29 @@ export function ConfigPlugin() {return (<div>- <PanelHeader className="sticky top-0 bg-canvas z-10 pb-3" title={t('plugins.title')} description={t('plugins.panel_tooltip')} />+ <PanelHeader+ className="sticky top-0 bg-canvas z-10 pb-3"+ title={(+ <div className="flex justify-between">+ <Typography type="h4">{t('plugins.title')}</Typography>+ <Tooltip delay={0}>+ <Button+ size="sm"+ variant="primary"+ className="rounded-md"+ onPress={store.harness.openPreinstall}+ isDisabled={preinstall.installing}+ >+ {t('preinstall.open_preset')}+ </Button>+ <Tooltip.Content>+ <p>{t('preinstall.settings_hint')}</p>+ </Tooltip.Content>+ </Tooltip>+ </div>+ )}+ description={t('plugins.panel_tooltip')}+ />{/* 加载 / 失败 / 空态 */}<PanelState loading={loading} error={error}>diff --git a/src/components/panel-header.tsx b/src/components/panel-header.tsxindex ff8e2172..15bd193d 100644--- a/src/components/panel-header.tsx+++ b/src/components/panel-header.tsx@@ -1,3 +1,4 @@+import type { ReactNode } from 'react'import { Typography } from '@heroui/react'import { cn } from 'tailwind-variants'@@ -7,7 +8,7 @@ import { cn } from 'tailwind-variants'* className 用于叠加 sticky / 背景等定位类(如 config-plugin 的 sticky 头部)。*/export interface PanelHeaderProps {- title: string+ title: string | ReactNodedescription: stringclassName?: string}@@ -15,7 +16,7 @@ export interface PanelHeaderProps {export function PanelHeader({ title, description, className }: PanelHeaderProps) {return (<div className={cn('space-y-2', className)}>- <Typography type="h4">{title}</Typography>+ {typeof title === 'string' ? <Typography type="h4">{title}</Typography> : title}<Typography color="muted" type="body-sm">{description}</Typography></div>)