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.

863 B
Raw Blame
import { useValues } from 'kea'

import { Spinner, Text } from '@posthog/quill'

import { canvasSceneLogic } from './canvasSceneLogic'

/** A quiet note in the header while an agent works on a canvas that already shows something. */
export function CanvasGenerationIndicator(): JSX.Element | null {
    const { generationPhase, bodyState } = useValues(canvasSceneLogic)

    // A canvas with nothing to show says this in its body instead.
    if (!generationPhase || bodyState === 'generating') {
        return null
    }
    return (
        <div className="flex items-center gap-1.5" data-attr="canvas-generation-indicator">
            <Spinner />
            <Text size="xs" variant="muted" className="quill-shimmer">
                {generationPhase === 'starting' ? 'Starting the agent' : 'The agent is editing'}
            </Text>
        </div>
    )
}