dsh-ws-recency 0.19.1 → 0.19.3

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
@@ -122,7 +122,7 @@ DSH 原生的置顶只把会话顶到**它所属工作区分组的第一行**,
122
122
 
123
123
  长期会话的上下文迟早会满,被动压缩往往比"换个新会话、带上交接"更差。交接做成两步:
124
124
 
125
- 1. 会话「…」菜单 → **准备交接…**:插件把一段固定指令放进输入框(若放不进去就提供「复制指令」),你按回车发送;
125
+ 1. 会话「…」菜单或每轮回复底部的动作行 → **交接到新会话**:插件把一段固定指令放进输入框(若放不进去就提供「复制指令」),你按回车发送;
126
126
  2. 当前会话的 AI 按指令输出一个 ```handoff 代码块——**只写文档路径和要点,不粘贴文档内容**;
127
127
  3. 插件每 2 秒轮询最新回复,抓到代码块后弹出预览(可直接编辑);
128
128
  4. 点 **确认交接,开新会话**:在当前工作区开一个新会话,把"开场要求 + 交接块"预填进输入框,你按回车就开始;点 **继续补充** 回到输入框继续打磨。
@@ -167,7 +167,7 @@ dsh plugin --profile <profile> add github:chyxhtc/dsh-ws-recency
167
167
  或固定版本的预构建包:
168
168
 
169
169
  ```powershell
170
- dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.19.1/dsh-ws-recency-0.19.1.tgz
170
+ dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.19.3/dsh-ws-recency-0.19.3.tgz
171
171
  ```
172
172
 
173
173
  装完把 `dsh-ws-recency` 加进 `~/.hypers-work/profiles/<profile>/package.json` 的 `dsh.profile.bundles`,重启应用。
package/client.js CHANGED
@@ -140,8 +140,8 @@
140
140
  ".wsr-footer-action{display:flex;box-sizing:border-box;flex:none;align-items:center;justify-content:flex-start;gap:8px;width:calc(100% + 4px);min-width:0;height:42px;margin:4px -2px;padding:0 10px 0 8px;border:0;border-radius:12px;background:transparent;color:var(--dsw-alias-label-primary);font-family:inherit;font-size:14px;line-height:22px;text-align:left;cursor:pointer}",
141
141
  ".wsr-footer-action:hover{background:var(--dsw-alias-interactive-bg-hover)}",
142
142
  ".wsr-page{display:flex;flex-direction:column;gap:10px;padding:16px 18px;min-width:0;box-sizing:border-box;height:100%;overflow:auto}",
143
- ".wsr-header-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer}",
144
- ".wsr-header-btn:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08));color:var(--dsw-alias-label-primary)}",
143
+ ".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}",
144
+ ".wsr-msg-btn:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(255,255,255,.08));color:var(--dsw-alias-label-primary)}",
145
145
  ".wsr-handoff-status{font-size:12px;color:var(--dsw-alias-label-tertiary);line-height:1.6}",
146
146
  ".wsr-handoff-text{width:100%;box-sizing:border-box;min-height:220px;max-height:46vh;resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.6;padding: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)}",
147
147
  ".wsr-page-head{display:flex;align-items:center;gap:8px}",
@@ -264,7 +264,7 @@
264
264
  "stats.diagnose.unmounted": "\n\n(宿主半已加载,但统计路由没挂上——重启应用再试)",
265
265
  "stats.diagnose.noHost": "\n\n(宿主半未加载:需要重启应用加载新版本)",
266
266
  "menu.move": "移动到工作区…",
267
- "menu.handoff": "准备交接…",
267
+ "menu.handoff": "交接到新会话",
268
268
  "handoff.title": "会话交接",
269
269
  "handoff.note": "交接指令已经放进输入框(或点「复制指令」自己粘),发送后我在这里等 AI 写出交接块;抓到以后可以直接开到新会话。",
270
270
  "handoff.instruction": "我要把这个会话交接给一个新会话继续推进。请按下面的要求输出一份交接说明,写进一个 ```handoff 代码块里,我会原样交给新会话:\n\n1. 只给文档路径和一句话说明「读它为什么」,不要粘贴文档内容;\n2. 文档按重要性排序,标注哪些必读、哪些按需;\n3. 包含:目标、当前进度、尚未完成与下一步、关键决策与约束、踩过的坑、验证方式;\n4. 交接正文控制在 400 字以内(文档引用除外)。",
@@ -384,7 +384,7 @@
384
384
  "stats.diagnose.unmounted": "\n\n(the host half is loaded but the statistics route did not mount - restart the app and retry)",
385
385
  "stats.diagnose.noHost": "\n\n(the host half is not loaded: restart the app to pick up the new version)",
386
386
  "menu.move": "Move to workspace\u2026",
387
- "menu.handoff": "Prepare handoff\u2026",
387
+ "menu.handoff": "Hand off to a new session",
388
388
  "handoff.title": "Session handoff",
389
389
  "handoff.note": "The instruction is in the composer (or copy it yourself). Once you send it I watch for the handoff block and can carry it into a fresh Session.",
390
390
  "handoff.instruction": "I am handing this session over to a new one. Please answer with a handoff note inside a ```handoff code block, which I will pass on verbatim:\n\n1. Reference documents by path with one line on why to read them; never paste document contents.\n2. Order them by importance and mark which are required and which are optional.\n3. Cover: goal, current progress, remaining work and next step, key decisions and constraints, pitfalls, and how to verify.\n4. Keep the note under 400 words (references excluded).",
@@ -2082,21 +2082,25 @@
2082
2082
  poll(1500);
2083
2083
  }
2084
2084
 
2085
- /** Conversation header: the same handoff, one click from the branch button. */
2086
- function HandoffHeaderButton(props) {
2085
+ /**
2086
+ * Turn actions: the handoff sits in the same row as copy / rate / branch,
2087
+ * which the chat renders once at the end of a completed turn.
2088
+ */
2089
+ function HandoffTurnAction(props) {
2087
2090
  var Icon = ui.IconShareOutlineRegular;
2091
+ var Tooltip = ui.Tooltip;
2088
2092
  var label = t("menu.handoff");
2089
- return h("button", {
2093
+ var button = h("button", {
2090
2094
  type: "button",
2091
- className: "wsr-header-btn",
2092
- title: label,
2095
+ className: "wsr-msg-btn",
2093
2096
  "aria-label": label,
2094
- "data-wsr-handoff-header": "true",
2097
+ "data-wsr-handoff-action": "true",
2095
2098
  onClick: function () {
2096
2099
  var sessionId = props !== undefined && props !== null && typeof props.sessionId === "string" ? props.sessionId : null;
2097
2100
  if (sessionId !== null) openHandoffPanel(sessionId);
2098
2101
  },
2099
2102
  }, typeof Icon === "function" ? h(Icon, { size: 16 }) : null);
2103
+ return typeof Tooltip === "function" ? h(Tooltip, { label: label, side: "bottom" }, button) : button;
2100
2104
  }
2101
2105
 
2102
2106
  /** Session "..." menu row: hand the work over to a fresh Session. */
@@ -2893,14 +2897,14 @@
2893
2897
  }, ArgModeRow);
2894
2898
  });
2895
2899
 
2896
- ctx.slots.inject("conversation.session.header.utilities", function () {
2900
+ ctx.slots.inject("conversation.chat.assistant-actions", function () {
2897
2901
  return ctx.slots.register({
2898
- name: "conversation.session.header.utilities",
2902
+ name: "conversation.chat.assistant-actions",
2899
2903
  id: "ws-recency-handoff",
2900
- order: 10,
2904
+ order: 20,
2901
2905
  locale: NS,
2902
2906
  inject: function (sessionId) { return { sessionId: sessionId }; },
2903
- }, HandoffHeaderButton);
2907
+ }, HandoffTurnAction);
2904
2908
  });
2905
2909
 
2906
2910
  ctx.slots.inject("sidebar.workspaces.session.menu.item", function () {
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.19.1";
35
+ export const HOST_VERSION = "0.19.3";
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.19.1",
3
+ "version": "0.19.3",
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",