MCPcopy Index your code
hub / github.com/simstudioai/sim / useLogsList

Function useLogsList

apps/sim/hooks/queries/logs.ts:161–177  ·  view source on GitHub ↗
(
  workspaceId: string | undefined,
  filters: LogFilters,
  options?: UseLogsListOptions
)

Source from the content-addressed store, hash-verified

159}
160
161export function useLogsList(
162 workspaceId: string | undefined,
163 filters: LogFilters,
164 options?: UseLogsListOptions
165) {
166 return useInfiniteQuery({
167 queryKey: logKeys.list(workspaceId, filters),
168 queryFn: ({ pageParam, signal }) =>
169 fetchLogsPage(workspaceId as string, filters, pageParam, signal),
170 enabled: Boolean(workspaceId) && (options?.enabled ?? true),
171 refetchInterval: options?.refetchInterval ?? false,
172 staleTime: 30 * 1000,
173 placeholderData: keepPreviousData,
174 initialPageParam: null as string | null,
175 getNextPageParam: (lastPage) => lastPage.nextCursor,
176 })
177}
178
179interface UseLogDetailOptions {
180 enabled?: boolean

Callers 2

LogsFunction · 0.90
useAvailableResourcesFunction · 0.90

Calls 1

fetchLogsPageFunction · 0.85

Tested by

no test coverage detected