feat(菜单): 支持菜单文本/图片可配置输出并接入md2image\n\n- 新增 RobotMenu.output_mode 配置,支持 text 与 image 两种菜单发送模式\n- 新增图片相关配置:image_fallback_to_text、image_render_timeout_seconds、image_render_retries\n- 菜单与菜单状态命令支持按配置走 md2image 生成图片后发送\n- 新增菜单 Markdown 生成逻辑,图片中展示每个插件的序号、功能键、状态、说明、指令信息\n- 图片发送失败时按配置决定是否回退文本,并补充失败提示与日志\n- 补充详细中文注释并保持原文本发送逻辑兼容

This commit is contained in:
liuwei
2026-04-20 10:19:16 +08:00
parent 7768cebe42
commit 9819b43656
2 changed files with 158 additions and 5 deletions

View File

@@ -1,6 +1,17 @@
[RobotMenu]
enable = true
command = ["菜单", "功能菜单"]
# 菜单输出模式:
# - text发送文本菜单历史行为
# - image先用 md2image 将 Markdown 渲染为图片后发送
output_mode = "image"
# 图片生成失败时是否回退文本菜单:
# - false严格按图片模式不发送完整菜单文本
# - true优先保证可达失败后改发文本
image_fallback_to_text = false
# md2image 渲染参数:可按服务器性能调整
image_render_timeout_seconds = 45
image_render_retries = 1
command-format = """
📝功能菜单指令:
菜单 - 显示功能菜单