Skip to content

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

refactor(plugins): 消费方接入 GoalBar 图标动作与新 Chip 结构

hairyff97b8bbb0290
diff --git a/packages/dsh-tauri-bundle/package.json b/packages/dsh-tauri-bundle/package.json
index 537194c1..ab1aa802 100644
--- a/packages/dsh-tauri-bundle/package.json
+++ b/packages/dsh-tauri-bundle/package.json
@@ -10,7 +10,7 @@
"dsh-tauri-pet": "workspace:*",
"dsh-tauri-rightclick": "workspace:*",
"dsh-tauri-session": "workspace:*",
- "dsh-tauri-turnrewind": "workspace:*",
+ "dsh-tauri-running-changes": "workspace:*",
"dsh-tauri-ui": "workspace:*",
"dsh-tauri-worktree": "workspace:*"
}
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 5068ea1f..dfa4bfcd 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
@@ -182,10 +182,12 @@ export function ModelPicker({
setPane('root')
setOpen(true)
}}
- chevron={<Icon as={ChevronDown} size={14} />}
+ badge={effortLabel === undefined
+ ? undefined
+ : <span className="dshp-scheduler__model-trigger-effort">{effortLabel}</span>}
+ chevron={<Icon as={ChevronDown} />}
>
<span className="dshp-scheduler__model-trigger-label">{trigger}</span>
- {effortLabel !== undefined && <span className="dshp-scheduler__model-trigger-effort">{effortLabel}</span>}
</Chip>
)}
/>
diff --git a/packages/dsh-tauri-panel-scheduler/src/host/service/executor.utils.ts b/packages/dsh-tauri-panel-scheduler/src/host/service/executor.utils.ts
index 798e5c70..5622a527 100644
--- a/packages/dsh-tauri-panel-scheduler/src/host/service/executor.utils.ts
+++ b/packages/dsh-tauri-panel-scheduler/src/host/service/executor.utils.ts
@@ -40,7 +40,7 @@ function reasonOf(reason: Record<string, unknown>): Record<string, unknown> {
* turn 收尾原因 → 失败文案。
*
* `turn/end` 缺失不算失败:核心在异常收尾(取消 / 中断 / 崩溃修复)时可能不补写,
- * 与 `agent/status → idle` 的兜底语义保持一致(见 pet / turnrewind 的同名处理)。
+ * 与 `agent/status → idle` 的兜底语义保持一致(见 pet / running-changes 的同名处理)。
*/
export function describeFailure(reason: Record<string, unknown> | undefined): RunFailure {
if (!reason)
diff --git a/packages/dsh-tauri-pet/src/client/components/pet-settings.tsx b/packages/dsh-tauri-pet/src/client/components/pet-settings.tsx
index 5252e9f2..f8489a2e 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 { PetSettingsProps } from './pet-settings.types'
-import { ArrowDownToLine, Button, Icon, Plus, SegmentedControl } from 'dsh-tauri-ui/client'
+import { ArrowRightFromSquare, Button, Icon, Plus, SegmentedControl } from 'dsh-tauri-ui/client'
import { useStore, useWatchImmediate } from 'dsh-tauri/client'
import { useEffect, useId, useRef, useState } from 'react'
import { PET_DEFAULT_SIZE, PET_SIZE_MAX, PET_SIZE_MIN, PET_SIZE_STEP } from '../constants'
@@ -254,7 +254,7 @@ export function PetSettings(props: PetSettingsProps): ReactElement {
type="button"
variant="outline"
size="sm"
- icon={<Icon as={ArrowDownToLine} />}
+ icon={<Icon as={ArrowRightFromSquare} />}
disabled={busy}
onClick={() => fileRef.current?.click()}
>
diff --git a/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsx b/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsx
index a96a7770..5b7398cb 100644
--- a/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsx
+++ b/packages/dsh-tauri-ui-playground/src/client/ui/components-playground/ui-components.tsx
@@ -1,6 +1,7 @@
import type { ChipVariant, UiComponentEntry } from 'dsh-tauri-ui/client'
import type { ReactElement, ReactNode } from 'react'
import {
+ ArrowRightFromSquare,
Button,
ChevronDown,
Chip,
@@ -20,9 +21,11 @@ import {
Puzzle,
Switch,
Tag,
+ TerminalLine,
TrashBin,
UI_COMPONENT_REGISTRY,
useMountStyle,
+ Xmark,
} from 'dsh-tauri-ui/client'
import { useState } from 'react'
import { UI_COMPONENTS_STYLE_ID } from '../../constants'
@@ -74,7 +77,7 @@ function SelectSample({ variant, icon, options }: {
<Chip
aria-expanded={open}
aria-haspopup="menu"
- chevron={<Icon as={ChevronDown} size={12} />}
+ chevron={<Icon as={ChevronDown} size={14} />}
icon={icon}
open={open}
variant={variant}
@@ -175,17 +178,47 @@ export function UiComponentsPanel(): ReactElement {
<GoalBar
actions={(
<>
- <GoalBarAction>日志</GoalBarAction>
- <GoalBarAction>检出本地</GoalBarAction>
- <GoalBarAction variant="danger">放弃</GoalBarAction>
+ <GoalBarAction
+ aria-label="检出本地"
+ iconOnly
+ title="检出本地"
+ >
+ <Icon as={ArrowRightFromSquare} size={14} />
+ </GoalBarAction>
+ <GoalBarAction
+ aria-label="放弃"
+ iconOnly
+ title="放弃"
+ >
+ <Icon as={TrashBin} size={14} />
+ </GoalBarAction>
</>
)}
glyph={<Icon as={CircleTree} size={14} />}
label="工作树"
objective="deepseek-harness-desktop · worktree 5a25420f"
- />
+ >
+ <GoalBarAction
+ aria-label="日志"
+ iconOnly
+ title="日志"
+ >
+ <Icon as={TerminalLine} size={14} />
+ </GoalBarAction>
+ </GoalBar>
<GoalBar
- actions={<GoalBarAction>关闭</GoalBarAction>}
+ actions={(
+ <>
+ <GoalBarAction
+ aria-label="关闭"
+ iconOnly
+ title="关闭"
+ >
+ <Icon as={Xmark} size={14} />
+ </GoalBarAction>
+ <GoalBarAction>文本动作</GoalBarAction>
+ </>
+ )}
error="worktree create failed: exit 128"
glyph={<Icon as={CircleTree} size={14} />}
label="错误"
@@ -193,7 +226,7 @@ export function UiComponentsPanel(): ReactElement {
</div>
</div>
<div className="dshp-ui-components__sample">
- <SelectSample icon={<Icon as={Person} size={14} />} options={SEAT_OPTIONS} variant="seat" />
+ <SelectSample icon={<Icon as={Person} size={16} />} options={SEAT_OPTIONS} variant="seat" />
<SelectSample icon={<Icon as={Gear} size={14} />} options={PERMISSION_OPTIONS} variant="composerTrigger" />
<SelectSample options={THEME_OPTIONS} variant="selector" />
<Tag variant="version">1.0.0</Tag>
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 79d3e3d2..0bc85944 100644
--- a/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx
+++ b/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx
@@ -229,7 +229,7 @@ function WorktreeModeControl({ sessionId, useInput, inputActions, sessionsRuntim
aria-expanded={open}
open={open}
icon={<Icon as={CircleTree} size={14} />}
- chevron={<Icon as={ChevronDown} size={14} />}
+ chevron={<Icon as={ChevronDown} />}
onClick={() => setOpen(value => !value)}
>
<span className="dshp-mode-select__label">{activeLabel}</span>
diff --git a/packages/dsh-tauri-worktree/src/client/components/surface.tsx b/packages/dsh-tauri-worktree/src/client/components/surface.tsx
index f41cfe32..73c5ea70 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 './surface.types'
-import { CircleTree, GoalBar, GoalBarAction, Icon } from 'dsh-tauri-ui/client'
+import { ArrowRightFromSquare, CircleTree, GoalBar, GoalBarAction, Icon, TerminalLine, TrashBin, Xmark } from 'dsh-tauri-ui/client'
import { useState } from 'react'
import { useWorktreeSession } from '../hooks/use-worktree-session'
import { locale } from '../locales'
@@ -34,17 +34,32 @@ export function WorktreeSurface({ sessionId }: SurfaceBarProps): ReactElement |
<>
{bound && !deleting && (
<>
- <GoalBarAction onClick={() => store.worktree.patch(sessionId, { checkoutOpen: true, error: '' })}>
- {locale.text('surfaceCheckout')}
+ <GoalBarAction
+ aria-label={locale.text('surfaceCheckout')}
+ iconOnly
+ onClick={() => store.worktree.patch(sessionId, { checkoutOpen: true, error: '' })}
+ title={locale.text('surfaceCheckout')}
+ >
+ <Icon as={ArrowRightFromSquare} size={14} />
</GoalBarAction>
- <GoalBarAction variant="danger" onClick={() => store.worktree.patch(sessionId, { abandonOpen: true })}>
- {locale.text('surfaceAbandon')}
+ <GoalBarAction
+ aria-label={locale.text('surfaceAbandon')}
+ iconOnly
+ onClick={() => store.worktree.patch(sessionId, { abandonOpen: true })}
+ title={locale.text('surfaceAbandon')}
+ >
+ <Icon as={TrashBin} size={14} />
</GoalBarAction>
</>
)}
{failed && !bound && (
- <GoalBarAction onClick={() => store.worktree.patch(sessionId, { phase: 'idle', error: '' })}>
- {locale.text('surfaceDismiss')}
+ <GoalBarAction
+ aria-label={locale.text('surfaceDismiss')}
+ iconOnly
+ onClick={() => store.worktree.patch(sessionId, { phase: 'idle', error: '' })}
+ title={locale.text('surfaceDismiss')}
+ >
+ <Icon as={Xmark} size={14} />
</GoalBarAction>
)}
</>
@@ -55,11 +70,14 @@ export function WorktreeSurface({ sessionId }: SurfaceBarProps): ReactElement |
label={`${label}${creating ? '...' : ''}`}
>
{bound && state.log.length > 0 && (
- <div className="dshp-worktree__surface-content">
- <GoalBarAction onClick={() => setLogOpen(value => !value)}>
- {locale.text('progressViewLogs')}
- </GoalBarAction>
- </div>
+ <GoalBarAction
+ aria-label={locale.text('progressViewLogs')}
+ iconOnly
+ onClick={() => setLogOpen(value => !value)}
+ title={locale.text('progressViewLogs')}
+ >
+ <Icon as={TerminalLine} size={14} />
+ </GoalBarAction>
)}
</GoalBar>
<Logs log={state.log} open={logOpen} />
diff --git a/packages/dsh-tauri-worktree/src/client/styles/index.cssr.ts b/packages/dsh-tauri-worktree/src/client/styles/index.cssr.ts
index c5a38bc1..ca899039 100644
--- a/packages/dsh-tauri-worktree/src/client/styles/index.cssr.ts
+++ b/packages/dsh-tauri-worktree/src/client/styles/index.cssr.ts
@@ -15,6 +15,7 @@ export default c([
color: 'var(--dsw-alias-label-secondary)',
}),
c('[role="treeitem"]', { position: 'relative' }),
+ c(`[role="treeitem"]:hover [${SESSION_ICON_ATTRIBUTE}]`, { visibility: 'hidden' }),
c('.dshp-mode-select__host', { display: 'inline-flex', alignItems: 'center', flex: 'none' }),
c('.dshp-mode-select__anchor', { display: 'none' }),
@@ -28,7 +29,6 @@ export default c([
margin: '0 auto',
alignSelf: 'center',
}),
- c('.dshp-worktree__surface-content', { display: 'flex', alignItems: 'center', gap: '5px' }),
c('.dshp-worktree__logs', {
display: 'grid',
gridTemplateRows: '0fr',
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 00fcab58..7f6b3250 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -646,12 +646,12 @@ importers:
dsh-tauri-rightclick:
specifier: workspace:*
version: link:../dsh-tauri-rightclick
+ dsh-tauri-running-changes:
+ specifier: workspace:*
+ version: link:../dsh-tauri-running-changes
dsh-tauri-session:
specifier: workspace:*
version: link:../dsh-tauri-session
- dsh-tauri-turnrewind:
- specifier: workspace:*
- version: link:../dsh-tauri-turnrewind
dsh-tauri-ui:
specifier: workspace:*
version: link:../dsh-tauri-ui
@@ -871,6 +871,31 @@ importers:
specifier: catalog:cli
+ packages/dsh-tauri-running-changes:
+ dependencies:
+ dsh-tauri:
+ specifier: workspace:*
+ version: link:../dsh-tauri
+ dsh-tauri-ui:
+ specifier: workspace:*
+ version: link:../dsh-tauri-ui
+ hookable:
+ specifier: catalog:utils
+ version: 6.1.1
+ pathe:
+ specifier: catalog:utils
+ version: 2.0.3
+ unstorage:
+ specifier: catalog:utils
+ version: 1.17.5([email protected])
+ devDependencies:
+ dsh-tauri-tsdown:
+ specifier: workspace:*
+ version: link:../dsh-tauri-tsdown
+ tsdown:
+ specifier: catalog:cli
+
packages/dsh-tauri-session:
dependencies:
dsh-tauri:
@@ -908,31 +933,6 @@ importers:
specifier: catalog:cli
version: 5.8.3
- packages/dsh-tauri-turnrewind:
- dependencies:
- dsh-tauri:
- specifier: workspace:*
- version: link:../dsh-tauri
- dsh-tauri-ui:
- specifier: workspace:*
- version: link:../dsh-tauri-ui
- hookable:
- specifier: catalog:utils
- version: 6.1.1
- pathe:
- specifier: catalog:utils
- version: 2.0.3
- unstorage:
- specifier: catalog:utils
- version: 1.17.5([email protected])
- devDependencies:
- dsh-tauri-tsdown:
- specifier: workspace:*
- version: link:../dsh-tauri-tsdown
- tsdown:
- specifier: catalog:cli
-
packages/dsh-tauri-ui:
dependencies:
dsh-tauri: