diff --git a/.changeset/real-cobras-rule.md b/.changeset/real-cobras-rule.md
new file mode 100644
index 00000000..a43e80c8
--- /dev/null
+++ b/.changeset/real-cobras-rule.md
@@ -0,0 +1,5 @@
+---
+"claude-dev": minor
+---
+
+Add remote config with posthog allowing for disabling new features until they're reading, making for a better developer experience.
diff --git a/src/services/telemetry/TelemetryService.ts b/src/services/telemetry/TelemetryService.ts
index 7d84c76f..df1ea3ff 100644
--- a/src/services/telemetry/TelemetryService.ts
+++ b/src/services/telemetry/TelemetryService.ts
@@ -4,6 +4,7 @@ import { version as extensionVersion } from "../../../package.json"
import type { TaskFeedbackType } from "@shared/WebviewMessage"
import type { BrowserSettings } from "@shared/BrowserSettings"
+import { posthogConfig } from "@/shared/services/config/posthog-config"
/**
* PostHogClient handles telemetry event tracking for the Cline extension
@@ -93,8 +94,8 @@ class PostHogClient {
* Initializes PostHog client with configuration
*/
private constructor() {
- this.client = new PostHog("phc_qfOAGxZw2TL5O8p9KYd9ak3bPBFzfjC8fy5L6jNWY7K", {
- host: "https://us.i.posthog.com",
+ this.client = new PostHog(posthogConfig.apiKey, {
+ host: posthogConfig.host,
enableExceptionAutocapture: false,
})
}
diff --git a/src/shared/services/config/posthog-config.ts b/src/shared/services/config/posthog-config.ts
new file mode 100644
index 00000000..c4a793ff
--- /dev/null
+++ b/src/shared/services/config/posthog-config.ts
@@ -0,0 +1,5 @@
+// Public PostHog key (safe for open source)
+export const posthogConfig = {
+ apiKey: "phc_qfOAGxZw2TL5O8p9KYd9ak3bPBFzfjC8fy5L6jNWY7K",
+ host: "https://us.i.posthog.com",
+}
diff --git a/src/shared/services/feature-flags/feature-flags.ts b/src/shared/services/feature-flags/feature-flags.ts
new file mode 100644
index 00000000..58e5f267
--- /dev/null
+++ b/src/shared/services/feature-flags/feature-flags.ts
@@ -0,0 +1,6 @@
+export const FEATURE_FLAGS = {
+ CUSTOM_INSTRUCTIONS: "custom-instructions",
+ // Further flags here
+} as const
+
+export type FeatureFlag = (typeof FEATURE_FLAGS)[keyof typeof FEATURE_FLAGS]
diff --git a/webview-ui/src/Providers.tsx b/webview-ui/src/Providers.tsx
index e1a60f47..16660b46 100644
--- a/webview-ui/src/Providers.tsx
+++ b/webview-ui/src/Providers.tsx
@@ -3,13 +3,22 @@ import type { ReactNode } from "react"
import { ExtensionStateContextProvider } from "./context/ExtensionStateContext"
import { FirebaseAuthProvider } from "./context/FirebaseAuthContext"
import { HeroUIProvider } from "@heroui/react"
+import { PostHogProvider } from "posthog-js/react"
+import { posthogConfig } from "@shared/services/config/posthog-config"
+import posthog from "posthog-js"
+
+posthog.init(posthogConfig.apiKey, {
+ api_host: posthogConfig.host,
+})
export function Providers({ children }: { children: ReactNode }) {
return (
- These instructions are added to the end of the system prompt sent with every request. -
-+ These instructions are added to the end of the system prompt sent with every request. +
+