fix(site): update useAgentLogs
to make it more testable and add more tests
#19126
+404
−256
useAgentLogs
to make it more testable and add more tests
#19126