diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/AllSubcommand.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/AllSubcommand.cs index 179e82b8..e0afcc50 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/AllSubcommand.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/AllSubcommand.cs @@ -960,10 +960,10 @@ internal static async Task ExecuteMessagingEndpointStepAsync(SetupContext ctx) /// Prompts for the messaging endpoint URL. Returns the entered HTTPS URL, or null to defer /// (blank entry). The caller prints the section header and opens the indent scope. /// - private static async Task PromptForMessagingEndpointAsync(SetupContext ctx) + private static Task PromptForMessagingEndpointAsync(SetupContext ctx) { if (ctx.NonInteractive) - return null; + return Task.FromResult(null); ctx.Logger.LogInformation("The HTTPS URL where your deployed agent receives messages."); ctx.Logger.LogInformation("Leave blank to configure it later, after you deploy the agent."); @@ -975,15 +975,15 @@ internal static async Task ExecuteMessagingEndpointStepAsync(SetupContext ctx) var entered = ConsoleHelper.ReadLineCancellable(ctx.CancellationToken)?.Trim(); if (string.IsNullOrWhiteSpace(entered)) - return null; + return Task.FromResult(null); if (Uri.TryCreate(entered, UriKind.Absolute, out var uri) && uri.Scheme == Uri.UriSchemeHttps) - return entered; + return Task.FromResult(entered); ctx.Logger.LogWarning("Enter a valid HTTPS URL (e.g. https://my-agent.example.com/api/messages), or leave blank to skip."); } - return null; + return Task.FromResult(null); } ///