diff --git a/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts b/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts index 2830a072eb..abfcdffdac 100644 --- a/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts +++ b/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts @@ -57,15 +57,14 @@ export class RegenerateButtonCommand extends Command { if (isClientType(generationType)) { await regenerateService.regenerateClient(settings, selectedPaths); - + } + if (isPluginType(generationType)) { + await regenerateService.regeneratePlugin(settings, selectedPaths); const workspaceJson = vscode.workspace.textDocuments.find(doc => doc.fileName.endsWith(KIOTA_WORKSPACE_FILE)); if (workspaceJson && !workspaceJson.isDirty) { await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey); } } - if (isPluginType(generationType)) { - await regenerateService.regeneratePlugin(settings, selectedPaths); - } } } \ No newline at end of file diff --git a/vscode/microsoft-kiota/src/commands/regenerate/regenerateCommand.ts b/vscode/microsoft-kiota/src/commands/regenerate/regenerateCommand.ts index c28e1824d1..f121131698 100644 --- a/vscode/microsoft-kiota/src/commands/regenerate/regenerateCommand.ts +++ b/vscode/microsoft-kiota/src/commands/regenerate/regenerateCommand.ts @@ -43,12 +43,12 @@ export class RegenerateCommand extends Command { const regenerateService = new RegenerateService(this._context, this._openApiTreeProvider, clientOrPluginKey, clientOrPluginObject); if (isClientType(generationType)) { await regenerateService.regenerateClient(settings); - if (workspaceJson) { - await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey); - } } if (isPluginType(generationType)) { await regenerateService.regeneratePlugin(settings); + if (workspaceJson) { + await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey); + } } } } \ No newline at end of file