Skip to content

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

refactor(ui): align plugin panel header

hairyfae377203cb12
diff --git a/src-tauri/src/service/plugin/install/mod.rs b/src-tauri/src/service/plugin/install/mod.rs
index 1ee72bdf..3f6ca437 100644
--- a/src-tauri/src/service/plugin/install/mod.rs
+++ b/src-tauri/src/service/plugin/install/mod.rs
@@ -167,7 +167,6 @@ async fn install_with_cancel(
// 旧档案可能由早期版本创建,没有同步 Harness 的最小发布时间例外;补齐
// 精确的已审查 zod 版本,避免 registry 元数据瞬时失败阻断插件安装(issue #222)。
super::ensure_profile_pnpm_policy(app_handle)?;
-
// 安装前停止运行中的服务,避免资源冲突
if workflow::has_owned_process() {
// 停服务会让用户感到"重启",先在日志面板讲清缘由(issue #48)
diff --git a/src-tauri/src/service/plugin/install/single.rs b/src-tauri/src/service/plugin/install/single.rs
index 6df344fa..00aa539a 100644
--- a/src-tauri/src/service/plugin/install/single.rs
+++ b/src-tauri/src/service/plugin/install/single.rs
@@ -174,7 +174,6 @@ async fn run_single_plugin_command(
// 与批量安装保持一致:旧档案也必须具备精确的 release-age 例外,
// 否则升级/卸载触发 pnpm lockfile 校验时同样会被 issue #222 的问题阻断。
super::ensure_profile_pnpm_policy(app_handle)?;
-
// 插件操作会改写 profile,先停止运行中的服务(与安装一致)
if workflow::has_owned_process() {
let _ = window.emit(
diff --git a/src-tauri/src/service/profile/mod.rs b/src-tauri/src/service/profile/mod.rs
index 7f51cc49..d19da748 100644
--- a/src-tauri/src/service/profile/mod.rs
+++ b/src-tauri/src/service/profile/mod.rs
@@ -58,8 +58,6 @@ pub fn profile_dir_of(app_handle: &AppHandle, id: &str) -> PathBuf {
/// 仅豁免 lockfile 使用的精确版本,避免关闭整个 supply-chain policy。
const PROFILE_MINIMUM_RELEASE_AGE_EXCLUDES: [&str; 1] = ["[email protected]"];
-/// 确保现有档案也获得与新建档案相同的 pnpm 供应链策略例外。
-/// 使用 YAML 合并而不是文本追加,避免重复映射键破坏 pnpm-workspace.yaml。
pub(crate) fn ensure_profile_pnpm_policy(app_handle: &AppHandle) -> Result<(), String> {
let path = profile_dir_of(app_handle, &active_profile(app_handle)).join("pnpm-workspace.yaml");
let existing = match fs::read_to_string(&path) {
diff --git a/src/components/config-plugin.tsx b/src/components/config-plugin.tsx
index 9bf68f3c..17a9a9f6 100644
--- a/src/components/config-plugin.tsx
+++ b/src/components/config-plugin.tsx
@@ -1,5 +1,5 @@
import { CircleExclamation } from '@gravity-ui/icons'
-import { Button, Chip, Label, Spinner, Tooltip, Typography } from '@heroui/react'
+import { Button, Chip, Label, Spinner, Tooltip } from '@heroui/react'
import { useOverlay } from '@overlastic/react'
import { useMutation, useQueryClient } from '@tanstack/react-query'
import { invoke } from '@tauri-apps/api/core'
@@ -123,24 +123,22 @@ export function ConfigPlugin() {
<div>
<PanelHeader
className="sticky top-0 bg-canvas z-10 pb-3"
- title={(
- <div className="flex justify-between">
- <Typography type="h4">{t('plugins.title')}</Typography>
- <Tooltip delay={0}>
- <Button
- size="sm"
- variant="primary"
- className="rounded-md"
- onPress={store.harness.openPreinstall}
- isDisabled={preinstall.installing}
- >
- {t('preinstall.open_preset')}
- </Button>
- <Tooltip.Content>
- <p>{t('preinstall.settings_hint')}</p>
- </Tooltip.Content>
- </Tooltip>
- </div>
+ title={t('plugins.title')}
+ action={(
+ <Tooltip delay={0}>
+ <Button
+ size="sm"
+ variant="primary"
+ className="rounded-md"
+ onPress={store.harness.openPreinstall}
+ isDisabled={preinstall.installing}
+ >
+ {t('preinstall.open_preset')}
+ </Button>
+ <Tooltip.Content>
+ <p>{t('preinstall.settings_hint')}</p>
+ </Tooltip.Content>
+ </Tooltip>
)}
description={t('plugins.panel_tooltip')}
/>