entari-plugin-hyw 3.2.106__tar.gz → 3.2.107__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of entari-plugin-hyw might be problematic. Click here for more details.
- {entari_plugin_hyw-3.2.106/src/entari_plugin_hyw.egg-info → entari_plugin_hyw-3.2.107}/PKG-INFO +1 -1
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/pyproject.toml +1 -1
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/render.py +38 -2
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107/src/entari_plugin_hyw.egg-info}/PKG-INFO +1 -1
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/MANIFEST.in +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/README.md +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/setup.cfg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/__init__.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/anthropic.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/deepseek.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/gemini.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/google.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/grok.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/microsoft.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/minimax.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/mistral.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/nvida.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/openai.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/openrouter.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/perplexity.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/qwen.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/xai.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/zai.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/highlight.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/highlight.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/katex-auto-render.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/katex.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/katex.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/tailwind.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/package-lock.json +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/package.json +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/tailwind.config.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/tailwind.input.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/template.html +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/template.html.bak +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/template.j2 +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/__init__.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/config.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/history.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/hyw.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/pipeline.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/render.py.bak +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/__init__.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/browser.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/mcp_playwright.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/misc.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/playwright_tool.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/prompts.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/search.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw.egg-info/SOURCES.txt +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw.egg-info/dependency_links.txt +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw.egg-info/requires.txt +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "entari_plugin_hyw"
|
|
7
|
-
version = "3.2.
|
|
7
|
+
version = "3.2.107"
|
|
8
8
|
description = "Use large language models to interpret chat messages"
|
|
9
9
|
authors = [{name = "kumoSleeping", email = "zjr2992@outlook.com"}]
|
|
10
10
|
dependencies = [
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/render.py
RENAMED
|
@@ -178,12 +178,48 @@ class ContentRenderer:
|
|
|
178
178
|
last_exc = None
|
|
179
179
|
for attempt in range(1, max_attempts + 1):
|
|
180
180
|
try:
|
|
181
|
-
#
|
|
181
|
+
# 1. Protect math blocks
|
|
182
|
+
# We look for $$...$$, \[...\], \(...\)
|
|
183
|
+
# We'll replace them with placeholders so markdown extensions (like nl2br) don't touch them.
|
|
184
|
+
math_blocks = {}
|
|
185
|
+
|
|
186
|
+
def protect_math(match):
|
|
187
|
+
key = f"__MATH_BLOCK_{len(math_blocks)}__"
|
|
188
|
+
math_blocks[key] = match.group(0)
|
|
189
|
+
return key
|
|
190
|
+
|
|
191
|
+
# Patterns for math:
|
|
192
|
+
# 1) $$ ... $$ (display math)
|
|
193
|
+
# 2) \[ ... \] (display math)
|
|
194
|
+
# 3) \( ... \) (inline math)
|
|
195
|
+
# Note: We must handle multiline for $$ and \[
|
|
196
|
+
|
|
197
|
+
# Regex for $$...$$
|
|
198
|
+
markdown_content = re.sub(r'\$\$(.*?)\$\$\s*', protect_math, markdown_content, flags=re.DOTALL)
|
|
199
|
+
|
|
200
|
+
# Regex for \[...\]
|
|
201
|
+
markdown_content = re.sub(r'\\\[(.*?)\\\]\s*', protect_math, markdown_content, flags=re.DOTALL)
|
|
202
|
+
|
|
203
|
+
# Regex for \(...\) (usually single line, but DOTALL is safest if user wraps lines)
|
|
204
|
+
markdown_content = re.sub(r'\\\((.*?)\\\)', protect_math, markdown_content, flags=re.DOTALL)
|
|
205
|
+
|
|
206
|
+
# 2. Render Markdown
|
|
207
|
+
# Use 'nl2br' to turn newlines into <br>, 'fenced_code' for code blocks
|
|
182
208
|
content_html = markdown.markdown(
|
|
183
|
-
markdown_content.strip(),
|
|
209
|
+
markdown_content.strip(),
|
|
184
210
|
extensions=['fenced_code', 'tables', 'nl2br', 'sane_lists']
|
|
185
211
|
)
|
|
186
212
|
|
|
213
|
+
# 3. Restore math blocks
|
|
214
|
+
def restore_math(text):
|
|
215
|
+
# We assume placeholders are intact. We do a simple string replace or regex.
|
|
216
|
+
# Since placeholders are unique strings, we can just replace them.
|
|
217
|
+
for key, val in math_blocks.items():
|
|
218
|
+
text = text.replace(key, val)
|
|
219
|
+
return text
|
|
220
|
+
|
|
221
|
+
content_html = restore_math(content_html)
|
|
222
|
+
|
|
187
223
|
# Post-process to style citation markers
|
|
188
224
|
parts = re.split(r'(<code.*?>.*?</code>)', content_html, flags=re.DOTALL)
|
|
189
225
|
for i, part in enumerate(parts):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/gemini.svg
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/google.svg
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/grok.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/nvida.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/openai.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/qwen.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/xai.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/icon/zai.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/katex.css
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/libs/katex.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/package.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/template.html
RENAMED
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/assets/template.j2
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/__init__.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/config.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/history.py
RENAMED
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/pipeline.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/core/render.py.bak
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/__init__.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/browser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/prompts.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw/utils/search.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw.egg-info/requires.txt
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.107}/src/entari_plugin_hyw.egg-info/top_level.txt
RENAMED
|
File without changes
|