fix: update channelTemplates to filter for Discord and Lark only (#16065)

### What problem does this PR solve?

fix: update channelTemplates to filter for Discord and Lark only
- Fixed a display issue with chunks during pipeline parsing.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-06-16 17:09:24 +08:00
committed by GitHub
parent ba8796b8da
commit a15e667b3c
2 changed files with 13 additions and 9 deletions

View File

@@ -81,7 +81,9 @@ export const ArrayContainer = (props: IJsonContainerProps) => {
{isArray(content.value) &&
content.value?.map((item, index) => {
if (
item[parserKeyMap[content.key as keyof typeof parserKeyMap]] === ''
item[parserKeyMap[content.key as keyof typeof parserKeyMap]] ===
'' ||
!item[parserKey]
) {
return null;
}

View File

@@ -56,14 +56,16 @@ const AvailableChannelCard = ({
const ChatChannel = () => {
const { t } = useTranslation();
const { chatChannelInfo } = useChatChannelInfo();
const channelTemplates: IChatChannelInfo[] = Object.values(
ChatChannelKey,
).map((id) => ({
id,
name: chatChannelInfo[id].name,
description: chatChannelInfo[id].description,
icon: chatChannelInfo[id].icon,
}));
const channelTemplates: IChatChannelInfo[] = Object.values(ChatChannelKey)
.filter(
(id) => [ChatChannelKey.DISCORD, ChatChannelKey.FEISHU].includes(id), // Show only Discord and Feishu
)
.map((id) => ({
id,
name: chatChannelInfo[id].name,
description: chatChannelInfo[id].description,
icon: chatChannelInfo[id].icon,
}));
const { categorizedList } = useListChatChannel();