Skip to main content

syncfusion-aspnetcore-inline-ai-assist

Implement Syncfusion ASP.NET Core Inline AI Assist control for real-time text processing and AI-powered features. Use this skill when users need intelligent prompt suggestions, AI-assisted content generation, command popups, response actions, or positioning AI assist popups in ASP.NET Core applications.

소스 정보

저장소
syncfusion/aspnetcore-ui-components-skills
최근 소스 활동
2026년 7월 6일 07:20
감지된 SKILL.md 언어
영어
스타
0
포크
2

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
9 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
syncfusion-aspnetcore-inline-ai-assist
description
Implement Syncfusion ASP.NET Core Inline AI Assist control for real-time text processing and AI-powered features. Use this skill when users need intelligent prompt suggestions, AI-assisted content generation, command popups, response actions, or positioning AI assist popups in ASP.NET Core applications.
metadata
{"author":"Syncfusion Inc","version":"34.1.29"}
# Syncfusion ASP.NET Core Inline AI Assist Control ## Overview The Inline AI Assist is a Syncfusion ASP.NET Core control that provides intelligent text processing capabilities with: - **Real-time prompt processing** connected to AI services (OpenAI, Azure Cognitive Services) - **Multiple response modes**: Inline (in-place updates) or Popup (floating dialog) - **Command popups** with built-in and custom command items - **Response action items** for user feedback and content acceptance - **Event lifecycle**: created, promptRequest, open, close - **Public methods**: addResponse, executePrompt, showPopup, hidePopup, showCommandPopup, hideCommandPopup - **Template support**: Custom editor templates and response templates - **Globalization**: Localization (L10n) and RTL support ## Documentation Navigation Guide ### Getting Started 📄 **Read:** [references/getting-started.md](references/getting-started.md) - Prerequisites and system requirements - ASP.NET Core project setup with Razor pages - NuGet package installation (Syncfusion.EJ2.AspNet.Core) - Tag helper configuration in _ViewImports.cshtml - Script and stylesheet resources setup - Basic control rendering and first run ### Positioning and Response Modes 📄 **Read:** [references/positioning-and-modes.md](references/positioning-and-modes.md) - Configure relateTo property (position relative to elements) - Configure target property (where control appends) - ResponseMode property: Inline vs Popup modes - Dynamic mode switching - Complete positioning examples with use cases ### Command Configuration 📄 **Read:** [references/command-configuration.md](references/command-configuration.md) - CommandSettings and command items - Command properties (id, label, prompt, iconCss, disabled, groupBy, tooltip) - PopupWidth and PopupHeight configuration - Command grouping and organization - ItemSelect event handling - Advanced command scenarios ### Events and Handlers 📄 **Read:** [references/events-and-handlers.md](references/events-and-handlers.md) - created event (control rendering completion) - promptRequest event (with async handling) - open event (popup opened) - close event (popup closed) - Event flow and lifecycle - Best practices for event handlers ### Public Methods and APIs 📄 **Read:** [references/methods-and-apis.md](references/methods-and-apis.md) - addResponse() - Add response programmatically - executePrompt() - Execute prompt dynamically - showPopup() - Open popup with optional positioning - hidePopup() - Close popup - showCommandPopup() - Show command menu - hideCommandPopup() - Hide command menu ### Inline Assist Features 📄 **Read:** [references/inline-assist-features.md](references/inline-assist-features.md) - Prompt property configuration - Prompts collection (history management) - Placeholder text customization - Z-index property - Popup width and height configuration - CssClass for custom styling - Managing prompt-response collections ### Response Settings and Templates 📄 **Read:** [references/response-settings-templates.md](references/response-settings-templates.md) - ResponseSettings configuration - Built-in response items (accept/reject) - Custom response items and grouping - EditorTemplate for footer customization - ResponseTemplate for response items - Template syntax and context variables - ItemSelect event handling ### Advanced Features 📄 **Read:** [references/advanced-features.md](references/advanced-features.md) - Public methods (addResponse, executePrompt, showPopup, hidePopup, showCommandPopup, hideCommandPopup) - Inline toolbar settings and positioning - Toolbar items (type, text, iconCss, alignment, tooltip) - TabIndex for keyboard navigation - Globalization: L10n and localization - RTL (enableRtl property) - Accessibility features ## Quick Start Example ```razor @using Syncfusion.EJ2.InteractiveChat; <style> #editableText { width: 100%; min-height: 120px; max-height: 300px; overflow-y: auto; font-size: 16px; padding: 12px; border-radius: 4px; border: 1px solid; } </style> <div class="container" style="height: 350px; width: 650px;"> <button id="summarizeBtn" class="e-btn e-primary" onclick="onSummarizeClick()">Summarize</button> <div id="editableText" contenteditable="true"> <p>Add your content here for AI processing...</p> </div> <ejs-inlineaiassist id="defaultInlineAssist" relateTo="#summarizeBtn" created="onCreated" promptRequest="onPromptRequest"> <e-inlineaiassist-responsesettings itemSelect="onItemSelect"></e-inlineaiassist-responsesettings> </ejs-inlineaiassist> </div> <script> var inlineAssist; function onCreated() { inlineAssist = this; } function onPromptRequest(args) { setTimeout(function () { var response = 'Connect to your AI service for real processing...'; inlineAssist.addResponse(response); }, 1000); } function onItemSelect(args) { if (args.command.label === 'Accept') { document.getElementById('editableText').innerHTML = '<p>' + inlineAssist.prompts[inlineAssist.prompts.length - 1].response + '</p>'; inlineAssist.hidePopup(); } } function onSummarizeClick() { if (inlineAssist) { inlineAssist.showPopup(); } } </script> ``` ## Common Patterns ### 1. Setup Inline vs Popup Modes ```razor <!-- Popup mode (default) --> <ejs-inlineaiassist id="assist1" responseMode="Popup" relateTo="#btn"></ejs-inlineaiassist> <!-- Inline mode (updates content in-place) --> <ejs-inlineaiassist id="assist2" responseMode="Inline" relateTo="#btn"></ejs-inlineaiassist> ``` ### 2. Add Command Popups ```razor <ejs-inlineaiassist id="assist3" relateTo="#btn"> <e-inlineaiassist-commandsettings commands="commandsData" popupWidth="250px" popupHeight="200px" itemSelect="onCommandSelect"> </e-inlineaiassist-commandsettings> </ejs-inlineaiassist> ``` ### 3. Handle Events ```razor <ejs-inlineaiassist id="assist4" created="onCreated" promptRequest="onPromptRequest" open="onOpen" close="onClose"> </ejs-inlineaiassist> ``` ### 4. Use Public Methods ```javascript // Show popup at current position inlineAssist.showPopup(); // Execute prompt dynamically inlineAssist.executePrompt('Your prompt text'); // Add response programmatically inlineAssist.addResponse('Response text'); // Hide popup inlineAssist.hidePopup(); ``` ## Key Props | Property | Purpose | Example | |----------|---------|---------| | `relateTo` | Position control relative to DOM element | `relateTo="#btn"` or `relateTo=".container"` | | `target` | Specify where control appends in DOM | `target="#container"` | | `responseMode` | Display mode for responses | `responseMode="Popup"` or `"Inline"` | | `prompt` | Default prompt text | `prompt="What are benefits?"` | | `popupWidth` | Control width | `popupWidth="400px"` | | `popupHeight` | Control height | `popupHeight="auto"` | | `placeholder` | Textarea placeholder text | `placeholder="Type prompt here..."` | | `zIndex` | Stacking context | `zIndex="4000"` | | `enableRtl` | Right-to-left layout | `enableRtl="true"` | | `locale` | Localization language | `locale="de"` | | `cssClass` | Custom CSS class | `cssClass="custom-class"` | ## Common Use Cases 1. **Content Summarization Tool** - Place button near text editor - Use Popup mode for full interface - Add Accept/Reject response items - Connect promptRequest to summarization API 2. **Inline Text Suggestions** - Use Inline mode for in-place updates - Minimal UI footprint - Quick acceptance workflow - Stream responses for real-time feedback 3. **Multi-Command Workflow** - Show command popup for quick actions - Group commands by category (Improve, Edit) - Handle each command's promptRequest differently - Dynamic response handling per command 4. **Accessibility-Focused Implementation** - Enable RTL for Arabic/Hebrew content - Use localization for multiple languages - Configure tab navigation with tabIndex - Use semantic templates ---
GitHub에서 보기