From 488bea4510f9b574a6b71be4bb98adf72be85b92 Mon Sep 17 00:00:00 2001 From: thewahome Date: Thu, 5 Dec 2024 14:51:06 +0300 Subject: [PATCH] refresh workspace tree on (re)generation --- .../src/commands/generate/generateClientCommand.ts | 1 + .../src/commands/regenerate/regenerateButtonCommand.ts | 1 + .../microsoft-kiota/src/commands/regenerate/regenerateCommand.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/vscode/microsoft-kiota/src/commands/generate/generateClientCommand.ts b/vscode/microsoft-kiota/src/commands/generate/generateClientCommand.ts index 172f138fa6..a5de05a636 100644 --- a/vscode/microsoft-kiota/src/commands/generate/generateClientCommand.ts +++ b/vscode/microsoft-kiota/src/commands/generate/generateClientCommand.ts @@ -170,6 +170,7 @@ export class GenerateClientCommand extends Command { if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) { await vscode.commands.executeCommand('vscode.openFolder', vscode.Uri.file(config.workingDirectory ?? getWorkspaceJsonDirectory()), true); } else { + await vscode.commands.executeCommand('kiota.workspace.refresh'); await displayGenerationResults(this._openApiTreeProvider, config); } } diff --git a/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts b/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts index 44e07ad3ff..7319264b44 100644 --- a/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts +++ b/vscode/microsoft-kiota/src/commands/regenerate/regenerateButtonCommand.ts @@ -61,6 +61,7 @@ export class RegenerateButtonCommand extends Command { await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey); } } + await vscode.commands.executeCommand('kiota.workspace.refresh'); } } \ 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 d9647fe9b6..1ff0bfe302 100644 --- a/vscode/microsoft-kiota/src/commands/regenerate/regenerateCommand.ts +++ b/vscode/microsoft-kiota/src/commands/regenerate/regenerateCommand.ts @@ -46,5 +46,6 @@ export class RegenerateCommand extends Command { await regenerateService.regenerateTeamsApp(workspaceJson, clientOrPluginKey); } } + await vscode.commands.executeCommand('kiota.workspace.refresh'); } } \ No newline at end of file