Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

2.6 KB
Raw Blame
import { ComponentType } from 'react'

import { lazyWithRetry } from 'lib/utils/retryImport'

import { CyclotronJobInputSchemaType, CyclotronJobInvocationGlobalsWithInputs } from '~/types'

export interface CustomInputRendererProps {
    schema: CyclotronJobInputSchemaType
    value: any
    onChange: (value: any) => void
    // Hog globals, forwarded for renderers whose values are Hog expressions (e.g. the
    // account-properties editor) so they can offer `{event.*}` autocomplete. Optional — most
    // renderers ignore it.
    sampleGlobalsWithInputs?: CyclotronJobInvocationGlobalsWithInputs | null
}

export const CUSTOM_INPUT_RENDERERS: Record<
    string,
    React.LazyExoticComponent<ComponentType<CustomInputRendererProps>>
> = {
    posthog_assignee: lazyWithRetry(
        () => import('products/conversations/frontend/components/Assignee/CyclotronJobInputAssignee')
    ),
    posthog_ticket_tags: lazyWithRetry(
        () => import('products/conversations/frontend/components/TicketTags/CyclotronJobInputTicketTags')
    ),
    posthog_business_hours: lazyWithRetry(
        () => import('products/conversations/frontend/components/SlaBusinessHours/CyclotronJobInputBusinessHours')
    ),
    customer_analytics_account_properties: lazyWithRetry(
        () =>
            import('products/customer_analytics/frontend/components/AccountPropertiesInput/CyclotronJobInputAccountProperties')
    ),
    customer_analytics_account_relationships: lazyWithRetry(
        () =>
            import('products/customer_analytics/frontend/components/AccountRelationshipsInput/CyclotronJobInputAccountRelationships')
    ),
    task_model: lazyWithRetry(
        () => import('products/tasks/frontend/components/TaskModelPicker/CyclotronJobInputTaskModel')
    ),
    task_repository: lazyWithRetry(
        () => import('products/tasks/frontend/components/TaskRepositoryPicker/CyclotronJobInputTaskRepository')
    ),
    task_mcp_installations: lazyWithRetry(
        () => import('products/tasks/frontend/components/TaskConnectorsPicker/CyclotronJobInputTaskConnectors')
    ),
    replay_vision_scan: lazyWithRetry(
        () => import('products/replay_vision/frontend/components/WorkflowScanSetup/CyclotronJobInputReplayVisionScan')
    ),
    signals_scout: lazyWithRetry(
        () => import('products/signals/frontend/components/ScoutPicker/CyclotronJobInputScoutPicker')
    ),
    posthog_survey: lazyWithRetry(
        () => import('products/surveys/frontend/components/WorkflowSurveyPicker/CyclotronJobInputSurveyPicker')
    ),
    task_skills: lazyWithRetry(
        () => import('products/tasks/frontend/components/TaskSkillsPicker/CyclotronJobInputTaskSkills')
    ),
}