diff --git a/api/src/AzExtResourceType.ts b/api/src/AzExtResourceType.ts index d8d9afe5..ff169da8 100644 --- a/api/src/AzExtResourceType.ts +++ b/api/src/AzExtResourceType.ts @@ -24,6 +24,7 @@ export enum AzExtResourceType { ResourceGroup = 'ResourceGroup', // Below are not supported but have icons in the Resources extension + AiFoundry = 'AiFoundry', ApiManagementService = 'ApiManagementService', ApplicationInsights = 'ApplicationInsights', AppServiceKubernetesEnvironment = 'AppServiceKubernetesEnvironment', @@ -49,6 +50,7 @@ export enum AzExtResourceType { LoadBalancers = 'LoadBalancers', LogicApp = 'LogicApp', LogicWorkflows = 'LogicWorkflows', + MachineLearningWorkspace = 'MachineLearningWorkspace', ManagedIdentityUserAssignedIdentities = 'ManagedIdentityUserAssignedIdentities', MysqlServers = 'MysqlServers', NetworkApplicationGateways = 'NetworkApplicationGateways', diff --git a/api/src/getAzExtResourceType.ts b/api/src/getAzExtResourceType.ts index cf89fb53..471fa507 100644 --- a/api/src/getAzExtResourceType.ts +++ b/api/src/getAzExtResourceType.ts @@ -7,6 +7,7 @@ import { AzExtResourceType } from "./AzExtResourceType"; const FunctionAppKind = 'functionapp'; const LogicAppKind = 'workflowapp'; +const AiFoundryProjectKind = 'project'; /** * Gets a normalized type for an Azure resource, accounting for the fact that some @@ -29,6 +30,14 @@ export function getAzExtResourceType(resource: { type: string; kind?: string; }) return AzExtResourceType.AppServices; } + case 'microsoft.machinelearningservices/workspaces': + // Azure Machine Learning Workspace and Azure Foundry have the same type + if (kind.includes(AiFoundryProjectKind)) { + return AzExtResourceType.AiFoundry; + } else { + return AzExtResourceType.MachineLearningWorkspace; + } + default: return azureTypeToAzExtResourceTypeMap[type]; } @@ -46,6 +55,7 @@ const azureTypeToAzExtResourceTypeMap: RecordIcon-machinelearning-167 \ No newline at end of file diff --git a/src/AzExtWrapper.ts b/src/AzExtWrapper.ts index 3e42b990..00d87326 100644 --- a/src/AzExtWrapper.ts +++ b/src/AzExtWrapper.ts @@ -82,6 +82,10 @@ export class AzExtWrapper { return !!this.getCodeExtension(); } + public isPrivate(): boolean { + return this._data.private === true; + } + public meetsMinVersion(): boolean { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return this.getCodeExtension()?.packageJSON?.contributes?.[contributesKey] !== undefined; diff --git a/src/azureExtensions.ts b/src/azureExtensions.ts index 935232bd..b356b684 100644 --- a/src/azureExtensions.ts +++ b/src/azureExtensions.ts @@ -139,7 +139,7 @@ export const azureExtensions: IAzExtMetadata[] = [ }, { name: 'vscode-azurelogicapps', - publisher: "ms-azuretools", + publisher: 'ms-azuretools', label: 'Logic Apps', resourceTypes: [ AzExtResourceType.LogicApp, @@ -158,9 +158,18 @@ export const azureExtensions: IAzExtMetadata[] = [ ], reportIssueCommandId: 'azureWebPubSub.reportIssue' }, + { + name: 'vscode-ai-foundry', + publisher: 'ms-toolsai', + label: 'AI Foundry', + resourceTypes: [AzExtResourceType.AiFoundry], + reportIssueCommandId: 'azure-ai-extension.reportIssue', + private: true + }, ]; export const legacyTypeMap: Partial> = { + AiFoundry: 'microsoft.machinelearningservices/workspaces', DurableTaskScheduler: 'microsoft.durabletask/schedulers', FunctionApp: 'microsoft.web/functionapp', AppServices: 'microsoft.web/sites', @@ -181,6 +190,7 @@ export interface IAzExtMetadata { resourceTypes: AzExtResourceType[]; tutorial?: IAzExtTutorial; reportIssueCommandId?: string; + private?: boolean; } export interface IAzExtResourceType { diff --git a/src/tree/azure/DefaultAzureResourceItem.ts b/src/tree/azure/DefaultAzureResourceItem.ts index 4df0bd3b..b7b89e54 100644 --- a/src/tree/azure/DefaultAzureResourceItem.ts +++ b/src/tree/azure/DefaultAzureResourceItem.ts @@ -25,7 +25,7 @@ export class DefaultAzureResourceItem implements ResourceGroupsItem { public readonly id: string = this.resource.id; getChildren(): Promise { - if (this.resourceTypeExtension && !this.resourceTypeExtension.isInstalled()) { + if (this.resourceTypeExtension && !this.resourceTypeExtension.isInstalled() && !this.resourceTypeExtension.isPrivate()) { return Promise.resolve([ new GenericItem( localize('installExtensionToEnableFeatures', 'Install extension to enable additional features...'), diff --git a/src/utils/azureUtils.ts b/src/utils/azureUtils.ts index feebba41..e84c6bb9 100644 --- a/src/utils/azureUtils.ts +++ b/src/utils/azureUtils.ts @@ -85,6 +85,7 @@ interface AzExtResourceTypeDisplayInfo { } const azExtDisplayInfo: Partial> = { + AiFoundry: { displayName: localize('aiFoundry', 'AI Foundry') }, ApplicationInsights: { displayName: localize('insightsComponents', 'Application Insights') }, AppServiceKubernetesEnvironment: { displayName: localize('containerService', 'App Service Kubernetes Environment') }, AppServicePlans: { displayName: localize('serverFarms', 'App Service plans') },