From e2cf0289512e8bb7216707a53943a42e824d9eff Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Sat, 12 Apr 2025 23:39:56 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20wpf=E8=87=AA=E5=8A=A8=E6=88=98=E6=96=97?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=AF=E5=8A=A8=E5=A4=B1=E8=B4=A5=E6=97=B6?= =?UTF-8?q?=E7=9A=84log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs index 64d021edf4..efaee078a9 100644 --- a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs @@ -1030,7 +1030,7 @@ namespace MaaWpfGui.ViewModels.UI } catch { - _logger.Error("Could not save copilot task to file: " + cachePath); + AddLog("Could not save copilot task to file: " + cachePath, UiLogColor.Error, showTime: false); _semaphore.Release(); return false; } @@ -1325,6 +1325,7 @@ namespace MaaWpfGui.ViewModels.UI var list = CopilotItemViewModels.Where(i => i.IsChecked); if (list.Any(i => string.IsNullOrEmpty(i.Name.Trim()))) { + AddLog("copilot tasks with empty name", UiLogColor.Error, showTime: false); return false; } @@ -1332,6 +1333,7 @@ namespace MaaWpfGui.ViewModels.UI { if (!File.Exists(path)) { + AddLog("could not find copilot file:" + path, UiLogColor.Error, showTime: false); return null; }