feat(channel): add qq bot (#363)

Co-authored-by: 陶建行 <189307154@qq.com>
This commit is contained in:
taojianhang
2026-03-10 14:20:02 +08:00
committed by GitHub
Unverified
parent 65c2b73e23
commit 1bae8229af
14 changed files with 1018 additions and 784 deletions

View File

@@ -19,7 +19,8 @@ export type ChannelType =
| 'line'
| 'msteams'
| 'googlechat'
| 'mattermost';
| 'mattermost'
| 'qqbot';
/**
* Channel connection status
@@ -92,6 +93,7 @@ export const CHANNEL_ICONS: Record<ChannelType, string> = {
msteams: '👔',
googlechat: '💭',
mattermost: '💠',
qqbot: '🐧',
};
/**
@@ -111,12 +113,43 @@ export const CHANNEL_NAMES: Record<ChannelType, string> = {
msteams: 'Microsoft Teams',
googlechat: 'Google Chat',
mattermost: 'Mattermost',
qqbot: 'QQ Bot',
};
/**
* Channel metadata with configuration information
*/
export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
qqbot: {
id: 'qqbot',
name: 'QQ Bot',
icon: '🐧',
description: 'channels:meta.qqbot.description',
connectionType: 'token',
docsUrl: 'channels:meta.qqbot.docsUrl',
configFields: [
{
key: 'appId',
label: 'channels:meta.qqbot.fields.appId.label',
type: 'text',
placeholder: 'channels:meta.qqbot.fields.appId.placeholder',
required: true,
},
{
key: 'clientSecret',
label: 'channels:meta.qqbot.fields.clientSecret.label',
type: 'password',
placeholder: 'channels:meta.qqbot.fields.clientSecret.placeholder',
required: true,
},
],
instructions: [
'channels:meta.qqbot.instructions.0',
'channels:meta.qqbot.instructions.1',
'channels:meta.qqbot.instructions.2',
],
isPlugin: true,
},
dingtalk: {
id: 'dingtalk',
name: 'DingTalk',
@@ -529,7 +562,7 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
* Get primary supported channels (non-plugin, commonly used)
*/
export function getPrimaryChannels(): ChannelType[] {
return ['telegram', 'discord', 'whatsapp', 'dingtalk', 'feishu', 'wecom'];
return ['telegram', 'discord', 'whatsapp', 'dingtalk', 'feishu', 'wecom', 'qqbot'];
}
/**
@@ -537,4 +570,4 @@ export function getPrimaryChannels(): ChannelType[] {
*/
export function getAllChannels(): ChannelType[] {
return Object.keys(CHANNEL_META) as ChannelType[];
}
}