Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/OpenClaw.Shared/OpenClawGatewayClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 4 additions & 10 deletions tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down