diff --git a/plugins/actions/ACTION_PLUGIN_TEMPLATE.py b/plugins/actions/ACTION_PLUGIN_TEMPLATE.py index 778ed98..289a01d 100644 --- a/plugins/actions/ACTION_PLUGIN_TEMPLATE.py +++ b/plugins/actions/ACTION_PLUGIN_TEMPLATE.py @@ -315,7 +315,7 @@ class Action: if role == "user" else "Assistant" if role == "assistant" else role ) - aggregated_parts.append(f"[{role_label} Message {i}]\n{text_content}") + aggregated_parts.append(f"{text_content}") if not aggregated_parts: return body # Or handle error diff --git a/plugins/actions/ACTION_PLUGIN_TEMPLATE_CN.py b/plugins/actions/ACTION_PLUGIN_TEMPLATE_CN.py index 400af74..7c4cbe6 100644 --- a/plugins/actions/ACTION_PLUGIN_TEMPLATE_CN.py +++ b/plugins/actions/ACTION_PLUGIN_TEMPLATE_CN.py @@ -326,7 +326,7 @@ class Action: if role == "user" else "助手" if role == "assistant" else role ) - aggregated_parts.append(f"[{role_label} 消息 {i}]\n{text_content}") + aggregated_parts.append(f"{text_content}") if not aggregated_parts: return body # 或者处理错误 diff --git a/plugins/actions/export_to_docx/README.md b/plugins/actions/export_to_docx/README.md index 238c718..10c57a3 100644 --- a/plugins/actions/export_to_docx/README.md +++ b/plugins/actions/export_to_docx/README.md @@ -75,6 +75,14 @@ All dependencies are declared in the plugin docstring. ## Changelog +### v0.3.0 + +- **Mermaid Diagrams**: Native support for rendering Mermaid diagrams as images in Word. +- **Native Math**: Converts LaTeX equations to native Office MathML for editable equations. +- **Citations**: Automatic bibliography generation and citation linking. +- **Reasoning Removal**: Option to strip `` blocks from the output. +- **Table Enhancements**: Improved table formatting with smart column widths. + ### v0.2.0 - Added native math equation support (LaTeX → OMML) - Added Mermaid diagram rendering diff --git a/plugins/actions/export_to_docx/README_CN.md b/plugins/actions/export_to_docx/README_CN.md index bdf9eed..b5026d5 100644 --- a/plugins/actions/export_to_docx/README_CN.md +++ b/plugins/actions/export_to_docx/README_CN.md @@ -75,6 +75,14 @@ ## 更新日志 +### v0.3.0 + +- **Mermaid 图表**: 原生支持将 Mermaid 图表渲染为 Word 中的图片。 +- **原生公式**: 将 LaTeX 公式转换为原生 Office MathML,支持在 Word 中编辑。 +- **引用参考**: 自动生成参考文献列表并链接引用。 +- **移除推理**: 选项支持从输出中移除 `` 推理块。 +- **表格增强**: 改进表格格式,支持智能列宽。 + ### v0.2.0 - 新增原生数学公式支持(LaTeX → OMML) - 新增 Mermaid 图表渲染 diff --git a/plugins/actions/export_to_docx/export_to_word.py b/plugins/actions/export_to_docx/export_to_word.py index ad60b0d..409d179 100644 --- a/plugins/actions/export_to_docx/export_to_word.py +++ b/plugins/actions/export_to_docx/export_to_word.py @@ -3,7 +3,7 @@ title: Export to Word author: Fu-Jie author_url: https://github.com/Fu-Jie funding_url: https://github.com/Fu-Jie/awesome-openwebui -version: 0.2.0 +version: 0.3.0 icon_url: data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIyNCIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgZmlsbD0ibm9uZSIKICBzdHJva2U9ImN1cnJlbnRDb2xvciIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAyMmEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg4YTIuNCAyLjQgMCAwIDEgMS43MDQuNzA2bDMuNTg4IDMuNTg4QTIuNCAyLjQgMCAwIDEgMjAgOHYxMmEyIDIgMCAwIDEtMiAyeiIgLz4KICA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4KICA8cGF0aCBkPSJNMTAgOUg4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxM0g4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxN0g4IiAvPgo8L3N2Zz4K requirements: python-docx==1.1.2, latex2mathml, mathml2omml description: Export conversation to Word (.docx) with syntax highlighting, native math equations (LaTeX), Mermaid diagrams, citations, and enhanced table formatting. @@ -158,6 +158,10 @@ class Action: ): logger.info(f"action:{__name__}") + # Reset counters for new request + self._mermaid_figure_counter = 0 + self._bookmark_id_counter = 1 + # Parse user info if isinstance(__user__, (list, tuple)): user_language = ( diff --git a/plugins/actions/export_to_docx/export_to_word_cn.py b/plugins/actions/export_to_docx/export_to_word_cn.py index e0f3292..a994ebc 100644 --- a/plugins/actions/export_to_docx/export_to_word_cn.py +++ b/plugins/actions/export_to_docx/export_to_word_cn.py @@ -3,7 +3,7 @@ title: 导出为 Word author: Fu-Jie author_url: https://github.com/Fu-Jie funding_url: https://github.com/Fu-Jie/awesome-openwebui -version: 0.2.0 +version: 0.3.0 icon_url: data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIyNCIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgZmlsbD0ibm9uZSIKICBzdHJva2U9ImN1cnJlbnRDb2xvciIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAyMmEyIDIgMCAwIDEtMi0yVjRhMiAyIDAgMCAxIDItMmg4YTIuNCAyLjQgMCAwIDEgMS43MDQuNzA2bDMuNTg4IDMuNTg4QTIuNCAyLjQgMCAwIDEgMjAgOHYxMmEyIDIgMCAwIDEtMiAyeiIgLz4KICA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4KICA8cGF0aCBkPSJNMTAgOUg4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxM0g4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxN0g4IiAvPgo8L3N2Zz4K requirements: python-docx==1.1.2, Pygments>=2.15.0, latex2mathml, mathml2omml description: 将对话导出为 Word (.docx),支持代码高亮、原生数学公式 (LaTeX)、Mermaid 图表、引用参考和增强表格格式。 @@ -158,6 +158,10 @@ class Action: ): logger.info(f"action:{__name__}") + # Reset counters for new request + self._mermaid_figure_counter = 0 + self._bookmark_id_counter = 1 + # 解析用户信息 if isinstance(__user__, (list, tuple)): user_language = (