entari-plugin-hyw 3.2.107__tar.gz → 3.2.109__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.107/src/entari_plugin_hyw.egg-info → entari_plugin_hyw-3.2.109}/PKG-INFO +1 -1
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/pyproject.toml +1 -1
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/render.py +24 -6
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/prompts.py +3 -3
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109/src/entari_plugin_hyw.egg-info}/PKG-INFO +1 -1
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/MANIFEST.in +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/README.md +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/setup.cfg +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/__init__.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/anthropic.svg +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/deepseek.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/gemini.svg +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/google.svg +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/grok.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/microsoft.svg +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/minimax.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/mistral.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/nvida.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/openai.svg +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/openrouter.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/perplexity.svg +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/qwen.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/xai.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/zai.png +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/highlight.css +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/highlight.js +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex-auto-render.js +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex.css +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex.js +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/tailwind.css +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/package-lock.json +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/package.json +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/tailwind.config.js +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/tailwind.input.css +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.html +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.html.bak +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.j2 +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/__init__.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/config.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/history.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/hyw.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/pipeline.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/render.py.bak +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/__init__.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/browser.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/mcp_playwright.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/misc.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/playwright_tool.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/search.py +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/SOURCES.txt +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/dependency_links.txt +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/requires.txt +0 -0
- {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/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.109"
|
|
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.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/render.py
RENAMED
|
@@ -221,14 +221,32 @@ class ContentRenderer:
|
|
|
221
221
|
content_html = restore_math(content_html)
|
|
222
222
|
|
|
223
223
|
# Post-process to style citation markers
|
|
224
|
+
# We split by code blocks to avoid messing up real code, BUT our citations ARE code blocks now.
|
|
225
|
+
# So we need to look at the code blocks themselves.
|
|
224
226
|
parts = re.split(r'(<code.*?>.*?</code>)', content_html, flags=re.DOTALL)
|
|
225
227
|
for i, part in enumerate(parts):
|
|
226
|
-
if
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
#
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
# Check if this part is a code block containing our specific citation format
|
|
229
|
+
if part.startswith('<code'):
|
|
230
|
+
# Match <code>ref:123</code> or <code>mcp:abc</code>
|
|
231
|
+
# Note: attributes like class might be present if we are unlucky, but `ref:` inside usually means inline code.
|
|
232
|
+
|
|
233
|
+
# 1. Numeric: <code>ref:123</code>
|
|
234
|
+
ref_match = re.match(r'^<code.*?>ref:(\d+)</code>$', part)
|
|
235
|
+
if ref_match:
|
|
236
|
+
citation_id = ref_match.group(1)
|
|
237
|
+
parts[i] = f'<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">{citation_id}</span>'
|
|
238
|
+
continue
|
|
239
|
+
|
|
240
|
+
# 2. Alpha: <code>mcp:abc</code>
|
|
241
|
+
mcp_match = re.match(r'^<code.*?>mcp:([a-zA-Z]+)</code>$', part)
|
|
242
|
+
if mcp_match:
|
|
243
|
+
mcp_id = mcp_match.group(1)
|
|
244
|
+
parts[i] = f'<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">{mcp_id}</span>'
|
|
245
|
+
continue
|
|
246
|
+
|
|
247
|
+
# If it's NOT a code block, or a code block we didn't transform, we leave it alone.
|
|
248
|
+
# (Previous logic was to regex replace inside non-code blocks. We don't need that anymore
|
|
249
|
+
# because the prompt now enforces code spans).
|
|
232
250
|
content_html = "".join(parts)
|
|
233
251
|
|
|
234
252
|
# Strip out the structured JSON blocks if they leaked into the content
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/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
|
+
- 搜索引用: 在正文中使用 `ref:数字id` (代码形式) 如 `ref: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.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/gemini.svg
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/google.svg
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/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.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/nvida.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/openai.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/qwen.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/xai.png
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/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.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex.css
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/package.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.html
RENAMED
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.j2
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/__init__.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/config.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/history.py
RENAMED
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/pipeline.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/render.py.bak
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/__init__.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/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.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/search.py
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/requires.txt
RENAMED
|
File without changes
|
{entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/top_level.txt
RENAMED
|
File without changes
|