Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion workspaces/ballerina/ballerina-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -156,15 +157,29 @@ export class AiPanelRpcManager implements AIPanelAPI {
}

async showSignInAlert(): Promise<boolean> {
// Don't show alert in WI environment (WSO2 Integrator extension is installed)
const isInWI = !!extensions.getExtension(WI_EXTENSION_ID);
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;
}

Expand Down
Loading