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:
buua436
2026-06-18 20:06:00 +08:00
committed by GitHub
parent 5ca1686ac7
commit b409cfc3d5
8 changed files with 490 additions and 1 deletions

View File

@@ -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',

View File

@@ -61,6 +61,7 @@ const ChatChannel = () => {
(id) =>
[
ChatChannelKey.DISCORD,
ChatChannelKey.DINGTALK,
ChatChannelKey.FEISHU,
ChatChannelKey.TELEGRAM,
ChatChannelKey.QQBOT,