mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user