: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { useActions, useValues } from 'kea'
import { IconPause, IconPlay } from '@posthog/icons'
import { LemonButton } from '@posthog/lemon-ui'
import { autoresearchPipelineLogic } from '../autoresearchPipelineLogic'
export function PipelineActions(): JSX.Element | null {
const { pipeline, pipelineLoading } = useValues(autoresearchPipelineLogic)
const { pausePipeline, resumePipeline } = useActions(autoresearchPipelineLogic)
if (!pipeline) {
return null
}
return (
<>
{pipeline.status === 'paused' ? (
<LemonButton
type="secondary"
icon={<IconPlay />}
size="small"
onClick={() => resumePipeline()}
data-attr="autoresearch-model-resume"
loading={pipelineLoading}
>
Resume
</LemonButton>
) : pipeline.status === 'running' ? (
<LemonButton
type="secondary"
icon={<IconPause />}
size="small"
onClick={() => pausePipeline()}
data-attr="autoresearch-model-pause"
loading={pipelineLoading}
>
Pause
</LemonButton>
) : null}
</>
)
}