sync snapshot from LAN repo (source codex/kb-context-retrieval-20261021 @ b69568e4)
This commit is contained in:
1 parent
ea9dcff9c0
commit
4cf657f725
781 files changed
+13559
-104852
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
deleteAdminV1Fact,
|
||||
generateUserLeaderboardReport,
|
||||
getUserMemory,
|
||||
getUserAnalytics,
|
||||
getUserLeaderboard,
|
||||
refreshTodayLeaderboard,
|
||||
listUserQa,
|
||||
@@ -161,6 +162,18 @@ export function useRefreshTodayLeaderboard() {
|
||||
});
|
||||
}
|
||||
|
||||
export function useUserAnalytics(
|
||||
userId: string | null,
|
||||
range: { since: string; until: string; days?: number },
|
||||
limit = 20,
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: ["admin-activity", "analytics", userId, range.since, range.until, limit],
|
||||
queryFn: () => getUserAnalytics(userId!, range, limit),
|
||||
enabled: !!userId,
|
||||
});
|
||||
}
|
||||
|
||||
export function useGenerateUserLeaderboardReport() {
|
||||
return useMutation({
|
||||
mutationFn: ({
|
||||
|
||||
Reference in new issue
Block a user