refactor: split node agent and Go control plane

This commit is contained in:
2026-09-11 16:57:31 +08:00
parent 078c22c73b
commit c86ba9c4d7
129 changed files with 654 additions and 77 deletions
@@ -0,0 +1,14 @@
namespace WxAgent.Core;
public static class WechatTextInput
{
public static string Prepare(string text)
{
if (string.IsNullOrWhiteSpace(text))
throw new WxAgentException(WxAgentErrorCode.InvalidArgument, "Message text must not be empty.");
var normalized = text.ReplaceLineEndings("\n");
if (normalized.Length > 4000 || normalized.Any(character => char.IsControl(character) && character is not ('\n' or '\t')))
throw new WxAgentException(WxAgentErrorCode.InvalidArgument, "Message text must not exceed 4000 characters or contain unsupported control characters.");
return normalized;
}
}