1. 为消息插件新增可配置的前台/后台分发模式,并在 robot 主链路中加入独立后台任务池,避免长任务长期占用前台 20 个消息处理槽位。 2. 放宽插件执行超时上限到 1800 秒,支持 200 秒以上长任务,同时保留熔断、统计和异常记录。 3. 为群聊总结和 AI 绘图启用后台执行配置,并将菜单插件默认输出改回文本模式。
37 lines
1.4 KiB
TOML
37 lines
1.4 KiB
TOML
# 消息总结插件配置
|
||
|
||
[general]
|
||
enabled = true
|
||
|
||
[api]
|
||
# 群总结能力改为场景路由,后台切换 summary.daily 即可统一切换实现。
|
||
scene = "summary.daily"
|
||
connect_timeout_seconds = 10
|
||
retry_delays_seconds = [10, 20]
|
||
|
||
[output]
|
||
output_dir = "output"
|
||
image_format = "png"
|
||
# 图片渲染模式:
|
||
# - template: 使用 HTML 模板渲染(模板样式稳定后再切换)
|
||
# - markdown: 使用历史 md2image 样式
|
||
summary_image_mode = "markdown"
|
||
# 总结卡片模板路径(相对项目根目录)
|
||
summary_image_template_path = "plugins/message_summary/templates/gemini_summary_card.html"
|
||
# 模板模式截图视口配置(仅 template 模式生效)
|
||
# 说明:
|
||
# 1. 这里可以覆盖 md2image 默认 780 宽;
|
||
# 2. 模板卡片宽度约 420,截图建议 460~520 区间;
|
||
# 3. scale 提高后字体与线条会更清晰。
|
||
template_viewport_width = 580
|
||
template_viewport_height = 960
|
||
template_device_scale_factor = 2.0
|
||
|
||
[runtime]
|
||
# 群总结属于典型长任务:
|
||
# 1. 生成期间会查库、调 LLM、渲染图片,整体耗时明显高于普通命令;
|
||
# 2. 因此这里改为 background,让命令命中后转入后台任务池,不再占住前台 20 个消息处理槽位;
|
||
# 3. 同时把插件总超时放宽到 10 分钟,避免长总结被全局保护策略过早截断。
|
||
message_dispatch_mode = "background"
|
||
plugin_process_timeout_seconds = 600
|