opencode-bioresearcher 1.11.0 → 1.11.1
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.
package/connector-meta.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"description_en": "Biomedical research plugin for OpenCode: biomcp MCP server tools for literature, clinical trials, genes, variants, drugs, diseases and patents, plus skills for publication-grade figures and deep-research subagent.",
|
|
8
8
|
"source": "bioresearcher",
|
|
9
9
|
"type": "plugin",
|
|
10
|
-
"version": "1.11.
|
|
10
|
+
"version": "1.11.1",
|
|
11
11
|
"harness": "opencode",
|
|
12
12
|
"examples_zh": [
|
|
13
13
|
"帮我做一个关于肿瘤免疫治疗的多方面文献综述并附引用",
|
package/package.json
CHANGED
|
@@ -36,13 +36,21 @@ DEFAULT_ICON_DATA_URI = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBD
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def get_brand_icon_uri() -> str:
|
|
39
|
-
"""Retrieve brand icon data URI with local repository fallback."""
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
"""Retrieve brand icon data URI with local repository and packaged connector fallback."""
|
|
40
|
+
root = Path(__file__).resolve().parents[3]
|
|
41
|
+
candidates = [
|
|
42
|
+
root / "icon.png",
|
|
43
|
+
root / "connector" / "workbuddy" / "icon.png",
|
|
44
|
+
root / "icon.jpg",
|
|
45
|
+
root / "connector" / "workbuddy" / "icon.jpg",
|
|
46
|
+
]
|
|
47
|
+
for p in candidates:
|
|
48
|
+
if p.is_file():
|
|
49
|
+
try:
|
|
50
|
+
mime = "image/png" if p.suffix == ".png" else "image/jpeg"
|
|
51
|
+
return f"data:{mime};base64,{base64.b64encode(p.read_bytes()).decode('ascii')}"
|
|
52
|
+
except OSError:
|
|
53
|
+
pass
|
|
46
54
|
return DEFAULT_ICON_DATA_URI
|
|
47
55
|
|
|
48
56
|
|
|
@@ -1829,6 +1837,7 @@ def convert(markdown_path: Path, title: str) -> str:
|
|
|
1829
1837
|
toc_html = md.toc or ""
|
|
1830
1838
|
|
|
1831
1839
|
icon_uri = get_brand_icon_uri()
|
|
1840
|
+
icon_mime = "image/png" if icon_uri.startswith("data:image/png") else "image/jpeg"
|
|
1832
1841
|
header_card = build_header_card(effective_title, metadata, icon_uri)
|
|
1833
1842
|
|
|
1834
1843
|
return f"""<!DOCTYPE html>
|
|
@@ -1837,7 +1846,7 @@ def convert(markdown_path: Path, title: str) -> str:
|
|
|
1837
1846
|
<meta charset="utf-8">
|
|
1838
1847
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
1839
1848
|
<title>{html.escape(effective_title)}</title>
|
|
1840
|
-
<link rel="icon" type="
|
|
1849
|
+
<link rel="icon" type="{icon_mime}" href="{icon_uri}">
|
|
1841
1850
|
<style>{CSS}</style>
|
|
1842
1851
|
</head>
|
|
1843
1852
|
<body>
|