dsh-ws-recency 0.21.0 → 0.22.0

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/README.md CHANGED
@@ -125,7 +125,7 @@ DSH 原生的置顶只把会话顶到**它所属工作区分组的第一行**,
125
125
  1. 每轮回复底部的动作行(复制 / 点赞 / 分支那一排)里点 **交接到新会话**:插件把交接指令放进输入框并尝试直接发送(发不出去会在卡片上提示你按回车);
126
126
  2. 当前会话的 AI 输出一个 ```handoff 代码块——**只写文档路径和要点,不粘贴文档内容**;
127
127
  3. 抓到代码块后,**在该轮回复下方**出现一张问询卡片,和工具向用户提问的形态一致:
128
- - **确认,交接到新会话**(默认选中):当前工作区开新会话,内容预填进输入框;
128
+ - 卡片样式沿用宿主问询卡:标题 + 编号选项 + 底部动作;**确认,交接到新会话**(默认选中):当前工作区开新会话,内容预填进输入框;
129
129
  - **不满意,重新生成一版**:让当前会话按同样的要求再写一份;
130
130
  - 底部输入框:填写调整意见(例如"多写接口约束、少写历史"),提交后按这些要求重写;
131
131
  - 「查看内容」展开只读预览,「放弃交接」收起卡片。
@@ -169,7 +169,7 @@ dsh plugin --profile <profile> add github:chyxhtc/dsh-ws-recency
169
169
  或固定版本的预构建包:
170
170
 
171
171
  ```powershell
172
- dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.21.0/dsh-ws-recency-0.21.0.tgz
172
+ dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.22.0/dsh-ws-recency-0.22.0.tgz
173
173
  ```
174
174
 
175
175
  装完把 `dsh-ws-recency` 加进 `~/.hypers-work/profiles/<profile>/package.json` 的 `dsh.profile.bundles`,重启应用。
package/client.js CHANGED
@@ -148,9 +148,29 @@
148
148
  ".wsr-handoff-option-desc{font-size:11px;color:var(--dsw-alias-label-tertiary)}",
149
149
  ".wsr-handoff-extra{width:100%;box-sizing:border-box;min-height:56px;max-height:140px;resize:vertical;font:inherit;font-size:12px;line-height:1.6;padding:8px 10px;border-radius:8px;border:.5px solid var(--dsw-alias-border-l2,rgba(255,255,255,.16));background:var(--dsw-alias-bg-layer-1,#1b1b1b);color:var(--dsw-alias-label-primary,#e6e6e6)}",
150
150
  ".wsr-handoff-body{white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.6;max-height:220px;overflow:auto;padding:8px 10px;border-radius:8px;background:var(--dsw-alias-bg-layer-1,#1b1b1b)}",
151
- ".wsr-handoff-card{display:flex;flex-direction:column;gap:8px;margin:8px 0;padding:12px 14px;border:.5px solid var(--dsw-alias-border-l2,rgba(255,255,255,.16));border-radius:10px;background:var(--dsw-alias-bg-layer-2,rgba(255,255,255,.04))}",
152
- ".wsr-handoff-head{font-size:12px;color:var(--dsw-alias-label-secondary)}",
153
- ".wsr-handoff-actions{display:flex;gap:6px;align-items:center;white-space:nowrap}",
151
+ ".wsr-qcard{width:100%;max-width:var(--dsh-chat-content-width,100%);border-radius:var(--dsw-radius-xl,16px);background:var(--dsw-specific-input-major,var(--dsw-alias-bg-layer-2));box-shadow:var(--dsw-elevation-panel,0 8px 24px rgba(0,0,0,.35));color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;padding:0 0 10px;margin:8px 0;overflow:hidden}",
152
+ ".wsr-qcard *{box-sizing:border-box}",
153
+ ".wsr-qhead{display:flex;align-items:flex-start;gap:8px;padding:14px 16px 8px}",
154
+ ".wsr-qheading{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}",
155
+ ".wsr-qeyebrow{font-size:11px;line-height:16px;color:var(--dsw-alias-label-tertiary);text-transform:uppercase;letter-spacing:.04em}",
156
+ ".wsr-qtitle{font-size:15px;font-weight:500;line-height:22px;color:var(--dsw-alias-label-primary)}",
157
+ ".wsr-qdetail{font-size:11px;line-height:16px;color:var(--dsw-alias-label-tertiary)}",
158
+ ".wsr-qicon{flex:none;border:none;background:transparent;color:var(--dsw-alias-label-tertiary);font:inherit;font-size:12px;cursor:pointer;padding:2px 6px;border-radius:6px}",
159
+ ".wsr-qicon:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08));color:var(--dsw-alias-label-primary)}",
160
+ ".wsr-qoptions{display:flex;flex-direction:column;gap:1px;margin:8px 0 0;padding:4px 12px}",
161
+ ".wsr-qoption{display:flex;align-items:flex-start;gap:8px;width:100%;min-height:40px;padding:8px 12px 8px 8px;border:1px solid transparent;border-radius:var(--dsw-radius-md,8px);background:transparent;color:inherit;text-align:left;cursor:pointer;font:inherit;transition:background-color .12s,border-color .12s}",
162
+ ".wsr-qoption:hover,.wsr-qoption-selected{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}",
163
+ ".wsr-qoption-selected{border-color:var(--dsw-alias-border-l2,rgba(255,255,255,.16))}",
164
+ ".wsr-qnum{flex:none;width:18px;font-size:12px;line-height:20px;color:var(--dsw-alias-label-tertiary);text-align:center}",
165
+ ".wsr-qtext{display:flex;flex-direction:column;gap:2px;min-width:0}",
166
+ ".wsr-qextra{padding:4px 16px 0}",
167
+ ".wsr-qpreview{margin:8px 16px 0;padding:8px 10px;border-radius:8px;background:var(--dsw-alias-bg-layer-1,rgba(0,0,0,.24));white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.6;max-height:220px;overflow:auto}",
168
+ ".wsr-qfooter{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:8px 16px 0}",
169
+ ".wsr-qactions{display:flex;align-items:center;gap:8px}",
170
+ ".wsr-qcancel{border:none;background:transparent;color:var(--dsw-alias-label-tertiary);font:inherit;font-size:12px;cursor:pointer;padding:4px 8px;border-radius:6px}",
171
+ ".wsr-qcancel:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08))}",
172
+ ".wsr-qsubmit{border:none;border-radius:8px;background:var(--dsw-alias-brand-primary,#4f7cff);color:#fff;font:inherit;font-size:12px;font-weight:500;cursor:pointer;padding:6px 14px}",
173
+ ".wsr-qsubmit:hover{filter:brightness(1.06)}",
154
174
  ".wsr-handoff-live{margin:8px 0;font-size:12px;color:var(--dsw-alias-label-tertiary)}",
155
175
  ".wsr-msg-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--dsw-alias-label-tertiary);cursor:pointer}",
156
176
  ".wsr-msg-btn:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08));color:var(--dsw-alias-label-primary)}",
@@ -299,6 +319,7 @@
299
319
  "handoff.extraPlaceholder": "补充调整意见(填了就按这些要求重写,例如:多写接口约束、少写历史)",
300
320
  "handoff.preview": "查看内容",
301
321
  "handoff.submit": "提交",
322
+ "handoff.eyebrow": "需要你确认",
302
323
  "handoff.regeneratePrompt": "这份交接说明需要重写。请按最初同样的要求再输出一份,同样写进 ```handoff 代码块,路径与要点保持精炼。",
303
324
  "handoff.adjustPrompt": "请按下面的补充要求重写交接说明,保持 ```handoff 代码块格式:",
304
325
  "move.title": "移动到工作区",
@@ -430,6 +451,7 @@
430
451
  "handoff.extraPlaceholder": "Adjustments (if filled, the note is rewritten with them: more constraints, less history, …)",
431
452
  "handoff.preview": "Show note",
432
453
  "handoff.submit": "Submit",
454
+ "handoff.eyebrow": "Needs your decision",
433
455
  "handoff.regeneratePrompt": "Rewrite the handoff note with the same rules as before, again inside a ```handoff block.",
434
456
  "handoff.adjustPrompt": "Rewrite the handoff note following these adjustments, keeping the ```handoff block format:",
435
457
  "move.title": "Move to workspace",
@@ -2115,10 +2137,10 @@
2115
2137
  /**
2116
2138
  * The handoff question card.
2117
2139
  *
2118
- * Two mutually exclusive choices and one free-text field, the same shape as a
2119
- * tool asking the user a question: confirm and carry over, regenerate, or say
2120
- * what to change. The note itself is read-only here - detail edits belong in
2121
- * the new Session's composer.
2140
+ * Visual language copied from the Host's own ask-a-question card (the one the
2141
+ * question tool renders): a raised panel with a title, numbered option rows
2142
+ * and one footer of actions. Two mutually exclusive choices plus a free-text
2143
+ * field, which takes precedence when it has content.
2122
2144
  */
2123
2145
  function HandoffTailCard(props) {
2124
2146
  var sessionId = props !== undefined && props !== null && typeof props.sessionId === "string" ? props.sessionId : "";
@@ -2142,73 +2164,70 @@
2142
2164
  }
2143
2165
  if (state.phase !== "ready") return null;
2144
2166
 
2145
- var rows = [
2146
- h("label", { className: "wsr-handoff-option", key: "opt-confirm" },
2147
- h("input", {
2148
- type: "radio",
2149
- name: "wsr-handoff-" + sessionId,
2150
- checked: picked === "confirm",
2151
- onChange: function () { setPicked("confirm"); },
2152
- }),
2153
- h("span", { className: "wsr-handoff-option-text" },
2154
- h("span", { className: "wsr-handoff-option-title" }, t("handoff.confirm")),
2155
- h("span", { className: "wsr-handoff-option-desc" }, t("handoff.confirmDesc")),
2167
+ function optionRow(id, index, title, description) {
2168
+ return h("button", {
2169
+ type: "button",
2170
+ key: "opt-" + id,
2171
+ className: "wsr-qoption" + (picked === id ? " wsr-qoption-selected" : ""),
2172
+ onClick: function () { setPicked(id); },
2173
+ },
2174
+ h("span", { className: "wsr-qnum" }, String(index)),
2175
+ h("span", { className: "wsr-qtext" },
2176
+ h("span", { className: "wsr-qtitle" }, title),
2177
+ h("span", { className: "wsr-qdetail" }, description),
2156
2178
  ),
2157
- ),
2158
- h("label", { className: "wsr-handoff-option", key: "opt-redo" },
2159
- h("input", {
2160
- type: "radio",
2161
- name: "wsr-handoff-" + sessionId,
2162
- checked: picked === "redo",
2163
- onChange: function () { setPicked("redo"); },
2164
- }),
2165
- h("span", { className: "wsr-handoff-option-text" },
2166
- h("span", { className: "wsr-handoff-option-title" }, t("handoff.regen")),
2167
- h("span", { className: "wsr-handoff-option-desc" }, t("handoff.regenDesc")),
2179
+ );
2180
+ }
2181
+
2182
+ return h("div", { className: "wsr-qcard" },
2183
+ h("div", { className: "wsr-qhead" },
2184
+ h("div", { className: "wsr-qheading" },
2185
+ h("div", { className: "wsr-qeyebrow" }, t("handoff.eyebrow")),
2186
+ h("div", { className: "wsr-qtitle" }, t("handoff.found")),
2168
2187
  ),
2169
- ),
2170
- h("textarea", {
2171
- className: "wsr-handoff-extra",
2172
- key: "extra",
2173
- placeholder: t("handoff.extraPlaceholder"),
2174
- value: extra,
2175
- onChange: function (event) { setExtra(event.target.value); },
2176
- }),
2177
- h("div", { className: "wsr-handoff-actions", key: "actions" },
2178
2188
  h("button", {
2179
2189
  type: "button",
2180
- className: "wsr-btn",
2190
+ className: "wsr-qicon",
2191
+ title: t("handoff.preview"),
2181
2192
  onClick: function () {
2182
- if (extra.trim() !== "") { rewriteHandoff(sessionId, extra); return; }
2183
- if (picked === "redo") { rewriteHandoff(sessionId, ""); return; }
2184
- carryHandoff(sessionId, state.block);
2185
- },
2186
- }, t("handoff.submit")),
2187
- h("button", {
2188
- type: "button",
2189
- className: "wsr-btn",
2190
- onClick: function () { resetHandoff(); },
2191
- }, t("handoff.cancel")),
2192
- h("button", {
2193
- type: "button",
2194
- className: "wsr-btn",
2195
- onClick: function () {
2196
- var preview = typeof document !== "undefined" ? document.querySelector('[data-wsr-handoff-preview="' + sessionId + '"]') : null;
2197
- if (preview !== null && preview !== undefined && preview.style !== undefined) {
2198
- preview.style.display = preview.style.display === "none" ? "" : "none";
2193
+ var body = typeof document !== "undefined" ? document.querySelector('[data-wsr-handoff-preview="' + sessionId + '"]') : null;
2194
+ if (body !== null && body !== undefined && body.style !== undefined) {
2195
+ body.style.display = body.style.display === "none" ? "" : "none";
2199
2196
  }
2200
2197
  },
2201
2198
  }, t("handoff.preview")),
2202
2199
  ),
2203
- ];
2204
-
2205
- return h("div", { className: "wsr-handoff-card" },
2206
- h("div", { className: "wsr-handoff-head" }, t("handoff.found")),
2207
- h("div", { "data-wsr-handoff-preview": sessionId, className: "wsr-handoff-body", style: { display: "none" } }, state.block),
2208
- rows[0],
2209
- rows[1],
2210
- rows[2],
2211
- rows[3],
2200
+ h("div", { className: "wsr-qoptions" },
2201
+ optionRow("confirm", 1, t("handoff.confirm"), t("handoff.confirmDesc")),
2202
+ optionRow("redo", 2, t("handoff.regen"), t("handoff.regenDesc")),
2203
+ ),
2204
+ h("div", { className: "wsr-qextra" },
2205
+ h("textarea", {
2206
+ className: "wsr-handoff-extra",
2207
+ placeholder: t("handoff.extraPlaceholder"),
2208
+ value: extra,
2209
+ onChange: function (event) { setExtra(event.target.value); },
2210
+ }),
2211
+ ),
2212
+ h("div", { "data-wsr-handoff-preview": sessionId, className: "wsr-qpreview", style: { display: "none" } }, state.block),
2213
+ h("div", { className: "wsr-qfooter" },
2214
+ h("div", { className: "wsr-qactions" },
2215
+ h("button", {
2216
+ type: "button",
2217
+ className: "wsr-qcancel",
2218
+ onClick: function () { resetHandoff(); },
2219
+ }, t("handoff.cancel")),
2220
+ h("button", {
2221
+ type: "button",
2222
+ className: "wsr-qsubmit",
2223
+ onClick: function () {
2224
+ if (extra.trim() !== "") { rewriteHandoff(sessionId, extra); return; }
2225
+ if (picked === "redo") { rewriteHandoff(sessionId, ""); return; }
2226
+ carryHandoff(sessionId, state.block);
2227
+ },
2228
+ }, t("handoff.submit")),
2229
+ ),
2230
+ ),
2212
2231
  );
2213
2232
  }
2214
2233
 
package/index.js CHANGED
@@ -32,7 +32,7 @@ import { dirname, join } from "node:path";
32
32
  export const name = "ws-recency";
33
33
 
34
34
  /** Version marker reported by the health route. */
35
- export const HOST_VERSION = "0.21.0";
35
+ export const HOST_VERSION = "0.22.0";
36
36
 
37
37
  /**
38
38
  * Exact routes the client half calls. Registered on the bare web server, so they
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ws-recency",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
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, archived sessions managed from that same trash panel, per-session token statistics with an argument/result split and an option to count tool arguments as the agent's writing, and moving a session to another workspace.",
5
5
  "license": "MIT",
6
6
  "author": "chyxhtc",