@michengai/dsh-codex-pet 1.0.9 → 1.0.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.12] - 2026-11-03
4
+
5
+ - Accurately detect settings nav icon slot container: only skip DOM pseudo-element when span.navIcon container is present, preventing dual icons on newer hosts while maintaining single icon compatibility on older hosts.
6
+
3
7
  ## [1.0.9] - 2026-11-03
4
8
 
5
9
  - Align with latest DSH host conventions: verified compatibility across DSH latest prerelease `0.2.2-alpha.3` and all RCs up to `0.2.1-rc.5`, and integrated the official settings section icon slot to ensure the pet settings row presents the native paw icon on newer hosts.
@@ -1,5 +1,9 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.0.12] - 2026-11-03
4
+
5
+ - 设置导航图标精准识别宿主插槽容器:仅在存在 span.navIcon 容器时主动避让 DOM 伪元素,避免新版宿主双图标重叠与老版宿主单图标兼容异常。
6
+
3
7
  ## [1.0.9] - 2026-11-03
4
8
 
5
9
  - 适配最新 DSH 宿主规范:全面支持 DSH 最新预发布版本 `0.2.2-alpha.3` 与全系 RC(覆盖至 `0.2.1-rc.5`),在设置页接入官方原生导航图标插槽,确保宠物设置项在最新宿主中正常展示矢量图标。
package/lib/client.js CHANGED
@@ -861,7 +861,7 @@ function PluginUpdateHeader({ locale }) {
861
861
  zh2 ? "\u5BA0\u7269" : "Pets",
862
862
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dcp-version", children: [
863
863
  "v",
864
- "1.0.9"
864
+ "1.0.12"
865
865
  ] })
866
866
  ] }),
867
867
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -2285,6 +2285,16 @@ function isPetNavRow(button) {
2285
2285
  function applyPetSettingsIcon(button) {
2286
2286
  const isOwn = isPetNavRow(button);
2287
2287
  if (isOwn) {
2288
+ const hasSlotIcon = Array.from(button.children).some(
2289
+ (child) => child.tagName === "SPAN" && child.className && String(child.className).includes("navIcon")
2290
+ ) || Boolean(button.querySelector?.('span[class*="navIcon"]'));
2291
+ if (hasSlotIcon) {
2292
+ if (button.hasAttribute(PET_NAV_ICON_MARKER)) {
2293
+ button.removeAttribute(PET_NAV_ICON_MARKER);
2294
+ return true;
2295
+ }
2296
+ return false;
2297
+ }
2288
2298
  if (button.getAttribute(PET_NAV_ICON_MARKER) === "") return false;
2289
2299
  button.setAttribute(PET_NAV_ICON_MARKER, "");
2290
2300
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-pet",
3
- "version": "1.0.9",
3
+ "version": "1.0.12",
4
4
  "license": "Apache-2.0",
5
5
  "description": "DSH Codex Pet — 为 DeepSeek Harness 提供宠物陪伴、多任务提醒与交互,以及 Skill 自定义宠物 · A pet companion with multi-task notifications, interactions, and Skill-based custom pets for DeepSeek Harness",
6
6
  "type": "module",