dsh-ws-recency 0.11.2 → 0.11.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +8 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -130,7 +130,7 @@ dsh plugin --profile <profile> add github:chyxhtc/dsh-ws-recency
130
130
  或固定版本的预构建包:
131
131
 
132
132
  ```powershell
133
- dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.11.2/dsh-ws-recency-0.11.2.tgz
133
+ dsh plugin --profile <profile> add https://github.com/chyxhtc/dsh-ws-recency/releases/download/v0.11.3/dsh-ws-recency-0.11.3.tgz
134
134
  ```
135
135
 
136
136
  装完把 `dsh-ws-recency` 加进 `~/.hypers-work/profiles/<profile>/package.json` 的 `dsh.profile.bundles`,重启应用。
package/index.js CHANGED
@@ -551,7 +551,13 @@ export async function moveSessionToWorkspace(ctx, sessionId, workspaceId) {
551
551
  cached header and the live one have to follow - otherwise an open session is
552
552
  refused with its old directory. */
553
553
  const movedHeader = { ...header, cwd: targetPath };
554
- const wasLive = typeof ctx.sessions?.get === "function" && ctx.sessions.get(sessionId) !== undefined;
554
+ /* Cordis throws on an undeclared service, so the probe is guarded. */
555
+ let wasLive = false;
556
+ try {
557
+ wasLive = typeof ctx.sessions?.get === "function" && ctx.sessions.get(sessionId) !== undefined;
558
+ } catch {
559
+ wasLive = false;
560
+ }
555
561
  try {
556
562
  if (typeof ctx.workspaceRegistry.indexHeader === "function") await ctx.workspaceRegistry.indexHeader(movedHeader);
557
563
  } catch {
@@ -692,7 +698,7 @@ export function apply(ctx) {
692
698
  }), "ws-recency: stats route");
693
699
  });
694
700
 
695
- webCtx.inject(["sessionPersistence", "workspaceRegistry"], (moveCtx) => {
701
+ webCtx.inject(["sessionPersistence", "workspaceRegistry", "sessions"], (moveCtx) => {
696
702
  moveMounted = true;
697
703
  webCtx.effect(() => server.register({
698
704
  kind: "exact",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ws-recency",
3
- "version": "0.11.2",
3
+ "version": "0.11.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, per-session token statistics split by tool, and moving a session to another workspace.",
5
5
  "license": "MIT",
6
6
  "author": "chyxhtc",