diff --git a/core/config/yaml/loadYaml.ts b/core/config/yaml/loadYaml.ts index bf0515253..b008092e9 100644 --- a/core/config/yaml/loadYaml.ts +++ b/core/config/yaml/loadYaml.ts @@ -415,6 +415,9 @@ export async function loadContinueConfigFromYaml( continueConfig, sharedConfig, ); + if (withShared.allowAnonymousTelemetry === undefined) { + withShared.allowAnonymousTelemetry = true; + } return { config: withShared, diff --git a/core/util/paths.ts b/core/util/paths.ts index 9a4c77bb2..bd5a69e1a 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -5,10 +5,10 @@ import * as path from "path"; import * as JSONC from "comment-json"; import dotenv from "dotenv"; +import { DevEventName } from "@continuedev/config-yaml"; import { IdeType, SerializedContinueConfig } from "../"; import { defaultConfig, defaultConfigJetBrains } from "../config/default"; import Types from "../config/types"; -import { DevEventName } from "@continuedev/config-yaml"; dotenv.config(); @@ -397,10 +397,6 @@ export function migrateV1DevDataFiles() { if (!fs.existsSync(newFilePath)) { fs.copyFileSync(oldFilePath, newFilePath); fs.unlinkSync(oldFilePath); - } else { - console.warn( - `V1 Dev data migration: ${newFilePath} already exists, skipping ${oldFileName}`, - ); } } } diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 9b61f1900..cbcebc34e 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.2", + "version": "1.1.3", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", diff --git a/gui/src/hooks/CustomPostHogProvider.tsx b/gui/src/hooks/CustomPostHogProvider.tsx index 5555f8c12..9f2c722b2 100644 --- a/gui/src/hooks/CustomPostHogProvider.tsx +++ b/gui/src/hooks/CustomPostHogProvider.tsx @@ -1,6 +1,6 @@ import posthog from "posthog-js"; import { PostHogProvider } from "posthog-js/react"; -import React, { PropsWithChildren, useEffect } from "react"; +import { PropsWithChildren, useEffect } from "react"; import { useAppSelector } from "../redux/hooks"; const CustomPostHogProvider = ({ children }: PropsWithChildren) => { @@ -8,8 +8,6 @@ const CustomPostHogProvider = ({ children }: PropsWithChildren) => { (store) => store?.config?.config?.allowAnonymousTelemetry, ); - const [client, setClient] = React.useState(undefined); - useEffect(() => { if (allowAnonymousTelemetry) { posthog.init("phc_JS6XFROuNbhJtVCEdTSYk6gl5ArRrTNMpCcguAXlSPs", { @@ -22,17 +20,12 @@ const CustomPostHogProvider = ({ children }: PropsWithChildren) => { }); posthog.identify(window.vscMachineId); posthog.opt_in_capturing(); - setClient(client); } else { - setClient(undefined); + posthog.opt_out_capturing(); } }, [allowAnonymousTelemetry]); - return allowAnonymousTelemetry ? ( - {children} - ) : ( - <>{children} - ); + return {children}; }; export default CustomPostHogProvider;