DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
refactor(plugins): inline className bem strings, drop class constants
hairyf90dc75c003c8
diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/menu.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/menu.tsxindex fc3536a6..d19a4e49 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/components/menu.tsx+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/menu.tsx@@ -10,7 +10,6 @@import type { CSSProperties, ReactNode, RefObject } from 'react'import { createContext, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react'import { createPortal } from 'react-dom'-import { SCHEDULER_CLASSES as K } from '../constants'export interface MenuOption<T extends string> {readonly value: T@@ -110,7 +109,7 @@ export function MenuPopup({const node = (<divref={menuRef}- className={`${className}${host !== null ? ` ${K.menuFloat}` : ''}`}+ className={`${className}${host !== null ? ` ${'dshp-scheduler__menu-float'}` : ''}`}role="menu"aria-label={ariaLabel}style={host !== null ? style : undefined}@@ -157,15 +156,15 @@ export function MenuRow({readonly onClick: () => void}): JSX.Element {return (- <button type="button" className={`${K.menuRow}${active === true ? ' is-on' : ''}${kv === true ? ' is-kv' : ''}`} onClick={onClick}>- <span className={K.menuRowMain}>+ <button type="button" className={`${'dshp-scheduler__menu-row'}${active === true ? ' is-on' : ''}${kv === true ? ' is-kv' : ''}`} onClick={onClick}>+ <span className="dshp-scheduler__menu-row-main">{icon}<span>{label}</span></span>- <span className={K.menuRowSide}>+ <span className="dshp-scheduler__menu-row-side">{hint}- {active === true && chevron !== true && <i className={K.menuTick} />}- {chevron === true && <i className={K.menuNext} />}+ {active === true && chevron !== true && <i className="dshp-scheduler__menu-tick" />}+ {chevron === true && <i className="dshp-scheduler__menu-next" />}</span></button>)@@ -191,10 +190,10 @@ export function MenuSelect<T extends string>({const menu = useMenuOpen()const current = options.find(item => item.value === value)?.label ?? valuereturn (- <div className={`${K.menuSelect}${wide === true ? ' is-wide' : ''}${pill === true ? ' is-pill' : ''}${menu.open ? ' is-open' : ''}`} ref={menu.root}>+ <div className={`${'dshp-scheduler__menu-select'}${wide === true ? ' is-wide' : ''}${pill === true ? ' is-pill' : ''}${menu.open ? ' is-open' : ''}`} ref={menu.root}><buttontype="button"- className={K.menuSelectBtn}+ className="dshp-scheduler__menu-select-btn"onMouseDown={event => event.stopPropagation()}onClick={() => menu.setOpen(value => !value)}>@@ -208,7 +207,7 @@ export function MenuSelect<T extends string>({menuRef={menu.menu}up={up}end={up}- className={`${K.menuSelectMenu}${pill === true ? ' is-composer' : ''}${up === true ? ' is-up' : ''}${up === true ? ' is-end' : ''}`}+ className={`${'dshp-scheduler__menu-select-menu'}${pill === true ? ' is-composer' : ''}${up === true ? ' is-up' : ''}${up === true ? ' is-end' : ''}`}>{options.map(item => (<MenuRow@@ -242,10 +241,10 @@ export function MenuPanel({}): JSX.Element {const menu = useMenuOpen()return (- <div className={`${K.menuSelect}${ghost === true ? ' is-pill' : ''}${menu.open ? ' is-open' : ''}`} ref={menu.root}>+ <div className={`${'dshp-scheduler__menu-select'}${ghost === true ? ' is-pill' : ''}${menu.open ? ' is-open' : ''}`} ref={menu.root}><buttontype="button"- className={K.chipBtn}+ className="dshp-scheduler__chip-btn"onMouseDown={event => event.stopPropagation()}onClick={() => menu.setOpen(value => !value)}>@@ -257,7 +256,7 @@ export function MenuPanel({anchor={menu.root}menuRef={menu.menu}up={up}- className={`${K.menuSelectMenu} is-composer${up === true ? ' is-up' : ''}`}+ className={`${'dshp-scheduler__menu-select-menu'} is-composer${up === true ? ' is-up' : ''}`}onClick={() => {if (persist !== true)menu.setOpen(false)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.tsxindex be00da1e..fe5d0ff0 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@@ -10,7 +10,6 @@ import type { ModelCatalogFailure, ModelOption, ModelTranslate } from '../types'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'export function ModelPicker({@@ -83,10 +82,10 @@ export function ModelPicker({}return (- <div className={`${K.modelSelect}${menu.open ? ` ${K.modelSelectOpen}` : ''}`} ref={menu.root}>+ <div className={`${'dshp-scheduler__model-select'}${menu.open ? ` ${'dshp-scheduler__model-select--open'}` : ''}`} ref={menu.root}><buttontype="button"- className={K.modelTrigger}+ className="dshp-scheduler__model-trigger"aria-label={selected === undefined? modelT('trigger.selectAria'): effortLabel === undefined@@ -103,10 +102,10 @@ export function ModelPicker({}}><span>{trigger}</span>- {effortLabel !== undefined && <span className={K.modelTriggerEffort}>{effortLabel}</span>}- <Icon as={ChevronDown} className={`${K.modelTriggerChevron}${menu.open ? ` ${K.modelTriggerChevronOpen}` : ''}`} />+ {effortLabel !== undefined && <span className="dshp-scheduler__model-trigger-effort">{effortLabel}</span>}+ <Icon as={ChevronDown} className={`${'dshp-scheduler__model-trigger-chevron'}${menu.open ? ` ${'dshp-scheduler__model-trigger-chevron--open'}` : ''}`} /></button>- <MenuPopup open={menu.open} anchor={menu.root} menuRef={menu.menu} up end className={`${K.modelSelectMenu} is-up is-end`} ariaLabel={modelT('menu.aria')}>+ <MenuPopup open={menu.open} anchor={menu.root} menuRef={menu.menu} up end className={`${'dshp-scheduler__model-select-menu'} is-up is-end`} ariaLabel={modelT('menu.aria')}>{pane === 'root' && (<><MenuRow@@ -130,13 +129,13 @@ export function ModelPicker({{pane === 'model' && (<>{failures.map(failure => (- <div key={failure.provider} className={K.modelWarning}>+ <div key={failure.provider} className="dshp-scheduler__model-warning">{modelT('warning.groupLoad', { name: failure.providerLabel, message: failure.message })}</div>))}{modelGroups.map(([provider, group]) => (- <section key={provider} role="group" aria-label={group.label} className={K.modelGroup}>- <div className={K.modelGroupTitle}>{group.label}</div>+ <section key={provider} role="group" aria-label={group.label} className="dshp-scheduler__model-group">+ <div className="dshp-scheduler__model-group-title">{group.label}</div>{group.models.map((item) => {const value = `${item.provider}::${item.model}`return (@@ -145,21 +144,21 @@ export function ModelPicker({type="button"role="menuitemradio"aria-checked={value === modelKey}- className={K.modelOption}+ className="dshp-scheduler__model-option"title={item.label}onClick={() => selectModel(item)}>- <span className={K.modelOptionCopy}>- <span className={K.modelName}>{item.label}</span>- {item.description !== undefined && <span className={K.modelDescription}>{item.description}</span>}+ <span className="dshp-scheduler__model-option-copy">+ <span className="dshp-scheduler__model-name">{item.label}</span>+ {item.description !== undefined && <span className="dshp-scheduler__model-description">{item.description}</span>}</span>- <span className={K.modelCheck}>{value === modelKey && <Icon as={Check} />}</span>+ <span className="dshp-scheduler__model-check">{value === modelKey && <Icon as={Check} />}</span></button>)})}</section>))}- {modelGroups.length === 0 && failures.length === 0 && <div className={K.modelEmpty}>{modelT('empty.models')}</div>}+ {modelGroups.length === 0 && failures.length === 0 && <div className="dshp-scheduler__model-empty">{modelT('empty.models')}</div>}</>)}{pane === 'effort' && reasoning !== undefined && (@@ -169,11 +168,11 @@ export function ModelPicker({type="button"role="menuitemradio"aria-checked={reasoningEffort === 'none'}- className={K.modelOption}+ className="dshp-scheduler__model-option"onClick={() => selectEffort('none')}>- <span className={K.modelOptionCopy}><span className={K.modelName}>{modelT('effort.providerDefault')}</span></span>- <span className={K.modelCheck}>{reasoningEffort === 'none' && <Icon as={Check} />}</span>+ <span className="dshp-scheduler__model-option-copy"><span className="dshp-scheduler__model-name">{modelT('effort.providerDefault')}</span></span>+ <span className="dshp-scheduler__model-check">{reasoningEffort === 'none' && <Icon as={Check} />}</span></button>)}{reasoning.efforts.map(item => (@@ -182,17 +181,17 @@ export function ModelPicker({type="button"role="menuitemradio"aria-checked={effectiveEffort === item.id}- className={K.modelOption}+ className="dshp-scheduler__model-option"onClick={() => selectEffort(item.id)}>- <span className={K.modelOptionCopy}>- <span className={K.modelName}>{item.name}</span>- {item.description !== undefined && <span className={K.modelDescription}>{item.description}</span>}+ <span className="dshp-scheduler__model-option-copy">+ <span className="dshp-scheduler__model-name">{item.name}</span>+ {item.description !== undefined && <span className="dshp-scheduler__model-description">{item.description}</span>}</span>- <span className={K.modelCheck}>{effectiveEffort === item.id && <Icon as={Check} />}</span>+ <span className="dshp-scheduler__model-check">{effectiveEffort === item.id && <Icon as={Check} />}</span></button>))}- {reasoning.efforts.length === 0 && reasoning.defaultEffort !== undefined && <div className={K.modelEmpty}>{modelT('empty.efforts')}</div>}+ {reasoning.efforts.length === 0 && reasoning.defaultEffort !== undefined && <div className="dshp-scheduler__model-empty">{modelT('empty.efforts')}</div>}</>)}</MenuPopup>diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsxindex 5a768896..45276f10 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsx+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/recommendations.tsx@@ -2,7 +2,6 @@ import type { IconComponent } from 'dsh-tauri-ui/client'import type { ReactElement } from 'react'import type { ScheduleForm, TaskFormState, TaskView, Translate } from '../types'import { Calendar, Icon } from 'dsh-tauri-ui/client'-import { SCHEDULER_CLASSES as K } from '../constants'import { applyCreateTask } from '../service/scheduler'import { recommendationMatchesTask } from '../utils/recommendations'import { describeSchedule } from '../utils/schedule'@@ -70,25 +69,25 @@ export function Recommendations({ t, tasks }: RecommendationsProps): ReactElemenconst visible = RECOMMENDATIONS.filter(rec => !tasks.some(task => recommendationMatchesTask(rec, task, t)))return (- <section className={K.recs} aria-label={t('recommended')}>- <h2 className={K.recTitle}>{t('recommended')}</h2>+ <section className="dshp-scheduler__recs" aria-label={t('recommended')}>+ <h2 className="dshp-scheduler__recs-title">{t('recommended')}</h2>{visible.length === 0- ? <p className={K.muted}>{t('recommendedEmpty')}</p>+ ? <p className="dshp-scheduler__muted">{t('recommendedEmpty')}</p>: (- <ul className={K.recList}>+ <ul className="dshp-scheduler__recs-list">{visible.map(rec => (<li key={rec.id}>- <button type="button" className={K.recItem} onClick={() => void add(rec)}>- <span className={K.recIcon} style={{ color: rec.accent }}>+ <button type="button" className="dshp-scheduler__recs-item" onClick={() => void add(rec)}>+ <span className="dshp-scheduler__recs-icon" style={{ color: rec.accent }}><Icon as={rec.icon} /></span>- <span className={K.recBody}>- <span className={K.recName}>+ <span className="dshp-scheduler__recs-body">+ <span className="dshp-scheduler__recs-name">{t(rec.nameKey)}{' '}<span style={{ color: 'var(--dsw-alias-label-tertiary)' }}>{describeSchedule(rec.schedule, t)}</span></span>- <span className={K.recPrompt}>{t(rec.promptKey)}</span>+ <span className="dshp-scheduler__recs-prompt">{t(rec.promptKey)}</span></span></button></li>diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/runs-tab.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/runs-tab.tsxindex 7ef27d56..f96c82c7 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/components/runs-tab.tsx+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/runs-tab.tsx@@ -4,7 +4,6 @@import type { ReactElement } from 'react'import type { RunView, Translate } from '../types'-import { SCHEDULER_CLASSES as K } from '../constants'import { formatLocalTime } from '../utils/schedule'export interface RunsTabProps {@@ -26,20 +25,20 @@ function statusKey(t: Translate, status: RunView['status']): string {export function RunsTab({ t, runs, onDelete }: RunsTabProps): ReactElement {if (runs.length === 0)- return <p className={K.empty}>{t('emptyRuns')}</p>+ return <p className="dshp-scheduler__empty">{t('emptyRuns')}</p>return (<>- <ul className={K.runsList}>+ <ul className="dshp-scheduler__runs-list">{runs.map(run => (- <li key={run.id} className={K.runRow}>- <div className={K.runMain}>- <span className={K.runName} title={run.taskName}>{run.taskName}</span>- {run.error ? <p className={K.runError}>{run.error}</p> : null}+ <li key={run.id} className="dshp-scheduler__run-row">+ <div className="dshp-scheduler__run-main">+ <span className="dshp-scheduler__run-name" title={run.taskName}>{run.taskName}</span>+ {run.error ? <p className="dshp-scheduler__run-error">{run.error}</p> : null}</div>- <div className={K.runMeta}>- {run.status !== 'succeeded' && <span className={K.chip} data-status={run.status}>{statusKey(t, run.status)}</span>}- <span className={K.runTime}>{formatLocalTime(run.startedAt) ?? ''}</span>- <button type="button" className={K.runDelete} onClick={() => onDelete(run.id)} aria-label={t('deleteRun')}>{t('delete')}</button>+ <div className="dshp-scheduler__run-meta">+ {run.status !== 'succeeded' && <span className="dshp-scheduler__chip" data-status={run.status}>{statusKey(t, run.status)}</span>}+ <span className="dshp-scheduler__run-time">{formatLocalTime(run.startedAt) ?? ''}</span>+ <button type="button" className="dshp-scheduler__run-delete" onClick={() => onDelete(run.id)} aria-label={t('deleteRun')}>{t('delete')}</button></div></li>))}diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/scheduler-panel.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/scheduler-panel.tsxindex f545204e..5a9903ba 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/components/scheduler-panel.tsx+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/scheduler-panel.tsx@@ -12,7 +12,7 @@ import type { ReactElement } from 'react'import type { SchedulerPanelProps, TaskFormState, TaskView } from '../types'import { CommentPlus, Icon, Magnifier, Plus } from 'dsh-tauri-ui/client'import { useEffect, useState } from 'react'-import { SCHEDULER_CLASSES as K, REFRESH_INTERVAL_MS } from '../constants'+import { REFRESH_INTERVAL_MS } from '../constants'import { applyDeleteRun, refreshScheduler } from '../service/scheduler'import { useSchedulerState } from '../store'import { describeSchedule, formatRelative, isTaskPaused } from '../utils/schedule'@@ -65,17 +65,17 @@ export function SchedulerPanel({ t, onViaChat }: SchedulerPanelProps): ReactElem: state.tasksreturn (- <div className={K.shell}>- <header className={K.top}>- <div className={K.heading}>+ <div className="dshp-scheduler__shell">+ <header className="dshp-scheduler__top">+ <div className="dshp-scheduler__heading"><h1>{t('scheduler')}</h1><p>{t('subtitle')}</p></div>- <div className={K.toolbar}>- <div className={K.searchWrap}>- <Icon as={Magnifier} className={K.searchIcon} />+ <div className="dshp-scheduler__toolbar">+ <div className="dshp-scheduler__search-wrap">+ <Icon as={Magnifier} className="dshp-scheduler__search-icon" /><input- className={K.input}+ className="dshp-scheduler__input"type="search"aria-label={t('searchPlaceholder')}placeholder={t('searchPlaceholder')}@@ -83,24 +83,24 @@ export function SchedulerPanel({ t, onViaChat }: SchedulerPanelProps): ReactElemonChange={event => setSearch(event.target.value)}/></div>- <div className={K.toolbarSpacer} />- <button className={K.btn} type="button" onClick={onViaChat}>+ <div className="dshp-scheduler__toolbar-spacer" />+ <button className="dshp-scheduler__btn" type="button" onClick={onViaChat}><Icon as={CommentPlus} />{t('viaChat')}</button>- <button className={`${K.btn} ${K.btnPrimary}`} type="button" onClick={() => setDialog({})}>+ <button className={`${'dshp-scheduler__btn'} ${'dshp-scheduler__btn--primary'}`} type="button" onClick={() => setDialog({})}><Icon as={Plus} />{t('createManual')}</button></div></header>- <div className={K.tabs} role="tablist" aria-label={t('scheduler')}>+ <div className="dshp-scheduler__tabs" role="tablist" aria-label={t('scheduler')}><buttontype="button"role="tab"aria-selected={tab === 'tasks'}- className={tab === 'tasks' ? `${K.tab} ${K.tabActive}` : K.tab}+ className={tab === 'tasks' ? `${'dshp-scheduler__tab'} ${'dshp-scheduler__tab--active'}` : 'dshp-scheduler__tab'}onClick={() => setTab('tasks')}>{t('tasksTab')}@@ -109,22 +109,22 @@ export function SchedulerPanel({ t, onViaChat }: SchedulerPanelProps): ReactElemtype="button"role="tab"aria-selected={tab === 'runs'}- className={tab === 'runs' ? `${K.tab} ${K.tabActive}` : K.tab}+ className={tab === 'runs' ? `${'dshp-scheduler__tab'} ${'dshp-scheduler__tab--active'}` : 'dshp-scheduler__tab'}onClick={() => setTab('runs')}>{t('runsTab')}</button></div>- {state.error ? <p className={K.error} role="alert">{state.error}</p> : null}+ {state.error ? <p className="dshp-scheduler__error" role="alert">{state.error}</p> : null}{tab === 'tasks'? (<>{filtered.length === 0- ? <p className={K.empty}>{search ? t('noMatch') : t('emptyTasks')}</p>+ ? <p className="dshp-scheduler__empty">{search ? t('noMatch') : t('emptyTasks')}</p>: (- <ul className={K.cards}>+ <ul className="dshp-scheduler__cards">{filtered.map(task => (<TaskCardkey={task.id}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.tsxindex a6828257..21b644a2 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@@ -12,7 +12,6 @@ import type { TaskView, Translate } from '../types'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'import { applyDeleteTask, applyRunTask, applyToggleTask } from '../service/scheduler'export interface TaskCardProps {@@ -83,7 +82,7 @@ export function TaskCard({ task, t, describe, nextRun, paused, onEdit }: TaskCarreturn (<liref={cardRef}- className={`${K.card}${paused ? ` ${K.cardPaused}` : ''}`}+ className={`${'dshp-scheduler__card'}${paused ? ` ${'dshp-scheduler__card--paused'}` : ''}`}onClick={(event) => {// 仅当点击落在卡片本体(title/meta 文本)时打开编辑;portaled 的菜单列表 /// Modal 不是 li 的 DOM 后代,contains() 为 false,不触发编辑(避免误开弹窗)。@@ -93,7 +92,7 @@ export function TaskCard({ task, t, describe, nextRun, paused, onEdit }: TaskCar><div style={{ height: 36 }}><span- className={K.taskToggle}+ className="dshp-scheduler__task-toggle"aria-label={paused ? t('resume') : t('pause')}onClick={(event) => {event.stopPropagation()@@ -104,11 +103,11 @@ export function TaskCard({ task, t, describe, nextRun, paused, onEdit }: TaskCar</span></div><div style={{ flex: 1 }}>- <span className={K.cardTitle} title={task.name}>+ <span className="dshp-scheduler__card-title" title={task.name}>{task.name}</span>- <div className={K.cardMeta}>- <span className={K.cardMetaText}>+ <div className="dshp-scheduler__card-meta">+ <span className="dshp-scheduler__card-meta-text">{describe}{' · '}{nextRun !== undefined@@ -144,7 +143,7 @@ export function TaskCard({ task, t, describe, nextRun, paused, onEdit }: TaskCaranchor={(<buttontype="button"- className={K.iconButton}+ className="dshp-scheduler__icon-button"aria-label={task.name}aria-haspopup="menu"aria-expanded={menuOpen}@@ -157,7 +156,7 @@ export function TaskCard({ task, t, describe, nextRun, paused, onEdit }: TaskCar</button>)}/>- {actionError ? <p className={K.error} role="alert">{actionError}</p> : null}+ {actionError ? <p className="dshp-scheduler__error" role="alert">{actionError}</p> : null}{toast !== null? (<Toast@@ -178,8 +177,8 @@ export function TaskCard({ task, t, describe, nextRun, paused, onEdit }: TaskCarcloseLabel={t('close')}footer={(<>- <button className={K.btn} type="button" onClick={() => setConfirmOpen(false)}>{t('cancel')}</button>- <button className={`${K.btn} ${K.btnDanger}`} type="button" onClick={() => void onDelete()}>{t('deleteConfirmAction')}</button>+ <button className="dshp-scheduler__btn" type="button" onClick={() => setConfirmOpen(false)}>{t('cancel')}</button>+ <button className={`${'dshp-scheduler__btn'} ${'dshp-scheduler__btn--danger'}`} type="button" onClick={() => void onDelete()}>{t('deleteConfirmAction')}</button></>)}/>diff --git a/packages/dsh-tauri-panel-scheduler/src/client/components/task-create-dialog.tsx b/packages/dsh-tauri-panel-scheduler/src/client/components/task-create-dialog.tsxindex 305985de..fe003bbe 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/components/task-create-dialog.tsx+++ b/packages/dsh-tauri-panel-scheduler/src/client/components/task-create-dialog.tsx@@ -14,7 +14,6 @@ import type { ModelTranslate, ScheduleForm, SchedulerOptions, TaskFormState, Traimport { Modal } from '@deepseek-ai/dsh-client-ui-primitives'import { MenuSelect } from 'dsh-tauri-ui/client'import { useRef, useState } from 'react'-import { SCHEDULER_CLASSES as K } from '../constants'import { applyCreateTask, applyUpdateTask } from '../service/scheduler'import { MenuHostProvider } from './menu'import { ModelPicker } from './model-picker'@@ -180,21 +179,21 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskCtitle={taskId ? t('editDialogTitle') : t('createDialogTitle')}description={t('dialogHint')}closeLabel={t('close')}- className={K.modal}+ className="dshp-scheduler__modal"footer={(<>- <button className={K.btn} type="button" disabled={saving} onClick={closeSafe}>{t('cancel')}</button>- <button className={`${K.btn} ${K.btnPrimary}`} type="button" disabled={saving} onClick={() => void onSave()}>+ <button className="dshp-scheduler__btn" type="button" disabled={saving} onClick={closeSafe}>{t('cancel')}</button>+ <button className={`${'dshp-scheduler__btn'} ${'dshp-scheduler__btn--primary'}`} type="button" disabled={saving} onClick={() => void onSave()}>{t('save')}</button></>)}><div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>- <label className={K.field}>- <span className={K.fieldLabel}>{t('taskName')}</span>+ <label className="dshp-scheduler__field">+ <span className="dshp-scheduler__field-label">{t('taskName')}</span><input- className={K.input}+ className="dshp-scheduler__input"type="text"value={form.name}placeholder={t('taskNamePlaceholder')}@@ -202,11 +201,11 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskC/></label>- <div className={K.field}>- <span className={K.fieldLabel}>{t('schedule')}</span>- <div className={K.inline}>+ <div className="dshp-scheduler__field">+ <span className="dshp-scheduler__field-label">{t('schedule')}</span>+ <div className="dshp-scheduler__inline"><select- className={`${K.input} ${K.selectInput} ${K.inlineSelect}`}+ className={`${'dshp-scheduler__input'} ${'dshp-scheduler__select-input'} ${'dshp-scheduler__inline-select'}`}value={scheduleKind}aria-label={t('schedule')}onChange={event => setForm(state => ({ ...state, schedule: defaultScheduleFor(event.target.value as ScheduleForm['kind']) }))}@@ -219,7 +218,7 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskC{scheduleKind === 'interval'? (<select- className={`${K.input} ${K.selectInput} ${K.inlineSelectAuto}`}+ className={`${'dshp-scheduler__input'} ${'dshp-scheduler__select-input'} ${'dshp-scheduler__inline-select--auto'}`}value={currentEveryMinutes}aria-label={t('scheduleEveryMinutes')}onChange={event => setSchedule({ kind: 'interval', everyMinutes: Number(event.target.value) })}@@ -231,7 +230,7 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskC? (<><select- className={`${K.input} ${K.selectInput} ${K.inlineSelectAuto}`}+ className={`${'dshp-scheduler__input'} ${'dshp-scheduler__select-input'} ${'dshp-scheduler__inline-select--auto'}`}value={currentWeekday}aria-label={t('scheduleWeekdays')}onChange={event => setSchedule({ kind: 'weekly', weekdays: [event.target.value as Weekday], time: currentTime })}@@ -239,7 +238,7 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskC{WEEKDAYS.map(day => <option key={day} value={day}>{t(WEEKDAY_KEYS[day])}</option>)}</select><select- className={`${K.input} ${K.selectInput} ${K.inlineSelectAuto}`}+ className={`${'dshp-scheduler__input'} ${'dshp-scheduler__select-input'} ${'dshp-scheduler__inline-select--auto'}`}value={currentTime}aria-label={t('scheduleTime')}onChange={event => setSchedule({ ...form.schedule, time: event.target.value } as ScheduleForm)}@@ -250,7 +249,7 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskC): (<select- className={`${K.input} ${K.selectInput} ${K.inlineSelectAuto}`}+ className={`${'dshp-scheduler__input'} ${'dshp-scheduler__select-input'} ${'dshp-scheduler__inline-select--auto'}`}value={currentTime}aria-label={t('scheduleTime')}onChange={event => setSchedule({ ...form.schedule, time: event.target.value } as ScheduleForm)}@@ -261,16 +260,16 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskC</div></div>- <div className={K.field}>- <span className={K.fieldLabel}>{t('schedulePrompt')}</span>- <div className={K.promptWrap}>+ <div className="dshp-scheduler__field">+ <span className="dshp-scheduler__field-label">{t('schedulePrompt')}</span>+ <div className="dshp-scheduler__prompt-wrap"><textarea- className={K.textarea}+ className="dshp-scheduler__textarea"value={form.prompt}placeholder={t('schedulePromptPlaceholder')}onChange={event => setForm(state => ({ ...state, prompt: event.target.value }))}/>- <div className={K.composer}>+ <div className="dshp-scheduler__composer"><MenuSelectvariant="pill"label={t('workspace')}@@ -311,8 +310,8 @@ export function TaskCreateDialog({ t, options, onClose, taskId, initial }: TaskC</div></div></div>- {error ? <p className={K.error} role="alert">{error}</p> : null}- <div className={K.flyoutRoot} ref={setMenuHost} />+ {error ? <p className="dshp-scheduler__error" role="alert">{error}</p> : null}+ <div className="dshp-scheduler__flyout-root" ref={setMenuHost} /></Modal></MenuHostProvider>)diff --git a/packages/dsh-tauri-panel-scheduler/src/client/constants/index.ts b/packages/dsh-tauri-panel-scheduler/src/client/constants/index.tsindex 7c3e4100..97a55c5c 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/constants/index.ts+++ b/packages/dsh-tauri-panel-scheduler/src/client/constants/index.ts@@ -46,110 +46,3 @@ export const PROTOCOL_RETRY_MS = 50* 全部基于 --dsw-alias-* 令牌(浅色/深色主题自动适配),不依赖生成的* CSS module hash(docs/AGENTS.plugins.md 禁止)。*/-export const SCHEDULER_CLASSES = {- // —— 面板外壳 / 页头 ——- shell: 'dshp-scheduler__shell',- top: 'dshp-scheduler__top',- heading: 'dshp-scheduler__heading',- toolbar: 'dshp-scheduler__toolbar',- toolbarSpacer: 'dshp-scheduler__toolbar-spacer',- searchWrap: 'dshp-scheduler__search-wrap',- searchIcon: 'dshp-scheduler__search-icon',- banner: 'dshp-scheduler__banner',-- // —— Tabs ——- tabs: 'dshp-scheduler__tabs',- tab: 'dshp-scheduler__tab',- tabActive: 'dshp-scheduler__tab--active',-- // —— 任务卡片 ——- cards: 'dshp-scheduler__cards',- card: 'dshp-scheduler__card',- cardPaused: 'dshp-scheduler__card--paused',- cardTitle: 'dshp-scheduler__card-title',- cardIcon: 'dshp-scheduler__card-icon',- taskToggle: 'dshp-scheduler__task-toggle',- cardMeta: 'dshp-scheduler__card-meta',- cardMetaText: 'dshp-scheduler__card-meta-text',-- // —— 执行记录 ——- runsList: 'dshp-scheduler__runs-list',- runsToolbar: 'dshp-scheduler__runs-toolbar',- runRow: 'dshp-scheduler__run-row',- runMain: 'dshp-scheduler__run-main',- runMeta: 'dshp-scheduler__run-meta',- runName: 'dshp-scheduler__run-name',- runTime: 'dshp-scheduler__run-time',- runDelete: 'dshp-scheduler__run-delete',- runError: 'dshp-scheduler__run-error',- chip: 'dshp-scheduler__chip',-- // —— 文案状态 ——- empty: 'dshp-scheduler__empty',- muted: 'dshp-scheduler__muted',- error: 'dshp-scheduler__error',-- // —— 推荐列表 ——- recs: 'dshp-scheduler__recs',- recTitle: 'dshp-scheduler__recs-title',- recList: 'dshp-scheduler__recs-list',- recItem: 'dshp-scheduler__recs-item',- recIcon: 'dshp-scheduler__recs-icon',- recBody: 'dshp-scheduler__recs-body',- recName: 'dshp-scheduler__recs-name',- recPrompt: 'dshp-scheduler__recs-prompt',-- // —— 官方控件复刻(ModelsSection / LanguageRow 样式值)——- field: 'dshp-scheduler__field',- fieldLabel: 'dshp-scheduler__field-label',- inline: 'dshp-scheduler__inline',- inlineSelect: 'dshp-scheduler__inline-select',- inlineSelectAuto: 'dshp-scheduler__inline-select--auto',- composer: 'dshp-scheduler__composer',- promptWrap: 'dshp-scheduler__prompt-wrap',- input: 'dshp-scheduler__input',- selectInput: 'dshp-scheduler__select-input',- textarea: 'dshp-scheduler__textarea',- iconButton: 'dshp-scheduler__icon-button',- iconButtonDanger: 'dshp-scheduler__icon-button--danger',- btn: 'dshp-scheduler__btn',- btnPrimary: 'dshp-scheduler__btn--primary',- btnDanger: 'dshp-scheduler__btn--danger',- selector: 'dshp-scheduler__selector',- selectorChevron: 'dshp-scheduler__selector-chevron',- selectorEffort: 'dshp-scheduler__selector-effort',-- // —— ModelPicker(照搬 dsh-automation create-modal.tsx 的 ModelPicker)——- modelSelect: 'dshp-scheduler__model-select',- modelSelectOpen: 'dshp-scheduler__model-select--open',- modelTrigger: 'dshp-scheduler__model-trigger',- modelTriggerEffort: 'dshp-scheduler__model-trigger-effort',- modelTriggerChevron: 'dshp-scheduler__model-trigger-chevron',- modelTriggerChevronOpen: 'dshp-scheduler__model-trigger-chevron--open',- modelSelectMenu: 'dshp-scheduler__model-select-menu',- modelSelectMenuFloat: 'dshp-scheduler__model-select-menu-float',- menuRow: 'dshp-scheduler__menu-row',- menuRowOn: 'dshp-scheduler__menu-row--on',- menuRowKv: 'dshp-scheduler__menu-row--kv',- menuRowMain: 'dshp-scheduler__menu-row-main',- menuRowSide: 'dshp-scheduler__menu-row-side',- menuTick: 'dshp-scheduler__menu-tick',- menuNext: 'dshp-scheduler__menu-next',- menuFloat: 'dshp-scheduler__menu-float',- menuSelect: 'dshp-scheduler__menu-select',- menuSelectBtn: 'dshp-scheduler__menu-select-btn',- menuSelectMenu: 'dshp-scheduler__menu-select-menu',- chipBtn: 'dshp-scheduler__chip-btn',- modelWarning: 'dshp-scheduler__model-warning',- modelGroup: 'dshp-scheduler__model-group',- modelGroupTitle: 'dshp-scheduler__model-group-title',- modelOption: 'dshp-scheduler__model-option',- modelOptionCopy: 'dshp-scheduler__model-option-copy',- modelName: 'dshp-scheduler__model-name',- modelDescription: 'dshp-scheduler__model-description',- modelCheck: 'dshp-scheduler__model-check',- modelEmpty: 'dshp-scheduler__model-empty',- flyoutRoot: 'dshp-scheduler__flyout-root',-- modal: 'dshp-scheduler__modal',-} as constdiff --git a/packages/dsh-tauri-panel-scheduler/src/client/styles/scheduler-panel.cssr.ts b/packages/dsh-tauri-panel-scheduler/src/client/styles/scheduler-panel.cssr.tsindex 8f584771..16058951 100644--- a/packages/dsh-tauri-panel-scheduler/src/client/styles/scheduler-panel.cssr.ts+++ b/packages/dsh-tauri-panel-scheduler/src/client/styles/scheduler-panel.cssr.ts@@ -1,6 +1,4 @@import { cssr, styles as sharedStyles } from 'dsh-tauri-ui/client'-import { SCHEDULER_CLASSES as K } from '../constants'-/*** styles/index.ts — 定时任务面板样式(官方控件样式复刻 + 布局补充)。*@@ -42,53 +40,53 @@ const {export default c([// —— 面板外壳 / 页头 ——- c(`.${K.shell}`, { boxSizing: 'border-box', maxWidth: '1080px', width: '100%', margin: '0 auto', padding: '0 0 32px', color: primary, fontFamily: font, fontSize: '13px', lineHeight: '1.5' }),- c(`.${K.top}`, { display: 'flex', flexDirection: 'column', gap: '14px', marginBottom: '12px' }),- c(`.${K.heading} h1`, { margin: '0', fontSize: '20px', lineHeight: '28px', fontWeight: '650', letterSpacing: '-.2px' }),- c(`.${K.heading} p`, { margin: '4px 0 0', color: tertiary, fontSize: '13px', lineHeight: '1.5' }),- c(`.${K.toolbar}`, { display: 'flex', flexWrap: 'nowrap', alignItems: 'center', gap: '8px' }),- c(`.${K.toolbarSpacer}`, { flex: '1' }),+ c(`.dshp-scheduler__shell`, { boxSizing: 'border-box', maxWidth: '1080px', width: '100%', margin: '0 auto', padding: '0 0 32px', color: primary, fontFamily: font, fontSize: '13px', lineHeight: '1.5' }),+ c(`.dshp-scheduler__top`, { display: 'flex', flexDirection: 'column', gap: '14px', marginBottom: '12px' }),+ c(`.dshp-scheduler__heading h1`, { margin: '0', fontSize: '20px', lineHeight: '28px', fontWeight: '650', letterSpacing: '-.2px' }),+ c(`.dshp-scheduler__heading p`, { margin: '4px 0 0', color: tertiary, fontSize: '13px', lineHeight: '1.5' }),+ c(`.dshp-scheduler__toolbar`, { display: 'flex', flexWrap: 'nowrap', alignItems: 'center', gap: '8px' }),+ c(`.dshp-scheduler__toolbar-spacer`, { flex: '1' }),// —— 搜索框(官方 input 类 + 插件补的图标定位)——- c(`.${K.searchWrap}`, { position: 'relative', display: 'inline-flex', flex: '1', minWidth: '0', maxWidth: '280px' }),- c(`.${K.searchWrap} .${K.input}`, { width: '100%', paddingLeft: '32px' }),- c(`.${K.searchIcon}`, { position: 'absolute', left: '10px', top: '50%', transform: 'translateY(-50%)', pointerEvents: 'none', color: tertiary }),+ c(`.dshp-scheduler__search-wrap`, { position: 'relative', display: 'inline-flex', flex: '1', minWidth: '0', maxWidth: '280px' }),+ c(`.dshp-scheduler__search-wrap .dshp-scheduler__input`, { width: '100%', paddingLeft: '32px' }),+ c(`.dshp-scheduler__search-icon`, { position: 'absolute', left: '10px', top: '50%', transform: 'translateY(-50%)', pointerEvents: 'none', color: tertiary }),// —— Tabs ——- c(`.${K.tabs}`, { display: 'flex', alignItems: 'center', gap: '16px', margin: '4px 0 14px', borderBottom: `1px solid ${border}` }),- c(`.${K.tab}`, { padding: '8px 0', border: '0', borderBottom: '2px solid transparent', background: 'transparent', color: secondary, font: 'inherit', fontSize: '13px', cursor: 'pointer' }),- c(`.${K.tab}:hover`, { color: primary }),- c(`.${K.tabActive}`, { borderBottomColor: 'currentColor', color: primary, fontWeight: '650' }),+ c(`.dshp-scheduler__tabs`, { display: 'flex', alignItems: 'center', gap: '16px', margin: '4px 0 14px', borderBottom: `1px solid ${border}` }),+ c(`.dshp-scheduler__tab`, { padding: '8px 0', border: '0', borderBottom: '2px solid transparent', background: 'transparent', color: secondary, font: 'inherit', fontSize: '13px', cursor: 'pointer' }),+ c(`.dshp-scheduler__tab:hover`, { color: primary }),+ c(`.dshp-scheduler__tab--active`, { borderBottomColor: 'currentColor', color: primary, fontWeight: '650' }),- c(`.${K.modal}`, { width: 'min(640px,100%) !important' }),+ c(`.dshp-scheduler__modal`, { width: 'min(640px,100%) !important' }),// —— 任务卡片(单列;容器样式与推荐项 recs-item 一致,点击=编辑)——- c(`.${K.cards}`, { display: 'flex', flexDirection: 'column', gap: '8px', margin: '0', padding: '0', listStyle: 'none' }),- c('@media (max-width: 680px)', [c(`.${K.searchWrap}`, { maxWidth: '160px' })]),- c(`.${K.card}`, { boxSizing: 'border-box', display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '10px', width: '100%', minWidth: '0', height: '60px', padding: '10px 12px', border: `1px solid ${border}`, borderRadius: '10px', background: 'transparent', color: 'inherit', font: 'inherit', fontSize: '13px', lineHeight: '20px', textAlign: 'left', cursor: 'pointer', overflow: 'hidden' }),- c(`.${K.card}:hover`, { background: hover }),- c(`.${K.cardPaused}`, { opacity: '.6' }),- c(`.${K.cardTitle}`, { display: 'flex', alignItems: 'center', gap: '8px', margin: '0', fontSize: '13px', lineHeight: '18px', fontWeight: '500', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),- c(`.${K.cardIcon}`, { flex: 'none', width: '16px', height: '16px', color: business }),- c(`.${K.taskToggle}`, { flex: 'none', display: 'inline-flex', marginTop: '2px', fontSize: '16px', color: tertiary, cursor: 'pointer' }),- c(`.${K.taskToggle}:hover`, { color: secondary }),- c(`.${K.cardMeta}`, { display: 'flex', alignItems: 'center', gap: '10px', minWidth: '0' }),- c(`.${K.cardMetaText}`, { flex: '1', minWidth: '0', color: tertiary, fontSize: '12px', lineHeight: '18px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),- c(`.${K.cardMetaText} strong`, { color: secondary, fontWeight: '600' }),+ c(`.dshp-scheduler__cards`, { display: 'flex', flexDirection: 'column', gap: '8px', margin: '0', padding: '0', listStyle: 'none' }),+ c('@media (max-width: 680px)', [c(`.dshp-scheduler__search-wrap`, { maxWidth: '160px' })]),+ c(`.dshp-scheduler__card`, { boxSizing: 'border-box', display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '10px', width: '100%', minWidth: '0', height: '60px', padding: '10px 12px', border: `1px solid ${border}`, borderRadius: '10px', background: 'transparent', color: 'inherit', font: 'inherit', fontSize: '13px', lineHeight: '20px', textAlign: 'left', cursor: 'pointer', overflow: 'hidden' }),+ c(`.dshp-scheduler__card:hover`, { background: hover }),+ c(`.dshp-scheduler__card--paused`, { opacity: '.6' }),+ c(`.dshp-scheduler__card-title`, { display: 'flex', alignItems: 'center', gap: '8px', margin: '0', fontSize: '13px', lineHeight: '18px', fontWeight: '500', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__card-icon`, { flex: 'none', width: '16px', height: '16px', color: business }),+ c(`.dshp-scheduler__task-toggle`, { flex: 'none', display: 'inline-flex', marginTop: '2px', fontSize: '16px', color: tertiary, cursor: 'pointer' }),+ c(`.dshp-scheduler__task-toggle:hover`, { color: secondary }),+ c(`.dshp-scheduler__card-meta`, { display: 'flex', alignItems: 'center', gap: '10px', minWidth: '0' }),+ c(`.dshp-scheduler__card-meta-text`, { flex: '1', minWidth: '0', color: tertiary, fontSize: '12px', lineHeight: '18px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__card-meta-text strong`, { color: secondary, fontWeight: '600' }),// —— 官方控件复刻:input / selectInput / textarea ——- c(`.${K.input}`, { boxSizing: 'border-box', border: `.5px solid ${borderL4}`, width: '100%', height: '32px', font: 'inherit', background: layer1, color: primary, borderRadius: '8px', padding: '0 10px', fontSize: '14px', lineHeight: '22px' }),- c(`select.${K.input}`, { cursor: 'pointer', maxWidth: '240px' }),- c(`.${K.input}:focus`, { borderColor: brand, outline: 'none' }),- c(`.${K.input}::placeholder`, { color: dimmed }),- c(`.${K.input}:disabled`, { opacity: '.6', cursor: 'default' }),- c(`.${K.selectInput}`, { appearance: 'none', backgroundImage: chevronSvg, backgroundPosition: 'right 12px center', backgroundRepeat: 'no-repeat', backgroundSize: '12px 12px', paddingRight: '32px' }),- c(`.${K.textarea}`, { boxSizing: 'border-box', border: `.5px solid ${borderL4}`, width: '100%', height: 'auto', minHeight: '240px', font: 'inherit', background: layer1, color: primary, borderRadius: '8px', padding: '10px', paddingBottom: '46px', fontSize: '14px', lineHeight: '1.55', resize: 'vertical', outline: 'none' }),- c(`.${K.textarea}:focus`, { borderColor: brand }),- c(`.${K.textarea}::placeholder`, { color: dimmed }),+ c(`.dshp-scheduler__input`, { boxSizing: 'border-box', border: `.5px solid ${borderL4}`, width: '100%', height: '32px', font: 'inherit', background: layer1, color: primary, borderRadius: '8px', padding: '0 10px', fontSize: '14px', lineHeight: '22px' }),+ c(`select.dshp-scheduler__input`, { cursor: 'pointer', maxWidth: '240px' }),+ c(`.dshp-scheduler__input:focus`, { borderColor: brand, outline: 'none' }),+ c(`.dshp-scheduler__input::placeholder`, { color: dimmed }),+ c(`.dshp-scheduler__input:disabled`, { opacity: '.6', cursor: 'default' }),+ c(`.dshp-scheduler__select-input`, { appearance: 'none', backgroundImage: chevronSvg, backgroundPosition: 'right 12px center', backgroundRepeat: 'no-repeat', backgroundSize: '12px 12px', paddingRight: '32px' }),+ c(`.dshp-scheduler__textarea`, { boxSizing: 'border-box', border: `.5px solid ${borderL4}`, width: '100%', height: 'auto', minHeight: '240px', font: 'inherit', background: layer1, color: primary, borderRadius: '8px', padding: '10px', paddingBottom: '46px', fontSize: '14px', lineHeight: '1.55', resize: 'vertical', outline: 'none' }),+ c(`.dshp-scheduler__textarea:focus`, { borderColor: brand }),+ c(`.dshp-scheduler__textarea::placeholder`, { color: dimmed }),// —— 官方控件复刻:iconButton ——- c(`.${K.iconButton}:focus-visible`, focusRing),- c(`.${K.iconButton}`, {+ c(`.dshp-scheduler__icon-button:focus-visible`, focusRing),+ c(`.dshp-scheduler__icon-button`, {display: 'inline-flex',alignItems: 'center',justifyContent: 'center',@@ -107,110 +105,110 @@ export default c([]),// —— 官方控件复刻:36px 胶囊按钮(primary / secondary / danger)——- c(`.${K.btn},.${K.btnPrimary},.${K.btnDanger}`, { boxSizing: 'border-box', height: '36px', font: 'inherit', cursor: 'pointer', border: 'none', borderRadius: '18px', justifyContent: 'center', alignItems: 'center', gap: '4px', padding: '0 14px', fontSize: '14px', lineHeight: '22px', display: 'inline-flex', whiteSpace: 'nowrap' }),- c(`.${K.btn}`, { border: `.5px solid ${borderL3}`, color: primary, background: 'transparent' }),- c(`.${K.btn}:not(:disabled):hover`, { background: hoverSolid }),- c(`.${K.btnPrimary}`, { background: primaryFill, color: primaryFg, borderColor: 'transparent' }),- c(`.${K.btnPrimary}:not(:disabled):hover`, { background: primaryHover, borderColor: 'transparent' }),- c(`.${K.btnDanger}`, { color: error }),- c(`.${K.btnDanger}:not(:disabled):hover`, { background: hoverDanger }),- c(`.${K.btn}:disabled,.${K.btnPrimary}:disabled,.${K.btnDanger}:disabled`, { opacity: '.4', cursor: 'default' }),- c(`.${K.btn}:focus-visible,.${K.btnPrimary}:focus-visible,.${K.btnDanger}:focus-visible`, focusRing),+ c(`.dshp-scheduler__btn,.dshp-scheduler__btn--primary,.dshp-scheduler__btn--danger`, { boxSizing: 'border-box', height: '36px', font: 'inherit', cursor: 'pointer', border: 'none', borderRadius: '18px', justifyContent: 'center', alignItems: 'center', gap: '4px', padding: '0 14px', fontSize: '14px', lineHeight: '22px', display: 'inline-flex', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__btn`, { border: `.5px solid ${borderL3}`, color: primary, background: 'transparent' }),+ c(`.dshp-scheduler__btn:not(:disabled):hover`, { background: hoverSolid }),+ c(`.dshp-scheduler__btn--primary`, { background: primaryFill, color: primaryFg, borderColor: 'transparent' }),+ c(`.dshp-scheduler__btn--primary:not(:disabled):hover`, { background: primaryHover, borderColor: 'transparent' }),+ c(`.dshp-scheduler__btn--danger`, { color: error }),+ c(`.dshp-scheduler__btn--danger:not(:disabled):hover`, { background: hoverDanger }),+ c(`.dshp-scheduler__btn:disabled,.dshp-scheduler__btn--primary:disabled,.dshp-scheduler__btn--danger:disabled`, { opacity: '.4', cursor: 'default' }),+ c(`.dshp-scheduler__btn:focus-visible,.dshp-scheduler__btn--primary:focus-visible,.dshp-scheduler__btn--danger:focus-visible`, focusRing),// —— 官方控件复刻:字段 / 下拉 pill selector(LanguageRow selector,配 primitives Menu)——- c(`.${K.field}`, { flexDirection: 'column', gap: '2px', display: 'flex', minWidth: '0', fontSize: '13px' }),- c(`.${K.fieldLabel}`, { color: secondary, alignItems: 'center', gap: '10px', fontSize: '12px', fontWeight: '500', lineHeight: '18px', display: 'inline-flex' }),- c(`.${K.inline}`, { display: 'flex', flexWrap: 'wrap', gap: '8px', alignItems: 'center' }),- c(`.${K.inlineSelect}`, { flex: '1', minWidth: '120px' }),- c(`.${K.inlineSelectAuto}`, { flex: 'none', width: 'auto', minWidth: '120px' }),- c(`.${K.composer}`, { position: 'absolute', left: '10px', bottom: '10px', display: 'flex', gap: '8px', alignItems: 'center', right: '10px' }),- c(`.${K.promptWrap}`, { position: 'relative', display: 'flex', alignItems: 'center', gap: '8px' }),- c(`.${K.selector}`, { background: modulePlatform, height: '36px', font: 'inherit', color: primary, cursor: 'pointer', border: 'none', borderRadius: '18px', alignItems: 'center', gap: '12px', padding: '0 14px', fontSize: '14px', lineHeight: '22px', display: 'inline-flex', whiteSpace: 'nowrap' }),- c(`.${K.selector}:hover`, { background: hover }),- c(`.${K.selectorChevron}`, { flex: 'none' }),- c(`.${K.selectorEffort}`, { color: tertiary, fontSize: '12px', maxWidth: '120px', overflow: 'hidden', textOverflow: 'ellipsis' }),+ c(`.dshp-scheduler__field`, { flexDirection: 'column', gap: '2px', display: 'flex', minWidth: '0', fontSize: '13px' }),+ c(`.dshp-scheduler__field-label`, { color: secondary, alignItems: 'center', gap: '10px', fontSize: '12px', fontWeight: '500', lineHeight: '18px', display: 'inline-flex' }),+ c(`.dshp-scheduler__inline`, { display: 'flex', flexWrap: 'wrap', gap: '8px', alignItems: 'center' }),+ c(`.dshp-scheduler__inline-select`, { flex: '1', minWidth: '120px' }),+ c(`.dshp-scheduler__inline-select--auto`, { flex: 'none', width: 'auto', minWidth: '120px' }),+ c(`.dshp-scheduler__composer`, { position: 'absolute', left: '10px', bottom: '10px', display: 'flex', gap: '8px', alignItems: 'center', right: '10px' }),+ c(`.dshp-scheduler__prompt-wrap`, { position: 'relative', display: 'flex', alignItems: 'center', gap: '8px' }),+ c(`.dshp-scheduler__selector`, { background: modulePlatform, height: '36px', font: 'inherit', color: primary, cursor: 'pointer', border: 'none', borderRadius: '18px', alignItems: 'center', gap: '12px', padding: '0 14px', fontSize: '14px', lineHeight: '22px', display: 'inline-flex', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__selector:hover`, { background: hover }),+ c(`.dshp-scheduler__selector-chevron`, { flex: 'none' }),+ c(`.dshp-scheduler__selector-effort`, { color: tertiary, fontSize: '12px', maxWidth: '120px', overflow: 'hidden', textOverflow: 'ellipsis' }),// —— ModelPicker(照搬 dsh-automation create-modal ModelPicker 样式值)——- c(`.${K.modelSelect}`, { position: 'relative', zIndex: '1', minWidth: '0', flex: 'none', height: '28px' }),- c(`.${K.modelSelectOpen}`, { zIndex: '30' }),- c(`.${K.modelTrigger}`, { display: 'flex', alignItems: 'center', gap: '4px', minWidth: '0', maxWidth: '260px', height: '28px', padding: '0 4px 0 8px', border: '0', borderRadius: '24px', background: 'transparent', color: secondary, fontSize: '13px', fontWeight: '500', lineHeight: '20px', cursor: 'pointer' }),- c(`.${K.modelTrigger}:hover`, { background: hover, color: primary }),- c(`.${K.modelTrigger} > span:first-child`, { minWidth: '0', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),- c(`.${K.modelTriggerEffort}`, { flex: 'none', color: tertiary, whiteSpace: 'nowrap' }),- c(`.${K.modelTriggerChevron}`, { flex: 'none', transition: 'transform .16s ease' }),- c(`.${K.modelTriggerChevronOpen}`, { transform: 'rotate(180deg)' }),- c(`.${K.modelSelectMenu}`, { zIndex: '30', width: 'min(240px, calc(100vw - 32px))', maxHeight: 'min(360px, calc(100vh - 96px))', overflowY: 'auto', padding: '4px', border: `1px solid ${border}`, borderRadius: '12px', background: 'var(--dsw-specific-menu, var(--dsw-alias-bg-base))', boxShadow: 'var(--dsw-shadow-lv3)' }),- c(`.${K.modelSelectMenuFloat}`, { position: 'absolute', zIndex: '1200', boxSizing: 'border-box' }),- c(`.${K.modelSelectMenu} .${K.menuRow}`, { minHeight: '40px', padding: '0 10px', borderRadius: '10px', fontSize: '14px' }),- c(`.${K.modelSelectMenu} .${K.menuRow}.is-kv .${K.menuRowSide}`, { fontSize: '13px', color: tertiary }),- c(`.${K.modelGroup} + .${K.modelGroup}`, { marginTop: '4px' }),- c(`.${K.modelGroupTitle}`, { position: 'sticky', top: '0', zIndex: '1', padding: '5px 8px 3px', background: 'var(--dsw-specific-menu, var(--dsw-alias-bg-base))', color: tertiary, fontSize: '12px', fontWeight: '500', lineHeight: '18px' }),- c(`.${K.modelOption}`, { display: 'flex', width: '100%', minHeight: '38px', alignItems: 'center', gap: '8px', padding: '6px 8px', border: '0', borderRadius: '10px', background: 'transparent', color: primary, textAlign: 'left', cursor: 'pointer' }),- c(`.${K.modelOption}:hover, .${K.modelOption}:focus-visible`, { background: hover, outline: 'none' }),- c(`.${K.modelOptionCopy}`, { display: 'flex', minWidth: '0', flex: '1', flexDirection: 'column' }),- c(`.${K.modelName}`, { overflow: 'hidden', fontSize: '14px', fontWeight: '500', lineHeight: '20px', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),- c(`.${K.modelDescription}`, { overflow: 'hidden', color: tertiary, fontSize: '12px', lineHeight: '18px', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),- c(`.${K.modelCheck}`, { display: 'grid', flex: '0 0 18px', placeItems: 'center', color: primary }),- c(`.${K.modelWarning}`, { margin: '4px', padding: '8px', borderRadius: '8px', background: 'var(--dsw-alias-interactive-bg-hover-danger, rgba(248,81,73,.1))', color: 'var(--dsw-alias-state-error-primary, #f85149)', fontSize: '12px', lineHeight: '18px' }),- c(`.${K.modelEmpty}`, { padding: '14px 12px', color: tertiary, fontSize: '12px', textAlign: 'center' }),+ c(`.dshp-scheduler__model-select`, { position: 'relative', zIndex: '1', minWidth: '0', flex: 'none', height: '28px' }),+ c(`.dshp-scheduler__model-select--open`, { zIndex: '30' }),+ c(`.dshp-scheduler__model-trigger`, { display: 'flex', alignItems: 'center', gap: '4px', minWidth: '0', maxWidth: '260px', height: '28px', padding: '0 4px 0 8px', border: '0', borderRadius: '24px', background: 'transparent', color: secondary, fontSize: '13px', fontWeight: '500', lineHeight: '20px', cursor: 'pointer' }),+ c(`.dshp-scheduler__model-trigger:hover`, { background: hover, color: primary }),+ c(`.dshp-scheduler__model-trigger > span:first-child`, { minWidth: '0', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__model-trigger-effort`, { flex: 'none', color: tertiary, whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__model-trigger-chevron`, { flex: 'none', transition: 'transform .16s ease' }),+ c(`.dshp-scheduler__model-trigger-chevron--open`, { transform: 'rotate(180deg)' }),+ c(`.dshp-scheduler__model-select-menu`, { zIndex: '30', width: 'min(240px, calc(100vw - 32px))', maxHeight: 'min(360px, calc(100vh - 96px))', overflowY: 'auto', padding: '4px', border: `1px solid ${border}`, borderRadius: '12px', background: 'var(--dsw-specific-menu, var(--dsw-alias-bg-base))', boxShadow: 'var(--dsw-shadow-lv3)' }),+ c(`.dshp-scheduler__model-select-menu-float`, { position: 'absolute', zIndex: '1200', boxSizing: 'border-box' }),+ c(`.dshp-scheduler__model-select-menu .dshp-scheduler__menu-row`, { minHeight: '40px', padding: '0 10px', borderRadius: '10px', fontSize: '14px' }),+ c(`.dshp-scheduler__model-select-menu .dshp-scheduler__menu-row.is-kv .dshp-scheduler__menu-row-side`, { fontSize: '13px', color: tertiary }),+ c(`.dshp-scheduler__model-group + .dshp-scheduler__model-group`, { marginTop: '4px' }),+ c(`.dshp-scheduler__model-group-title`, { position: 'sticky', top: '0', zIndex: '1', padding: '5px 8px 3px', background: 'var(--dsw-specific-menu, var(--dsw-alias-bg-base))', color: tertiary, fontSize: '12px', fontWeight: '500', lineHeight: '18px' }),+ c(`.dshp-scheduler__model-option`, { display: 'flex', width: '100%', minHeight: '38px', alignItems: 'center', gap: '8px', padding: '6px 8px', border: '0', borderRadius: '10px', background: 'transparent', color: primary, textAlign: 'left', cursor: 'pointer' }),+ c(`.dshp-scheduler__model-option:hover, .dshp-scheduler__model-option:focus-visible`, { background: hover, outline: 'none' }),+ c(`.dshp-scheduler__model-option-copy`, { display: 'flex', minWidth: '0', flex: '1', flexDirection: 'column' }),+ c(`.dshp-scheduler__model-name`, { overflow: 'hidden', fontSize: '14px', fontWeight: '500', lineHeight: '20px', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__model-description`, { overflow: 'hidden', color: tertiary, fontSize: '12px', lineHeight: '18px', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__model-check`, { display: 'grid', flex: '0 0 18px', placeItems: 'center', color: primary }),+ c(`.dshp-scheduler__model-warning`, { margin: '4px', padding: '8px', borderRadius: '8px', background: 'var(--dsw-alias-interactive-bg-hover-danger, rgba(248,81,73,.1))', color: 'var(--dsw-alias-state-error-primary, #f85149)', fontSize: '12px', lineHeight: '18px' }),+ c(`.dshp-scheduler__model-empty`, { padding: '14px 12px', color: tertiary, fontSize: '12px', textAlign: 'center' }),// —— menu 基础设施(照搬 dsh-automation menu 样式值)——- c(`.${K.menuRow}`, { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '12px', width: '100%', padding: '8px 10px', border: '0', borderRadius: '10px', background: 'transparent', color: 'inherit', textAlign: 'left', cursor: 'pointer', fontSize: '13px', whiteSpace: 'nowrap' }),- c(`.${K.menuRow}:hover, .${K.menuRow}.is-on`, { background: 'var(--dsw-alias-interactive-bg-hover, rgba(255,255,255,.06))' }),- c(`.${K.menuRow}.is-kv .${K.menuRowMain}`, { flex: 'none' }),- c(`.${K.menuRow}.is-kv .${K.menuRowSide}`, { flex: '1', justifyContent: 'flex-end', minWidth: '0' }),- c(`.${K.menuRowMain}`, { display: 'inline-flex', alignItems: 'center', gap: '8px', minWidth: '0' }),- c(`.${K.menuRowSide}`, { display: 'inline-flex', alignItems: 'center', gap: '8px', color: secondary, fontSize: '12px' }),- c(`.${K.menuTick}, .${K.menuNext}`, { width: '7px', height: '11px', borderRight: '1.6px solid currentColor', borderBottom: '1.6px solid currentColor', flex: 'none' }),- c(`.${K.menuTick}`, { height: '12px', width: '6px', transform: 'rotate(45deg) translateY(-2px)', borderRightColor: '#7aa2ff', borderBottomColor: '#7aa2ff' }),- c(`.${K.menuNext}`, { height: '7px', transform: 'rotate(-45deg)', opacity: '.55' }),- c(`.${K.menuFloat}`, { position: 'absolute', zIndex: '1200' }),- c(`.${K.menuSelect}`, { position: 'relative', minWidth: '108px', zIndex: '1' }),- c(`.${K.menuSelect}.is-open`, { zIndex: '30' }),- c(`.${K.menuSelectBtn}`, { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '10px', minHeight: '36px', width: '100%', padding: '0 12px', border: '1px solid var(--dsw-alias-border-l2)', borderRadius: '12px', background: 'rgba(255,255,255,.04)', color: 'inherit', cursor: 'pointer' }),- c(`.${K.menuSelectBtn} em, .${K.chipBtn} em`, { width: '6px', height: '6px', marginLeft: '2px', opacity: '.55', borderRight: '1.5px solid currentColor', borderBottom: '1.5px solid currentColor', transform: 'rotate(45deg) translateY(-2px)' }),- c(`.${K.menuSelect}.is-pill`, { width: 'auto', minWidth: '0', flex: 'none' }),- c(`.${K.menuSelect}.is-pill .${K.menuSelectBtn}`, { width: 'auto', minHeight: '28px', height: '28px', padding: '0 8px', border: '0', borderRadius: '8px', background: 'transparent', color: secondary, fontSize: '13px', fontWeight: '500', gap: '6px', whiteSpace: 'nowrap' }),- c(`.${K.menuSelect}.is-pill .${K.menuSelectBtn}:hover`, { background: 'rgba(255,255,255,.06)', color: primary }),- c(`.${K.menuSelectMenu}`, { position: 'absolute', top: 'calc(100% + 6px)', left: '0', zIndex: '30', minWidth: '196px', maxHeight: '280px', overflow: 'auto', padding: '6px', border: '1px solid rgba(255,255,255,.08)', borderRadius: '14px', background: 'var(--dsw-alias-bg-base, #2a2c31)', boxShadow: '0 16px 40px rgba(0,0,0,.42)' }),- c(`.${K.menuSelectMenu}.is-up`, { top: 'auto', bottom: 'calc(100% + 6px)' }),- c(`.${K.menuSelectMenu}.is-end`, { left: 'auto', right: '0' }),- c(`.${K.chipBtn}`, { display: 'inline-flex', alignItems: 'center', gap: '6px', minHeight: '28px', height: '28px', padding: '0 8px', border: '0', borderRadius: '8px', background: 'transparent', color: secondary, fontSize: '13px', fontWeight: '500', whiteSpace: 'nowrap', cursor: 'pointer' }),- c(`.${K.chipBtn}:hover`, { background: 'rgba(255,255,255,.06)', color: primary }),- c(`.${K.flyoutRoot}`, { position: 'absolute', inset: '0', zIndex: '1200', overflow: 'visible', pointerEvents: 'none' }),- c(`.${K.flyoutRoot} .${K.menuSelectMenu}, .${K.flyoutRoot} .${K.modelSelectMenu}`, { pointerEvents: 'auto' }),+ c(`.dshp-scheduler__menu-row`, { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '12px', width: '100%', padding: '8px 10px', border: '0', borderRadius: '10px', background: 'transparent', color: 'inherit', textAlign: 'left', cursor: 'pointer', fontSize: '13px', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__menu-row:hover, .dshp-scheduler__menu-row.is-on`, { background: 'var(--dsw-alias-interactive-bg-hover, rgba(255,255,255,.06))' }),+ c(`.dshp-scheduler__menu-row.is-kv .dshp-scheduler__menu-row-main`, { flex: 'none' }),+ c(`.dshp-scheduler__menu-row.is-kv .dshp-scheduler__menu-row-side`, { flex: '1', justifyContent: 'flex-end', minWidth: '0' }),+ c(`.dshp-scheduler__menu-row-main`, { display: 'inline-flex', alignItems: 'center', gap: '8px', minWidth: '0' }),+ c(`.dshp-scheduler__menu-row-side`, { display: 'inline-flex', alignItems: 'center', gap: '8px', color: secondary, fontSize: '12px' }),+ c(`.dshp-scheduler__menu-tick, .dshp-scheduler__menu-next`, { width: '7px', height: '11px', borderRight: '1.6px solid currentColor', borderBottom: '1.6px solid currentColor', flex: 'none' }),+ c(`.dshp-scheduler__menu-tick`, { height: '12px', width: '6px', transform: 'rotate(45deg) translateY(-2px)', borderRightColor: '#7aa2ff', borderBottomColor: '#7aa2ff' }),+ c(`.dshp-scheduler__menu-next`, { height: '7px', transform: 'rotate(-45deg)', opacity: '.55' }),+ c(`.dshp-scheduler__menu-float`, { position: 'absolute', zIndex: '1200' }),+ c(`.dshp-scheduler__menu-select`, { position: 'relative', minWidth: '108px', zIndex: '1' }),+ c(`.dshp-scheduler__menu-select.is-open`, { zIndex: '30' }),+ c(`.dshp-scheduler__menu-select-btn`, { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '10px', minHeight: '36px', width: '100%', padding: '0 12px', border: '1px solid var(--dsw-alias-border-l2)', borderRadius: '12px', background: 'rgba(255,255,255,.04)', color: 'inherit', cursor: 'pointer' }),+ c(`.dshp-scheduler__menu-select-btn em, .dshp-scheduler__chip-btn em`, { width: '6px', height: '6px', marginLeft: '2px', opacity: '.55', borderRight: '1.5px solid currentColor', borderBottom: '1.5px solid currentColor', transform: 'rotate(45deg) translateY(-2px)' }),+ c(`.dshp-scheduler__menu-select.is-pill`, { width: 'auto', minWidth: '0', flex: 'none' }),+ c(`.dshp-scheduler__menu-select.is-pill .dshp-scheduler__menu-select-btn`, { width: 'auto', minHeight: '28px', height: '28px', padding: '0 8px', border: '0', borderRadius: '8px', background: 'transparent', color: secondary, fontSize: '13px', fontWeight: '500', gap: '6px', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__menu-select.is-pill .dshp-scheduler__menu-select-btn:hover`, { background: 'rgba(255,255,255,.06)', color: primary }),+ c(`.dshp-scheduler__menu-select-menu`, { position: 'absolute', top: 'calc(100% + 6px)', left: '0', zIndex: '30', minWidth: '196px', maxHeight: '280px', overflow: 'auto', padding: '6px', border: '1px solid rgba(255,255,255,.08)', borderRadius: '14px', background: 'var(--dsw-alias-bg-base, #2a2c31)', boxShadow: '0 16px 40px rgba(0,0,0,.42)' }),+ c(`.dshp-scheduler__menu-select-menu.is-up`, { top: 'auto', bottom: 'calc(100% + 6px)' }),+ c(`.dshp-scheduler__menu-select-menu.is-end`, { left: 'auto', right: '0' }),+ c(`.dshp-scheduler__chip-btn`, { display: 'inline-flex', alignItems: 'center', gap: '6px', minHeight: '28px', height: '28px', padding: '0 8px', border: '0', borderRadius: '8px', background: 'transparent', color: secondary, fontSize: '13px', fontWeight: '500', whiteSpace: 'nowrap', cursor: 'pointer' }),+ c(`.dshp-scheduler__chip-btn:hover`, { background: 'rgba(255,255,255,.06)', color: primary }),+ c(`.dshp-scheduler__flyout-root`, { position: 'absolute', inset: '0', zIndex: '1200', overflow: 'visible', pointerEvents: 'none' }),+ c(`.dshp-scheduler__flyout-root .dshp-scheduler__menu-select-menu, .dshp-scheduler__flyout-root .dshp-scheduler__model-select-menu`, { pointerEvents: 'auto' }),// —— 状态文案 ——- c(`.${K.error}`, { color: error, margin: '0', fontSize: '12px', lineHeight: '18px' }),- c(`.${K.empty}`, { margin: '0', padding: '48px 0', color: tertiary, fontSize: '13px', textAlign: 'center' }),- c(`.${K.muted}`, { margin: '0', color: secondary, fontSize: '12px' }),+ c(`.dshp-scheduler__error`, { color: error, margin: '0', fontSize: '12px', lineHeight: '18px' }),+ c(`.dshp-scheduler__empty`, { margin: '0', padding: '48px 0', color: tertiary, fontSize: '13px', textAlign: 'center' }),+ c(`.dshp-scheduler__muted`, { margin: '0', color: secondary, fontSize: '12px' }),// —— 执行记录 ——- c(`.${K.runsToolbar}`, { display: 'flex', justifyContent: 'flex-end', marginBottom: '8px' }),- c(`.${K.runsList}`, { display: 'flex', flexDirection: 'column', gap: '8px', margin: '0', padding: '0', listStyle: 'none' }),- c(`.${K.runRow}`, { boxSizing: 'border-box', display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '10px', width: '100%', minWidth: '0', minHeight: '60px', padding: '10px 12px', border: `1px solid ${border}`, borderRadius: '10px', background: 'transparent', color: 'inherit', fontSize: '13px', lineHeight: '20px', textAlign: 'left', overflow: 'hidden' }),- c(`.${K.runMain}`, { display: 'flex', flexDirection: 'column', gap: '2px', minWidth: '0', overflow: 'hidden' }),- c(`.${K.runMeta}`, { display: 'flex', alignItems: 'center', gap: '4px', minWidth: '0', flexShrink: '0' }),- c(`.${K.runName}`, { display: 'block', minWidth: '0', fontWeight: '500', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),- c(`.${K.runTime}`, { color: tertiary, fontVariantNumeric: 'tabular-nums', whiteSpace: 'nowrap' }),- c(`.${K.runDelete}`, { border: 'none', background: 'transparent', color: tertiary, cursor: 'pointer', font: 'inherit', fontSize: '12px', padding: '2px 4px' }),- c(`.${K.runDelete}:hover`, { color: error }),- c(`.${K.runError}`, { width: '100%', margin: '0', color: error, fontSize: '12px', lineHeight: '16px', whiteSpace: 'pre-wrap' }),- c(`.${K.chip}`, { display: 'inline-flex', alignItems: 'center', gap: '4px', padding: '2px 10px', borderRadius: '999px', background: layer3, color: secondary, fontSize: '12px', whiteSpace: 'nowrap' }),- c(`.${K.chip}[data-status='succeeded']`, { background: `color-mix(in srgb,${success} 12%,transparent)`, color: success }),- c(`.${K.chip}[data-status='failed']`, { background: `color-mix(in srgb,${error} 12%,transparent)`, color: error }),- c(`.${K.chip}[data-status='running'],.${K.chip}[data-status='queued']`, { background: `color-mix(in srgb,${business} 12%,transparent)`, color: business }),+ c(`.dshp-scheduler__runs-toolbar`, { display: 'flex', justifyContent: 'flex-end', marginBottom: '8px' }),+ c(`.dshp-scheduler__runs-list`, { display: 'flex', flexDirection: 'column', gap: '8px', margin: '0', padding: '0', listStyle: 'none' }),+ c(`.dshp-scheduler__run-row`, { boxSizing: 'border-box', display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: '10px', width: '100%', minWidth: '0', minHeight: '60px', padding: '10px 12px', border: `1px solid ${border}`, borderRadius: '10px', background: 'transparent', color: 'inherit', fontSize: '13px', lineHeight: '20px', textAlign: 'left', overflow: 'hidden' }),+ c(`.dshp-scheduler__run-main`, { display: 'flex', flexDirection: 'column', gap: '2px', minWidth: '0', overflow: 'hidden' }),+ c(`.dshp-scheduler__run-meta`, { display: 'flex', alignItems: 'center', gap: '4px', minWidth: '0', flexShrink: '0' }),+ c(`.dshp-scheduler__run-name`, { display: 'block', minWidth: '0', fontWeight: '500', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__run-time`, { color: tertiary, fontVariantNumeric: 'tabular-nums', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__run-delete`, { border: 'none', background: 'transparent', color: tertiary, cursor: 'pointer', font: 'inherit', fontSize: '12px', padding: '2px 4px' }),+ c(`.dshp-scheduler__run-delete:hover`, { color: error }),+ c(`.dshp-scheduler__run-error`, { width: '100%', margin: '0', color: error, fontSize: '12px', lineHeight: '16px', whiteSpace: 'pre-wrap' }),+ c(`.dshp-scheduler__chip`, { display: 'inline-flex', alignItems: 'center', gap: '4px', padding: '2px 10px', borderRadius: '999px', background: layer3, color: secondary, fontSize: '12px', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__chip[data-status='succeeded']`, { background: `color-mix(in srgb,${success} 12%,transparent)`, color: success }),+ c(`.dshp-scheduler__chip[data-status='failed']`, { background: `color-mix(in srgb,${error} 12%,transparent)`, color: error }),+ c(`.dshp-scheduler__chip[data-status='running'],.dshp-scheduler__chip[data-status='queued']`, { background: `color-mix(in srgb,${business} 12%,transparent)`, color: business }),// —— 推荐(预置)定时任务 ——- c(`.${K.recs}`, { marginTop: '24px' }),- c(`.${K.recTitle}`, { margin: '0 0 10px', fontSize: '13px', lineHeight: '18px', fontWeight: '600', color: secondary }),- c(`.${K.recList}`, { display: 'flex', flexDirection: 'column', gap: '8px', margin: '0', padding: '0', listStyle: 'none' }),- c(`.${K.recItem}`, { boxSizing: 'border-box', display: 'flex', alignItems: 'flex-start', gap: '10px', width: '100%', minWidth: '0', padding: '10px 12px', border: `1px solid ${border}`, borderRadius: '10px', background: 'transparent', color: 'inherit', font: 'inherit', fontSize: '13px', lineHeight: '20px', textAlign: 'left', cursor: 'pointer' }),- c(`.${K.recItem}:hover`, { background: hover }),-- c(`.${K.recIcon}`, { flex: 'none', display: 'inline-flex', marginTop: '2px', fontSize: '16px' }),- c(`.${K.recBody}`, { display: 'flex', flexDirection: 'column', gap: '2px', minWidth: '0' }),- c(`.${K.recName}`, { color: primary, fontSize: '13px', lineHeight: '18px', fontWeight: '500' }),- c(`.${K.recName} strong`, { color: secondary, fontWeight: '600' }),- c(`.${K.recPrompt}`, { color: tertiary, fontSize: '12px', lineHeight: '18px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),+ c(`.dshp-scheduler__recs`, { marginTop: '24px' }),+ c(`.dshp-scheduler__recs-title`, { margin: '0 0 10px', fontSize: '13px', lineHeight: '18px', fontWeight: '600', color: secondary }),+ c(`.dshp-scheduler__recs-list`, { display: 'flex', flexDirection: 'column', gap: '8px', margin: '0', padding: '0', listStyle: 'none' }),+ c(`.dshp-scheduler__recs-item`, { boxSizing: 'border-box', display: 'flex', alignItems: 'flex-start', gap: '10px', width: '100%', minWidth: '0', padding: '10px 12px', border: `1px solid ${border}`, borderRadius: '10px', background: 'transparent', color: 'inherit', font: 'inherit', fontSize: '13px', lineHeight: '20px', textAlign: 'left', cursor: 'pointer' }),+ c(`.dshp-scheduler__recs-item:hover`, { background: hover }),++ c(`.dshp-scheduler__recs-icon`, { flex: 'none', display: 'inline-flex', marginTop: '2px', fontSize: '16px' }),+ c(`.dshp-scheduler__recs-body`, { display: 'flex', flexDirection: 'column', gap: '2px', minWidth: '0' }),+ c(`.dshp-scheduler__recs-name`, { color: primary, fontSize: '13px', lineHeight: '18px', fontWeight: '500' }),+ c(`.dshp-scheduler__recs-name strong`, { color: secondary, fontWeight: '600' }),+ c(`.dshp-scheduler__recs-prompt`, { color: tertiary, fontSize: '12px', lineHeight: '18px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }),])diff --git a/packages/dsh-tauri-panel/src/client/components/action-item.tsx b/packages/dsh-tauri-panel/src/client/components/action-item.tsxindex e97df6ca..d56ff97d 100644--- a/packages/dsh-tauri-panel/src/client/components/action-item.tsx+++ b/packages/dsh-tauri-panel/src/client/components/action-item.tsx@@ -7,7 +7,7 @@import type { ReactElement } from 'react'import type { PanelActionItemProps } from '../types'-import { PANEL_CLASSES, PANEL_DATA_ATTRIBUTES } from '../constants'+import { PANEL_DATA_ATTRIBUTES } from '../constants'import { usePanelViewId } from '../hooks/panel'export function PanelActionItem({ id, icon, onClick, children }: PanelActionItemProps): ReactElement {@@ -15,12 +15,12 @@ export function PanelActionItem({ id, icon, onClick, children }: PanelActionItemreturn (<buttontype="button"- className={active ? `${PANEL_CLASSES.menuItem} ${PANEL_CLASSES.menuItemSelected}` : PANEL_CLASSES.menuItem}+ className={active ? `${'dshp-panel__menu-item'} ${'dshp-panel__menu-item--selected'}` : 'dshp-panel__menu-item'}{...{ [PANEL_DATA_ATTRIBUTES.action]: '' }}onClick={onClick}>- {icon !== undefined && <span className={PANEL_CLASSES.menuItemIcon}>{icon}</span>}- <span className={PANEL_CLASSES.menuItemLabel}>{children}</span>+ {icon !== undefined && <span className="dshp-panel__menu-item-icon">{icon}</span>}+ <span className="dshp-panel__menu-item-label">{children}</span></button>)}diff --git a/packages/dsh-tauri-panel/src/client/components/conversation-seat.tsx b/packages/dsh-tauri-panel/src/client/components/conversation-seat.tsxindex eaf3912c..1d154dff 100644--- a/packages/dsh-tauri-panel/src/client/components/conversation-seat.tsx+++ b/packages/dsh-tauri-panel/src/client/components/conversation-seat.tsx@@ -16,7 +16,7 @@ import type { ReactElement } from 'react'import type { PanelWidthController } from '../service/width'import type { PanelContentSpec } from '../types'import { useEffect, useRef } from 'react'-import { PANEL_CLASSES, PANEL_DATA_ATTRIBUTES } from '../constants'+import { PANEL_DATA_ATTRIBUTES } from '../constants'import { WidthHandle } from './width-handle'export function ConversationSeat({@@ -42,11 +42,11 @@ export function ConversationSeat({return nullconst View = spec.renderreturn (- <div ref={rootRef} {...{ [PANEL_DATA_ATTRIBUTES.view]: '' }} className={PANEL_CLASSES.panelView}>+ <div ref={rootRef} {...{ [PANEL_DATA_ATTRIBUTES.view]: '' }} className="dshp-panel__panel-view">{/* 内容列:对齐官方内容列宽度(max-width var(--dsh-chat-content-width, 780px)),子插件零宽度关注,只负责内容自身布局(垂直方向自定)。 */}<div style={{ padding: '16px 16px 16px 8px' }}>- <div className={PANEL_CLASSES.panelViewColumn}>+ <div className="dshp-panel__panel-view-column"><View t={t} /></div></div>diff --git a/packages/dsh-tauri-panel/src/client/components/sidebar.tsx b/packages/dsh-tauri-panel/src/client/components/sidebar.tsxindex 09c6d100..484c1480 100644--- a/packages/dsh-tauri-panel/src/client/components/sidebar.tsx+++ b/packages/dsh-tauri-panel/src/client/components/sidebar.tsx@@ -3,7 +3,7 @@ import type { SidebarRootProps } from '../types'import { SlotOutlet } from '@deepseek-ai/dsh-client-ui-renderer'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'+import { COLLAPSE_SETTLE_MS, PANEL_DATA_ATTRIBUTES, SCROLLBAR_LINGER_MS } from '../constants'/*** components/sidebar.tsx — sidebar 槽整槽替换的克隆组件(priority -1 shadow 官方@@ -70,12 +70,12 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebarreturn (<divclassName={cx(- PANEL_CLASSES.root,- !wide && PANEL_CLASSES.collapsed,- !wide && everWide.current && PANEL_CLASSES.railIn,- collapsed && wide && PANEL_CLASSES.fading,- !pointerInside && PANEL_CLASSES.quietBars,- wide && PANEL_CLASSES.wide,+ 'dshp-panel',+ !wide && 'dshp-panel--collapsed',+ !wide && everWide.current && 'dshp-panel--rail-in',+ collapsed && wide && 'dshp-panel--fading',+ !pointerInside && 'dshp-panel--quiet-bars',+ wide && 'dshp-panel--wide',)}{...{ [PANEL_DATA_ATTRIBUTES.sidebar]: '' }}style={wide ? { '--dshp-width': `${collapsed ? lastWideWidth.current : width}px` } as CSSProperties : undefined}@@ -87,11 +87,11 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebararmLinger()}}>- <div className={PANEL_CLASSES.logoRow}>+ <div className="dshp-panel__logo-row">{wide && (<buttontype="button"- className={PANEL_CLASSES.brand}+ className="dshp-panel__brand"aria-label={t('session.new.label')}onClick={() => {console.warn('[dsh-tauri-panel] new session requested', { source: 'brand' })@@ -103,19 +103,19 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar}}}>- <span className={PANEL_CLASSES.brandIdentity} aria-hidden="true">- <span className={PANEL_CLASSES.brandMark}>+ <span className="dshp-panel__brand-identity" aria-hidden="true">+ <span className="dshp-panel__brand-mark"><SlotOutletslotKey="sidebar.brand.mark"ownerProps={{ size: 24 }}opts={{ fallback: <Icon as={FishMark} size={24} /> }}/></span>- <span className={PANEL_CLASSES.brandName}>+ <span className="dshp-panel__brand-name"><SlotOutletslotKey="sidebar.brand.name"ownerProps={{}}- opts={{ fallback: <span className={PANEL_CLASSES.fallbackBrandName}>DSH Local Build</span> }}+ opts={{ fallback: <span className="dshp-panel__fallback-brand-name">DSH Local Build</span> }}/></span></span>@@ -123,13 +123,13 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar)}<buttontype="button"- className={`${PANEL_CLASSES.iconButton} ${PANEL_CLASSES.toggle}`}+ className={`${'dshp-panel__icon-button'} ${'dshp-panel__toggle'}`}aria-label={collapsed ? t('toggle.open') : t('toggle.collapse')}title={collapsed ? t('toggle.open') : t('toggle.collapse')}onClick={() => toggleSidebar()}>{!wide && (- <span className={PANEL_CLASSES.railMark} aria-hidden="true">+ <span className="dshp-panel__rail-mark" aria-hidden="true"><SlotOutletslotKey="sidebar.brand.mark"ownerProps={{ size: 24 }}@@ -139,10 +139,10 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar)}</button></div>- <div className={PANEL_CLASSES.panelArea}>+ <div className="dshp-panel__panel-area"><buttontype="button"- className={`${PANEL_CLASSES.menuItem} ${PANEL_CLASSES.newSession}`}+ className={`${'dshp-panel__menu-item'} ${'dshp-panel__new-session'}`}title={t('session.new.label')}onClick={() => {console.warn('[dsh-tauri-panel] new session requested', { source: 'menu' })@@ -154,13 +154,13 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar}}}>- <span className={PANEL_CLASSES.menuItemIcon}><Icon as={CommentPlus} size={wide ? 14 : 18} /></span>- <span className={PANEL_CLASSES.menuItemLabel}>{t('session.new')}</span>+ <span className="dshp-panel__menu-item-icon"><Icon as={CommentPlus} size={wide ? 14 : 18} /></span>+ <span className="dshp-panel__menu-item-label">{t('session.new')}</span></button><SlotOutlet slotKey="sidebar.panel.action" ownerProps={{ wide }} /></div>- <div className={PANEL_CLASSES.regionArea}>+ <div className="dshp-panel__region-area"><SlotOutletslotKey="sidebar.workspaces"ownerProps={{@@ -173,11 +173,11 @@ export function SidebarRootClone({ collapsed, width, startSession, toggleSidebar/></div>- <div className={PANEL_CLASSES.footArea}>- <div className={PANEL_CLASSES.footerActions}>+ <div className="dshp-panel__foot-area">+ <div className="dshp-panel__footer-actions"><SlotOutlet slotKey="sidebar.footer.action" ownerProps={{ wide }} /></div>- <div className={PANEL_CLASSES.settingsArea}>+ <div className="dshp-panel__settings-area"><SlotOutlet slotKey="sidebar.settings" ownerProps={{ wide }} /></div></div>diff --git a/packages/dsh-tauri-panel/src/client/components/width-handle.tsx b/packages/dsh-tauri-panel/src/client/components/width-handle.tsxindex b6ef138e..907c4bfc 100644--- a/packages/dsh-tauri-panel/src/client/components/width-handle.tsx+++ b/packages/dsh-tauri-panel/src/client/components/width-handle.tsx@@ -10,7 +10,7 @@import type { ReactElement } from 'react'import type { PanelWidthHandleCallbacks } from '../service/width'import { useCallback, useRef, useState } from 'react'-import { PANEL_CLASSES, PANEL_DATA_ATTRIBUTES, PANEL_WIDTH_VARS } from '../constants'+import { PANEL_DATA_ATTRIBUTES, PANEL_WIDTH_VARS } from '../constants'export interface WidthHandleProps {/** 手柄所在侧(决定外向拖拽方向)。 */@@ -84,7 +84,7 @@ export function WidthHandle({ side, handle }: WidthHandleProps): ReactElement {return (<div- className={PANEL_CLASSES.widthHandle}+ className="dshp-panel__width-handle"data-side={side}{...{ [PANEL_DATA_ATTRIBUTES.widthHandle]: side }}data-dragging={dragging || undefined}diff --git a/packages/dsh-tauri-panel/src/client/constants/index.ts b/packages/dsh-tauri-panel/src/client/constants/index.tsindex d0ab1838..d1334d99 100644--- a/packages/dsh-tauri-panel/src/client/constants/index.ts+++ b/packages/dsh-tauri-panel/src/client/constants/index.ts@@ -17,37 +17,6 @@ export const WORKSPACE_GROUP_SELECTOR = '[role="treeitem"][aria-expanded]'*/export const SIDEBAR_KEEP_OPEN_SELECTOR = 'button[aria-label="视图选项"],button[aria-label="View options"],button[aria-label="添加工作区"],button[aria-label="Add workspace"]'-export const PANEL_CLASSES = {- root: 'dshp-panel',- collapsed: 'dshp-panel--collapsed',- railIn: 'dshp-panel--rail-in',- fading: 'dshp-panel--fading',- quietBars: 'dshp-panel--quiet-bars',- wide: 'dshp-panel--wide',- logoRow: 'dshp-panel__logo-row',- brand: 'dshp-panel__brand',- brandIdentity: 'dshp-panel__brand-identity',- brandMark: 'dshp-panel__brand-mark',- brandName: 'dshp-panel__brand-name',- fallbackBrandName: 'dshp-panel__fallback-brand-name',- iconButton: 'dshp-panel__icon-button',- toggle: 'dshp-panel__toggle',- railMark: 'dshp-panel__rail-mark',- panelArea: 'dshp-panel__panel-area',- menuItem: 'dshp-panel__menu-item',- menuItemSelected: 'dshp-panel__menu-item--selected',- newSession: 'dshp-panel__new-session',- menuItemIcon: 'dshp-panel__menu-item-icon',- menuItemLabel: 'dshp-panel__menu-item-label',- regionArea: 'dshp-panel__region-area',- footArea: 'dshp-panel__foot-area',- footerActions: 'dshp-panel__footer-actions',- settingsArea: 'dshp-panel__settings-area',- panelView: 'dshp-panel__panel-view',- panelViewColumn: 'dshp-panel__panel-view-column',- widthHandle: 'dshp-panel__width-handle',-} as const-export const PANEL_DATA_ATTRIBUTES = {sidebar: 'data-dshp-panel-sidebar',active: 'data-dshp-panel-active',diff --git a/packages/dsh-tauri-panel/src/client/dom/panel.ts b/packages/dsh-tauri-panel/src/client/dom/panel.tsindex 6d585b70..e1306f97 100644--- a/packages/dsh-tauri-panel/src/client/dom/panel.ts+++ b/packages/dsh-tauri-panel/src/client/dom/panel.ts@@ -5,7 +5,7 @@* setSidebarPanelActive 把面板激活态投影到侧栏根供跨插件样式协议使用。*/-import { PANEL_CLASSES, PANEL_DATA_ATTRIBUTES, SIDEBAR_INTERACTIVE_SELECTOR, SIDEBAR_KEEP_OPEN_SELECTOR, WORKSPACE_GROUP_SELECTOR } from '../constants'+import { PANEL_DATA_ATTRIBUTES, SIDEBAR_INTERACTIVE_SELECTOR, SIDEBAR_KEEP_OPEN_SELECTOR, WORKSPACE_GROUP_SELECTOR } from '../constants'/*** 判断侧栏 pointerdown 是否代表离开当前面板的导航动作:@@ -20,7 +20,7 @@ export function shouldClosePanelForSidebarTarget(target: Element | null): booleaconst sidebar = target.closest(`[${PANEL_DATA_ATTRIBUTES.sidebar}]`)if (!sidebar)return false- if (target.closest(`[${PANEL_DATA_ATTRIBUTES.view}],[${PANEL_DATA_ATTRIBUTES.action}],.${PANEL_CLASSES.panelView}`))+ if (target.closest(`[${PANEL_DATA_ATTRIBUTES.view}],[${PANEL_DATA_ATTRIBUTES.action}],.dshp-panel__panel-view`))return falseif (target.closest(SIDEBAR_KEEP_OPEN_SELECTOR))return false@@ -43,5 +43,3 @@ export function setSidebarPanelActive(active: boolean): void {elsesidebar?.removeAttribute(PANEL_DATA_ATTRIBUTES.active)}--export { PANEL_CLASSES }diff --git a/packages/dsh-tauri-rightclick/src/client/constants/index.ts b/packages/dsh-tauri-rightclick/src/client/constants/index.tsindex c6838159..abb8140c 100644--- a/packages/dsh-tauri-rightclick/src/client/constants/index.ts+++ b/packages/dsh-tauri-rightclick/src/client/constants/index.ts@@ -22,14 +22,6 @@ export const RIGHTCLICK_MENU_EFFECT = `${RIGHTCLICK_CLIENT_PLUGIN}: context menu* css-render class 前缀(bem blockPrefix `.dshp-`,跨插件协议暴露给扩展事件* detail 的 DOM 结构保持稳定——修改必须同步 styles/*.cssr.ts)。*/-export const RIGHTCLICK_CLASSES = {- menu: 'dshp-menu',- item: 'dshp-menu__item',- itemDanger: 'dshp-menu__item--danger',- shortcut: 'dshp-menu__shortcut',- separator: 'dshp-menu__separator',- toast: 'dshp-toast',-} as const/** 扩展注册表协议(其他 Web 插件经 globalThis[Symbol.for(KEY)] 登记扩展项)。 */export const EXTENSIONS_REGISTRY_KEY = 'dsh.rightclick-menu.extensions'diff --git a/packages/dsh-tauri-rightclick/src/client/dom/menu-item.ts b/packages/dsh-tauri-rightclick/src/client/dom/menu-item.tsindex 6c578ee2..96a5b367 100644--- a/packages/dsh-tauri-rightclick/src/client/dom/menu-item.ts+++ b/packages/dsh-tauri-rightclick/src/client/dom/menu-item.ts@@ -5,7 +5,7 @@* 不含 close/toast/错误处理等控制器职责(那些留在 menu.ts 的 add/split 包装里)。* 全部基于稳定的 role / class 语义,不依赖生成哈希的 CSS module 类名。*/-import { RIGHTCLICK_CLASSES as K, MENU_VIEWPORT_MARGIN } from '../constants'+import { MENU_VIEWPORT_MARGIN } from '../constants'/** 菜单项构建选项(danger 决定危险样式;shortcut 显示右侧快捷键提示)。 */export interface MenuItemOptions {@@ -18,7 +18,7 @@ export interface MenuItemOptions {/** 创建菜单根节点(初始隐藏,定位后由 positionMenu 显隐)。 */export function createMenuRoot(): HTMLDivElement {const root = document.createElement('div')- root.className = K.menu+ root.className = 'dshp-menu'root.setAttribute('role', 'menu')root.style.visibility = 'hidden'return root@@ -28,7 +28,7 @@ export function createMenuRoot(): HTMLDivElement {export function createMenuItem(options: MenuItemOptions): HTMLButtonElement {const button = document.createElement('button')button.type = 'button'- button.className = options.danger ? `${K.item} ${K.itemDanger}` : K.item+ button.className = options.danger ? `${'dshp-menu__item'} ${'dshp-menu__item--danger'}` : 'dshp-menu__item'button.setAttribute('role', 'menuitem')button.tabIndex = -1const itemLabel = document.createElement('span')@@ -36,7 +36,7 @@ export function createMenuItem(options: MenuItemOptions): HTMLButtonElement {button.appendChild(itemLabel)if (options.shortcut) {const hint = document.createElement('span')- hint.className = K.shortcut+ hint.className = 'dshp-menu__shortcut'hint.textContent = options.shortcutbutton.appendChild(hint)}@@ -49,7 +49,7 @@ export function createMenuItem(options: MenuItemOptions): HTMLButtonElement {/** 创建菜单分隔线(role=separator)。 */export function createSeparator(): HTMLDivElement {const node = document.createElement('div')- node.className = K.separator+ node.className = 'dshp-menu__separator'node.setAttribute('role', 'separator')return node}diff --git a/packages/dsh-tauri-rightclick/src/client/service/menu.ts b/packages/dsh-tauri-rightclick/src/client/service/menu.tsindex 03d6a4e6..7860c990 100644--- a/packages/dsh-tauri-rightclick/src/client/service/menu.ts+++ b/packages/dsh-tauri-rightclick/src/client/service/menu.ts@@ -19,7 +19,6 @@ import type {import { compat, createLifecycleController } from 'dsh-tauri/client'import {CONTEXT_MENU_EVENT,- RIGHTCLICK_CLASSES as K,} from '../constants'import { editableFrom, externalUrl, officialAction, resolveSession, rowFrom, selectedText, selectedUrl, ungroupedRowFrom, workspaceForSession, workspaceFrom } from '../dom/locate'import { createMenuItem, createMenuRoot, createSeparator, positionMenu } from '../dom/menu-item'@@ -79,7 +78,7 @@ export function installContextMenu(ctx: ClientContext): () => void {}/** 追加分隔线(已有条目且末项不是分隔线时才加)。 */const split = (root: HTMLElement): void => {- if (!root.childElementCount || root.lastElementChild?.classList.contains(K.separator))+ if (!root.childElementCount || root.lastElementChild?.classList.contains('dshp-menu__separator'))returnroot.appendChild(createSeparator())}diff --git a/packages/dsh-tauri-rightclick/src/client/utils/dialog.ts b/packages/dsh-tauri-rightclick/src/client/utils/dialog.tsindex 2dc77f47..964a45c5 100644--- a/packages/dsh-tauri-rightclick/src/client/utils/dialog.ts+++ b/packages/dsh-tauri-rightclick/src/client/utils/dialog.ts@@ -1,11 +1,11 @@/** dialog.ts — lightweight toast notifications for context-menu actions. */-import { RIGHTCLICK_CLASSES as K, TOAST_DURATION_MS } from '../constants'+import { TOAST_DURATION_MS } from '../constants'/** Toast 展示:同一时刻只保留一条,自动消失。 */export function toast(message: string): void {- document.querySelector(`.${K.toast}`)?.remove()+ document.querySelector(`.${'dshp-toast'}`)?.remove()const node = document.createElement('div')- node.className = K.toast+ node.className = 'dshp-toast'node.textContent = messagedocument.body.appendChild(node)setTimeout(() => node.remove(), TOAST_DURATION_MS)diff --git a/packages/dsh-tauri-session/src/client/components/archive-panel.tsx b/packages/dsh-tauri-session/src/client/components/archive-panel.tsxindex 7e34e8c4..505f7543 100644--- a/packages/dsh-tauri-session/src/client/components/archive-panel.tsx+++ b/packages/dsh-tauri-session/src/client/components/archive-panel.tsx@@ -23,7 +23,6 @@ import type { ArchivePanelProps, ArchiveSort } from '../types'import { Button, Input, Menu, Modal, Toast } from '@deepseek-ai/dsh-client-ui-primitives'import { Ellipsis, FolderOpen, Icon, Magnifier, MenuSelect, TrashBin } from 'dsh-tauri-ui/client'import { useCallback, useEffect, useState, useSyncExternalStore } from 'react'-import { SESSION_CLASSES as K } from '../constants'import { text, useLocale } from '../locales'import {clearArchive,@@ -150,7 +149,7 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {<Button variant="ghost" onClick={() => setConfirm(null)}>{text('cancel')}</Button><Buttonvariant="outline"- className={K.deleteBtn}+ className="dshp-session__delete-btn"disabled={ui.pending}onClick={handleConfirmDelete}>@@ -160,25 +159,25 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {)return (- <div className={K.page}>- <div className={K.header}>- <h1 className={K.title}>{text('archiveTitle')}</h1>+ <div className="dshp-session__page">+ <div className="dshp-session__header">+ <h1 className="dshp-session__title">{text('archiveTitle')}</h1><Buttontype="button"variant="ghost"icon={<Icon as={TrashBin} />}- className={K.deleteAll}+ className="dshp-session__delete-all"style={{ color: 'var(--dsw-alias-state-error-primary)' }}disabled={busy}onClick={() => setConfirm({ kind: 'all' })}>- <span className={K.deleteBtnText}>{text('deleteAll')}</span>+ <span className="dshp-session__delete-btn-text">{text('deleteAll')}</span></Button></div>- <div className={K.toolbar}>+ <div className="dshp-session__toolbar"><Input- className={K.search}+ className="dshp-session__search"value={ui.query}placeholder={text('searchPlaceholder')}aria-label={text('searchPlaceholder')}@@ -187,9 +186,9 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {/><MenuSelectvariant="default"- triggerClassName={K.menuSelect}- labelClassName={K.menuSelectLabel}- chevronClassName={K.menuSelectChevron}+ triggerClassName="dshp-session__menu-select"+ labelClassName="dshp-session__menu-select-label"+ chevronClassName="dshp-session__menu-select-chevron"label={text('sortLabel')}value={ui.sort}onSelect={id => setSort(id as ArchiveSort)}@@ -201,9 +200,9 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {/><MenuSelectvariant="default"- triggerClassName={K.menuSelect}- labelClassName={K.menuSelectLabel}- chevronClassName={K.menuSelectChevron}+ triggerClassName="dshp-session__menu-select"+ labelClassName="dshp-session__menu-select-label"+ chevronClassName="dshp-session__menu-select-chevron"label={text('allProjects')}value={ui.workspaceId}onSelect={setWorkspaceFilter}@@ -215,19 +214,19 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {/></div>- {ui.error && <div className={K.error}>{ui.error}</div>}+ {ui.error && <div className="dshp-session__error">{ui.error}</div>}{!ui.loading && visible.length === 0 && (- <div className={K.empty}>{query ? text('noResults') : text('empty')}</div>+ <div className="dshp-session__empty">{query ? text('noResults') : text('empty')}</div>)}- <div className={K.groups}>+ <div className="dshp-session__groups">{groups.map(group => (- <section key={group.id} className={K.group}>- <div className={K.groupHeader}>+ <section key={group.id} className="dshp-session__group">+ <div className="dshp-session__group-header"><Icon as={FolderOpen} />- <span className={K.groupTitle}>{group.title || text('ungrouped')}</span>- <span className={K.groupCount}>+ <span className="dshp-session__group-title">{group.title || text('ungrouped')}</span>+ <span className="dshp-session__group-count">{group.rows.length}{' '}{text('chats')}@@ -256,7 +255,7 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {anchor={(<buttontype="button"- className={K.groupMenuTrigger}+ className="dshp-session__group-menu-trigger"aria-label={text('groupMenuAria')}aria-haspopup="menu"aria-expanded={openGroupMenu === group.id}@@ -267,25 +266,25 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {)}/></div>- <ul className={K.list}>+ <ul className="dshp-session__list">{group.rows.map(row => (- <li key={row.sessionId} className={K.row}>- <div className={K.rowMain}>+ <li key={row.sessionId} className="dshp-session__row">+ <div className="dshp-session__row-main"><buttontype="button"- className={K.rowTitle}+ className="dshp-session__row-title"title={text('openDirectory')}aria-label={`${text('openDirectory')}: ${row.title}`}onClick={() => void handleOpenSessionDirectory(row.sessionId)}>{row.title}</button>- <span className={K.rowTime}>{formatTime(row)}</span>+ <span className="dshp-session__row-time">{formatTime(row)}</span></div>- <div className={K.rowActions}>+ <div className="dshp-session__row-actions"><buttontype="button"- className={K.rowDelete}+ className="dshp-session__row-delete"aria-label={text('deleteRowAria')}disabled={busy}onClick={() => setConfirm({ kind: 'single', sessionId: row.sessionId })}@@ -296,7 +295,7 @@ export function ArchivePanel(props: ArchivePanelProps): ReactElement | null {type="button"variant="outline"size="sm"- className={K.unarchive}+ className="dshp-session__unarchive"disabled={busy}onClick={() => handleUnarchive(row.sessionId)}>diff --git a/packages/dsh-tauri-session/src/client/constants/index.ts b/packages/dsh-tauri-session/src/client/constants/index.tsindex 1e7a5157..ecef4e88 100644--- a/packages/dsh-tauri-session/src/client/constants/index.ts+++ b/packages/dsh-tauri-session/src/client/constants/index.ts@@ -18,38 +18,6 @@ export const SESSION_ARCHIVE_PATCH_EFFECT = `${SESSION_PLUGIN_NAME}: workspace aexport const SESSION_ARCHIVE_SECTION_EFFECT = `${SESSION_PLUGIN_NAME}: archive section`/** css-render class prefix (value 仅用于样式命名,不作为协议). */-export const SESSION_CLASSES = {- page: 'dshp-session__page',- header: 'dshp-session__header',- title: 'dshp-session__title',- deleteAll: 'dshp-session__delete-all',- toolbar: 'dshp-session__toolbar',- search: 'dshp-session__search',- menuSelect: 'dshp-session__menu-select',- menuSelectLabel: 'dshp-session__menu-select-label',- menuSelectChevron: 'dshp-session__menu-select-chevron',- groups: 'dshp-session__groups',- group: 'dshp-session__group',- groupHeader: 'dshp-session__group-header',- groupTitle: 'dshp-session__group-title',- groupCount: 'dshp-session__group-count',- groupMenu: 'dshp-session__group-menu',- groupMenuTrigger: 'dshp-session__group-menu-trigger',- list: 'dshp-session__list',- row: 'dshp-session__row',- rowMain: 'dshp-session__row-main',- rowTitle: 'dshp-session__row-title',- rowTime: 'dshp-session__row-time',- rowActions: 'dshp-session__row-actions',- rowDelete: 'dshp-session__row-delete',- unarchive: 'dshp-session__unarchive',- deleteBtn: 'dshp-session__delete-btn',- deleteBtnText: 'dshp-session__delete-btn-text',- empty: 'dshp-session__empty',- error: 'dshp-session__error',- toastView: 'dshp-session__toast-view',- archiveMenuItem: 'dshp-session__archive-menu-item',-} as const/*** Sync strings for matching the official workspace-row menu's delete itemdiff --git a/packages/dsh-tauri-session/src/client/dom/workspace-patch.ts b/packages/dsh-tauri-session/src/client/dom/workspace-patch.tsindex 1c4a0103..b5b0111b 100644--- a/packages/dsh-tauri-session/src/client/dom/workspace-patch.ts+++ b/packages/dsh-tauri-session/src/client/dom/workspace-patch.ts@@ -24,7 +24,6 @@ import { createElement } from 'react'import { createRoot } from 'react-dom/client'import {DELETE_WORKSPACE_LABELS,- SESSION_CLASSES as K,MENU_ITEM_SELECTOR,SIDEBAR_SELECTOR,WORKSPACE_MENU_ANCHOR_ATTRIBUTE,@@ -208,7 +207,7 @@ export function installWorkspaceArchivePatch(workspacesRuntime: WorkspacesRuntimif (icon)icon.innerHTML = ARCHIVE_ICON_SVG// 删除条目带 danger 样式,归档条目需要还原成普通条目外观。- archiveItem.classList.add(K.archiveMenuItem)+ archiveItem.classList.add('dshp-session__archive-menu-item')archiveItem.style.setProperty('color', 'var(--dsw-alias-label-primary)', 'important')archiveItem.style.setProperty('background', 'transparent', 'important')icon?.style.setProperty('color', 'var(--dsw-alias-label-tertiary)', 'important')diff --git a/packages/dsh-tauri-session/src/client/styles/session-archive.cssr.ts b/packages/dsh-tauri-session/src/client/styles/session-archive.cssr.tsindex f6513a43..c026fdd8 100644--- a/packages/dsh-tauri-session/src/client/styles/session-archive.cssr.ts+++ b/packages/dsh-tauri-session/src/client/styles/session-archive.cssr.ts@@ -1,24 +1,23 @@/** Archive page styles generated as css-render nodes. */import { cssr } from 'dsh-tauri-ui/client'-import { SESSION_CLASSES as K } from '../constants'const { c } = cssrexport default c([- c(`.${K.page}`, {+ c(`.dshp-session__page`, {display: 'flex',flexDirection: 'column',gap: '16px',minHeight: '100%',color: 'var(--dsw-alias-label-primary)',}),- c(`.${K.header}`, {+ c(`.dshp-session__header`, {display: 'flex',alignItems: 'center',justifyContent: 'space-between',gap: '12px',}),- c(`.${K.title}`, {+ c(`.dshp-session__title`, {margin: 0,fontSize: '24px',lineHeight: '32px',@@ -26,13 +25,13 @@ export default c([}),// 「全部删除」:红字 + hover 透明红底。官方 ghost hover 是单类 + :hover:not()// 的同特异性选择器,靠样式表顺序不保险,这里叠加双类抬高特异性保证覆盖。- c(`.${K.deleteAll}`, {+ c(`.dshp-session__delete-all`, {color: 'var(--dsw-alias-state-error-primary, var(--dsw-alias-danger-text, inherit))',}),- c(`.${K.deleteAll}.${K.deleteAll}:hover:not(:disabled)`, {+ c(`.dshp-session__delete-all.dshp-session__delete-all:hover:not(:disabled)`, {background: 'var(--dsw-alias-interactive-bg-hover-danger)',}),- c(`.${K.archiveMenuItem}`, {+ c(`.dshp-session__archive-menu-item`, {color: 'var(--dsw-alias-label-primary) !important',background: 'transparent !important',}, [@@ -45,7 +44,7 @@ export default c([}),]),- c(`.${K.toolbar}`, {+ c(`.dshp-session__toolbar`, {position: 'sticky',top: 0,zIndex: 2,@@ -57,13 +56,13 @@ export default c([background: 'var(--dsw-alias-bg-base, var(--dsw-alias-bg-module-platform))',}),// 官方 Input 自带外观(32px 圆角框、focus 描边),这里只控制弹性宽度。- c(`.${K.search}`, {+ c(`.dshp-session__search`, {flex: '1 1 220px',minWidth: 0,}),// 官方风格下拉触发器(MenuSelect):对齐官方「通用设置」Select 的 pill 规格// (36px 高、全圆角、无边框、bg-module-platform 底、hover 换 interactive 底)。- c(`.${K.menuSelect}`, {+ c(`.dshp-session__menu-select`, {display: 'inline-flex',alignItems: 'center',gap: '12px',@@ -82,33 +81,33 @@ export default c([}, [c('&:hover', { background: 'var(--dsw-alias-interactive-bg-hover)' }),]),- c(`.${K.menuSelectLabel}`, {+ c(`.dshp-session__menu-select-label`, {textOverflow: 'ellipsis',whiteSpace: 'nowrap',overflow: 'hidden',minWidth: 0,}),- c(`.${K.menuSelectChevron}`, {+ c(`.dshp-session__menu-select-chevron`, {flex: 'none',}),- c(`.${K.groups}`, {+ c(`.dshp-session__groups`, {display: 'flex',flexDirection: 'column',gap: '20px',}),- c(`.${K.group}`, {+ c(`.dshp-session__group`, {display: 'flex',flexDirection: 'column',gap: '8px',}),- c(`.${K.groupHeader}`, {+ c(`.dshp-session__group-header`, {display: 'flex',alignItems: 'center',gap: '8px',padding: '0 2px',color: 'var(--dsw-alias-label-secondary)',}),- c(`.${K.groupTitle}`, {+ c(`.dshp-session__group-title`, {fontSize: '14px',lineHeight: '22px',fontWeight: 500,@@ -117,13 +116,13 @@ export default c([textOverflow: 'ellipsis',whiteSpace: 'nowrap',}),- c(`.${K.groupCount}`, {+ c(`.dshp-session__group-count`, {fontSize: '13px',lineHeight: '20px',color: 'var(--dsw-alias-label-secondary, var(--dsw-alias-label-primary))',marginLeft: 'auto',}),- c(`.${K.groupMenuTrigger}`, {+ c(`.dshp-session__group-menu-trigger`, {display: 'inline-flex',alignItems: 'center',justifyContent: 'center',@@ -141,7 +140,7 @@ export default c([c('&:hover', { background: 'var(--dsw-alias-interactive-bg-hover)' }),]),// 重置 ul 默认 margin/padding/标记,行内边距由 .row 自行控制,去掉左侧缩进空白。- c(`.${K.list}`, {+ c(`.dshp-session__list`, {display: 'flex',flexDirection: 'column',margin: 0,@@ -151,7 +150,7 @@ export default c([borderRadius: '12px',overflow: 'hidden',}),- c(`.${K.row}`, {+ c(`.dshp-session__row`, {display: 'flex',alignItems: 'center',gap: '12px',@@ -162,14 +161,14 @@ export default c([}, [c('& + &', { borderTop: '1px solid var(--dsw-alias-border-weak, rgba(127,127,127,0.2))' }),]),- c(`.${K.rowMain}`, {+ c(`.dshp-session__row-main`, {flex: '1 1 auto',minWidth: 0,display: 'flex',flexDirection: 'column',gap: '4px',}),- c(`.${K.rowTitle}`, {+ c(`.dshp-session__row-title`, {fontSize: '13px',lineHeight: '22px',fontWeight: 600,@@ -192,7 +191,7 @@ export default c([textDecorationColor: 'var(--dsw-alias-label-secondary, currentColor)',}),]),- c(`.${K.rowTime}`, {+ c(`.dshp-session__row-time`, {fontSize: '13px',lineHeight: '20px',color: 'var(--dsw-alias-label-secondary, var(--dsw-alias-label-primary))',@@ -200,14 +199,14 @@ export default c([textOverflow: 'ellipsis',whiteSpace: 'nowrap',}),- c(`.${K.rowActions}`, {+ c(`.dshp-session__row-actions`, {flex: 'none',display: 'flex',alignItems: 'center',gap: '8px',}),// 行内垃圾桶:官方 iconButton 规格(28px 圆角方形、hover 底色)。- c(`.${K.rowDelete}`, {+ c(`.dshp-session__row-delete`, {display: 'inline-flex',alignItems: 'center',justifyContent: 'center',@@ -223,23 +222,23 @@ export default c([}, [c('&:hover', { background: 'var(--dsw-alias-interactive-bg-hover)' }),]),- c(`.${K.unarchive}`, {+ c(`.dshp-session__unarchive`, {color: 'var(--dsw-alias-label-primary)',}),// 删除确认弹窗的「删除」按钮:危险色(浅红底 + 红字)。- c(`.${K.deleteBtn}`, {+ c(`.dshp-session__delete-btn`, {background: 'var(--dsw-alias-interactive-bg-hover-danger, var(--dsw-alias-interactive-bg-hover))',borderColor: 'var(--dsw-alias-state-error-primary, var(--dsw-alias-border-l2))',}, []),- c(`.${K.empty}`, {+ c(`.dshp-session__empty`, {padding: '32px 0',textAlign: 'center',fontSize: '14px',lineHeight: '22px',color: 'var(--dsw-alias-label-secondary, var(--dsw-alias-label-primary))',}),- c(`.${K.error}`, {+ c(`.dshp-session__error`, {padding: '12px 16px',borderRadius: '10px',background: 'var(--dsw-alias-interactive-bg-hover, rgba(127,127,127,0.08))',@@ -249,7 +248,7 @@ export default c([}),// 取消归档 toast 里的「查看」:内联链接式动作按钮(官方 Toast 文案槽不支持动作,// 这里以插件类名渲染内联按钮)。- c(`.${K.toastView}`, {+ c(`.dshp-session__toast-view`, {padding: 0,border: 'none',background: 'none',diff --git a/packages/dsh-tauri-worktree/src/client/components/dialog.tsx b/packages/dsh-tauri-worktree/src/client/components/dialog.tsxindex 73029884..351ee86e 100644--- a/packages/dsh-tauri-worktree/src/client/components/dialog.tsx+++ b/packages/dsh-tauri-worktree/src/client/components/dialog.tsx@@ -16,7 +16,6 @@ import type { WorkspacesRuntime, WorktreeDialogProps } from '../types'* 职责拆分:slot 注册在 register/dialog.ts,工作区顶部插入逻辑在 lib/worktree.ts。*/import { useEffect } from 'react'-import { worktreeStyles } from '../constants'import { text, useLocale } from '../locales'import { applyCheckout, applyDiscard } from '../service/actions'import { patchSession, useWorktreeSession } from '../store'@@ -54,7 +53,7 @@ export function WorktreeDialog({ useSessions, workspacesRuntime, sessionsRuntimereturn nullreturn (- <div className={worktreeStyles.modal} data-dsh-worktree-dialog="1" onClick={closeAll}>+ <div className="dshp-worktree__modal" data-dsh-worktree-dialog="1" onClick={closeAll}>{checkout && (<CheckoutDialogsessionId={sessionId}@@ -161,39 +160,39 @@ function CheckoutDialog(props: {return (<div- className={worktreeStyles.card}+ className="dshp-worktree__dialog-card"role="dialog"aria-modal="true"aria-label={text('checkoutTitle')}onClick={event => event.stopPropagation()}>- <h2 className={worktreeStyles.title}>{text('checkoutTitle')}</h2>- <div className={worktreeStyles.field}>- <label className={worktreeStyles.fieldLabel} htmlFor="wt-checkout-branch">{text('checkoutBranchLabel')}</label>- <div className={worktreeStyles.inputWrap}>+ <h2 className="dshp-worktree__dialog-title">{text('checkoutTitle')}</h2>+ <div className="dshp-worktree__dialog-field">+ <label className="dshp-worktree__dialog-field-label" htmlFor="wt-checkout-branch">{text('checkoutBranchLabel')}</label>+ <div className="dshp-worktree__dialog-input-wrap"><inputid="wt-checkout-branch"- className={worktreeStyles.input}+ className="dshp-worktree__dialog-input"value={branchName}placeholder="dsh/feature-xyz"onChange={event => updateBranch(event.target.value)}/></div></div>- <div className={worktreeStyles.pathRow}>- <span className={worktreeStyles.pathKey}>{text('checkoutCurrentPath')}</span>- <span className={worktreeStyles.pathValue}>{worktreeKey || '—'}</span>+ <div className="dshp-worktree__dialog-path-row">+ <span className="dshp-worktree__dialog-path-key">{text('checkoutCurrentPath')}</span>+ <span className="dshp-worktree__dialog-path-value">{worktreeKey || '—'}</span></div>- <div className={worktreeStyles.pathRow}>- <span className={worktreeStyles.pathKey}>{text('checkoutTargetPath')}</span>- <span className={worktreeStyles.pathValue}>{projectPath.replaceAll('\\', '/') || '—'}</span>+ <div className="dshp-worktree__dialog-path-row">+ <span className="dshp-worktree__dialog-path-key">{text('checkoutTargetPath')}</span>+ <span className="dshp-worktree__dialog-path-value">{projectPath.replaceAll('\\', '/') || '—'}</span></div>- {props.error && <div className={worktreeStyles.error}>{props.error}</div>}- <div className={worktreeStyles.footer}>- <button type="button" className={`${worktreeStyles.button} ${worktreeStyles.buttonGhost}`} onClick={onCancel}>{text('checkoutCancel')}</button>+ {props.error && <div className="dshp-worktree__dialog-error">{props.error}</div>}+ <div className="dshp-worktree__dialog-footer">+ <button type="button" className={`${'dshp-worktree__dialog-button'} ${'dshp-worktree__dialog-button--ghost'}`} onClick={onCancel}>{text('checkoutCancel')}</button><buttontype="button"- className={`${worktreeStyles.button} ${worktreeStyles.buttonPrimary} ${disabled ? worktreeStyles.buttonDisabled : ''}`}+ className={`${'dshp-worktree__dialog-button'} ${'dshp-worktree__dialog-button--primary'} ${disabled ? 'dshp-worktree__dialog-button--disabled' : ''}`}disabled={disabled}onClick={() => void checkout()}>@@ -222,20 +221,20 @@ function AbandonDialog(props: {}return (<div- className={worktreeStyles.card}+ className="dshp-worktree__dialog-card"role="dialog"aria-modal="true"aria-label={text('abandonTitle')}onClick={event => event.stopPropagation()}>- <h2 className={worktreeStyles.title}>{text('abandonTitle')}</h2>- <p className={worktreeStyles.body}>{text('abandonBody')}</p>- {props.error && <div className={worktreeStyles.error}>{props.error}</div>}- <div className={worktreeStyles.footer}>- <button type="button" className={`${worktreeStyles.button} ${worktreeStyles.buttonGhost}`} onClick={onCancel}>{text('abandonCancel')}</button>+ <h2 className="dshp-worktree__dialog-title">{text('abandonTitle')}</h2>+ <p className="dshp-worktree__dialog-body">{text('abandonBody')}</p>+ {props.error && <div className="dshp-worktree__dialog-error">{props.error}</div>}+ <div className="dshp-worktree__dialog-footer">+ <button type="button" className={`${'dshp-worktree__dialog-button'} ${'dshp-worktree__dialog-button--ghost'}`} onClick={onCancel}>{text('abandonCancel')}</button><buttontype="button"- className={`${worktreeStyles.button} ${worktreeStyles.buttonDanger}`}+ className={`${'dshp-worktree__dialog-button'} ${'dshp-worktree__dialog-button--danger'}`}onClick={() => void abandon()}>{text('abandonConfirm')}diff --git a/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx b/packages/dsh-tauri-worktree/src/client/components/mode-select.tsxindex a96dfb68..1b415b17 100644--- a/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx+++ b/packages/dsh-tauri-worktree/src/client/components/mode-select.tsx@@ -19,7 +19,6 @@ import {COMPOSER_SEAT_SELECTOR,HERO_PRESET_SLOT_SELECTOR,MODE_ANCHOR_ATTRIBUTE,- MODE_SELECT_CLASSES,} from '../constants'import { text, useLocale } from '../locales'import { attachWorktreeSession, createWorktree } from '../service/actions'@@ -66,7 +65,7 @@ export function WorktreeModeSelect(props: ModeSelectProps): ReactElement {if (!host) {host = document.createElement('span')host.dataset.dshTauriWorktreeMode = sessionId- host.className = MODE_SELECT_CLASSES.host+ host.className = 'dshp-mode-select__host'}if (target.nextElementSibling !== host)target.after(host)@@ -84,7 +83,7 @@ export function WorktreeModeSelect(props: ModeSelectProps): ReactElement {return (<>- <span ref={anchorRef} className={MODE_SELECT_CLASSES.anchor} {...{ [MODE_ANCHOR_ATTRIBUTE]: sessionId }} />+ <span ref={anchorRef} className="dshp-mode-select__anchor" {...{ [MODE_ANCHOR_ATTRIBUTE]: sessionId }} />{portalHost && createPortal(<WorktreeModeControl {...props} />, portalHost)}</>)@@ -216,13 +215,13 @@ function WorktreeModeControl({ sessionId, useInput, inputActions, sessionsRuntimaria-haspopup="menu"aria-expanded={open}onClick={() => setOpen(value => !value)}- className={open ? `${MODE_SELECT_CLASSES.trigger} ${MODE_SELECT_CLASSES.triggerOpen}` : MODE_SELECT_CLASSES.trigger}+ className={open ? `${'dshp-mode-select__trigger'} ${'dshp-mode-select__trigger--open'}` : 'dshp-mode-select__trigger'}>- <span className={MODE_SELECT_CLASSES.icon}>+ <span className="dshp-mode-select__icon"><Icon as={CircleTree} size={13} /></span><span>{activeLabel}</span>- <Icon as={ChevronDown} className={MODE_SELECT_CLASSES.chevron} />+ <Icon as={ChevronDown} className="dshp-mode-select__chevron" /></button>)diff --git a/packages/dsh-tauri-worktree/src/client/components/surface.tsx b/packages/dsh-tauri-worktree/src/client/components/surface.tsxindex 1c6915ba..6bf81bd2 100644--- a/packages/dsh-tauri-worktree/src/client/components/surface.tsx+++ b/packages/dsh-tauri-worktree/src/client/components/surface.tsx@@ -7,7 +7,6 @@ import { CircleTree, Icon } from 'dsh-tauri-ui/client'* 职责拆分:slot 注册在 register/surface.ts,样式在 styles.ts。*/import { useState } from 'react'-import { worktreeStyles } from '../constants'import { text, useLocale } from '../locales'import { patchSession, useWorktreeSession } from '../store'@@ -32,27 +31,27 @@ export function WorktreeSurface({ sessionId }: SurfaceBarProps): ReactElement |: text('surfaceWorktree')return (- <div className={worktreeStyles.surface}>- <div className={worktreeStyles.surfaceBar} data-dsh-worktree-surface={sessionId}>+ <div className="dshp-worktree__surface">+ <div className="dshp-worktree__surface-bar" data-dsh-worktree-surface={sessionId}><Icon as={CircleTree} size={14} />- <div className={worktreeStyles.surfaceContent}>- <span className={worktreeStyles.surfaceLabel}>+ <div className="dshp-worktree__surface-content">+ <span className="dshp-worktree__surface-label">{label}{creating && `...`}</span>{bound && state.log.length > 0 && (- <button type="button" className={`${worktreeStyles.action} ${worktreeStyles.actionLog}`} onClick={() => setLogOpen(value => !value)}>+ <button type="button" className={`${'dshp-worktree__action'} ${'dshp-worktree__action--log'}`} onClick={() => setLogOpen(value => !value)}>{text('progressViewLogs')}</button>)}</div>- <span className={worktreeStyles.spacer} />+ <span className="dshp-worktree__spacer" />{bound && !deleting && (<>- <button type="button" className={worktreeStyles.action} onClick={() => patchSession(sessionId, { checkoutOpen: true })}>+ <button type="button" className="dshp-worktree__action" onClick={() => patchSession(sessionId, { checkoutOpen: true })}>{text('surfaceCheckout')}</button>- <button type="button" className={`${worktreeStyles.action} ${worktreeStyles.actionDanger}`} onClick={() => patchSession(sessionId, { abandonOpen: true })}>+ <button type="button" className={`${'dshp-worktree__action'} ${'dshp-worktree__action--danger'}`} onClick={() => patchSession(sessionId, { abandonOpen: true })}>{text('surfaceAbandon')}</button></>@@ -67,11 +66,11 @@ export function Logs({ log, open }: { log: string[], open: boolean }): ReactElemreturn (<divaria-hidden={!open}- className={`${worktreeStyles.logs} ${open ? worktreeStyles.logsOpen : ''}`}+ className={`${'dshp-worktree__logs'} ${open ? 'dshp-worktree__logs--open' : ''}`}>- <div className={worktreeStyles.logsInner}>- <div className={worktreeStyles.logsPanel}>- {log.map((line, index) => <div key={`${index}:${line}`} className={worktreeStyles.logLine}>{line}</div>)}+ <div className="dshp-worktree__logs-inner">+ <div className="dshp-worktree__logs-panel">+ {log.map((line, index) => <div key={`${index}:${line}`} className="dshp-worktree__log-line">{line}</div>)}</div></div></div>diff --git a/packages/dsh-tauri-worktree/src/client/constants/index.ts b/packages/dsh-tauri-worktree/src/client/constants/index.tsindex a623f4df..504420c5 100644--- a/packages/dsh-tauri-worktree/src/client/constants/index.ts+++ b/packages/dsh-tauri-worktree/src/client/constants/index.ts@@ -43,49 +43,6 @@ export const MODE_SELECT_STYLE_ID = '@deepseek-ai/dsh-tauri-worktree/ModeSelect.export const WORKTREE_STYLE_ID = '@deepseek-ai/dsh-tauri-worktree/SurfaceDialog.module.css'export const SESSION_ICON_STYLE_ID = '@deepseek-ai/dsh-tauri-worktree/SessionBranchIcon.module.css'-export const MODE_SELECT_CLASSES = {- anchor: 'dshp-mode-select__anchor',- chevron: 'dshp-mode-select__chevron',- host: 'dshp-mode-select__host',- icon: 'dshp-mode-select__icon',- trigger: 'dshp-mode-select__trigger',- triggerOpen: 'dshp-mode-select__trigger--open',-} as const--export const worktreeStyles = {- surface: 'dshp-worktree__surface',- surfaceBar: 'dshp-worktree__surface-bar',- surfaceContent: 'dshp-worktree__surface-content',- surfaceLabel: 'dshp-worktree__surface-label',- action: 'dshp-worktree__action',- actionLog: 'dshp-worktree__action--log',- actionDanger: 'dshp-worktree__action--danger',- spacer: 'dshp-worktree__spacer',- logs: 'dshp-worktree__logs',- logsOpen: 'dshp-worktree__logs--open',- logsInner: 'dshp-worktree__logs-inner',- logsPanel: 'dshp-worktree__logs-panel',- logLine: 'dshp-worktree__log-line',- modal: 'dshp-worktree__modal',- card: 'dshp-worktree__dialog-card',- title: 'dshp-worktree__dialog-title',- body: 'dshp-worktree__dialog-body',- field: 'dshp-worktree__dialog-field',- fieldLabel: 'dshp-worktree__dialog-field-label',- inputWrap: 'dshp-worktree__dialog-input-wrap',- input: 'dshp-worktree__dialog-input',- pathRow: 'dshp-worktree__dialog-path-row',- pathKey: 'dshp-worktree__dialog-path-key',- pathValue: 'dshp-worktree__dialog-path-value',- error: 'dshp-worktree__dialog-error',- footer: 'dshp-worktree__dialog-footer',- button: 'dshp-worktree__dialog-button',- buttonGhost: 'dshp-worktree__dialog-button--ghost',- buttonPrimary: 'dshp-worktree__dialog-button--primary',- buttonDanger: 'dshp-worktree__dialog-button--danger',- buttonDisabled: 'dshp-worktree__dialog-button--disabled',-} as const-export const SESSION_ICON_ATTRIBUTE = 'data-dsh-worktree-icon'export const SIDEBAR_SELECTOR = '[data-slot="sidebar"]'export const COMPOSER_SEAT_SELECTOR = '[data-composer-seat]'