Syncfusion Angular AI AssistView Component
Component Overview
The Syncfusion AI AssistView is a powerful Angular component that provides a ready-to-use interface for building conversational AI applications.
Key Capabilities:
- Conversation Management - Manage prompt-response pairs with history, persistence, and markdown rendering
- AI Service Integration - Connect to OpenAI, Gemini, Ollama, Lite-LLM, and MCP providers with streaming support
- Chain of Thoughts - Visualize AI reasoning as collapsible thinking blocks with multi-stage, dynamic status updates via the injectable
AssistThinking module
- Generative UI - Render interactive tools, charts, and custom components within AI responses using
blocks and registerToolUI
- Speech Features - Built-in speech-to-text with 11 configurable properties and 4 events
- Toolbar System - Four toolbar types (header, prompt, response, footer) with custom actions and tag directives
- View Management - Multiple views with programmatic
activeView control and dynamic switching
- Events & Interactions - Typed event arguments (PromptRequestEventArgs, PromptChangedEventArgs, StopRespondingEventArgs)
- File Attachments - Support for file uploads with type/size restrictions and attachment click events
- Templates - Customize prompts, responses, suggestions, and banners with flexible templates
- Methods - Programmatically add/update responses, execute prompts, and control component behavior
- Globalization - Full RTL support and localization for 12+ languages with locale-based formatting
- Customizable UI - Height, width, CSS classes, HTML attributes, and theme customization
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and dependency setup
- Angular environment configuration
- Basic component initialization
- CSS imports and theme configuration
- First working example
Core Features & Conversation Management
📄 Read: references/assist-view-basics.md
- Setting prompt text and placeholders
- Managing prompt-response collections
- Markdown response rendering
- Configuring prompt suggestions
- Customizing user and assistant avatars
- UI controls (clear button, scroll-to-bottom)
- Component configuration (height, width, showHeader, cssClass, htmlAttributes)
- State persistence with
enablePersistence
- Globalization and localization (locale property with 12+ languages)
- RTL support with
enableRtl for Arabic, Hebrew, Persian, Urdu
Appearance & Styling
📄 Read: references/appearance-customization.md
- Setting component width and height
- Applying custom CSS classes
- Theme customization
- Responsive design patterns
Multiple Views & Custom Content
📄 Read: references/custom-views.md
- Adding custom view models
- View types (Assist and Custom)
- View configuration and naming
- Managing multiple views within one component
- Programmatic view switching with
activeView property
- Dynamic view navigation patterns
- View history and breadcrumb navigation
- Workflow-based view switching
- Conditional view display based on user roles
Programmatic Control & Methods
📄 Read: references/methods-and-actions.md
- Adding prompt responses (string and object
- Complete event arguments reference section
- PromptRequestEventArgs with 6 properties (prompt, attachedFiles, promptSuggestions, cancel, etc.)
- PromptChangedEventArgs with 5 properties (value, previousValue, element, event)
- StopRespondingEventArgs for canceling responses
- AttachmentClickEventArgs with FileInfo interface
- Production-ready examples with all event types formats)
- Executing prompts dynamically
- Response handling patterns
- Programmatic interaction
Chain of Thoughts
📄 Read: references/chain-of-thoughts.md
- Enabling reasoning visualization with the injectable
AssistThinking module
- Thinking block configuration (
blocks property, blockType: 'thinking')
- Streaming multi-step reasoning with
addPromptResponse and isFinalUpdate
- Adding stages with the
stages array and ThinkingStage properties
- Stage status indicators (
completed, inprogress, failed)
- Inline context items with
editableContext and {index} placeholders
- Handling the
editableContextClicked event
- Customizing rendering with
blockTemplate and itemTemplate
Generative UI
📄 Read: references/generative-ui.md
- Registering custom tools with
registerToolUI (toolName, template, handler)
- Configuring tool templates and interactive handler functions
- Adding
tool blocks to responses via addPromptResponse (toolName, props)
- Configuring the AI service system prompt to return structured
blocks JSON
- Chaining follow-up prompts with
executePrompt after tool interaction
- Complete production example: recipe builder with custom and chart-based tools
Text to Speech
📄 Read: references/text-to-speech.md
- Enabling built-in Text-to-Speech with the
e-assist-audio response toolbar item
- Reading AI responses aloud via the browser's
SpeechSynthesisUtterance API
- Customizing speech behavior with
textToSpeechSettings (language, speechPitch, speechRate, volume, voice)
Complete documentation for all 4 toolbar types
- Header Toolbar (
toolbarSettings) - Global actions and navigation
- Prompt Toolbar (
promptToolbarSettings) - Actions on user prompts
- Response Toolbar (
responseToolbarSettings) - Actions on AI responses
- Footer Toolbar (
footerToolbarSettings) - Input area customization
- ToolbarItemModel interface with 10 properties
- ToolbarItemClickedEventArgs with dataIndex handling
- Tag directive approach:
<e-toolbarsettings>, <e-toolbaritem>
- Property binding approach for dynamic toolbar items
- Common patterns, best practices, and troubleshootingest, promptChanged)
- File upload events (beforeAttachmentUpload, attachmentUploadSuccess)
- Event handling patterns and best practices
File Attachments
📄 Read: references/file-attachments.md
- File attachment configuration
- Upload handling and validation
- File size and type restrictions
- Attachment display and management
- Custom attachment templates (attachmentTemplate)
Toolbar Configuration
📄 Read: references/toolbar-items.md
- Toolbar customization
- Built-in speech-to-text with
speechToTextSettings (recommended approach)
- SpeechToTextSettingsModel with 11 configurable properties
- ButtonSettingsModel and TooltipSettingsModel interfaces
- 4 speech events: onStart, onStop, transcriptChanged, onError
- Event arguments: StartListeningEventArgs, StopListeningEventArgs, TranscriptChangedEventArgs, ErrorEventArgs
- Language support with 10+ language codes (en-US, es-ES, fr-FR, de-DE, ja-JP, etc.)
- Interim results handling with
allowInterimResults
- Custom Web Speech API implementation (alternative approach)
- Text-to-speech setup and configuration
- Browser compatibility and error handling
- Regenerate responses with
e-assist-regenerate icon, response navigation UI, and the regeneratedResponses property
Templates & Custom Rendering
📄 Read: references/templates.md
- Template system overview
- Prompt templates
- Response templates
- Custom template creation
AI Service Integration
📄 Read: references/ai-integrations.md
- Azure OpenAI integration setup
- Gemini integration
- Lite-LLM integration
- Model Context Protocol (MCP) integration
- Ollama integration
- Security best practices and API management
Speech Features
📄 Read: references/speech-features.md
- Speech-to-text setup and configuration
- Text-to-speech setup and configuration
- Audio handling
- Browser compatibility considerations
Methods (Generative UI)
| Method |
Description |
registerToolUI({ toolName, template, handler }) |
Registers a tool's rendering template and optional interaction handler. Call before referencing the tool in any response. |
executePrompt(prompt) |
Programmatically triggers a new prompt/response cycle, useful for chaining follow-up AI responses after a tool interaction. |
Quick Start Example
Here's a minimal working example to get started:
import { Component } from '@angular/core';
import { AIAssistViewModule } from '@syncfusion/ej2-angular-interactive-chat';
@Component({
imports: [AIAssistViewModule],
standalone: true,
selector: 'app-root',
template: `
<div ejs-aiassistview
id='aiAssistView'
[promptSuggestions]="suggestions"
(promptRequest)="onPromptRequest($event)">
</div>
`,
styles: [`
:host ::ng-deep #aiAssistView {
height: 100vh;
}
`]
})
export class AppComponent {
suggestions = [
'What is Angular?',
'How to create components?',
'Explain dependency injection'
];
onPromptRequest(args: any) {
// Handle prompt and provide response
setTimeout(() => {
const response = 'This is a sample response from your AI service.';
// Add response using component method
}, 1000);
}
}
Common Patterns
Pattern 1: Basic Conversation Flow
- Initialize component with suggestions
- User enters prompt
promptRequest event fires
- Call your AI service
- Use
addPromptResponse() to display result
- Conversation history maintained automatically
Pattern 2: AI Service Integration with Streaming
- Enable streaming with
[enableStreaming]="true"
- Configure AI provider credentials (OpenAI, Gemini, etc.)
- In
promptRequest event, call provider API with streaming
- Use
ReadableStream for chunked responses
- Handle
stopRespondingClick event for cancellation
- Update UI with
addPromptResponse() incrementally
Pattern 3: Custom View Management with activeView
- Define multiple view types (Assist, Custom)
- Use
[activeView]="currentIndex" to control display
- Switch between views programmatically based on user action
- Track view history for back/forward navigation
- Each view can have different configuration
- Maintain separate state per view
Pattern 4: Complete Toolbar Configuration
- Configure header toolbar for global actions (new chat, export, settings)
- Set up prompt toolbar for user prompt actions (edit, copy, retry)
- Add response toolbar for AI response actions (copy, regenerate, like/dislike)
- Configure footer toolbar for input actions (formatting, attachments)
- Use tag directive or property binding approach
- Handle
itemClicked events with dataIndex for context
Pattern 5: Speech-Enabled Interface
- Configure
speechToTextSettings with language and options
- Enable
allowInterimResults for real-time transcription
- Handle speech events:
onStart, onStop, transcriptChanged, onError
- Automatically submit recognized text as prompts
- Provide visual feedback during listening state
Pattern 6: Event-Driven Actions with Typed Arguments
- Use
PromptRequestEventArgs to access prompt, attachedFiles, and cancel flag
- Use
PromptChangedEventArgs for real-time input validation
- Handle
StopRespondingEventArgs to cancel long-running requests
- Use
beforeAttachmentUpload for file validation
- Use
editableContextClicked for inline context badge interactions
Pattern 7: Chain of Thoughts (Reasoning Visualization)
- Inject the
AssistThinking module via AIAssistView.Inject(AssistThinking)
- Push
blocks with blockType: 'thinking' via addPromptResponse, using isFinalUpdate: false while streaming
- Update
stages[].status (inprogress → completed/failed) as reasoning progresses
- Use
editableContext with {index} placeholders for clickable inline references
- Deliver the final
response text alongside the last isFinalUpdate: true call
- Optionally customize rendering with
blockTemplate (full block) or itemTemplate (per-stage)
Pattern 8: Generative UI (Interactive Tools in Responses)
- Register each tool once via
registerToolUI({ toolName, template, handler }), typically in ngAfterViewInit
- Reference registered tools in responses using
blocks: [{ blockType: 'tool', toolName, props }]
- Combine
text and tool blocks in the same blocks array for narrative + interactive content
- Configure the AI system prompt to return a structured
blocks JSON array for dynamic tool invocation
- Use
executePrompt to trigger a follow-up AI response after a user interacts with a rendered tool
- Parse AI-returned JSON defensively and fall back to plain text on malformed output
Key Properties
| Property |
Type |
Default |
When to Use |
prompt |
string |
'' |
Pre-fill prompt text |
promptPlaceholder |
string |
'Type prompt for assistance...' |
Guide user input |
promptSuggestions |
string[] |
[] |
Provide quick starting prompts |
prompts |
object[] |
[] |
Initialize conversation history |
showClearButton |
boolean |
false |
Show button to clear input |
enableScrollToBottom |
boolean |
true |
Show scroll-to-bottom indicator |
blockTemplate |
string | object |
'' |
Customize rendering of thinking blocks |
itemTemplate |
string | object |
'' |
Customize rendering of individual thinking stage items |
Layout & Appearance
| Property |
Type |
Default |
When to Use |
width |
string | number |
'100%' |
Set container width |
height |
string | number |
'100%' |
Set container height |
cssClass |
string |
'' |
Apply custom CSS styling and themes |
showHeader |
boolean |
true |
Control header visibility |
htmlAttributes |
object |
{} |
Add custom HTML attributes (aria-, data-, etc.) |
Streaming & Features
| Property |
Type |
Default |
When to Use |
enableStreaming |
boolean |
false |
Enable real-time streaming responses |
speechToTextSettings |
SpeechToTextSettingsModel |
null |
Configure built-in speech recognition |
textToSpeechSettings |
TextToSpeechSettingsModel |
null |
Configure built-in Text-to-speech support |
activeView |
number |
0 |
Programmatically switch between views |
Globalization
| Property |
Type |
Default |
When to Use |
locale |
string |
'en-US' |
Set language/culture (en-US, es-ES, fr-FR, de-DE, ja-JP, ar-SA, etc.) |
enableRtl |
boolean |
false |
Enable right-to-left text direction (Arabic, Hebrew, Persian, Urdu) |
enablePersistence |
boolean |
false |
Save component state between page reloads |
Toolbar Configuration
| Property |
Type |
Default |
When to Use |
toolbarSettings |
ToolbarSettingsModel |
null |
Configure header toolbar (global actions) |
promptToolbarSettings |
PromptToolbarSettingsModel |
null |
Configure prompt toolbar (edit, copy, retry) |
responseToolbarSettings |
ResponseToolbarSettingsModel |
null |
Configure response toolbar (copy, regenerate, like/dislike) |
footerToolbarSettings |
FooterToolbarSettingsModel |
null |
Configure footer toolbar (formatting, attachments) |
Common Use Cases
- Customer Support Chatbot: Build customer service interfaces with knowledge base integration
- Code Assistant: Create coding helpers with AI that can review and suggest code
- Content Writer Assistant: Implement writing tools with grammar and style suggestions
- Data Analysis Tool: Create interfaces for users to query and analyze data through natural language
- Learning Platform: Build educational assistants that answer student questions
- Internal Knowledge Bot: Create enterprise assistants for company documentation and FAQs
- Multi-language Support: Implement translation and localization features
- Accessibility Assistant: Provide reading aid or instruction assistance
- Reasoning Visualization: Build interfaces that surface AI reasoning via collapsible Chain of Thoughts blocks
- Generative UI Applications: Render interactive tools and charts (cards, gauges, custom widgets) inline within AI responses
1---2name: syncfusion-angular-ai-assistview3description: Implement the Syncfusion Angular AI AssistView component. Use this skill when you need to create conversational AI interfaces, integrate AI services, add chat-like UI, or create intelligent assistant applications. Includes setup, configuration, event handling, AI integrations (OpenAI, Gemini, Ollama), speech features, chain-of-thought reasoning, generative UI tool support, and customization. Use this skill for all AI AssistView component implementation needs.4---56# Syncfusion Angular AI AssistView Component78## Component Overview910The **Syncfusion AI AssistView** is a powerful Angular component that provides a ready-to-use interface for building conversational AI applications.1112**Key Capabilities:**13- **Conversation Management** - Manage prompt-response pairs with history, persistence, and markdown rendering14- **AI Service Integration** - Connect to OpenAI, Gemini, Ollama, Lite-LLM, and MCP providers with streaming support15- **Chain of Thoughts** - Visualize AI reasoning as collapsible thinking blocks with multi-stage, dynamic status updates via the injectable `AssistThinking` module16- **Generative UI** - Render interactive tools, charts, and custom components within AI responses using `blocks` and `registerToolUI`17- **Speech Features** - Built-in speech-to-text with 11 configurable properties and 4 events18- **Toolbar System** - Four toolbar types (header, prompt, response, footer) with custom actions and tag directives19- **View Management** - Multiple views with programmatic `activeView` control and dynamic switching20- **Events & Interactions** - Typed event arguments (PromptRequestEventArgs, PromptChangedEventArgs, StopRespondingEventArgs)21- **File Attachments** - Support for file uploads with type/size restrictions and attachment click events22- **Templates** - Customize prompts, responses, suggestions, and banners with flexible templates23- **Methods** - Programmatically add/update responses, execute prompts, and control component behavior24- **Globalization** - Full RTL support and localization for 12+ languages with locale-based formatting25- **Customizable UI** - Height, width, CSS classes, HTML attributes, and theme customization2627## Documentation and Navigation Guide2829### Getting Started30📄 **Read:** [references/getting-started.md](references/getting-started.md)31- Installation and dependency setup32- Angular environment configuration33- Basic component initialization34- CSS imports and theme configuration35- First working example3637### Core Features & Conversation Management38📄 **Read:** [references/assist-view-basics.md](references/assist-view-basics.md)39- Setting prompt text and placeholders40- Managing prompt-response collections41- Markdown response rendering42- Configuring prompt suggestions43- Customizing user and assistant avatars44- UI controls (clear button, scroll-to-bottom)45- Component configuration (height, width, showHeader, cssClass, htmlAttributes)46- State persistence with `enablePersistence`47- Globalization and localization (locale property with 12+ languages)48- RTL support with `enableRtl` for Arabic, Hebrew, Persian, Urdu4950### Appearance & Styling51📄 **Read:** [references/appearance-customization.md](references/appearance-customization.md)52- Setting component width and height53- Applying custom CSS classes54- Theme customization55- Responsive design patterns5657### Multiple Views & Custom Content58📄 **Read:** [references/custom-views.md](references/custom-views.md)59- Adding custom view models60- View types (Assist and Custom)61- View configuration and naming62- Managing multiple views within one component63- Programmatic view switching with `activeView` property64- Dynamic view navigation patterns65- View history and breadcrumb navigation66- Workflow-based view switching67- Conditional view display based on user roles6869### Programmatic Control & Methods70📄 **Read:** [references/methods-and-actions.md](references/methods-and-actions.md)71- Adding prompt responses (string and object72- Complete event arguments reference section73- PromptRequestEventArgs with 6 properties (prompt, attachedFiles, promptSuggestions, cancel, etc.)74- PromptChangedEventArgs with 5 properties (value, previousValue, element, event)75- StopRespondingEventArgs for canceling responses76- AttachmentClickEventArgs with FileInfo interface77- Production-ready examples with all event types formats)78- Executing prompts dynamically79- Response handling patterns80- Programmatic interaction8182### Chain of Thoughts83📄 **Read:** [references/chain-of-thoughts.md](references/chain-of-thoughts.md)84- Enabling reasoning visualization with the injectable `AssistThinking` module85- Thinking block configuration (`blocks` property, `blockType: 'thinking'`)86- Streaming multi-step reasoning with `addPromptResponse` and `isFinalUpdate`87- Adding stages with the `stages` array and `ThinkingStage` properties88- Stage status indicators (`completed`, `inprogress`, `failed`)89- Inline context items with `editableContext` and `{index}` placeholders90- Handling the `editableContextClicked` event91- Customizing rendering with `blockTemplate` and `itemTemplate`9293### Generative UI94📄 **Read:** [references/generative-ui.md](references/generative-ui.md)95- Registering custom tools with `registerToolUI` (toolName, template, handler)96- Configuring tool templates and interactive handler functions97- Adding `tool` blocks to responses via `addPromptResponse` (`toolName`, `props`)98- Configuring the AI service system prompt to return structured `blocks` JSON99- Chaining follow-up prompts with `executePrompt` after tool interaction100- Complete production example: recipe builder with custom and chart-based tools101102### Text to Speech103📄 **Read:** [references/text-to-speech.md](references/text-to-speech.md)104- Enabling built-in Text-to-Speech with the `e-assist-audio` response toolbar item105- Reading AI responses aloud via the browser's `SpeechSynthesisUtterance` API106- Customizing speech behavior with `textToSpeechSettings` (language, speechPitch, speechRate, volume, voice)107108## Complete documentation for all 4 toolbar types109- Header Toolbar (`toolbarSettings`) - Global actions and navigation110- Prompt Toolbar (`promptToolbarSettings`) - Actions on user prompts111- Response Toolbar (`responseToolbarSettings`) - Actions on AI responses112- Footer Toolbar (`footerToolbarSettings`) - Input area customization113- ToolbarItemModel interface with 10 properties114- ToolbarItemClickedEventArgs with dataIndex handling115- Tag directive approach: `<e-toolbarsettings>`, `<e-toolbaritem>`116- Property binding approach for dynamic toolbar items117- Common patterns, best practices, and troubleshootingest, promptChanged)118- File upload events (beforeAttachmentUpload, attachmentUploadSuccess)119- Event handling patterns and best practices120121### File Attachments122📄 **Read:** [references/file-attachments.md](references/file-attachments.md)123- File attachment configuration124- Upload handling and validation125- File size and type restrictions126- Attachment display and management127- Custom attachment templates (attachmentTemplate)128129### Toolbar Configuration130📄 **Read:** [references/toolbar-items.md](references/toolbar-items.md)131- Toolbar customization132- Built-in speech-to-text with `speechToTextSettings` (recommended approach)133- SpeechToTextSettingsModel with 11 configurable properties134- ButtonSettingsModel and TooltipSettingsModel interfaces135- 4 speech events: onStart, onStop, transcriptChanged, onError136- Event arguments: StartListeningEventArgs, StopListeningEventArgs, TranscriptChangedEventArgs, ErrorEventArgs137- Language support with 10+ language codes (en-US, es-ES, fr-FR, de-DE, ja-JP, etc.)138- Interim results handling with `allowInterimResults`139- Custom Web Speech API implementation (alternative approach)140- Text-to-speech setup and configuration141- Browser compatibility and error handling142- Regenerate responses with `e-assist-regenerate` icon, response navigation UI, and the `regeneratedResponses` property143144### Templates & Custom Rendering145📄 **Read:** [references/templates.md](references/templates.md)146- Template system overview147- Prompt templates148- Response templates149- Custom template creation150151### AI Service Integration152📄 **Read:** [references/ai-integrations.md](references/ai-integrations.md)153- Azure OpenAI integration setup154- Gemini integration155- Lite-LLM integration156- Model Context Protocol (MCP) integration157- Ollama integration158- Security best practices and API management159160### Speech Features161📄 **Read:** [references/speech-features.md](references/speech-features.md)162- Speech-to-text setup and configuration163- Text-to-speech setup and configuration164- Audio handling165- Browser compatibility considerations166167---168169### Methods (Generative UI)170| Method | Description |171|--------|-------------|172| `registerToolUI({ toolName, template, handler })` | Registers a tool's rendering template and optional interaction handler. Call before referencing the tool in any response. |173| `executePrompt(prompt)` | Programmatically triggers a new prompt/response cycle, useful for chaining follow-up AI responses after a tool interaction. |174175---176177## Quick Start Example178179Here's a minimal working example to get started:180181```typescript182import { Component } from '@angular/core';183import { AIAssistViewModule } from '@syncfusion/ej2-angular-interactive-chat';184185@Component({186 imports: [AIAssistViewModule],187 standalone: true,188 selector: 'app-root',189 template: `190 <div ejs-aiassistview 191 id='aiAssistView'192 [promptSuggestions]="suggestions"193 (promptRequest)="onPromptRequest($event)">194 </div>195 `,196 styles: [`197 :host ::ng-deep #aiAssistView {198 height: 100vh;199 }200 `]201})202export class AppComponent {203 suggestions = [204 'What is Angular?',205 'How to create components?',206 'Explain dependency injection'207 ];208209 onPromptRequest(args: any) {210 // Handle prompt and provide response211 setTimeout(() => {212 const response = 'This is a sample response from your AI service.';213 // Add response using component method214 }, 1000);215 }216}217```218219---220221## Common Patterns222223### Pattern 1: Basic Conversation Flow2241. Initialize component with suggestions2252. User enters prompt2263. `promptRequest` event fires2274. Call your AI service2285. Use `addPromptResponse()` to display result2296. Conversation history maintained automatically230231### Pattern 2: AI Service Integration with Streaming2321. Enable streaming with `[enableStreaming]="true"`2332. Configure AI provider credentials (OpenAI, Gemini, etc.)2343. In `promptRequest` event, call provider API with streaming2354. Use `ReadableStream` for chunked responses2365. Handle `stopRespondingClick` event for cancellation2376. Update UI with `addPromptResponse()` incrementally238239### Pattern 3: Custom View Management with activeView2401. Define multiple view types (Assist, Custom)2412. Use `[activeView]="currentIndex"` to control display2423. Switch between views programmatically based on user action2434. Track view history for back/forward navigation2445. Each view can have different configuration2456. Maintain separate state per view246247### Pattern 4: Complete Toolbar Configuration2481. Configure header toolbar for global actions (new chat, export, settings)2492. Set up prompt toolbar for user prompt actions (edit, copy, retry)2503. Add response toolbar for AI response actions (copy, regenerate, like/dislike)2514. Configure footer toolbar for input actions (formatting, attachments)2525. Use tag directive or property binding approach2536. Handle `itemClicked` events with `dataIndex` for context254255### Pattern 5: Speech-Enabled Interface2561. Configure `speechToTextSettings` with language and options2572. Enable `allowInterimResults` for real-time transcription2583. Handle speech events: `onStart`, `onStop`, `transcriptChanged`, `onError`2594. Automatically submit recognized text as prompts2605. Provide visual feedback during listening state261262### Pattern 6: Event-Driven Actions with Typed Arguments2631. Use `PromptRequestEventArgs` to access prompt, attachedFiles, and cancel flag2642. Use `PromptChangedEventArgs` for real-time input validation2653. Handle `StopRespondingEventArgs` to cancel long-running requests2664. Use `beforeAttachmentUpload` for file validation2675. Use `editableContextClicked` for inline context badge interactions268269### Pattern 7: Chain of Thoughts (Reasoning Visualization)2701. Inject the `AssistThinking` module via `AIAssistView.Inject(AssistThinking)`2712. Push `blocks` with `blockType: 'thinking'` via `addPromptResponse`, using `isFinalUpdate: false` while streaming2723. Update `stages[].status` (`inprogress` → `completed`/`failed`) as reasoning progresses2734. Use `editableContext` with `{index}` placeholders for clickable inline references2745. Deliver the final `response` text alongside the last `isFinalUpdate: true` call2756. Optionally customize rendering with `blockTemplate` (full block) or `itemTemplate` (per-stage)276277### Pattern 8: Generative UI (Interactive Tools in Responses)2781. Register each tool once via `registerToolUI({ toolName, template, handler })`, typically in `ngAfterViewInit`2792. Reference registered tools in responses using `blocks: [{ blockType: 'tool', toolName, props }]`2803. Combine `text` and `tool` blocks in the same `blocks` array for narrative + interactive content2814. Configure the AI system prompt to return a structured `blocks` JSON array for dynamic tool invocation2825. Use `executePrompt` to trigger a follow-up AI response after a user interacts with a rendered tool2836. Parse AI-returned JSON defensively and fall back to plain text on malformed output284285---286287## Key Properties288289| Property | Type | Default | When to Use |290|----------|------|---------|------------|291| `prompt` | string | `''` | Pre-fill prompt text |292| `promptPlaceholder` | string | `'Type prompt for assistance...'` | Guide user input |293| `promptSuggestions` | string[] | `[]` | Provide quick starting prompts |294| `prompts` | object[] | `[]` | Initialize conversation history |295| `showClearButton` | boolean | `false` | Show button to clear input |296| `enableScrollToBottom` | boolean | `true` | Show scroll-to-bottom indicator |297| `blockTemplate` | string \| object | `''` | Customize rendering of thinking blocks |298| `itemTemplate` | string \| object | `''` | Customize rendering of individual thinking stage items |299300### Layout & Appearance301| Property | Type | Default | When to Use |302|----------|------|---------|------------|303| `width` | string \| number | `'100%'` | Set container width |304| `height` | string \| number | `'100%'` | Set container height |305| `cssClass` | string | `''` | Apply custom CSS styling and themes |306| `showHeader` | boolean | `true` | Control header visibility |307| `htmlAttributes` | object | `{}` | Add custom HTML attributes (aria-*, data-*, etc.) |308309### Streaming & Features310| Property | Type | Default | When to Use |311|----------|------|---------|------------|312| `enableStreaming` | boolean | `false` | Enable real-time streaming responses |313| `speechToTextSettings` | SpeechToTextSettingsModel | `null` | Configure built-in speech recognition |314| `textToSpeechSettings` | `TextToSpeechSettingsModel` | `null` | Configure built-in Text-to-speech support|315| `activeView` | number | `0` | Programmatically switch between views |316317### Globalization318| Property | Type | Default | When to Use |319|----------|------|---------|------------|320| `locale` | string | `'en-US'` | Set language/culture (en-US, es-ES, fr-FR, de-DE, ja-JP, ar-SA, etc.) |321| `enableRtl` | boolean | `false` | Enable right-to-left text direction (Arabic, Hebrew, Persian, Urdu) |322| `enablePersistence` | boolean | `false` | Save component state between page reloads |323324### Toolbar Configuration325| Property | Type | Default | When to Use |326|----------|------|---------|------------|327| `toolbarSettings` | ToolbarSettingsModel | `null` | Configure header toolbar (global actions) |328| `promptToolbarSettings` | PromptToolbarSettingsModel | `null` | Configure prompt toolbar (edit, copy, retry) |329| `responseToolbarSettings` | ResponseToolbarSettingsModel | `null` | Configure response toolbar (copy, regenerate, like/dislike) |330| `footerToolbarSettings` | FooterToolbarSettingsModel | `null` | Configure footer toolbar (formatting, attachments)331332---333334## Common Use Cases3353361. **Customer Support Chatbot:** Build customer service interfaces with knowledge base integration3372. **Code Assistant:** Create coding helpers with AI that can review and suggest code3383. **Content Writer Assistant:** Implement writing tools with grammar and style suggestions3394. **Data Analysis Tool:** Create interfaces for users to query and analyze data through natural language3405. **Learning Platform:** Build educational assistants that answer student questions3416. **Internal Knowledge Bot:** Create enterprise assistants for company documentation and FAQs3427. **Multi-language Support:** Implement translation and localization features3438. **Accessibility Assistant:** Provide reading aid or instruction assistance3449. **Reasoning Visualization:** Build interfaces that surface AI reasoning via collapsible Chain of Thoughts blocks34510. **Generative UI Applications:** Render interactive tools and charts (cards, gauges, custom widgets) inline within AI responses346347---