mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
Merge pull request #2628 from QwenLM/feat/channels-telegram
feat(channels): add extensible Channels platform with plugin system and Telegram/WeChat/DingTalk channels
This commit is contained in:
commit
b2f04418fa
97 changed files with 9624 additions and 19 deletions
|
|
@ -88,6 +88,15 @@ export enum SettingScope {
|
|||
SystemDefaults = 'SystemDefaults',
|
||||
}
|
||||
|
||||
export interface ExtensionChannelConfig {
|
||||
/** Relative path to JS entry point (must export `plugin: ChannelPlugin`) */
|
||||
entry: string;
|
||||
/** Human-readable name for CLI output */
|
||||
displayName?: string;
|
||||
/** Extra config fields required beyond the shared ChannelConfig fields */
|
||||
requiredConfigFields?: string[];
|
||||
}
|
||||
|
||||
export interface Extension {
|
||||
id: string;
|
||||
name: string;
|
||||
|
|
@ -105,6 +114,7 @@ export interface Extension {
|
|||
skills?: SkillConfig[];
|
||||
agents?: SubagentConfig[];
|
||||
hooks?: { [K in HookEventName]?: HookDefinition[] };
|
||||
channels?: Record<string, ExtensionChannelConfig>;
|
||||
}
|
||||
|
||||
export interface ExtensionConfig {
|
||||
|
|
@ -118,6 +128,7 @@ export interface ExtensionConfig {
|
|||
agents?: string | string[];
|
||||
settings?: ExtensionSetting[];
|
||||
hooks?: { [K in HookEventName]?: HookDefinition[] };
|
||||
channels?: Record<string, ExtensionChannelConfig>;
|
||||
}
|
||||
|
||||
export interface ExtensionUpdateInfo {
|
||||
|
|
@ -651,6 +662,10 @@ export class ExtensionManager {
|
|||
);
|
||||
}
|
||||
|
||||
if (config.channels) {
|
||||
extension.channels = config.channels;
|
||||
}
|
||||
|
||||
extension.commands = await loadCommandsFromDir(
|
||||
`${effectiveExtensionPath}/commands`,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue