From c84631678df08be1b0030539beaa8f70b124e098 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Mon, 28 Jul 2025 14:23:58 +0530 Subject: [PATCH] rename protocol to getEnvironment --- core/core.ts | 2 +- core/protocol/core.ts | 2 +- core/protocol/passThrough.ts | 2 +- gui/src/components/Layout.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/core.ts b/core/core.ts index 69be1f484..8df4992d4 100644 --- a/core/core.ts +++ b/core/core.ts @@ -407,7 +407,7 @@ export class Core { await this.messenger.request("openUrl", url); }); - on("controlPlane/getEnvironmentType", async (msg) => { + on("controlPlane/getEnvironment", async (msg) => { return await getControlPlaneEnv(this.ide.getIdeSettings()); }); diff --git a/core/protocol/core.ts b/core/protocol/core.ts index abb6d40d2..1a6e4dc20 100644 --- a/core/protocol/core.ts +++ b/core/protocol/core.ts @@ -251,7 +251,7 @@ export type ToCoreFromIdeOrWebviewProtocol = { ]; "clipboardCache/add": [{ content: string }, void]; "controlPlane/openUrl": [{ path: string; orgSlug?: string }, void]; - "controlPlane/getEnvironmentType": [undefined, ControlPlaneEnv]; + "controlPlane/getEnvironment": [undefined, ControlPlaneEnv]; "controlPlane/getFreeTrialStatus": [undefined, FreeTrialStatus | null]; "controlPlane/getModelsAddOnUpgradeUrl": [ { vsCodeUriScheme?: string }, diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts index 69df93852..ba14d7594 100644 --- a/core/protocol/passThrough.ts +++ b/core/protocol/passThrough.ts @@ -68,7 +68,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] = "tools/call", "controlPlane/openUrl", "controlPlane/getModelsAddOnUpgradeUrl", - "controlPlane/getEnvironmentType", + "controlPlane/getEnvironment", "controlPlane/getFreeTrialStatus", "isItemTooBig", "process/markAsBackgrounded", diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index 0ace1cda2..2ada98d9d 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -59,7 +59,7 @@ const Layout = () => { useEffect(() => { (async () => { const response = await ideMessenger.request( - "controlPlane/getEnvironmentType", + "controlPlane/getEnvironment", undefined, ); console.log("debug2 response was", response);