/syncfusion-javascript:syncfusion-javascript-ai-assistviewfrom Syncfusion JavaScript UI Controls
Implement the Syncfusion JavaScript AI AssistView control (ej2-interactive-chat). Use this skill for AI assistant and AI chat UIs, prompt-response interfaces, AI integration (OpenAI, Gemini, Ollama, LiteLLM, MCP), chat toolbars, file attachments, speech-to-text, text-to-speech, custom AI views, prompt suggestions, markdown responses, chain of thoughts and thinking blocks (AssistThinking), generative UI and interactive tool cards (registerToolUI), telemetry (telemetrySettings, token usage, duration and tool call metrics), mentions (mentionChar, mention popup, filtering, templates, mentionSelect), response animation and templates, loading indicators, or any interactive AI assistant interface.
Ships in Syncfusion JavaScript UI Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The AI AssistView is an interactive chat component designed for building AI-powered conversational interfaces with support for prompts, responses, suggestions, custom toolbars, file attachments, speech features, and AI service integrations.
The AI AssistView component provides:
AssistThinking moduleblocks and registerToolUIe-assist-regenerate toolbar item, with automatic previous/next navigation between saved responses (regeneratedResponses)status, duration, toolCalls, streamingChunks, model, inputTokens, outputTokens, totalTokens, reasoningTokens, cachedInputTokens, plus custom attributes) and renders a per-response toolbar button with a hover tooltip report, fully configurable via telemetrySettings (enable, metrics, beforeReport)@ or /) backed by a local or remote data source (DataManager), with configurable fields, query, filterType (Contains/StartsWith/EndsWith), match highlighting, popup dimensions, and custom item/display/no-records templates; select an item via the mentionSelect eventresponseAnimationTemplate property (string or function returning HTML), and visible until addPromptResponse is called and any Promise returned by promptRequest resolves📄 Read: references/getting-started.md
@syncfusion/ej2-interactive-chat)promptRequest event handling for AI integration📄 Read: references/assist-view-configuration.md
prompt, promptPlaceholder)promptIconCss, responseIconCss)prompts property with PromptModel[])promptSuggestions, promptSuggestionsHeader)showClearButton, showHeader)enableScrollToBottom)enableStreaming)📄 Read: references/ai-integrations.md
promptRequest event best practices📄 Read: references/chain-of-thoughts.md
AssistThinking module (AIAssistView.Inject(AssistThinking))thinking, text, tool blocks within the blocks arrayblockType, title, content, isActive, collapsed, collapsible, stages)ThinkingStage) with Timeline-based renderingcompleted, inprogress, failed) for streaming reasoning progresseditableContext, ThinkingContextItem) with {index} placeholderseditableContextClicked eventblockTemplate) and stage item rendering (itemTemplate)📄 Read: references/generative-ui.md
registerToolUI({ toolName, template, handler? })tool blocks (blockType: 'tool', toolName, props) to responses via addPromptResponsetext and tool blocks in a single responseblocks JSON for generative UIexecutePrompt📄 Read: references/toolbar-configuration.md
toolbarSettings)footerToolbarSettings, toolbar positioning: Inline/Bottom)responseToolbarSettings, like/dislike/copy/refresh)promptToolbarSettings)ToolbarItemClickedEventArgs)e-assist-regenerate response toolbar itemregeneratedResponses (PromptModel) and the automatic previous/next navigation UI📄 Read: references/custom-views.md
views property with AssistViewModel[])AssistViewType enum)name, iconCss)viewTemplate for custom content)activeView property)📄 Read: references/templates.md
bannerTemplate)promptItemTemplate)responseItemTemplate)promptSuggestionItemTemplate)footerTemplate)📄 Read: references/file-attachments.md
enableAttachments)attachmentSettings with allowed types, size limits, max count)PromptModel.attachedFiles)📄 Read: references/speech-to-text.md
speechToTextSettings)📄 Read: references/text-to-speech.md
e-assist-audio response toolbar itemtextToSpeechSettings)language, speechPitch, speechRate, volume, voice, and inputTextSpeechSynthesisUtterance interface📄 Read: references/appearance.md
cssClass)enableRtl)📄 Read: references/methods-and-events.md
addPromptResponse() (with optional TelemetryData second argument), executePrompt(), scrollToBottom(), refresh()created, promptRequest, promptChanged, stopRespondingClickbeforeAttachmentUpload, attachmentUploadSuccess,attachmentUploadFailure, attachmentRemoving (pre-removal hook), attachmentRemoved, attachmentClick📄 Read: references/telemetry.md
telemetrySettings.enabletelemetrySettings.metrics and the TelemetryMetric type (status, duration, toolCalls, streamingChunks, model, inputTokens, outputTokens, totalTokens, reasoningTokens, cachedInputTokens); array order sets tooltip display ordertelemetrySettings.beforeReport event with TelemetryReportTelemetryData parameter of addPromptResponse (model, inputTokens, outputTokens, reasoningTokens, cachedInputTokens, customAttributes)region, tenant, sessionId, feature, etc.) as their own rows in the tooltiptotalTokens, metrics filter precedence, regenerate flow📄 Read: references/mentions.md
mentionChar, e.g. @ or /) via the mentions arrayDataManager (local/remote)fields.text, fields.value, fields.iconCss) and additional data operations (query)filterType (Contains/StartsWith/EndsWith) and highlightshowMentionChar and displayTemplatepopupWidth, popupHeight, itemTemplate, and noRecordsTemplatementionSelect eventimport { AIAssistView, PromptRequestEventArgs } from '@syncfusion/ej2-interactive-chat';
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
// Initialize AI AssistView
const aiAssistView: AIAssistView = new AIAssistView({
promptSuggestions: [
'How do I get started?',
'What are the key features?'
],
promptRequest: (args: PromptRequestEventArgs) => {
// Handle prompt request - integrate with AI service here
setTimeout(() => {
const response = 'This is the AI response to: ' + args.prompt;
aiAssistView.addPromptResponse(response);
}, 1000);
}
});
// Render to DOM
aiAssistView.appendTo('#aiAssistView');
<!DOCTYPE html>
<html lang="en">
<head>
<title>AI AssistView</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Syncfusion CSS -->
<link href="https://cdn.syncfusion.com/ej2/32.1.19/fluent2.css" rel="stylesheet" />
</head>
<body>
<div id='container' style="height: 400px; width: 700px;">
<div id="aiAssistView"></div>
</div>
</body>
</html>
@import "../../node_modules/@syncfusion/ej2-fluent2-theme/styles/ai-assistview/index.css";
const aiAssistView: AIAssistView = new AIAssistView({
promptSuggestions: ['Explain AI', 'Code example', 'Best practices'],
promptRequest: async (args: PromptRequestEventArgs) => {
try {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${OPENAI_API_KEY}`
},
body: JSON.stringify({
model: 'gpt-4',
messages: [{ role: 'user', content: args.prompt }]
})
});
const data = await response.json();
const aiResponse = data.choices[0].message.content;
aiAssistView.addPromptResponse(aiResponse);
} catch (error) {
aiAssistView.addPromptResponse('Error: ' + error.message);
}
}
});
const aiAssistView: AIAssistView = new AIAssistView({
enableStreaming: true,
promptRequest: (args: PromptRequestEventArgs) => {
// Simulate streaming response
const markdownResponse = `# Response\n\nThis is **bold** and *italic* text.\n\n- Item 1\n- Item 2\n\`\`\`javascript\nconst x = 10;\n\`\`\``;
let index = 0;
const interval = setInterval(() => {
if (index < markdownResponse.length) {
const chunk = markdownResponse.slice(0, index + 5);
aiAssistView.addPromptResponse(chunk, false);
index += 5;
} else {
clearInterval(interval);
aiAssistView.addPromptResponse(markdownResponse, true);
}
}, 50);
}
});
const aiAssistView: AIAssistView = new AIAssistView({
responseToolbarSettings: {
items: [
{ type: 'Button', iconCss: 'e-icons e-copy', tooltip: 'Copy' },
{ type: 'Button', iconCss: 'e-icons e-assist-like', tooltip: 'Like' },
{ type: 'Button', iconCss: 'e-icons e-assist-dislike', tooltip: 'Dislike' }
],
itemClicked: (args: ToolbarItemClickedEventArgs) => {
if (args.item.iconCss.includes('copy')) {
// Copy response to clipboard
const responseText = aiAssistView.prompts[args.dataIndex].response;
navigator.clipboard.writeText(responseText);
} else if (args.item.iconCss.includes('like')) {
console.log('User liked the response');
}
}
}
});
import { AIAssistView, AssistThinking, PromptRequestEventArgs } from '@syncfusion/ej2-interactive-chat';
AIAssistView.Inject(AssistThinking);
const aiAssistView: AIAssistView = new AIAssistView({
promptRequest: (args: PromptRequestEventArgs) => {
// Show an in-progress reasoning stage first
aiAssistView.addPromptResponse({
blocks: [{
blockType: 'thinking',
title: 'Understanding your request',
isActive: true,
collapsed: false,
stages: [
{ id: 'step1', status: 'inprogress', content: 'Analyzing the request…' }
]
}]
}, false); // isFinalUpdate: false while streaming
// Later, mark the stage complete and append the final response
setTimeout(() => {
aiAssistView.addPromptResponse({
blocks: [{
blockType: 'thinking',
title: 'Understanding your request',
isActive: false,
collapsed: true,
stages: [
{ id: 'step1', status: 'completed', content: 'Analyzed the request.' }
]
}],
response: 'Here is the final answer based on my reasoning.'
}, true); // isFinalUpdate: true
}, 1000);
}
});
import { AIAssistView } from '@syncfusion/ej2-interactive-chat';
const aiAssistView: AIAssistView = new AIAssistView({
promptRequest: onPromptRequest
});
// Register a tool BEFORE it's referenced in any response; toolName must be unique
aiAssistView.registerToolUI({
toolName: 'weather-card',
template: (props: any) => `
<div class="e-card">
<div class="e-card-header-title">${props.location}</div>
<div class="e-card-sub-title">${props.temperature}</div>
</div>
`
});
function onPromptRequest(args: any) {
setTimeout(() => {
// Mix text and tool blocks in a single response
aiAssistView.addPromptResponse({
blocks: [
{ blockType: 'text', content: 'Here is the forecast:' },
{ blockType: 'tool', toolName: 'weather-card', props: { location: 'New York', temperature: '1°C / -4°C' } }
]
});
}, 1000);
}
aiAssistView.appendTo('#aiAssistView');
const aiAssistView: AIAssistView = new AIAssistView({
enableAttachments: true,
attachmentSettings: {
allowedFileTypes: '.pdf,.docx,.txt,.jpg,.png',
maxFileSize: 5242880, // 5MB
maximumCount: 3,
saveUrl: 'https://your-api.com/upload',
removeUrl: 'https://your-api.com/remove'
},
promptRequest: (args: PromptRequestEventArgs) => {
console.log('Attached files:', args.attachedFiles);
// Process prompt with attached files
aiAssistView.addPromptResponse('Received your prompt with attachments');
}
});
import { AIAssistView, PromptRequestEventArgs, PromptModel } from '@syncfusion/ej2-interactive-chat';
let promptsData: PromptModel[] = [
{ prompt: "What is AI?", response: "AI stands for Artificial Intelligence..." }
];
const regenerateResponses: string[] = [
"AI, or Artificial Intelligence, refers to the simulation of human intelligence in machines.",
"Artificial Intelligence is the development of computer systems that perform human-like tasks."
];
const aiAssistView: AIAssistView = new AIAssistView({
prompts: promptsData,
responseToolbarSettings: {
// e-assist-regenerate enables the built-in regenerate button
items: [
{ type: 'Button', iconCss: 'e-icons e-assist-copy', tooltip: 'Copy' },
{ type: 'Button', iconCss: 'e-icons e-assist-regenerate', tooltip: 'Regenerate' }
]
},
promptRequest: (args: PromptRequestEventArgs) => {
// Regenerate re-fires promptRequest with the existing prompt text
setTimeout(() => {
const response = regenerateResponses[Math.floor(Math.random() * regenerateResponses.length)];
aiAssistView.addPromptResponse(response);
}, 1000);
}
});
import { AIAssistView, PromptRequestEventArgs, PromptModel } from '@syncfusion/ej2-interactive-chat';
const promptsData: PromptModel[] = [
{ prompt: "What is AI?", response: "AI stands for Artificial Intelligence..." }
];
const aiAssistView: AIAssistView = new AIAssistView({
prompts: promptsData,
responseToolbarSettings: {
// e-assist-audio enables the built-in Read Aloud button
items: [
{ type: 'Button', iconCss: 'e-icons e-assist-audio', tooltip: 'Read Aloud' },
{ type: 'Button', iconCss: 'e-icons e-assist-like', tooltip: 'Like' }
]
},
textToSpeechSettings: {
language: 'en-US',
speechPitch: 1,
speechRate: 1,
volume: 1
},
promptRequest: (args: PromptRequestEventArgs) => {
setTimeout(() => {
aiAssistView.addPromptResponse('This response can be read aloud via the toolbar.');
}, 1000);
}
});
import { AIAssistView, PromptRequestEventArgs, TelemetryData, TelemetryMetric } from '@syncfusion/ej2-interactive-chat';
// Enable telemetry and limit the report to a specific set/order of metrics
const aiAssistView: AIAssistView = new AIAssistView({
promptSuggestions: [
'How do I set achievable goals at work?',
'Why do people fly in their dreams?'
],
telemetrySettings: {
enable: true,
metrics: ['status', 'duration', 'model', 'inputTokens', 'outputTokens', 'totalTokens'] as TelemetryMetric[]
},
promptRequest: (args: PromptRequestEventArgs) => {
setTimeout(() => {
const defaultResponse = 'For real-time prompt processing, connect the AIAssistView component to your preferred AI service.';
// Attach AI usage details via the TelemetryData argument of addPromptResponse
const telemetryData: TelemetryData = {
model: 'gpt-4o',
inputTokens: 128,
outputTokens: 512,
customAttributes: { region: 'us-east-1', tenant: 'acme' }
};
aiAssistView.addPromptResponse(defaultResponse, true, telemetryData);
}, 1000);
}
});
aiAssistView.appendTo('#aiAssistView');
beforeReportimport { AIAssistView, PromptRequestEventArgs, TelemetryReport } from '@syncfusion/ej2-interactive-chat';
const aiAssistView: AIAssistView = new AIAssistView({
promptSuggestions: [
'How do I set achievable goals at work?',
'Why do people fly in their dreams?'
],
telemetrySettings: {
enable: true,
// Return the report (modified or not) to deliver it, or null to suppress it
beforeReport: (report: TelemetryReport): TelemetryReport | null => {
report.customAttributes = { region: 'us-east-1', tenant: 'acme', beta: true };
return report;
}
},
promptRequest: (args: PromptRequestEventArgs) => {
setTimeout(() => {
aiAssistView.addPromptResponse('Response with custom telemetry attributes.');
}, 1000);
}
});
aiAssistView.appendTo('#aiAssistView');
import { AIAssistView, PromptRequestEventArgs } from '@syncfusion/ej2-interactive-chat';
const agents: any[] = [
{ id: 'TechSupport', name: 'TechSupport' },
{ id: 'HRAssistant', name: 'HRAssistant' },
{ id: 'KnowledgeBase', name: 'KnowledgeBase' }
];
const aiAssistView: AIAssistView = new AIAssistView({
promptPlaceholder: "Type '@' to mention an agent...",
mentions: [
{
mentionChar: '@',
dataSource: agents,
fields: { text: 'name', value: 'id' },
filterType: 'StartsWith',
highlight: true,
popupWidth: '250px',
popupHeight: '200px'
}
],
promptRequest: (args: PromptRequestEventArgs) => {
setTimeout(() => {
aiAssistView.addPromptResponse('Processed mention from prompt: ' + args.prompt);
}, 1000);
}
});
aiAssistView.appendTo('#aiAssistView');
import { AIAssistView } from '@syncfusion/ej2-interactive-chat';
const agents: any[] = [
{ id: 'TechSupport', name: 'TechSupport', iconCss: 'e-icons e-comment-status' },
{ id: 'HRAssistant', name: 'HRAssistant', iconCss: 'e-icons e-people' }
];
const commands: any[] = [
{ id: 'table', name: '/table', description: 'Answer as a markdown table' },
{ id: 'rewrite', name: '/rewrite', description: 'Rewrite for clarity' }
];
const aiAssistView: AIAssistView = new AIAssistView({
promptPlaceholder: "Type '@' for agents or '/' for commands...",
mentions: [
{
mentionChar: '@',
dataSource: agents,
fields: { text: 'name', value: 'id', iconCss: 'iconCss' }
},
{
mentionChar: '/',
dataSource: commands,
showMentionChar: false,
fields: { text: 'name', value: 'id' },
itemTemplate:
'<div class="listItems">' +
'<span class="commandName">${name}</span>' +
'<span class="commandDesc">${description}</span>' +
'</div>'
}
],
promptRequest: () => {
setTimeout(() => aiAssistView.addPromptResponse('Mention processed.'), 1000);
}
});
aiAssistView.appendTo('#aiAssistView');
import { AIAssistView, PromptRequestEventArgs } from '@syncfusion/ej2-interactive-chat';
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
const aiAssistView: AIAssistView = new AIAssistView({
responseAnimationTemplate: responseAnimationContent,
// Returning a Promise keeps the animation visible until the response is added
promptRequest: (args: PromptRequestEventArgs) => {
return new Promise<void>((resolve: () => void) => {
setTimeout(() => {
const defaultResponse = 'For real-time prompt processing, connect the AIAssistView component to your preferred AI service, such as OpenAI or Azure Cognitive Services.';
aiAssistView.addPromptResponse(defaultResponse);
resolve();
}, 2000);
});
}
});
aiAssistView.appendTo('#aiAssistView');
function responseAnimationContent() {
return `<div class="assistview-loading-status">
<div class="assistview-grid-icon">
<span></span><span></span><span></span>
<span></span><span></span><span></span>
<span></span><span></span><span></span>
</div>
<span class="assistview-loading-label">Generating</span>
</div>`;
}
import { AIAssistView } from '@syncfusion/ej2-interactive-chat';
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
// Use the `align` property on a toolbar item to position it within the toolbar
// (supported values: 'Left', 'Center', 'Right'; default is 'Left').
const aiAssistView: AIAssistView = new AIAssistView({
toolbarSettings: {
items: [ { iconCss: 'e-icons e-refresh', align: 'Right' } ],
},
promptRequest: () => {
setTimeout(() => {
aiAssistView.addPromptResponse('For real-time prompt processing, connect the AIAssistView component to your preferred AI service, such as OpenAI or Azure Cognitive Services.');
}, 1000);
}
});
aiAssistView.appendTo('#aiAssistView');
| Property | Type | Description |
|---|---|---|
prompts | PromptModel[] | Collection of prompt-response pairs |
promptSuggestions | string[] | Array of suggested prompts |
promptRequest | Event | Event triggered when user submits a prompt |
enableStreaming | boolean | Enable response streaming |
enableAttachments | boolean | Enable file attachment functionality |
views | AssistViewModel[] | Custom view configurations |
toolbarSettings | ToolbarSettingsModel | Header toolbar configuration |
footerToolbarSettings | FooterToolbarSettingsModel | Footer toolbar configuration |
responseToolbarSettings | ResponseToolbarSettingsModel | Response toolbar configuration |
promptToolbarSettings | PromptToolbarSettingsModel | Prompt toolbar configuration |
bannerTemplate | string | Function | Custom banner template |
promptItemTemplate | string | Function | Custom prompt item template |
responseItemTemplate | string | Function | Custom response item template |
responseAnimationTemplate | string | Function | Custom loading indicator or animation shown while a response is being generated; visible until addPromptResponse is called and any Promise returned by promptRequest resolves |
speechToTextSettings | SpeechToTextSettingsModel | Speech-to-text configuration |
textToSpeechSettings | TextToSpeechSettingsModel | Text-to-speech configuration (language, speechPitch, speechRate, volume, voice, inputText) |
blockTemplate | string | Function | Custom template for rendering thinking blocks |
itemTemplate | string | Function | Custom template for individual thinking stage items |
editableContextClicked | Event | Triggered when a clickable inline context badge is clicked |
registerToolUI | Method | Registers a generative UI tool (toolName, template, optional handler) so it can be rendered via a tool block |
telemetrySettings | TelemetrySettingsModel | Configures AI interaction telemetry (enable, metrics, beforeReport) and renders a built-in telemetry button with a hover tooltip report per response |
addPromptResponse(response, isFinalUpdate?, telemetryData?) | Method | Adds a response; when telemetry is enabled, an optional TelemetryData argument supplies model, inputTokens, outputTokens, reasoningTokens, cachedInputTokens, and customAttributes for the report |
mentions | MentionSettingsModel[] | Configures mention support in the prompt editor: mentionChar, dataSource, fields, query, filterType, highlight, showMentionChar, popupWidth, popupHeight, displayTemplate, itemTemplate, noRecordsTemplate |
mentionSelect | Event | Triggered when a user selects an item from the mention suggestion popup (event args expose the selected itemData) |
references/ai-integrations.md (opens in a new tab)references/appearance.md (opens in a new tab)references/assist-view-configuration.md (opens in a new tab)references/chain-of-thoughts.md (opens in a new tab)references/custom-views.md (opens in a new tab)references/file-attachments.md (opens in a new tab)references/generative-ui.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/mentions.md (opens in a new tab)references/methods-and-events.md (opens in a new tab)references/speech-to-text.md (opens in a new tab)references/telemetry.md (opens in a new tab)references/templates.md (opens in a new tab)references/text-to-speech.md (opens in a new tab)references/toolbar-configuration.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-javascriptOther plugins' skills for the same job
67 skills in this plugin
/syncfusion-javascript-3d-chartCreate interactive 3D charts in Syncfusion TypeScript and JavaScript. Immediately use this skill when user needs to build 3D visualizations, render 3D column/bar charts, configure 3D rotation and depth, visualize data in three dimensions, customize 3D chart appearance, handle 3D interactions, or implement advanced 3D features. Works with TypeScript (webpack/module-based) and JavaScript (CDN/ES5)./syncfusion-javascript-accordionBuild collapsible navigation panels with the Syncfusion TypeScript Accordion component. Use this skill when implementing vertical accordion menus, expanding/collapsing content panels, multi-step wizards, data-driven panels with dynamic content, tabbed navigation alternatives, or nested hierarchical content structures. Covers initialization, expand modes, animations, icons, templates, styling, data binding, and advanced use cases like form wizards./syncfusion-javascript-accumulation-chartImplements Syncfusion JavaScript accumulation charts (Pie, Doughnut, Funnel, Pyramid) for proportional and percentage-based visualizations. Use when displaying categorical or proportional data. Covers legend and label configuration, interactivity, accessibility, and customization. Works with TypeScript (modules) and JavaScript (CDN/ES5).