Skip to content

Enhance dotnet.generateAssets command to accept skipPrompt parameter for asset generation #8510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

claudiaregio
Copy link
Contributor

@claudiaregio claudiaregio commented Aug 7, 2025

Bug: #8414

@claudiaregio claudiaregio requested a review from a team as a code owner August 7, 2025 22:14
@claudiaregio claudiaregio requested a review from WardenGnaw August 7, 2025 22:14
@@ -53,8 +53,8 @@ export function registerDebugger(
);

context.subscriptions.push(
vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To future proof from additional options and just appending more and more parameters.

Suggested change
vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex) => {
vscode.commands.registerCommand('dotnet.generateAssets', async (selectedIndex: number, options: { skipPrompt?: boolean } = {}) => {

if (getCSharpDevKit()) {
// If skipPrompt is true, proceed with generating assets without showing the dialog
if (skipPrompt) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (skipPrompt) {
if (options.skipPrompt) {

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

async function promptForDevKitDebugConfigurations(): Promise<boolean> {
async function promptForDevKitDebugConfigurations(skipPrompt: boolean = false): Promise<boolean> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to use new object, and no need to use a default here.

Suggested change
async function promptForDevKitDebugConfigurations(skipPrompt: boolean = false): Promise<boolean> {
async function promptForDevKitDebugConfigurations(options: { skipPrompt?: boolean }): Promise<boolean> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants