Skip to content

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

fix(panel-extension): MCP 卡片去掉字面量 \n 文本节点,补齐 scope/check 文案键(fixes #538)

hairyf662a0cab18ad
diff --git a/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsx b/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsx
index 90463d16..b2f76adb 100644
--- a/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsx
+++ b/packages/dsh-tauri-panel-extension/src/client/components/mcp-tab.tsx
@@ -361,13 +361,10 @@ export function McpTab({ t }: McpTabProps): ReactElement {
{row.transport === 'stdio' ? `${row.command ?? ''} ${(row.args ?? []).join(' ')}` : row.url ?? ''}
</p>
{row.shadowed === true && <p className="dshp-extension__form-error">{t('shadowedByGlobal')}</p>}
- \n
{row.globalError !== undefined && <p className="dshp-extension__form-error">{row.globalError}</p>}
- \n
<div className="dshp-extension__card-row">
<span className="dshp-extension__spacer" />
<Button variant="ghost" size="sm" disabled={busy || checking === row.id} onClick={() => void checkConnectivity(row)}>{checking === row.id ? t('checkRunning') : t('checkLabel')}</Button>
- \n
<Button variant="ghost" size="sm" disabled={busy} onClick={() => void doToggle(row)}>{t('toggle')}</Button>
<Button variant="ghost" size="sm" disabled={busy} onClick={() => openEdit(row)}>{t('edit')}</Button>
<Button variant="ghost" size="sm" disabled={busy} onClick={() => setConfirmId(row.id)}>{t('delete')}</Button>
diff --git a/packages/dsh-tauri-panel-extension/src/client/locales/index.ts b/packages/dsh-tauri-panel-extension/src/client/locales/index.ts
index 500b22b0..96867361 100644
--- a/packages/dsh-tauri-panel-extension/src/client/locales/index.ts
+++ b/packages/dsh-tauri-panel-extension/src/client/locales/index.ts
@@ -1,7 +1,7 @@
import type { ExtensionClientContext } from '../types'
import { LOCALE_NAMESPACE, PLUGIN_ID } from '../constants'
-const zh: Record<string, string> = {
+const zh = {
extension: '扩展技能',
skillsTab: '技能',
mcpTab: 'MCP',
@@ -105,13 +105,18 @@ const zh: Record<string, string> = {
scopeAll: '全部',
global: '全局',
profile: 'Profile',
- shadowed: '已覆盖',
- globalError: '全局错误',
connectivityOk: '连接成功',
connectivityFailed: '连接失败',
+ scopeGlobal: '全局',
+ scopeProfile: '当前 profile',
+ checkLabel: '检查',
+ checkRunning: '检查中…',
+ shadowedByGlobal: '全局层存在同名 id,此行不生效',
}
-const en: Record<string, string> = {
+type LocaleKey = keyof typeof zh
+
+const en: Record<LocaleKey, string> = {
extension: 'Extension Skills',
skillsTab: 'Skills',
mcpTab: 'MCP',
@@ -211,6 +216,17 @@ const en: Record<string, string> = {
formatPaste: 'Paste a JSON config (wrapper or bare entry)',
formatFill: 'Parse and switch to form',
pasteTransportMismatch: 'The row transport is locked and differs from the pasted config.',
+ scope: 'Scope',
+ scopeAll: 'All',
+ global: 'Global',
+ profile: 'Profile',
+ connectivityOk: 'Connected',
+ connectivityFailed: 'Connection failed',
+ scopeGlobal: 'Global',
+ scopeProfile: 'This profile',
+ checkLabel: 'Check',
+ checkRunning: 'Checking…',
+ shadowedByGlobal: 'a global row with the same id wins — this row has no effect',
}
export function registerExtensionLocale(ctx: ExtensionClientContext): void {