Skip to content

Commit 2ebe00f

Browse files
committed
Enhance dotnet.generateAssets command to accept skipPrompt parameter for asset generation
1 parent 4cb5e00 commit 2ebe00f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/lsptoolshost/debugger/debugger.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ export function registerDebugger(
5353
);
5454

5555
context.subscriptions.push(
56-
vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex) => {
57-
if (!(await promptForDevKitDebugConfigurations())) {
56+
vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex, skipPrompt = false) => {
57+
if (!(await promptForDevKitDebugConfigurations(skipPrompt))) {
5858
return;
5959
}
6060

@@ -63,8 +63,13 @@ export function registerDebugger(
6363
);
6464
}
6565

66-
async function promptForDevKitDebugConfigurations(): Promise<boolean> {
66+
async function promptForDevKitDebugConfigurations(skipPrompt: boolean = false): Promise<boolean> {
6767
if (getCSharpDevKit()) {
68+
// If skipPrompt is true, proceed with generating assets without showing the dialog
69+
if (skipPrompt) {
70+
return true;
71+
}
72+
6873
let result: boolean | undefined = undefined;
6974

7075
while (result === undefined) {

0 commit comments

Comments
 (0)