dsh-ws-recency 0.13.3 → 0.13.4

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/client.js +19 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -135,7 +135,7 @@ dsh plugin --profile <profile> add github:chyxhtc/dsh-ws-recency
135
135
  或固定版本的预构建包:
136
136
 
137
137
  ```powershell
138
- dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.13.3/dsh-ws-recency-0.13.3.tgz
138
+ dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.13.4/dsh-ws-recency-0.13.4.tgz
139
139
  ```
140
140
 
141
141
  装完把 `dsh-ws-recency` 加进 `~/.hypers-work/profiles/<profile>/package.json` 的 `dsh.profile.bundles`,重启应用。
package/client.js CHANGED
@@ -943,9 +943,14 @@
943
943
  break;
944
944
  }
945
945
  if (template === null || typeof template.cloneNode !== "function") return;
946
+ /* The button usually sits inside a row wrapper that owns the width and the
947
+ alignment; cloning only the button loses them and the label wraps. */
948
+ var rowSource = template.parentElement !== null && template.parentElement !== undefined && template.parentElement !== container
949
+ ? template.parentElement
950
+ : template;
946
951
  var clone;
947
952
  try {
948
- clone = template.cloneNode(true);
953
+ clone = rowSource.cloneNode(true);
949
954
  } catch (error) {
950
955
  return;
951
956
  }
@@ -955,6 +960,16 @@
955
960
  var labelTemplate = clone.querySelector("span");
956
961
  if (labelTemplate !== null && typeof labelTemplate.className === "string") labelClass = labelTemplate.className;
957
962
  }
963
+ /* The wrapper may rely on inline styles from React rather than classes. */
964
+ if (typeof window !== "undefined" && typeof window.getComputedStyle === "function") {
965
+ var metrics = ["display", "width", "min-width", "align-items", "justify-content", "gap", "padding", "font-size", "font-family", "font-weight", "line-height", "color"];
966
+ for (var mi = 0; mi < metrics.length; mi += 1) {
967
+ var value = "";
968
+ try { value = window.getComputedStyle(rowSource).getPropertyValue(metrics[mi]) || ""; } catch (error) { value = ""; }
969
+ if (value !== "" && value !== "auto") clone.style[metrics[mi]] = value;
970
+ }
971
+ clone.style.whiteSpace = "nowrap";
972
+ }
958
973
  /* Keep the wrapper that holds the icon (it owns the size and baseline) and
959
974
  drop only the template's text. */
960
975
  var iconChild = icon;
@@ -968,6 +983,9 @@
968
983
  var label = document.createElement("span");
969
984
  if (labelClass !== "") label.className = labelClass;
970
985
  label.textContent = t("trash.title");
986
+ label.style.whiteSpace = "nowrap";
987
+ label.style.overflow = "hidden";
988
+ label.style.textOverflow = "ellipsis";
971
989
  clone.appendChild(label);
972
990
  clone.setAttribute("data-wsr-clone", "true");
973
991
  clone.setAttribute("aria-label", t("trash.title"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ws-recency",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "Sidebar session management for DeepSeek Harness: workspace groups sorted by latest activity, stale history folded, a global pinned section, follow-up marks, session delete into a recoverable trash, per-session token statistics split by tool, and moving a session to another workspace.",
5
5
  "license": "MIT",
6
6
  "author": "chyxhtc",