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.

5.8 KB
Raw Blame
// Tier 2 — compound primitives & presenters: the broad presentational bucket for custom layouts and
// bespoke threads. The Thread compound + atoms, the prepackaged `ThreadView`,
// message presenters, the shared `RunLogSkeleton` loader, activity primitives, and the
// permission/question/resource surfaces. Use when the prepackaged `ReadonlyRunSurface` (Tier 1,
// ./readableRun) doesn't fit and you need to compose the pieces yourself — e.g. a compact inline thread via
// `Thread.*` atoms.
//
// (This is intentionally the wide presentational module. The Composer compound lives in ./composer so an
// eager input box does not pull the thread; split further, e.g. thread.ts, if a consumer needs it.)
//
// Part of the `products/posthog_ai/frontend/api/<module>` public surface — import from here, not from
// deep `../components/*` paths. See ../README.md for the tier model and ../AGENTS.md for the coupling rule.

// Render-null wrapper that attaches context for JSX-only call sites (the hook flavor is in api/logics).
export { AttachedContextProvider } from '../components/AttachedContextProvider'
export type { AttachedContextProviderProps } from '../components/AttachedContextProvider'

// Controlled model + reasoning-effort pickers for a composer footer.
export { ComposerModelEffortPickers } from '../components/composer/ComposerModelEffortPickers'
export type { ComposerModelEffortPickersProps } from '../components/composer/ComposerModelEffortPickers'

// The composer's context affordance: @-picker (TaxonomicPopover) + removable chips over the
// attached-context store. Drop into `Composer.Header`; headless half is in api/logics.
export { AttachedContextBar } from '../components/composer/AttachedContextBar'

// Welcome header (logomark + headline + subheadline) and its overridable default headlines.
export { Welcome } from '../components/welcome/Welcome'
export type { WelcomeProps } from '../components/welcome/Welcome'
export { DEFAULT_HEADLINES, pickHeadline } from '../components/welcome/welcomeDefaults'

// Suggestions compound (the "Try PostHog AI for…" button row + in-input dropdown) and its default content.
export { Suggestions } from '../components/suggestions/Suggestions'
export type {
    SuggestionItem,
    SuggestionGroup,
    SuggestionsRootProps,
    SuggestionsButtonsProps,
    SuggestionsDropdownProps,
} from '../components/suggestions/Suggestions'
export { DEFAULT_SUGGESTIONS_DATA } from '../components/suggestions/suggestionsDefaults'

// `Thread` is the Radix-style compound (Root + Message/Markdown/Reasoning/Failure/Activity/ToolCall
// atoms); `ThreadView` is the prepackaged virtualized presenter (also `Thread.Root`).
export { Thread } from '../components/Thread'
export { ThreadView } from '../components/ThreadView'
export { useQuillThread } from '../components/quill/quillThreadContext'

// The quill thread skin for a thread `ThreadView` does not render (the legacy chat behind `today-rail-nav`):
// the skin provider, the message bubbles, and the footer affordances the bubbles share.
export { QuillThreadSkin } from '../components/quill/QuillThreadSkin'
export type { QuillThreadSkinProps } from '../components/quill/QuillThreadSkin'
export {
    QuillHumanBubble,
    QuillAssistantBubble,
    QuillAssistantMarkdown,
    QUILL_ASSISTANT_PROSE_CLASS,
} from '../components/quill/QuillMessages'
export type { QuillHumanBubbleProps, QuillAssistantBubbleProps } from '../components/quill/QuillMessages'
export { QuillFooterButton, QuillCopyButton } from '../components/quill/QuillFooterButton'
export { QuillFooterTimestamp } from '../components/quill/QuillFooterTimestamp'
export { quillCardBorderClass } from '../components/quill/quillCardBorder'
export { MessageReveal } from '../components/MessageReveal'
export { NotQuill } from '../components/quill/NotQuill'
export type { TurnTrailer } from '../utils/turnTrailers'
export { TurnTrailerActions } from '../components/TurnTrailerActions'
export { MessageTemplate } from '../messages/MessageTemplate'
export { MarkdownMessage } from '../messages/MarkdownMessage'
export { ReasoningAnswer } from '../messages/ReasoningAnswer'
export type { ReasoningAnswerProps } from '../messages/ReasoningAnswer'
export { AssistantFailureMessage } from '../messages/AssistantFailureMessage'
export { RunLogSkeleton } from '../components/RunLogSkeleton'
export { QueuedMessageList } from '../components/QueuedMessageList'
export type { QueuedMessageListProps } from '../components/QueuedMessageList'

export {
    Activity,
    ActivityDetails,
    ActivityHeader,
    ActivityStatusIcon,
    ActivityToggleSection,
    ShimmeringContent,
} from '../components/ActivityPrimitives'
export { ActivitySubsteps } from '../components/ActivitySubsteps'
export type { ActivityStatus } from '../components/activityTypes'
export { RunActivity } from '../components/RunActivity'
export { RunAlertActivity } from '../components/RunAlertActivity'

export { TaskRunStatusDot } from '../components/TaskRunStatusDot'
export { TaskRunLivenessDot } from '../components/TaskRunLivenessDot'
export { TaskListItem } from '../components/navigation/TaskListItem'
export { TaskAssigneeFilterMenu } from '../components/navigation/TaskAssigneeFilterMenu'

// Debug-logs overflow menu for hosts with no scene chrome (the PostHog AI scene and side panel).
export { DebugLogsMenu } from '../components/DebugLogsMenu'
export type { DebugLogsMenuProps } from '../components/DebugLogsMenu'

export { PermissionInput } from '../components/PermissionInput'
export { QuestionInput } from '../components/QuestionInput'
export { parseSandboxQuestions } from '../policy/questionUtils'
export { ContextUsageChip } from '../components/ContextUsageChip'
export { QuestionField, MultiFieldQuestion, isFieldValid } from '../components/QuestionField'
export { OptionSelector } from '../components/OptionSelector'
export type { Option } from '../components/OptionSelector'