Files
qqbot/src/runtime.ts
rianli 50422aac14 feat(qqbot): 流式消息输出与架构重构
**流式消息**
- 新增 StreamSender 类,支持流式消息分片发送
- 实现消息队列异步处理,防止阻塞心跳
- 支持 C2C/Group 流式消息

**架构重构**
- 移除 clawdbot/moltbot 旧配置,统一为 qqbot
- 新增 upgrade-and-run.sh 一键升级脚本
- 重构 api/channel/gateway/outbound 模块
- 新增富媒体消息发送接口
2026-02-02 20:25:06 +08:00

15 lines
325 B
TypeScript

import type { PluginRuntime } from "openclaw/plugin-sdk";
let runtime: PluginRuntime | null = null;
export function setQQBotRuntime(next: PluginRuntime) {
runtime = next;
}
export function getQQBotRuntime(): PluginRuntime {
if (!runtime) {
throw new Error("QQBot runtime not initialized");
}
return runtime;
}