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.

Files changed (53) hide show
  1. {entari_plugin_hyw-3.2.107/src/entari_plugin_hyw.egg-info → entari_plugin_hyw-3.2.109}/PKG-INFO +1 -1
  2. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/pyproject.toml +1 -1
  3. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/render.py +24 -6
  4. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/prompts.py +3 -3
  5. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109/src/entari_plugin_hyw.egg-info}/PKG-INFO +1 -1
  6. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/MANIFEST.in +0 -0
  7. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/README.md +0 -0
  8. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/setup.cfg +0 -0
  9. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/__init__.py +0 -0
  10. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/anthropic.svg +0 -0
  11. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/deepseek.png +0 -0
  12. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/gemini.svg +0 -0
  13. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/google.svg +0 -0
  14. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/grok.png +0 -0
  15. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/microsoft.svg +0 -0
  16. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/minimax.png +0 -0
  17. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/mistral.png +0 -0
  18. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/nvida.png +0 -0
  19. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/openai.svg +0 -0
  20. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/openrouter.png +0 -0
  21. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/perplexity.svg +0 -0
  22. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/qwen.png +0 -0
  23. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/xai.png +0 -0
  24. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/icon/zai.png +0 -0
  25. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/highlight.css +0 -0
  26. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/highlight.js +0 -0
  27. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex-auto-render.js +0 -0
  28. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex.css +0 -0
  29. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/katex.js +0 -0
  30. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/libs/tailwind.css +0 -0
  31. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/package-lock.json +0 -0
  32. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/package.json +0 -0
  33. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/tailwind.config.js +0 -0
  34. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/tailwind.input.css +0 -0
  35. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.html +0 -0
  36. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.html.bak +0 -0
  37. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/assets/template.j2 +0 -0
  38. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/__init__.py +0 -0
  39. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/config.py +0 -0
  40. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/history.py +0 -0
  41. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/hyw.py +0 -0
  42. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/pipeline.py +0 -0
  43. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/core/render.py.bak +0 -0
  44. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/__init__.py +0 -0
  45. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/browser.py +0 -0
  46. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/mcp_playwright.py +0 -0
  47. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/misc.py +0 -0
  48. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/playwright_tool.py +0 -0
  49. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw/utils/search.py +0 -0
  50. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/SOURCES.txt +0 -0
  51. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/dependency_links.txt +0 -0
  52. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/requires.txt +0 -0
  53. {entari_plugin_hyw-3.2.107 → entari_plugin_hyw-3.2.109}/src/entari_plugin_hyw.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entari_plugin_hyw
3
- Version: 3.2.107
3
+ Version: 3.2.109
4
4
  Summary: Use large language models to interpret chat messages
5
5
  Author-email: kumoSleeping <zjr2992@outlook.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "entari_plugin_hyw"
7
- version = "3.2.107"
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 = [
@@ -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 not part.startswith('<code'):
227
- # 1. Numeric Citations [1] -> Blue Style (References)
228
- part = re.sub(r'\[(\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 [a] -> Orange Style (MCP Flow)
230
- part = re.sub(r'\[([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)
231
- parts[i] = part
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
@@ -60,7 +60,7 @@ AGENT_SYSTEM_PROMPT_SEARCH_ADD = """
60
60
 
61
61
  [最终回复]
62
62
  - 图片: 如果本次回答适合配图, 对搜索到的图片, 选择 1-3 张合适的尽量类型、来源、不同、主题契合的图片, 美观分布嵌入正文 `![alt](url)`.
63
- - 搜索引用: 在正文中使用 `[数字id]` 如 `[1]` 标注来源, 并在文末通过 `references` 代码块列出.
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
- - 工具引用: 在正文中使用 `[字母id]` 如 `[a]` 标注来源, 并在文末通过 `mcp` 代码块列出.
80
+ - 工具引用: 在正文中使用 `mcp:字母顺序` (代码形式) 如 `mcp:a` 标注来源, 并在文末通过 `mcp` 代码块列出.
81
81
  - 底部添加 `mcp` 代码块列出工具调用流程:
82
82
  - 格式: `[图标] 工具名称` + 文本描述
83
83
  - 图标: navigate, snapshot, click, type, code, wait, default
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entari_plugin_hyw
3
- Version: 3.2.107
3
+ Version: 3.2.109
4
4
  Summary: Use large language models to interpret chat messages
5
5
  Author-email: kumoSleeping <zjr2992@outlook.com>
6
6
  License: MIT