diff --git a/src/OpenClaw.Shared/OpenClawGatewayClient.cs b/src/OpenClaw.Shared/OpenClawGatewayClient.cs index 0e21836..72ae996 100644 --- a/src/OpenClaw.Shared/OpenClawGatewayClient.cs +++ b/src/OpenClaw.Shared/OpenClawGatewayClient.cs @@ -1562,11 +1562,6 @@ private void EmitNotification(string text) NotificationReceived?.Invoke(this, notification); } - private static (string title, string type) ClassifyNotification(string text) - { - return NotificationCategorizer.ClassifyByKeywords(text); - } - // --- Utility --- private static ActivityKind ClassifyTool(string toolName) diff --git a/tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs b/tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs index 424182d..7bda800 100644 --- a/tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs +++ b/tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs @@ -21,20 +21,14 @@ public GatewayClientTestHelper() public string ClassifyNotification(string text) { - var method = typeof(OpenClawGatewayClient).GetMethod("ClassifyNotification", - System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); - var result = method!.Invoke(null, new object[] { text }); - var tuple = ((string title, string type))result!; - return tuple.type; + var (_, type) = NotificationCategorizer.ClassifyByKeywords(text); + return type; } public string GetNotificationTitle(string text) { - var method = typeof(OpenClawGatewayClient).GetMethod("ClassifyNotification", - System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); - var result = method!.Invoke(null, new object[] { text }); - var tuple = ((string title, string type))result!; - return tuple.title; + var (title, _) = NotificationCategorizer.ClassifyByKeywords(text); + return title; } public ActivityKind ClassifyTool(string toolName)