From 7ece8b385d731bb5ba7187a83398cd38f710e66f Mon Sep 17 00:00:00 2001 From: Kanushka Gayan Date: Tue, 27 Jan 2026 21:42:36 +0530 Subject: [PATCH 1/4] feat: Enhance sign-in alert logic to avoid display in specific environments --- .../src/rpc-managers/ai-panel/rpc-manager.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts b/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts index 3dc80ad8e1d..214f590c2fe 100644 --- a/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts +++ b/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts @@ -45,7 +45,7 @@ import { } from "@wso2/ballerina-core"; import * as fs from 'fs'; import path from "path"; -import { workspace } from 'vscode'; +import { extensions, workspace } from 'vscode'; import { URI } from "vscode-uri"; import { isNumber } from "lodash"; @@ -156,15 +156,29 @@ export class AiPanelRpcManager implements AIPanelAPI { } async showSignInAlert(): Promise { + // Don't show alert in WI environment (WSO2 Integrator extension is installed) + const isInWI = !!extensions.getExtension('wso2.wso2-integrator'); + if (isInWI) { + return false; + } + + // Don't show alert in Devant environment + const isInDevant = !!process.env.CLOUD_STS_TOKEN; + if (isInDevant) { + return false; + } + + // Check if alert was already dismissed const resp = await extension.context.secrets.get('LOGIN_ALERT_SHOWN'); if (resp === 'true') { return false; } - const isWso2Signed = await this.isCopilotSignedIn(); + const isWso2Signed = await this.isCopilotSignedIn(); if (isWso2Signed) { return false; } + return true; } From f83c50cd42badb836ada1907629f3b079dcc90d4 Mon Sep 17 00:00:00 2001 From: Kanushka Gayan Date: Tue, 27 Jan 2026 22:03:57 +0530 Subject: [PATCH 2/4] feat: Introduce WI_EXTENSION_ID constant and refactor sign-in alert logic to use it --- .../ballerina/ballerina-extension/src/features/ai/constants.ts | 2 ++ .../src/rpc-managers/ai-panel/rpc-manager.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/workspaces/ballerina/ballerina-extension/src/features/ai/constants.ts b/workspaces/ballerina/ballerina-extension/src/features/ai/constants.ts index 517f8c9cdc8..b076633d1d6 100644 --- a/workspaces/ballerina/ballerina-extension/src/features/ai/constants.ts +++ b/workspaces/ballerina/ballerina-extension/src/features/ai/constants.ts @@ -16,6 +16,8 @@ * under the License. */ +export const WI_EXTENSION_ID = 'wso2.wso2-integrator'; + export const CONFIG_FILE_NAME = "Config.toml"; export const CONFIGURE_DEFAULT_MODEL_COMMAND = "ballerina.configureWso2DefaultModelProvider"; diff --git a/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts b/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts index 214f590c2fe..c6c124de629 100644 --- a/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts +++ b/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts @@ -79,6 +79,7 @@ import { cleanupTempProject } from "../../features/ai/utils/project/temp-project import { RPCLayer } from '../../RPCLayer'; import { chatStateStorage } from '../../views/ai-panel/chatStateStorage'; import { restoreWorkspaceSnapshot } from '../../views/ai-panel/checkpoint/checkpointUtils'; +import { WI_EXTENSION_ID } from "../../features/ai/constants"; export class AiPanelRpcManager implements AIPanelAPI { @@ -157,7 +158,7 @@ export class AiPanelRpcManager implements AIPanelAPI { async showSignInAlert(): Promise { // Don't show alert in WI environment (WSO2 Integrator extension is installed) - const isInWI = !!extensions.getExtension('wso2.wso2-integrator'); + const isInWI = !!extensions.getExtension(WI_EXTENSION_ID); if (isInWI) { return false; } From 8fbafa126362842ffcdf55e31445b77be9a82e2a Mon Sep 17 00:00:00 2001 From: Kanushka Gayan Date: Tue, 27 Jan 2026 22:04:49 +0530 Subject: [PATCH 3/4] Update workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../src/rpc-managers/ai-panel/rpc-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts b/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts index c6c124de629..9b46f21f63c 100644 --- a/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts +++ b/workspaces/ballerina/ballerina-extension/src/rpc-managers/ai-panel/rpc-manager.ts @@ -164,7 +164,7 @@ export class AiPanelRpcManager implements AIPanelAPI { } // Don't show alert in Devant environment - const isInDevant = !!process.env.CLOUD_STS_TOKEN; + const isInDevant = !!process.env.CLOUD_STS_TOKEN; if (isInDevant) { return false; } From 14776057ff8607e91dfeb1dea5916084a6f72159 Mon Sep 17 00:00:00 2001 From: choreo-cicd Date: Wed, 28 Jan 2026 03:15:58 +0000 Subject: [PATCH 4/4] Update version to ballerina-5.7.4 --- workspaces/ballerina/ballerina-extension/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/ballerina/ballerina-extension/package.json b/workspaces/ballerina/ballerina-extension/package.json index 01b5a682ed1..d0bdf609b8e 100644 --- a/workspaces/ballerina/ballerina-extension/package.json +++ b/workspaces/ballerina/ballerina-extension/package.json @@ -2,7 +2,7 @@ "name": "ballerina", "displayName": "Ballerina", "description": "Ballerina Language support, debugging, graphical visualization, AI-based data-mapping and many more.", - "version": "5.7.3", + "version": "5.7.4", "publisher": "wso2", "icon": "resources/images/ballerina.png", "homepage": "https://wso2.com/ballerina/vscode/docs",