Skip to content

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

feat(plugins): 扩展管理把市场标签页排在首位并默认选中

hairyff376fd75adaa
diff --git a/packages/dsh-tauri-panel-extension/src/client/components/extension-panel.tsx b/packages/dsh-tauri-panel-extension/src/client/components/extension-panel.tsx
index 9c623e91..24a0c0c0 100644
--- a/packages/dsh-tauri-panel-extension/src/client/components/extension-panel.tsx
+++ b/packages/dsh-tauri-panel-extension/src/client/components/extension-panel.tsx
@@ -28,13 +28,15 @@ export function ExtensionPanel({ createSkill, market }: ExtensionPanelProps): Re
const tabRefs = useRef<Array<HTMLButtonElement | null>>([])
const marketFace = market
const rows: ExtensionTab[] = [
+ ...(marketFace === undefined
+ ? []
+ : [{ id: 'market', label: t('marketTab'), render: () => <MarketTab market={marketFace} /> }]),
{ id: 'skills', label: t('skillsTab'), render: () => <SkillsTab t={t} createSkill={createSkill} /> },
{ id: 'mcp', label: t('mcpTab'), render: () => <McpTab t={t} /> },
]
- if (marketFace !== undefined)
- rows.push({ id: 'market', label: t('marketTab'), render: () => <MarketTab market={marketFace} /> })
- const [activeId, setActiveId] = useState('skills')
- const [visited, setVisited] = useState<ReadonlySet<string>>(() => new Set(['skills']))
+ const initialId = rows[0]?.id ?? 'skills'
+ const [activeId, setActiveId] = useState(initialId)
+ const [visited, setVisited] = useState<ReadonlySet<string>>(() => new Set([initialId]))
useEffect(() => setVisited(previous => previous.has(activeId) ? previous : new Set([...previous, activeId])), [activeId])
return (