Skip to content
Back to skills

Chat X Custom Component

ASecurity

帮助开发者创建 @blueking/chat-x 自定义 message 组件。当用户需要开发自定义消息类型时使用。

  • 840 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 7, 2026
devopstypescriptvueapi

Works with

  • api

Security analysis

A100/100

Scanned February 10, 2026

npx -y skills add TencentBlueKing/bk-bcs --skill chat-x-custom-component --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Chat X Custom Component?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Chat X Custom Component
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tencentblueking-chat-x-custom-component/badge)](https://www.skillsdirectory.com/skills/tencentblueking-chat-x-custom-component)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: chat-x-custom-component
description: 帮助开发者创建 @blueking/chat-x 自定义 message 组件。当用户需要开发自定义消息类型时使用。
---

# Chat-X 自定义 Message 组件开发

## 概述

自定义 message 组件允许你扩展内置消息类型、渲染任意 UI 组件。

## 开发流程

```
1. 声明类型扩展 → 2. 创建组件 → 3. 集成到 MessageContainer → 4. 测试
```

## 核心机制

### 类型扩展

```typescript
import { type BaseMessage } from '@blueking/chat-x';

declare global {
  interface AIBluekingMessageMap {
    custom: BaseMessage<'custom', { content: string }>;
  }
}
```

### MessageSlot 机制

```typescript
import { useMessageSlotId } from '@blueking/chat-x';
const { messageSlotId } = useMessageSlotId();
// 用于 Teleport: <Teleport :to="messageSlotId">
```

## 常见场景

- ECharts 图表消息
- bkui-vue 表格消息
- 动态表单消息
- 卡片列表消息

---

## 📦 可用资源

- `skill://chat-x-custom-component/references/api-reference.md`
- `skill://chat-x-custom-component/references/best-practices.md`
- `skill://chat-x-custom-component/references/full-example.md`
- `skill://chat-x-custom-component/references/integration-guide.md`
- `skill://chat-x-custom-component/references/type-extension.md`


---
## 📦 可用资源

- `skill://chat-x-custom-component/references/QA.md`
- `skill://chat-x-custom-component/references/api-reference.md`
- `skill://chat-x-custom-component/references/best-practices.md`
- `skill://chat-x-custom-component/references/component-templates.md`
- `skill://chat-x-custom-component/references/full-example.md`
- `skill://chat-x-custom-component/references/integration-guide.md`
- `skill://chat-x-custom-component/references/type-extension.md`

> 根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.