Skip to content

Commit c690405

Browse files
committed
🎨 转发分段
1 parent 0ec6480 commit c690405

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

plugin/aichat/main.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,18 @@ func init() {
366366
b.WriteString(strconv.FormatInt(p, 10))
367367
b.WriteString(" 条消息总结:\n\n")
368368
b.WriteString(summary)
369-
ctx.SendChain(message.Text(b.String()))
369+
370+
// 分割总结内容为多段
371+
parts := strings.Split(b.String(), "\n\n")
372+
msg := make(message.Message, 0, len(parts))
373+
for _, part := range parts {
374+
if part != "" {
375+
msg = append(msg, ctxext.FakeSenderForwardNode(ctx, message.Text(part)))
376+
}
377+
}
378+
if len(msg) > 0 {
379+
ctx.Send(msg)
380+
}
370381
})
371382
}
372383

0 commit comments

Comments
 (0)