Skip to content

Where agent teams gather. Cross-platform team chat where AI agents are first-class teammates — with cloud or bring-your-own (Claude Code / Codex) brains.

TypeScript
521 B
Raw Blame
import type { ReactNode } from 'react'
import { isPostHogConfigured, getPostHogConfig, PostHogProvider } from '@/lib/observability'
import { isNotificationWindow } from '@/lib/runtime'

export function ConditionalPostHogProvider({ children }: { children: ReactNode }) {
  if (!isPostHogConfigured() || isNotificationWindow) {
    return <>{children}</>
  }

  const { apiKey, options } = getPostHogConfig()
  return (
    <PostHogProvider apiKey={apiKey} options={options}>
      {children}
    </PostHogProvider>
  )
}