Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/plugins/changelog-to-json/libs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MOBILE_COMPONENT_MAP, NON_PASCAL_CASE_NAMES, WEB_COMPONENT_MAP } from '../../../js/components';
import { CHAT_COMPONENT_MAP, MOBILE_COMPONENT_MAP, NON_PASCAL_CASE_NAMES, WEB_COMPONENT_MAP } from '../../../js/components';
import type { Platform } from './types';

export const convert2PascalCase = (name: string) => name
Expand All @@ -9,6 +9,7 @@ export const convert2PascalCase = (name: string) => name
export const COMPONENT_MAPS = {
web: WEB_COMPONENT_MAP,
mobile: MOBILE_COMPONENT_MAP,
chat: CHAT_COMPONENT_MAP,
};

export const mapToParentName = (name: string, platform: Platform) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/changelog-to-json/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LOG_TYPES } from '.';

export type Platform = 'web' | 'mobile';
export type Platform = 'web' | 'mobile'| 'chat';

export type LogType = typeof LOG_TYPES[number];

Expand Down
24 changes: 14 additions & 10 deletions js/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,18 @@ export const MOBILE_COMPONENT_MAP: Record<string, string[]> = {
};

export const CHAT_COMPONENT_MAP: Record<string, string[]> = {
chat: [
'Chat',
'ChatItem',
'ChatInput',
'ChatContent',
'ChatReasoning',
'ChatAction',
'ChatLoading',
'ChatSender',
],
attachments: ['Attachments'],
'chat-actionbar': ['ChatActionbar', 'ChatAction'], // vue-chat: ChatAction 改名 ChatActionbar,保留 ChatAction 用于兼容,后续版本将移除
'chat-content': ['ChatContent'],
'chat-input': ['ChatInput'], // vue-chat: 后续版本将移除
'chat-item': ['ChatItem'], // vue-chat: 后续版本将移除
'chat-list': ['ChatList', 'Chat'], // vue-chat: Chat 改名 ChatList, 保留 Chat 用于兼容,后续版本将移除
'chat-loading': ['ChatLoading'],
'chat-markdown': ['ChatMarkdown'],
'chat-message': ['ChatMessage'],
'chat-reasoning': ['ChatReasoning'], // vue-chat: 后续版本将移除
'chat-sender': ['ChatSender'],
'chat-thinking': ['ChatThinking'],
chatbot: ['Chatbot'],
'file-card': ['FileCard'],
};