mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-16 12:47:19 +08:00
feat: add dingtalk chat channel (#16183)
### What does this PR do? This PR adds a new DingTalk chat channel integration and hardens the inbound callback path. ### Summary - Adds DingTalk as a selectable chat channel in the UI and backend channel registry. - Adds the DingTalk chat channel icon asset. - Acknowledges DingTalk Stream callbacks and deduplicates repeated inbound messages to avoid duplicate replies.
This commit is contained in:
@@ -8,6 +8,7 @@ import { IChatChannelInfoMap } from '../interface';
|
||||
export enum ChatChannelKey {
|
||||
CLICKCLACK = 'clickclack',
|
||||
DISCORD = 'discord',
|
||||
DINGTALK = 'dingtalk',
|
||||
FEISHU = 'feishu',
|
||||
GOOGLECHAT = 'googlechat',
|
||||
IRC = 'irc',
|
||||
@@ -48,6 +49,7 @@ const channelIcon = (key: ChatChannelKey) => (
|
||||
const CHANNEL_NAMES: Record<ChatChannelKey, string> = {
|
||||
[ChatChannelKey.CLICKCLACK]: 'ClickClack',
|
||||
[ChatChannelKey.DISCORD]: 'Discord',
|
||||
[ChatChannelKey.DINGTALK]: 'DingTalk',
|
||||
[ChatChannelKey.FEISHU]: 'Feishu / Lark',
|
||||
[ChatChannelKey.GOOGLECHAT]: 'Google Chat',
|
||||
[ChatChannelKey.IRC]: 'IRC',
|
||||
@@ -160,6 +162,21 @@ export const ChatChannelFormFields: Record<ChatChannelKey, FormFieldConfig[]> =
|
||||
placeholder: '1234567890',
|
||||
},
|
||||
],
|
||||
[ChatChannelKey.DINGTALK]: [
|
||||
{
|
||||
label: 'Client ID',
|
||||
name: 'config.credential.client_id',
|
||||
type: FormFieldType.Text,
|
||||
required: true,
|
||||
placeholder: 'dingxxxxxxxxxxxx',
|
||||
},
|
||||
{
|
||||
label: 'Client Secret',
|
||||
name: 'config.credential.client_secret',
|
||||
type: FormFieldType.Password,
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
[ChatChannelKey.FEISHU]: [
|
||||
{
|
||||
label: 'App ID',
|
||||
|
||||
@@ -61,6 +61,7 @@ const ChatChannel = () => {
|
||||
(id) =>
|
||||
[
|
||||
ChatChannelKey.DISCORD,
|
||||
ChatChannelKey.DINGTALK,
|
||||
ChatChannelKey.FEISHU,
|
||||
ChatChannelKey.TELEGRAM,
|
||||
ChatChannelKey.QQBOT,
|
||||
|
||||
Reference in New Issue
Block a user