Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
add posthog copy key event
Jakub Novak570f88aed49e
diff --git a/apps/dashboard/components/Settings/APIKey.tsx b/apps/dashboard/components/Settings/APIKey.tsxindex da719b0e6..439e66936 100644--- a/apps/dashboard/components/Settings/APIKey.tsx+++ b/apps/dashboard/components/Settings/APIKey.tsx@@ -1,10 +1,18 @@import { CopyIcon } from 'lucide-react'+import {usePostHog} from 'posthog-js/react'interface Props {apiKey: string;}function APIKey({ apiKey }: Props) {+ const posthog = usePostHog()++ const onClick = () => {+ navigator.clipboard.writeText(apiKey)+ posthog?.capture('copied API key')+ }+return (<div className="my-4 flex align-bottom justify-between w-3/4"><div@@ -13,7 +21,7 @@ function APIKey({ apiKey }: Props) {<span className="p-2 font-semibold">{apiKey}</span></div><CopyIcon- onClick={() => navigator.clipboard.writeText(apiKey)}+ onClick={() => onClick()}className="cursor-pointer place-self-center text-gray-200 hover:text-gray-400"size={24}/>