-
Notifications
You must be signed in to change notification settings - Fork 715
Open
Description
The InteractionService currently models requests for confirmation as MessageBoxInteractions.
aspire/src/Aspire.Hosting/ApplicationModel/InteractionService.cs
Lines 36 to 44 in 6ab1e17
| public async Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) | |
| { | |
| options ??= MessageBoxInteractionOptions.CreateDefault(); | |
| options.Intent = MessageIntent.Confirmation; | |
| options.ShowDismiss ??= false; | |
| options.ShowSecondaryButton ??= true; | |
| return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false); | |
| } |
We should consider modeling confirmation as an InputInteraction and add confirmation to the InputType enum to make the implementation play more nicely with CLI-based UIs where both confirmations and text-based inputs flow through the same pipeline.
Related to this, we should consider renaming certain APIs (like InputsDialogInteractionOptions) to remove assumptions about the type of UI that is used to present an interaction.
cc: @JamesNK @mitchdenny