mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 15:31:27 +00:00
feat(channels): add group chat support for Telegram
- Add GroupGate class for group access control with three policies: disabled (default), allowlist, and open - Implement mention gating: bot only responds when @mentioned or replied to in groups (configurable per-group) - Extend Envelope type with isGroup, isMentioned, isReplyToBot fields - Update TelegramAdapter to detect group context and mentions - Add comprehensive documentation for group chat setup and troubleshooting This enables using Qwen Code bots in Telegram groups with fine-grained access control and mention-based activation to prevent noise. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
8753245b5f
commit
90236465d3
9 changed files with 228 additions and 17 deletions
|
|
@ -61,13 +61,13 @@ export class AcpBridge extends EventEmitter {
|
|||
this.child.stderr?.on('data', (data: Buffer) => {
|
||||
const msg = data.toString().trim();
|
||||
if (msg) {
|
||||
console.error('[AcpBridge]', msg);
|
||||
process.stderr.write(`[AcpBridge] ${msg}\n`);
|
||||
}
|
||||
});
|
||||
|
||||
this.child.on('exit', (code, signal) => {
|
||||
console.error(
|
||||
`[AcpBridge] Process exited (code=${code}, signal=${signal})`,
|
||||
process.stderr.write(
|
||||
`[AcpBridge] Process exited (code=${code}, signal=${signal})\n`,
|
||||
);
|
||||
this.connection = null;
|
||||
this.child = null;
|
||||
|
|
@ -197,6 +197,9 @@ export class AcpBridge extends EventEmitter {
|
|||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Ignore other session update types
|
||||
break;
|
||||
}
|
||||
|
||||
this.emit('sessionUpdate', params);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue