@@ -60,8 +60,8 @@ export async function buildProjectArtifactsStructure(projectDir: string, langCli
6060export async function updateProjectArtifacts ( publishedArtifacts : ArtifactsNotification ) : Promise < void > {
6161 // Current project structure
6262 const currentProjectStructure : ProjectStructureResponse = StateMachine . context ( ) . projectStructure ;
63- const projectUri = URI . parse ( StateMachine . context ( ) . projectUri ) ;
64- const isWithinProject = URI . parse ( publishedArtifacts . uri ) . path . toLowerCase ( ) . includes ( projectUri . path . toLowerCase ( ) ) ;
63+ const projectUri = URI . file ( StateMachine . context ( ) . projectUri ) ;
64+ const isWithinProject = URI . parse ( publishedArtifacts . uri ) . fsPath . toLowerCase ( ) . includes ( projectUri . fsPath . toLowerCase ( ) ) ;
6565 if ( currentProjectStructure && isWithinProject ) {
6666 const entryLocations = await traverseUpdatedComponents ( publishedArtifacts . artifacts , currentProjectStructure ) ;
6767 const notificationHandler = ArtifactNotificationHandler . getInstance ( ) ;
@@ -104,7 +104,7 @@ async function getComponents(artifacts: Record<string, BaseArtifact>, artifactTy
104104}
105105
106106async function getEntryValue ( artifact : BaseArtifact , icon : string , moduleName ?: string ) {
107- const targetFile = Utils . joinPath ( URI . parse ( StateMachine . context ( ) . projectUri ) , artifact . location . fileName ) . fsPath ;
107+ const targetFile = Utils . joinPath ( URI . file ( StateMachine . context ( ) . projectUri ) , artifact . location . fileName ) . fsPath ;
108108 const entryValue : ProjectStructureArtifactResponse = {
109109 id : artifact . id ,
110110 name : artifact . name ,
@@ -183,7 +183,7 @@ async function injectAIAgent(serviceArtifact: BaseArtifact) {
183183 const agentName = serviceArtifact . name . split ( '-' ) [ 1 ] . trim ( ) . replace ( / \/ / g, '' ) ;
184184
185185 // Retrieve the service model
186- const targetFile = Utils . joinPath ( URI . parse ( StateMachine . context ( ) . projectUri ) , serviceArtifact . location . fileName ) . fsPath ;
186+ const targetFile = Utils . joinPath ( URI . file ( StateMachine . context ( ) . projectUri ) , serviceArtifact . location . fileName ) . fsPath ;
187187 const updatedService = await new ServiceDesignerRpcManager ( ) . getServiceModelFromCode ( {
188188 filePath : targetFile ,
189189 codedata : {
0 commit comments