This commit is contained in:
sliverp
2026-01-29 12:03:48 +08:00
parent ee8beee4c1
commit b58146d9b8
3 changed files with 15 additions and 1 deletions

View File

@@ -135,11 +135,19 @@ export async function startGateway(ctx: GatewayContext): Promise<void> {
const envelopeOptions = pluginRuntime.channel.reply.resolveEnvelopeFormatOptions(cfg);
// 组装消息体,添加系统提示词
const builtinPrompt = "由于平台限制你的回复中不可以包含任何URL";
const systemPrompts = [builtinPrompt];
if (account.systemPrompt) {
systemPrompts.push(account.systemPrompt);
}
const messageBody = `【系统提示】\n${systemPrompts.join("\n")}\n\n【用户输入】\n${event.content}`;
const body = pluginRuntime.channel.reply.formatInboundEnvelope({
channel: "QQBot",
from: event.senderName ?? event.senderId,
timestamp: new Date(event.timestamp).getTime(),
body: event.content,
body: messageBody,
chatType: isGroup ? "group" : "direct",
sender: {
id: event.senderId,