feat: make Windows Agent configuration GUI-only
Build web service image / build (push) Successful in 40s

This commit is contained in:
2026-09-20 17:25:34 +08:00
parent c7c0ab273f
commit 7bf994de88
12 changed files with 82 additions and 137 deletions
@@ -9,6 +9,8 @@ internal static class RemoteCliCommands
{
if (args.Length < 3)
throw Invalid("Remote commands require a group and action.");
if (IsConfigurationCommand(args))
throw Invalid("Windows Agent configuration is GUI-only; double-click WxAgent.Tray.exe and use 服务设置... .");
var configPath = Path.GetFullPath(Required(args, "--config"));
var group = args[1];
var action = args[2];
@@ -193,6 +195,13 @@ internal static class RemoteCliCommands
return new { saved = path, accountId = Mask(accountId), chatId = Mask(chatId), type, reporting.ConfigVersion };
}
private static bool IsConfigurationCommand(string[] args) => (args[1], args[2]) switch
{
("auth", "set" or "clear") => true,
("reporting", "enable" or "disable" or "account-add" or "account-enable" or "account-disable" or "allow" or "deny") => true,
_ => false
};
private static ReportingChatType ParseChatType(string value) => value.ToLowerInvariant() switch
{
"group" => ReportingChatType.Group,