Merge pull request #4449 from continuedev/nate/fix-remount

Nate/fix-remount
This commit is contained in:
Nate Sesti 2025-03-03 19:10:27 -08:00 • committed by GitHub
commit 2b64df53aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 17 deletions

View file

@ -415,6 +415,9 @@ export async function loadContinueConfigFromYaml(
continueConfig,
sharedConfig,
);
if (withShared.allowAnonymousTelemetry === undefined) {
withShared.allowAnonymousTelemetry = true;
}
return {
config: withShared,

View file

@ -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}`,
);
}
}
}

View file

@ -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",

View file

@ -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<any>(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 ? (
<PostHogProvider client={client}>{children}</PostHogProvider>
) : (
<>{children}</>
);
return <PostHogProvider client={posthog}>{children}</PostHogProvider>;
};
export default CustomPostHogProvider;