entari-plugin-hyw 3.2.106__tar.gz → 3.2.108__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.108}/PKG-INFO +1 -1
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/pyproject.toml +1 -1
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/render.py +42 -6
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/prompts.py +3 -3
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108/src/entari_plugin_hyw.egg-info}/PKG-INFO +1 -1
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/MANIFEST.in +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/README.md +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/setup.cfg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/__init__.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/anthropic.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/deepseek.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/gemini.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/google.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/grok.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/microsoft.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/minimax.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/mistral.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/nvida.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/openai.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/openrouter.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/perplexity.svg +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/qwen.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/xai.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/zai.png +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/libs/highlight.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/libs/highlight.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/libs/katex-auto-render.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/libs/katex.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/libs/katex.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/libs/tailwind.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/package-lock.json +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/package.json +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/tailwind.config.js +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/tailwind.input.css +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/template.html +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/template.html.bak +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/template.j2 +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/__init__.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/config.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/history.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/hyw.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/pipeline.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/render.py.bak +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/__init__.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/browser.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/mcp_playwright.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/misc.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/playwright_tool.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/search.py +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw.egg-info/SOURCES.txt +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw.egg-info/dependency_links.txt +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw.egg-info/requires.txt +0 -0
- {entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108"
|
|
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.108}/src/entari_plugin_hyw/core/render.py
RENAMED
|
@@ -178,20 +178,56 @@ 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):
|
|
190
226
|
if not part.startswith('<code'):
|
|
191
|
-
# 1. Numeric Citations [1
|
|
192
|
-
part = re.sub(r'\[(\d+)\
|
|
193
|
-
# 2. Alphabetical Citations [a
|
|
194
|
-
part = re.sub(r'\[([a-zA-Z]+)\
|
|
227
|
+
# 1. Numeric Citations [references](/1) -> Blue Style (References)
|
|
228
|
+
part = re.sub(r'\[references\]\(/(\d+)\)', r'<span class="inline-flex items-center justify-center min-w-[16px] h-4 px-0.5 text-[10px] font-bold text-blue-600 bg-blue-50 border border-blue-200 rounded mx-0.5 align-top relative -top-0.5">\1</span>', part)
|
|
229
|
+
# 2. Alphabetical Citations [mcp](/a) -> Orange Style (MCP Flow)
|
|
230
|
+
part = re.sub(r'\[mcp\]\(/([a-zA-Z]+)\)', r'<span class="inline-flex items-center justify-center min-w-[16px] h-4 px-0.5 text-[10px] font-bold text-orange-600 bg-orange-50 border border-orange-200 rounded mx-0.5 align-top relative -top-0.5">\1</span>', part)
|
|
195
231
|
parts[i] = part
|
|
196
232
|
content_html = "".join(parts)
|
|
197
233
|
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/prompts.py
RENAMED
|
@@ -60,7 +60,7 @@ AGENT_SYSTEM_PROMPT_SEARCH_ADD = """
|
|
|
60
60
|
|
|
61
61
|
[最终回复]
|
|
62
62
|
- 图片: 如果本次回答适合配图, 对搜索到的图片, 选择 1-3 张合适的尽量类型、来源、不同、主题契合的图片, 美观分布嵌入正文 ``.
|
|
63
|
-
- 搜索引用: 在正文中使用 `[
|
|
63
|
+
- 搜索引用: 在正文中使用 `[references](/数字id)` 如 `[references](/1)` 标注来源, 并在文末通过 `references` 代码块列出.
|
|
64
64
|
- 你需要在最终回复底部添加 `references` 代码块.
|
|
65
65
|
|
|
66
66
|
```references
|
|
@@ -75,9 +75,9 @@ AGENT_SYSTEM_PROMPT_MCP_ADD = """
|
|
|
75
75
|
{tools_desc}
|
|
76
76
|
|
|
77
77
|
> 积极使用工具完成任务,工具优先于文本回复。
|
|
78
|
-
|
|
78
|
+
秧根扭起来,我们喜羊羊大东北是我的家乡,我就在这一个人
|
|
79
79
|
[最终回复格式]
|
|
80
|
-
- 工具引用: 在正文中使用 `[
|
|
80
|
+
- 工具引用: 在正文中使用 `[mcp](/字母顺序)` 如 `[mcp](/a)` 标注来源, 并在文末通过 `mcp` 代码块列出.
|
|
81
81
|
- 底部添加 `mcp` 代码块列出工具调用流程:
|
|
82
82
|
- 格式: `[图标] 工具名称` + 文本描述
|
|
83
83
|
- 图标: navigate, snapshot, click, type, code, wait, default
|
|
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.108}/src/entari_plugin_hyw/assets/icon/gemini.svg
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/google.svg
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108}/src/entari_plugin_hyw/assets/icon/nvida.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108}/src/entari_plugin_hyw/assets/icon/qwen.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/assets/icon/xai.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108}/src/entari_plugin_hyw/assets/libs/katex.css
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108}/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.108}/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.108}/src/entari_plugin_hyw/assets/template.j2
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/__init__.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/config.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108}/src/entari_plugin_hyw/core/pipeline.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/core/render.py.bak
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw/utils/__init__.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108}/src/entari_plugin_hyw/utils/search.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/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.108}/src/entari_plugin_hyw.egg-info/requires.txt
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.106 → entari_plugin_hyw-3.2.108}/src/entari_plugin_hyw.egg-info/top_level.txt
RENAMED
|
File without changes
|