dsh-ws-recency 0.13.3 → 0.13.5

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 +25 -74
  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.5/dsh-ws-recency-0.13.5.tgz
139
139
  ```
140
140
 
141
141
  装完把 `dsh-ws-recency` 加进 `~/.hypers-work/profiles/<profile>/package.json` 的 `dsh.profile.bundles`,重启应用。
package/client.js CHANGED
@@ -924,71 +924,6 @@
924
924
  return typeof id === "string" && id !== "" ? id : null;
925
925
  }
926
926
 
927
- /** Clone one real footer entry into the slot so the icon box and text line up. */
928
- function decorateFooterAction() {
929
- if (typeof document === "undefined") return;
930
- var mine = document.querySelector('[data-wsr-footer="true"]');
931
- if (mine === null || typeof mine.parentElement === "undefined" || mine.parentElement === null) return;
932
- var container = mine.parentElement;
933
- if (typeof container.querySelectorAll !== "function" || typeof container.insertBefore !== "function") return;
934
- if (container.querySelector("[data-wsr-clone]") !== null || typeof mine.style === "undefined") return;
935
- var template = null;
936
- var buttons = container.querySelectorAll("button");
937
- for (var i = 0; i < buttons.length; i += 1) {
938
- var candidate = buttons[i];
939
- if (candidate === mine) continue;
940
- if (typeof candidate.closest === "function" && candidate.closest("[data-wsr-footer]") !== null) continue;
941
- if (typeof candidate.querySelector !== "function" || candidate.querySelector("svg") === null) continue;
942
- template = candidate;
943
- break;
944
- }
945
- if (template === null || typeof template.cloneNode !== "function") return;
946
- var clone;
947
- try {
948
- clone = template.cloneNode(true);
949
- } catch (error) {
950
- return;
951
- }
952
- var icon = typeof clone.querySelector === "function" ? clone.querySelector("svg") : null;
953
- var labelClass = "";
954
- if (typeof clone.querySelector === "function") {
955
- var labelTemplate = clone.querySelector("span");
956
- if (labelTemplate !== null && typeof labelTemplate.className === "string") labelClass = labelTemplate.className;
957
- }
958
- /* Keep the wrapper that holds the icon (it owns the size and baseline) and
959
- drop only the template's text. */
960
- var iconChild = icon;
961
- while (iconChild !== null && iconChild.parentElement !== null && iconChild.parentElement !== undefined && iconChild.parentElement !== clone) {
962
- iconChild = iconChild.parentElement;
963
- }
964
- var kids = Array.prototype.slice.call(clone.children || []);
965
- for (var k = 0; k < kids.length; k += 1) {
966
- if (kids[k] !== iconChild) clone.removeChild(kids[k]);
967
- }
968
- var label = document.createElement("span");
969
- if (labelClass !== "") label.className = labelClass;
970
- label.textContent = t("trash.title");
971
- clone.appendChild(label);
972
- clone.setAttribute("data-wsr-clone", "true");
973
- clone.setAttribute("aria-label", t("trash.title"));
974
- clone.addEventListener("click", function (event) {
975
- if (event !== undefined && typeof event.preventDefault === "function") event.preventDefault();
976
- openTrashPanel();
977
- });
978
- /* Keep the template's icon box (it owns the size and the baseline) but put
979
- our own trash glyph inside it. */
980
- var ourSvg = typeof mine.querySelector === "function" ? mine.querySelector("svg") : null;
981
- if (icon !== null && ourSvg !== null && icon.parentElement !== null && icon.parentElement !== undefined) {
982
- try {
983
- icon.parentElement.replaceChild(ourSvg, icon);
984
- } catch (error) {
985
- /* keep the template icon */
986
- }
987
- }
988
- container.insertBefore(clone, mine);
989
- mine.style.display = "none";
990
- }
991
-
992
927
  /** The nearest horizontal flex row above the stats: the whole footer dock. */
993
928
  function composerDockOf(row) {
994
929
  var node = row;
@@ -1117,14 +1052,12 @@
1117
1052
  var settings = settingsOf();
1118
1053
  if (!ready(sessions) || !ready(workspaces)) {
1119
1054
  decorateComposerStats();
1120
- decorateFooterAction();
1121
1055
  return;
1122
1056
  }
1123
1057
 
1124
1058
  var entries = collect();
1125
1059
  if (entries.length === 0) {
1126
1060
  decorateComposerStats();
1127
- decorateFooterAction();
1128
1061
  return;
1129
1062
  }
1130
1063
 
@@ -1133,7 +1066,6 @@
1133
1066
  renderPinned(entries, sessions, workspaces, settings);
1134
1067
  if (settings.colors) decorateRows(entries, sessions, data.statuses, settings);
1135
1068
  decorateComposerStats();
1136
- decorateFooterAction();
1137
1069
  }
1138
1070
 
1139
1071
  function schedule() {
@@ -1888,17 +1820,36 @@
1888
1820
  return h("button", {
1889
1821
  type: "button",
1890
1822
  className: "wsr-footer-action",
1891
- "data-wsr-footer": "true",
1892
- "data-wide": wide ? "true" : "false",
1893
1823
  title: label,
1894
1824
  "aria-label": label,
1895
1825
  "aria-haspopup": "dialog",
1826
+ style: {
1827
+ boxSizing: "border-box",
1828
+ width: "100%",
1829
+ alignSelf: "stretch",
1830
+ display: "flex",
1831
+ alignItems: "center",
1832
+ justifyContent: "flex-start",
1833
+ gap: "10px",
1834
+ minHeight: "40px",
1835
+ padding: "0 10px",
1836
+ border: "none",
1837
+ background: "transparent",
1838
+ color: "var(--dsw-alias-label-primary)",
1839
+ borderRadius: "10px",
1840
+ font: "inherit",
1841
+ fontSize: "14px",
1842
+ lineHeight: "22px",
1843
+ cursor: "pointer",
1844
+ textAlign: "left",
1845
+ },
1896
1846
  onClick: function () { openTrashPanel(); },
1897
1847
  },
1898
- typeof Icon === "function"
1899
- ? h("span", { className: "wsr-footer-glyph", "aria-hidden": "true" }, h(Icon, { size: wide ? 16 : 18 }))
1900
- : null,
1901
- wide ? h("span", { className: "wsr-footer-label" }, label) : null);
1848
+ h("span", {
1849
+ style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: "20px", height: "20px", flex: "none" },
1850
+ "aria-hidden": "true",
1851
+ }, typeof Icon === "function" ? h(Icon, { size: 18 }) : null),
1852
+ wide ? h("span", { style: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" } }, label) : null);
1902
1853
  }
1903
1854
 
1904
1855
  /**
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.5",
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",