From 84fc57756965764c2a60fb4f8628147408160d5d Mon Sep 17 00:00:00 2001 From: thewahome Date: Wed, 13 Nov 2024 12:33:00 +0300 Subject: [PATCH] ensure ttk regeneration happens for plugins --- .../src/commands/regenerate/regenerateButtonCommand.ts | 7 +++---- .../src/commands/regenerate/regenerateCommand.ts | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) 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