Skip to content

Commit

Permalink
show regenerate after loading api from a workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome committed Nov 25, 2024
1 parent 5ca9725 commit 37966c7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vscode/microsoft-kiota/src/commands/editPathsCommand.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as vscode from 'vscode';

import { extensionId, treeViewId } from "../constants";
import { ClientOrPluginProperties } from "../kiotaInterop";
import { OpenApiTreeProvider } from "../providers/openApiTreeProvider";
Expand Down Expand Up @@ -27,5 +29,14 @@ export class EditPathsCommand extends Command {

private async loadEditPaths(clientOrPluginKey: string, clientOrPluginObject: ClientOrPluginProperties) {
await openTreeViewWithProgress(() => this._openApiTreeProvider.loadEditPaths(clientOrPluginKey, clientOrPluginObject));

const regenerateAnswer = vscode.l10n.t("Regenerate");
const response = await vscode.window.showInformationMessage(
vscode.l10n.t('Click on Regenerate after selecting the paths in the API Explorer'),
regenerateAnswer
);
if (response === regenerateAnswer) {
await vscode.commands.executeCommand(`kiota.regenerate`);
}
}
}

0 comments on commit 37966c7

Please sign in to comment.