diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 41f8828b26..a0f8d335a4 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -2151,6 +2151,7 @@ processChatCommand' vr = \case CLGroup gId -> "Group " <> show gId CLUserContact ucId -> "UserContact " <> show ucId CLFile fId -> "File " <> show fId + DebugEvent event -> toView event >> ok_ GetAgentWorkers -> lift $ CRAgentWorkersSummary <$> withAgent' getAgentWorkersSummary GetAgentWorkersDetails -> lift $ CRAgentWorkersDetails <$> withAgent' getAgentWorkersDetails GetAgentStats -> lift $ CRAgentStats . map stat <$> withAgent' getAgentStats @@ -7225,6 +7226,7 @@ chatCommandP = ("/quit" <|> "/q" <|> "/exit") $> QuitChat, ("/version" <|> "/v") $> ShowVersion, "/debug locks" $> DebugLocks, + "/debug event " *> (DebugEvent <$> jsonP), "/get stats" $> GetAgentStats, "/reset stats" $> ResetAgentStats, "/get subs" $> GetAgentSubs, diff --git a/src/Simplex/Chat/Controller.hs b/src/Simplex/Chat/Controller.hs index 5295541697..51b652d6d2 100644 --- a/src/Simplex/Chat/Controller.hs +++ b/src/Simplex/Chat/Controller.hs @@ -492,6 +492,7 @@ data ChatCommand | QuitChat | ShowVersion | DebugLocks + | DebugEvent ChatResponse | GetAgentStats | ResetAgentStats | GetAgentSubs