ToolCallTagHelper
Kendo UI ToolCall TagHelper
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-toolcall")]
[RestrictChildren("parameters-template", new string[] { "approval-template", "result-template", "error-template", "messages", "svg-icon", "status-svg-icon" })]
public class ToolCallTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperBaseToolCallTagHelper
Implements:
Inherited Members
Child Tags
Constructors
Initializes a new instance of the ToolCallTagHelper class.
Properties
A function used to render the entire approval section when state is "awaitingApproval". Receives the widget options object as the first argument and must return an HTML string. When set, the built-in approve and reject buttons are not rendered. This option expects the name of a JavaScript function that will be called to return the template.
public string ApprovalTemplateHandler { get; set; }
A text message displayed inside the approval card when state is "awaitingApproval".
public string ApprovalText { get; set; }
A function used to render the entire error section when state is "error". Receives the widget options object as the first argument and must return an HTML string. When set, the built-in error message box is not rendered. This option expects the name of a JavaScript function that will be called to return the template.
public string ErrorTemplateHandler { get; set; }
An error message displayed when state is "error".
public string ErrorText { get; set; }
Enables toggling the visibility of the step body by clicking the header or using the keyboard.
public bool? Expandable { get; set; }
Controls whether the step body is visible when the widget initializes.
public bool? Expanded { get; set; }
The primary text label displayed in the step header.
public string Label { get; set; }
The name of the JavaScript function that will handle the action event. Fired when the user clicks the approve or reject button in the approval UI. Only fires when state is "awaitingApproval".The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnAction { get; set; }
The name of the JavaScript function that will handle the expandedChange event. Fired when the user clicks the header to toggle the expanded state. Calling e.preventDefault() prevents the toggle from taking effect.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnExpandedChange { get; set; }
A plain JavaScript object rendered as formatted JSON in the step body under the parameters label.
public object Parameters { get; set; }
A function used to render the parameters section body. Receives the widget options object as the first argument and must return an HTML string. This option expects the name of a JavaScript function that will be called to return the template.
public string ParametersTemplateHandler { get; set; }
A plain JavaScript object rendered as formatted JSON in the step body under the result label.
public object Result { get; set; }
A function used to render the result section body. Receives the widget options object as the first argument and must return an HTML string. This option expects the name of a JavaScript function that will be called to return the template.
public string ResultTemplateHandler { get; set; }
A secondary text label displayed after the separator in the step header.
public string SecondaryLabel { get; set; }
The current state of the tool call.
public ToolCallState? State { get; set; }
Overrides the default SVG icon used inside the state badge. When null, a built-in icon is chosen based on the current state.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.
[HtmlAttributeName("status-svg-icon")]
public string StatusSVGIcon { get; set; }
The name of the SVG icon displayed in the step header.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.
[HtmlAttributeName("svg-icon")]
public string SvgIcon { get; set; }
Configures the templates for the ToolCall.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
Methods
Gets the generated initialization script.
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Serializes the defined templates.
protected override Dictionary<string, object> SerializeTemplates()
Overrides:
Writes content to the output.
protected override void WriteHtml(TagHelperOutput output)
Overrides: