From b22914b5de9902f6234e28fae33fc72e75663e05 Mon Sep 17 00:00:00 2001 From: QWQLwToo <2467013926@qq.com> Date: Mon, 6 Jul 2026 23:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E8=87=AA=E6=A3=80?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=8A=9F=E8=83=BD=E5=92=8C=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=87=AA=E6=A3=80=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Startup/InstallIntegrityCheckService.cs | 12 +++++++++++- src/box-winUI/Services/ToolResultWebBridge.cs | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/YMhut.Box.Core/Startup/InstallIntegrityCheckService.cs b/src/YMhut.Box.Core/Startup/InstallIntegrityCheckService.cs index 928442f..73ba63b 100644 --- a/src/YMhut.Box.Core/Startup/InstallIntegrityCheckService.cs +++ b/src/YMhut.Box.Core/Startup/InstallIntegrityCheckService.cs @@ -441,6 +441,12 @@ public sealed class InstallIntegrityCheckService( private static bool ShouldVerifyPayloadFile(string relativePath) { var normalized = Normalize(relativePath); + if (normalized.StartsWith("Tools/", StringComparison.OrdinalIgnoreCase) || + normalized.StartsWith("Metadata/", StringComparison.OrdinalIgnoreCase)) + { + return false; + } + return normalized.StartsWith("lang/", StringComparison.OrdinalIgnoreCase) || normalized.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || normalized.EndsWith(".exe", StringComparison.OrdinalIgnoreCase) || @@ -486,7 +492,11 @@ public sealed class InstallIntegrityCheckService( LaunchableExtensions.Contains(Path.GetExtension(path), StringComparer.OrdinalIgnoreCase)) .Distinct(StringComparer.OrdinalIgnoreCase)) { - AddRelativeFileCheck(items, installRoot, relativePath, StartupCheckSeverity.Warning); + var normalized = Normalize(relativePath); + var path = Path.Combine(installRoot, normalized.Replace('/', Path.DirectorySeparatorChar)); + items.Add(File.Exists(path) + ? Passed($"file:{normalized}", Path.GetFileName(normalized), "历史外部工具清单项存在;按可选能力记录。", path) + : Skipped($"file:{normalized}", Path.GetFileName(normalized), "历史外部工具清单项缺失;当前版本不再将 Tools 目录作为必需随包内容。", path)); } } diff --git a/src/box-winUI/Services/ToolResultWebBridge.cs b/src/box-winUI/Services/ToolResultWebBridge.cs index 2d7294c..5df2658 100644 --- a/src/box-winUI/Services/ToolResultWebBridge.cs +++ b/src/box-winUI/Services/ToolResultWebBridge.cs @@ -128,7 +128,7 @@ public sealed class ToolResultWebBridge( if (!string.IsNullOrWhiteSpace(value) && services.GetService()?.NavigateToTool(value) == true) { - ToastService.Show(AppLocalizer.T("已打开工具,请确认输入后重新运行", "Tool opened; review the input and run again"), ToastKind.Information); + ToastService.Show(AppLocalizer.T("已打开工具,请确认输入后重新运行", "Tool opened; review the input and run again"), ToastKind.Info); } break; }