帮助开发者创建 @blueking/chat-x 自定义 message 组件。当用户需要开发自定义消息类型时使用。
78
72%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./bcs-services/bcs-project-manager/.cursor/skills/chat-x-custom-component/SKILL.md自定义 message 组件允许你扩展内置消息类型、渲染任意 UI 组件。
1. 声明类型扩展 → 2. 创建组件 → 3. 集成到 MessageContainer → 4. 测试import { type BaseMessage } from '@blueking/chat-x';
declare global {
interface AIBluekingMessageMap {
custom: BaseMessage<'custom', { content: string }>;
}
}import { useMessageSlotId } from '@blueking/chat-x';
const { messageSlotId } = useMessageSlotId();
// 用于 Teleport: <Teleport :to="messageSlotId">skill://chat-x-custom-component/references/api-reference.mdskill://chat-x-custom-component/references/best-practices.mdskill://chat-x-custom-component/references/full-example.mdskill://chat-x-custom-component/references/integration-guide.mdskill://chat-x-custom-component/references/type-extension.mdskill://chat-x-custom-component/references/QA.mdskill://chat-x-custom-component/references/api-reference.mdskill://chat-x-custom-component/references/best-practices.mdskill://chat-x-custom-component/references/component-templates.mdskill://chat-x-custom-component/references/full-example.mdskill://chat-x-custom-component/references/integration-guide.mdskill://chat-x-custom-component/references/type-extension.md根据 SKILL.md 中的 IF-THEN 规则判断是否需要加载
b08ac38
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.