66import { type ContainerApp , type ManagedEnvironment } from "@azure/arm-appcontainers" ;
77import { type ResourceGroup } from "@azure/arm-resources" ;
88import { LocationListStep , type ILocationWizardContext } from "@microsoft/vscode-azext-azureutils" ;
9- import { activityInfoIcon , AzureWizardPromptStep , createUniversallyUniqueContextValue , GenericTreeItem , type ExecuteActivityContext , type IActionContext } from "@microsoft/vscode-azext-utils" ;
9+ import { ActivityChildItem , ActivityChildType , activityInfoIcon , AzureWizardPromptStep , createContextValue , type ExecuteActivityContext , type IActionContext } from "@microsoft/vscode-azext-utils" ;
1010import { activityInfoContext } from "../constants" ;
1111import { ext } from "../extensionVariables" ;
1212import { localize } from "../utils/localize" ;
@@ -17,6 +17,8 @@ type StartingResourcesLogContext = IActionContext & Partial<ExecuteActivityConte
1717 containerApp ?: ContainerApp
1818} ;
1919
20+ const startingResourcesContext : string = 'startingResourcesLogStepItem' ;
21+
2022/**
2123 * Use to display primary Azure resource data to the output and activity log
2224 * i.e. resource group, managed environment, container app, location
@@ -49,9 +51,10 @@ export class StartingResourcesLogStep<T extends StartingResourcesLogContext> ext
4951 protected async logStartingResources ( context : T ) : Promise < void > {
5052 if ( context . resourceGroup ) {
5153 context . activityChildren ?. push (
52- new GenericTreeItem ( undefined , {
53- contextValue : createUniversallyUniqueContextValue ( [ 'useExistingResourceGroupInfoItem' , activityInfoContext ] ) ,
54- label : localize ( 'useResourceGroup' , 'Using resource group "{0}"' , context . resourceGroup . name ) ,
54+ new ActivityChildItem ( {
55+ contextValue : createContextValue ( [ startingResourcesContext , activityInfoContext ] ) ,
56+ label : localize ( 'useResourceGroup' , 'Use resource group "{0}"' , context . resourceGroup . name ) ,
57+ activityType : ActivityChildType . Info ,
5558 iconPath : activityInfoIcon
5659 } )
5760 ) ;
@@ -60,22 +63,24 @@ export class StartingResourcesLogStep<T extends StartingResourcesLogContext> ext
6063
6164 if ( context . managedEnvironment ) {
6265 context . activityChildren ?. push (
63- new GenericTreeItem ( undefined , {
64- contextValue : createUniversallyUniqueContextValue ( [ 'useExistingManagedEnvironmentInfoItem' , activityInfoContext ] ) ,
65- label : localize ( 'useManagedEnvironment' , 'Using managed environment "{0}"' , context . managedEnvironment . name ) ,
66+ new ActivityChildItem ( {
67+ label : localize ( 'useManagedEnvironment' , 'Use managed environment "{0}"' , context . managedEnvironment . name ) ,
68+ contextValue : createContextValue ( [ startingResourcesContext , activityInfoContext ] ) ,
69+ activityType : ActivityChildType . Info ,
6670 iconPath : activityInfoIcon
67- } )
71+ } ) ,
6872 ) ;
6973 ext . outputChannel . appendLog ( localize ( 'usingManagedEnvironment' , 'Using managed environment "{0}".' , context . managedEnvironment . name ) ) ;
7074 }
7175
7276 if ( context . containerApp ) {
7377 context . activityChildren ?. push (
74- new GenericTreeItem ( undefined , {
75- contextValue : createUniversallyUniqueContextValue ( [ 'useExistingContainerAppInfoItem' , activityInfoContext ] ) ,
76- label : localize ( 'useContainerApp' , 'Using container app "{0}"' , context . containerApp . name ) ,
77- iconPath : activityInfoIcon
78- } )
78+ new ActivityChildItem ( {
79+ label : localize ( 'useContainerApp' , 'Use container app "{0}"' , context . containerApp . name ) ,
80+ contextValue : createContextValue ( [ startingResourcesContext , activityInfoContext ] ) ,
81+ activityType : ActivityChildType . Info ,
82+ iconPath : activityInfoIcon ,
83+ } ) ,
7984 ) ;
8085 ext . outputChannel . appendLog ( localize ( 'usingContainerApp' , 'Using container app "{0}".' , context . containerApp . name ) ) ;
8186 }
0 commit comments