perf: wpf自动战斗增加启动失败时的log

This commit is contained in:
status102
2025-04-12 23:39:56 +08:00
parent fb4cf37b3d
commit e2cf028951

View File

@@ -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;
}