DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(settings): add environment info copy action (#895)
云游君2fd8656f6181
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.jsonindex eefc7355..8d9e2aa0 100644--- a/src/i18n/locales/en-US.json+++ b/src/i18n/locales/en-US.json@@ -161,6 +161,7 @@"buttons.copy": "Copy","buttons.copy_link": "Copy Link","buttons.copy_logs": "Copy Logs",+ "buttons.copy_environment": "Copy Environment Info","buttons.safe_mode": "Safe Mode","buttons.quarantine_patch": "Quarantine broken patch files","buttons.strip_patch_entries": "Remove dangling entries",@@ -169,6 +170,7 @@"patch.quarantine_failed_toast": "Failed to quarantine a broken patch file: {{path}} ({{error}})","hints.safe_mode": "Restart with only the core bundles and built-in plugins, uninstalling any other plugin from that profile to isolate the ones that fail to start. Patch files that cannot be parsed (a YAML syntax error) are also moved aside as `.broken-<timestamp>` backups. Switch back to your profile in the sidebar to exit safe mode.","messages.clipboard_copied": "Copied to clipboard",+ "messages.environment_copied": "Environment info copied to clipboard","messages.clipboard_failed": "Copy failed","messages.copy_success": "URL copied to clipboard","messages.log_copied": "Logs copied to clipboard",diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.jsonindex e3e8201e..203942ed 100644--- a/src/i18n/locales/zh-CN.json+++ b/src/i18n/locales/zh-CN.json@@ -161,6 +161,7 @@"buttons.copy": "复制","buttons.copy_link": "复制链接","buttons.copy_logs": "复制日志",+ "buttons.copy_environment": "复制环境信息","buttons.safe_mode": "安全模式","buttons.quarantine_patch": "隔离损坏的补丁文件","buttons.strip_patch_entries": "移除悬空条目",@@ -169,6 +170,7 @@"patch.quarantine_failed_toast": "隔离补丁文件失败:{{path}}({{error}})","hints.safe_mode": "仅加载核心组件与内置插件重启,并卸载该档案中的其它插件以隔离启动失败;解析不了的补丁文件(YAML 语法错误)也会被改名为 `.broken-<时间戳>` 备份。在侧边栏切回原档案即可退出安全模式。","messages.clipboard_copied": "已复制到剪贴板",+ "messages.environment_copied": "环境信息已复制到剪贴板","messages.clipboard_failed": "复制失败","messages.copy_success": "地址已复制到剪贴板","messages.log_copied": "日志已复制到剪贴板",diff --git a/src/ui/config/debug.tsx b/src/ui/config/debug.tsxindex c3b837ca..6c1af275 100644--- a/src/ui/config/debug.tsx+++ b/src/ui/config/debug.tsx@@ -17,6 +17,7 @@ import { ConfigCloseAction } from '@/ui/config/components/close-action'import { ConfigLaunchOnLogin } from '@/ui/config/components/launch-on-login'import { useCoreBreakingConfirm } from '@/ui/config/hooks/use-core-breaking-confirm'import { useCoreProfileSwitch } from '@/ui/config/hooks/use-core-profile-switch'+import { writeClipboardText } from '@/utils/clipboard'import { toast } from '@/utils/toast'const ZOOM_OPTIONS = Array.from({ length: 16 }, (_, index) => Number((0.5 + index * 0.1).toFixed(1)))@@ -111,6 +112,22 @@ export function ConfigDebug() {},})+ const { mutate: onCopyEnvironment, isPending: copyingEnvironment } = useMutation({+ mutationFn: async () => {+ if (!info)+ return+ await writeClipboardText([+ `${t('ui.current_version')}: ${info.app_version}`,+ `${t('ui.dsh_version')}: ${info.dsh_version ?? '-'}`,+ `${t('ui.node_version')}: ${info.node_version ? `v${info.node_version}` : '-'}`,+ `${t('ui.platform')}: ${info.platform} / ${info.arch}`,+ ].join('\n'), t('messages.environment_copied'))+ },+ onError: (err: unknown) => {+ console.error('[ConfigDebug] copy environment info failed:', err)+ },+ })+const { mutate: onSavePort } = useMutation({mutationFn: async (port: number) => {// 保存前校验:必须是 1–65535 的整数(输入框可能被清空成 0 / 浮点 / NaN)@@ -267,6 +284,17 @@ export function ConfigDebug() {{info ? `${info.platform} / ${info.arch}` : '-'}</Info></div>+ <div className="mt-2 flex justify-end">+ <Button+ size="sm"+ variant="secondary"+ isDisabled={!info || copyingEnvironment}+ onPress={() => onCopyEnvironment()}+ >+ <If cond={copyingEnvironment} then={<Spinner size="sm" color="current" />} else={<Copy className="size-3.5" />} />+ {t('buttons.copy_environment')}+ </Button>+ </div></div><div className="border-t border-line/30" /><div className="space-y-1.5">