rename protocol to getEnvironment

This commit is contained in:
uinstinct 2025-07-28 14:23:58 +05:30
parent 7544cef8b9
commit c84631678d
4 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

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

View file

@ -59,7 +59,7 @@ const Layout = () => {
useEffect(() => {
(async () => {
const response = await ideMessenger.request(
"controlPlane/getEnvironmentType",
"controlPlane/getEnvironment",
undefined,
);
console.log("debug2 response was", response);