DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(ui): 配置弹窗移除服务日志区块
hairyffa0de43e82c4
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.jsonindex 6c12d8bc..de9c0918 100644--- a/src/i18n/locales/en-US.json+++ b/src/i18n/locales/en-US.json@@ -120,8 +120,6 @@"ui.node_version": "Node.js Runtime","ui.platform": "Platform","ui.data_dir": "Data Directory",- "ui.logs": "Service Logs",- "ui.no_logs": "(no logs yet)","ui.iframe_error": "Cannot load the DeepSeek Harness interface.","ui.ensure_running": "Please make sure the service is running at {{url}}.","ui.language": "Language",@@ -153,8 +151,6 @@"messages.zoom_failed": "Failed to update zoom","messages.launch_on_login_failed": "Failed to update launch at login","messages.close_action_failed": "Failed to update close action",- "messages.logs_cleared": "Logs cleared",- "messages.logs_clear_failed": "Failed to clear logs","messages.cli_link_failed": "Failed to update CLI integration","messages.port_invalid": "Port must be an integer between 1 and 65535","messages.port_save_failed": "Failed to save port",diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.jsonindex be86aec0..bd0bd96c 100644--- a/src/i18n/locales/zh-CN.json+++ b/src/i18n/locales/zh-CN.json@@ -120,8 +120,6 @@"ui.node_version": "Node.js 运行时","ui.platform": "平台","ui.data_dir": "数据目录",- "ui.logs": "服务日志",- "ui.no_logs": "(暂无日志)","ui.iframe_error": "无法加载 DeepSeek Harness 界面。","ui.ensure_running": "请确认服务正在 {{url}} 运行。","ui.language": "语言",@@ -153,8 +151,6 @@"messages.zoom_failed": "界面缩放更新失败","messages.launch_on_login_failed": "更新开机自启动设置失败","messages.close_action_failed": "更新关闭行为设置失败",- "messages.logs_cleared": "日志已清空",- "messages.logs_clear_failed": "清空日志失败","messages.cli_link_failed": "更新命令行集成设置失败","messages.port_invalid": "端口必须是 1 到 65535 之间的整数","messages.port_save_failed": "保存端口失败",diff --git a/src/ui/config/debug.tsx b/src/ui/config/debug.tsxindex 3e56d8d3..b84a1cfc 100644--- a/src/ui/config/debug.tsx+++ b/src/ui/config/debug.tsx@@ -1,5 +1,5 @@-import { ArrowRotateRight, ArrowUpRightFromSquare, ChevronRight, Copy, Folder, Power, TrashBin } from '@gravity-ui/icons'-import { Button, Chip, Description, Input, Link, ListBox, Select, Spinner, Surface, Switch } from '@heroui/react'+import { ArrowRotateRight, ArrowUpRightFromSquare, ChevronRight, Copy, Folder, Power } from '@gravity-ui/icons'+import { Button, Chip, Description, Input, Link, ListBox, Select, Spinner, Switch } from '@heroui/react'import { useMutation, useQuery } from '@tanstack/react-query'import { invoke } from '@tauri-apps/api/core'import { useState } from 'react'@@ -14,7 +14,6 @@ import { store } from '@/store'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 { 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)))@@ -67,22 +66,6 @@ export function ConfigDebug() {queryFn: () => invoke<CliLinkStatus>('get_cli_link_status'),})- const { data: logs, refetch: refreshLogs } = useQuery({- queryKey: queryKeys.logs,- queryFn: () => invoke<string>('read_service_logs'),- refetchInterval: 2000,- })-- async function copyLogs() {- try {- // 成功/失败提示由 writeClipboardText 统一给出,这里只记录日志- await writeClipboardText(logs || '', t('messages.logs_copied'))- }- catch (err) {- console.error('[ConfigDebug] copy logs failed:', err)- }- }-/** 「存在新版本」:直接展示更新提示;破坏性更改确认推迟到点击「立即更新」时 */function handleShowNewVersion() {store.harnessUpdater.showToast(() => handleUpdate())@@ -96,18 +79,6 @@ export function ConfigDebug() {await store.harnessUpdater.handleUpdate()}- const { mutate: onClearLogs } = useMutation({- mutationFn: async () => {- await invoke('clear_service_logs')- await refreshLogs()- toast(t('messages.logs_cleared'))- },- onError: (err: unknown) => {- console.error('[ConfigDebug] clear logs failed:', err)- toast(t('messages.logs_clear_failed'), { variant: 'danger' })- },- })-const { mutate: onToggleCliLink } = useMutation({mutationFn: async (enabled: boolean) => {// 命令会先建/删 shim 与 PATH 再落盘,前端只改 store 不会产生这些副作用@@ -404,36 +375,6 @@ export function ConfigDebug() {</div></div>- <div className="border-t border-line/30" />-- <div className="space-y-1.5">- <div className="flex items-center justify-between">- <span className="text-xs font-medium text-ink">{t('ui.logs')}</span>- <div className="flex gap-1">- <Button- isIconOnly- size="sm"- className="rounded-md size-6"- variant="ghost"- onPress={() => { void copyLogs() }}- >- <Copy className="scale-80" />- </Button>- <Button- isIconOnly- size="sm"- className="rounded-md size-6"- variant="ghost"- onPress={() => onClearLogs()}- >- <TrashBin className="scale-80" />- </Button>- </div>- </div>- <Surface className="bg-default rounded-md p-2 min-h-[140px] max-h-[180px] font-mono text-[11px] w-full leading-relaxed overflow-auto">- {logs || t('ui.no_logs')}- </Surface>- </div></div>)}