Syncfusion aspnetmvc ai assistview
Skill syncfusion/aspnetmvc-ui-components-skills/skills/syncfusion-aspnetmvc-ai-assistview
Implement the Syncfusion ASP.NET MVC AI AssistView component — a conversational AI chat interface with prompt/response rendering, prompt suggestions, custom views, toolbar customization, file attachments, speech-to-text, AI backend integrations (Azure OpenAI, Gemini, Ollama, LiteLLM), generative UI with interactive tools, Chain of Thoughts reasoning visualization and text-to-speech audio playback. Use this skill when building AI chat UIs, integrating LLM backends, configuring assistant toolbars, customizing templates, rendering dynamic UI components, or handling voice input/output in ASP.NET MVC applications.From its SKILL.md
npx -y skills add syncfusion/aspnetmvc-ui-components-skills --skill syncfusion-aspnetmvc-ai-assistviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
10.7 KB, ~2.3k tokens by cl100k_base, as published. Nobody here has run it
Syncfusion ASP.NET MVC AI AssistView
A full-featured conversational AI interface component for ASP.NET MVC. Renders prompt/response conversations, supports prompt suggestions, custom views, toolbar customization, file attachments, speech-to-text, and integrates with major AI backends.
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- NuGet installation and namespace setup
- CDN stylesheet and script references
- ScriptManager registration
- Minimal
AIAssistViewrender - Wiring
PromptRequestandaddPromptResponse - Configuring
PromptSuggestionswith matched responses
Assist View Configuration
📄 Read: references/assist-view-config.md
- Setting prompt text (
Promptproperty) - Prompt placeholder text (
PromptPlaceholder) - Pre-loading prompt/response pairs (
Promptscollection) - Rendering markdown responses
- Prompt suggestions and suggestion headers
- Prompter avatar icon (
PromptIconCss) - Responder avatar icon (
ResponseIconCss) - Show/hide clear button (
ShowClearButton) - Scroll-to-bottom indicator (
EnableScrollToBottom)
Appearance
📄 Read: references/appearance.md
- Setting control width (
Widthproperty) - Setting control height (
Heightproperty) - Custom CSS class (
CssClassproperty)
Templates
📄 Read: references/templates.md
- Banner template (
BannerTemplate) — welcome notes, branding - Prompt item template (
PromptItemTemplate) — custom prompt bubbles - Response item template (
ResponseItemTemplate) — custom response bubbles - Prompt suggestion item template (
PromptSuggestionItemTemplate) - Footer template (
FooterTemplate) — fully custom input area
Toolbar Items
📄 Read: references/toolbar-items.md
- Footer toolbar (send, attachment, positioning, custom items, ItemClick)
- Header toolbar items (iconCss, type, text, visible, disabled, tooltip, cssClass, align, tabIndex, template, ItemClicked)
- Built-in prompt toolbar (edit, copy) and response toolbar (copy, like, dislike)
- Custom prompt toolbar items (
PromptToolbarSettings) - Custom response toolbar items (
ResponseToolbarSettings) - Regenerate Responses — enable regenerate button, request alternative AI responses, navigate through multiple responses (
RegeneratedResponsesproperty)
Generative UI
📄 Read: references/generative-ui.md
- Register custom tools (
registerToolUImethod) - Define tool templates and handlers for interactive components
- Add tools to AI responses via
blocksproperty withblockType: 'tool' - Examples: weather cards, recipe builders, interactive forms
- Configure AI system prompt for structured generative UI block responses
- Dynamic tool rendering within conversation context
Chain of Thoughts (Thinking)
📄 Read: references/chain-of-thoughts.md
- Visualize AI reasoning process with thinking blocks
- Define reasoning stages with
blockType: 'thinking'andstagesarray - Stage status options:
completed,inprogress,failed - Add collapsible thinking headers and timeline visualization
- Configure thinking block templates (
blockTemplate,itemTemplate) - Support for inline context items with clickable badges
- Ideal for extended reasoning models (Claude 3.5, GPT-o1, etc.)
Custom Views
📄 Read: references/custom-views.md
- Adding views via
Viewscollection - View type (
AssistvsCustom) - View name, icon (
IconCss), andViewTemplate - Setting active view (
ActiveView)
File Attachments
📄 Read: references/file-attachments.md
- Enabling attachments (
EnableAttachments) - Configuring
AttachmentSettings(SaveUrl, RemoveUrl) - Restricting file types (
AllowedFileType) - File size limit (
MaxFileSize) - Maximum attachment count (
MaximumCount)
Events
📄 Read: references/events.md
Created— after control rendersPromptRequest— when user submits a promptPromptChanged— when prompt text changes- Attachment events:
BeforeAttachmentUpload,AttachmentUploadSuccess,AttachmentUploadFailure,AttachmentRemoved,AttachmentClick
Methods
📄 Read: references/methods.md
addPromptResponse(string)— add response to last promptaddPromptResponse(object)— add new prompt+response pairexecutePrompt(string)— programmatically trigger a prompt
AI Integrations & Speech
📄 Read: references/ai-integrations.md
- Azure OpenAI integration (controller + view wiring)
- Gemini AI integration (
Mscc.GenerativeAINuGet) - Ollama / local LLM integration (
Microsoft.Extensions.AI) - LiteLLM proxy integration (OpenAI-compatible API)
- Speech-to-Text (
SpeechToTextSettings: enable, lang, buttonSettings, tooltipSettings, interimResults, events) - Text-to-Speech (TTS) (
TextToSpeechSettings: language, speechPitch, speechRate, volume, voice; enable viae-assist-audiotoolbar icon) - Streaming response pattern (character-by-character with
marked.js)
Quick Start Example
@using Syncfusion.EJ2.InteractiveChat
@using Newtonsoft.Json
@{
var suggestions = new string[] {
"How do I prioritize my tasks?",
"How can I improve my time management skills?"
};
var prompts = new[]
{
new { prompt = "How do I prioritize my tasks?",
response = "Prioritize tasks by urgency and impact: tackle high-impact tasks first, delegate when possible, and break large tasks into smaller steps.",
suggestionData = new List<string>() }
};
var promptsJson = Html.Raw(JsonConvert.SerializeObject(prompts));
}
<div style="height: 350px; width: 650px;">
@Html.EJS().AIAssistView("aiAssistView")
.PromptSuggestions(suggestions)
.PromptRequest("onPromptRequest")
.Created("onCreated")
.Render()
</div>
<script>
var assistObj;
var prompts = @Html.Raw(promptsJson);
function onCreated() { assistObj = this; }
function onPromptRequest(args) {
setTimeout(function () {
var found = prompts.find(p => p.prompt === args.prompt);
var defaultResponse = 'Connect to your AI service for real-time responses.';
assistObj.addPromptResponse(found ? found.response : defaultResponse);
}, 2000);
}
</script>
Common Patterns
Pattern: Streaming Response with Markdown
// Include marked.js: <script src="https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js"></script>
async function streamResponse(responseText) {
let current = '';
let i = 0;
while (i < responseText.length) {
current += responseText[i++];
if (i % 10 === 0 || i === responseText.length) {
assistObj.addPromptResponse(marked.parse(current), i === responseText.length);
assistObj.scrollToBottom();
}
await new Promise(r => setTimeout(r, 15));
}
}
Pattern: Server-side AI Proxy (controller)
[HttpPost]
public async Task<IActionResult> GetAIResponse([FromBody] PromptRequest request)
{
if (string.IsNullOrEmpty(request?.Prompt))
return BadRequest("Prompt cannot be empty.");
// Call AI provider and return Json(responseText)
}
public class PromptRequest { public string Prompt { get; set; } }
Pattern: Reset conversation on toolbar click
function toolbarItemClicked(args) {
if (args.item.iconCss === 'e-icons e-refresh') {
assistObj.prompts = [];
assistObj.promptSuggestions = suggestions;
}
}
Key Properties at a Glance
| Property | Type | Description |
|---|---|---|
Prompt | string | Pre-set prompt text |
PromptPlaceholder | string | Textarea placeholder (default: "Type prompt for assistance...") |
Prompts | collection | Pre-loaded prompt/response data; supports regeneratedResponses for alternative responses |
PromptSuggestions | string[] | Suggestion chips shown to user |
PromptSuggestionsHeader | string | Header above suggestion chips |
PromptIconCss | string | CSS class for prompter avatar |
ResponseIconCss | string | CSS class for responder avatar (default: e-assistview-icon) |
ShowClearButton | bool | Show clear button in textarea (default: false) |
EnableScrollToBottom | bool | Show scroll-to-bottom icon (default: true) |
Width / Height | string | Control dimensions (default: 100%) |
CssClass | string | Custom CSS class for theming |
ActiveView | int | Zero-based index of active view (default: 0) |
EnableAttachments | bool | Enable file attachment button (default: false) |
ResponseToolbarSettings.Items | collection | Response toolbar buttons; can include e-assist-regenerate (regenerate) and e-assist-audio (text-to-speech) |
TextToSpeechSettings | object | Configure TTS behavior: Language, SpeechPitch, SpeechRate, Volume, Voice |
BlockTemplate | string | Custom template for thinking/tool blocks (generative UI and Chain of Thoughts) |
ItemTemplate | string | Custom template for thinking block stages in timeline |
Key Events
| Event | Trigger |
|---|---|
Created | Control fully rendered |
PromptRequest | User submits a prompt |
PromptChanged | Prompt textarea text changes |
BeforeAttachmentUpload | Before file upload begins |
AttachmentUploadSuccess | File uploaded successfully |
AttachmentUploadFailure | File upload failed |
AttachmentRemoved | Attachment removed |
Key Methods
| Method | Description |
|---|---|
assistObj.addPromptResponse('text') | Add string response to last prompt |
assistObj.addPromptResponse({prompt, response}) | Add new prompt+response pair |
assistObj.executePrompt('text') | Programmatically submit a prompt |
assistObj.scrollToBottom() | Scroll conversation to bottom |
What ships with it: 12 files
131.6 KB alongside SKILL.md
references/
- ai-integrations.md22.6 KB
- appearance.md3.2 KB
- assist-view-config.md10.7 KB
- chain-of-thoughts.md21.8 KB
- custom-views.md5.5 KB
- events.md7.1 KB
- file-attachments.md5.6 KB
- generative-ui.md20.5 KB
- getting-started.md5.5 KB
- methods.md5.7 KB
- templates.md10.5 KB
- toolbar-items.md12.9 KB