When to use this skill
ALWAYS use this skill when the user mentions:
- "MateChat Angular", "MateChat NG", "matechat-ng", "@matechat/ng"
- Building AI chat interfaces with Angular
- Using Angular chat UI components like Bubble, Input, Prompt, Layout, Markdown, etc.
- "MateChat Angular components", "AI chat UI", "AI Agent UI"
- Requests to "implement a [component] with MateChat Angular"
- Requests for MateChat Angular component API or configuration
- Building conversational AI interfaces with Angular
How to use this skill
This skill is organized to provide comprehensive guidance for MateChat Angular components, with automatic documentation updates.
1. Identify the User's Need
- Component Usage → See Component Categories below
- API Reference →
references/components/<component>/api.md - Demo Examples →
references/components/<component>/demo.md - Use Guide →
references/use-guide/(installation, configuration, themes, etc.)
2. Component Categories
Conversation Components
- Bubble - Bubble component, used to carry conversation content
- API:
references/components/bubble/api.md - Demo:
references/components/bubble/demo.md
- API:
Input Components
- Input - Input component, used for user message input
- API:
references/components/input/api.md - Demo:
references/components/input/demo.md
- API:
- Mention - Mention component, supports @mention functionality
- API:
references/components/mention/api.md - Demo:
references/components/mention/demo.md
- API:
Layout Components
- Layout - Layout component, provides overall page layout
- API:
references/components/layout/api.md - Demo:
references/components/layout/demo.md
- API:
- Header - Header component
- API:
references/components/header/api.md - Demo:
references/components/header/demo.md
- API:
Functional Components
- Prompt - Prompt component, used for quick prompts
- API:
references/components/prompt/api.md - Demo:
references/components/prompt/demo.md
- API:
- List - List component, used to display the conversation list
- API:
references/components/list/api.md - Demo:
references/components/list/demo.md
- API:
- Toolbar - Toolbar component
- API:
references/components/toolbar/api.md - Demo:
references/components/toolbar/demo.md
- API:
File Components
- Attachment - Attachment component, used for file upload
- API:
references/components/attachment/api.md - Demo:
references/components/attachment/demo.md
- API:
Display Components
- MarkdownCard - Markdown card component, used to render Markdown content
- API:
references/components/markdownCard/api.md - Demo:
references/components/markdownCard/demo.md
- API:
- Introduction - Introduction component
- API:
references/components/introduction/api.md - Demo:
references/components/introduction/demo.md
- API:
3. Use Guide Documentation
The references/use-guide/ directory contains comprehensive guides for using MateChat Angular:
Getting Started
- introduction.md - Introduction to MateChat Angular quick start guide, include installation etc.
To use guide documentation:
- Identify the topic from the user's request
- Load the corresponding guide file from
references/use-guide/ - Follow the instructions and best practices in that guide
4. Installation
Using npm:
npm install @matechat/ng
5. Basic Setup
Import Module:
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BubbleModule } from '@matechat/ng';
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, BubbleModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css',
})
export class AppComponent {}
6. Quick Start Example
<mc-bubble [content]="'Hello, MateChat'" [avatarConfig]="{ name: 'matechat' }"></mc-bubble>
Complete Chat Interface Example:
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BubbleModule, InputModule, MarkdownCardModule } from '@matechat/ng';
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, BubbleModule, InputModule, MarkdownCardModule],
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
})
export class AppComponent {
messages: any[] = [];
avatarConfig = {
imgSrc: 'https://matechat.gitcode.com/png/demo/userAvatar.svg',
};
modelAvatar = {
imgSrc: 'https://matechat.gitcode.com/logo.svg',
};
onSubmit(event: any) {
this.messages.push({
from: 'user',
content: event,
});
setTimeout(() => {
this.messages.push({
from: 'model',
content: event,
});
}, 200);
}
}
<div class="chat-list">
<ng-container *ngFor="let msg of messages">
@if (msg.from === 'user') {
<mc-bubble
class="user-bubble"
[align]="'right'"
[content]="msg.content"
[avatarConfig]="avatarConfig">
</mc-bubble>
} @else if (msg.from === 'model') {
<mc-bubble
class="model-bubble"
[align]="'left'"
[avatarConfig]="modelAvatar">
<mc-markdown-card [content]="msg.content"></mc-markdown-card>
</mc-bubble>
}
</ng-container>
</div>
<div class="chat-footer">
<mc-input (submit)="onSubmit($event)"></mc-input>
</div>
7. Theme Setup
import { bootstrapApplication } from '@angular/platform-browser';
import { ThemeServiceInit, infinityTheme, galaxyTheme } from 'devui-theme';
ThemeServiceInit(
{
'galaxy-theme': galaxyTheme,
'infinity-theme': infinityTheme,
},
'infinity-theme'
);
bootstrapApplication(AppComponent, appConfig);
API Reference
All component API documentation is available in the references/components/ directory, organized by component name:
- Each component has two files:
api.md- API documentation (props, events, slots, types)demo.md- Demo examples and usage patterns
To use API reference:
- Identify the component you need help with
- Load the corresponding API file:
references/components/<componentName>/api.md - Load the demo file for examples:
references/components/<componentName>/demo.md - Follow the examples and adapt to your use case
Automatic Documentation Updates
This skill includes an automatic documentation update mechanism to keep component documentation synchronized with the latest MateChat Angular release.
Best Practices
- Use standalone components: Angular 17+ standalone components are recommended
- Import modules properly: Import only the modules you need from
@matechat/ng - Handle events properly: Use proper event handlers for component interactions
- Customize themes: Use devui-theme for theme customization
- Use TypeScript: Leverage TypeScript for better type safety
- Follow Angular style guide: Follow Angular official style guide
- When designing components for use, it is necessary to read the corresponding component API documentation from
references/components/<componentName>/api.md
Component Selection Guide
For building a chat interface:
- Start with
Layoutfor overall structure - Use
Headerfor navigation - Use
Bubblefor messages - Use
Inputfor user input - Use
Listfor conversation history
For file handling:
- Use
Attachmentfor file upload
For rich content:
- Use
MarkdownCardfor rendering Markdown content - Use
Mentionfor @mentions in input
For quick actions:
- Use
Promptfor quick prompt suggestions - Use
Toolbarfor action buttons
Resources
- Official Documentation: https://matechat.gitcode.com/
- GitCode Repository: https://gitcode.com/DevCloudFE/MateChat
- NPM Package: https://www.npmjs.com/package/@matechat/ng
Keywords
MateChat, matechat-ng, MateChat Angular, Angular, AI chat, chat UI, Agent UI, conversation UI, bubble, input, prompt, layout, attachment, markdown card, mention, toolbar, conversation components, chat interface, bubble, input box, prompt, layout, attachment, Markdown card