Class WebMcpConfirmDialog
SfDialog host for the WebMCP confirmation gate. Modeled on
Modules/Link/Link.razor.cs:
ComponentBase with a cascading SfRichTextEditor parent.
dialogRef captured once the <SfDialog @ref> mounts.
- ShowAsync(string, string) flips
enableDialog and forces a render so the
@if (Parent != null && enableDialog) guard in the .razor
materializes the dialog markup.
- Syncfusion.Blazor.RichTextEditor.WebMcpConfirmDialog.OnAllow / Syncfusion.Blazor.RichTextEditor.WebMcpConfirmDialog.OnDeny mirror the Insert / Cancel handlers
in
Link.razor.cs: hide the dialog, resolve the pending task.
Inheritance
WebMcpConfirmDialog
Assembly: Syncfusion.Blazor.RichTextEditor.dll
Syntax
public class WebMcpConfirmDialog : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
Constructors
WebMcpConfirmDialog()
Declaration
public WebMcpConfirmDialog()
Properties
AllowText
Allow button label. Defaults to "Allow".
Declaration
[Parameter]
public string AllowText { get; set; }
Property Value
Dialog header. Defaults to "Confirm AI tool execution".
Declaration
[Parameter]
public string DefaultHeaderText { get; set; }
Property Value
DenyText
Deny button label. Defaults to "Deny".
Declaration
[Parameter]
public string DenyText { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Overrides
HideDialog(string?)
Programmatic close (used by Allow / Deny / Escape).
Declaration
public Task HideDialog(string? args = null)
Parameters
| Type |
Name |
Description |
| string |
args |
|
Returns
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides
ShowAsync(string, string)
Open the confirmation dialog for the given tool invocation. Mirrors
Link.ShowDialog(LinkFormModel, string):
- Pre-fills header / prompt / command.
- Sets
enableDialog = true (this is what flips the .razor @if guard).
await InvokeAsync(() => StateHasChanged()) to force the render.
Returns a Task that resolves to true on Allow, false on Deny / Escape.
Declaration
public Task<bool> ShowAsync(string command, string prompt)
Parameters
Returns
Implements