From 34e87af5f1bf171a4d3d4b6b76bdc33c89860c45 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Fri, 28 Feb 2025 22:24:34 -0800 Subject: [PATCH] Remove webview telemetry --- webview-ui/src/App.tsx | 17 ++++++++--------- webview-ui/src/main.tsx | 7 +------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/webview-ui/src/App.tsx b/webview-ui/src/App.tsx index a21e68b3db..911260d116 100644 --- a/webview-ui/src/App.tsx +++ b/webview-ui/src/App.tsx @@ -9,7 +9,6 @@ import AccountView from "./components/account/AccountView" import { ExtensionStateContextProvider, useExtensionState } from "./context/ExtensionStateContext" import { vscode } from "./utils/vscode" import McpView from "./components/mcp/McpView" -import posthog from "posthog-js" const AppContent = () => { const { didHydrateState, showWelcome, shouldShowAnnouncement, telemetrySetting, vscMachineId } = useExtensionState() @@ -61,14 +60,14 @@ const AppContent = () => { useEvent("message", handleMessage) - useEffect(() => { - if (telemetrySetting === "enabled") { - posthog.identify(vscMachineId) - posthog.opt_in_capturing() - } else { - posthog.opt_out_capturing() - } - }, [telemetrySetting, vscMachineId]) + // useEffect(() => { + // if (telemetrySetting === "enabled") { + // posthog.identify(vscMachineId) + // posthog.opt_in_capturing() + // } else { + // posthog.opt_out_capturing() + // } + // }, [telemetrySetting, vscMachineId]) useEffect(() => { if (shouldShowAnnouncement) { diff --git a/webview-ui/src/main.tsx b/webview-ui/src/main.tsx index 03e45df283..65f6265f7a 100644 --- a/webview-ui/src/main.tsx +++ b/webview-ui/src/main.tsx @@ -5,13 +5,8 @@ import "./index.css" import App from "./App.tsx" import "../../node_modules/@vscode/codicons/dist/codicon.css" -const apiKey = "phc_qfOAGxZw2TL5O8p9KYd9ak3bPBFzfjC8fy5L6jNWY7K" -const apiHost = "https://us.i.posthog.com" - createRoot(document.getElementById("root")!).render( - - - + , )