dsh-ws-recency 0.34.0 → 0.34.1

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/client.js +7 -0
  2. package/index.js +2618 -2598
  3. package/package.json +1 -1
package/client.js CHANGED
@@ -514,6 +514,7 @@
514
514
  "move.done": "已移动到「{workspace}」。若列表没刷新,切换一下工作区或重启应用。",
515
515
  "move.doneLive": "\n\n这个会话刚才是打开状态:建议重启应用后再继续对话,避免它沿用旧的目录。",
516
516
  "move.repaired": "已补登记到「{workspace}」:上一次移动只搬了日志、没登记工作区,这次把它补上了。",
517
+ "move.live": "这个会话正开着,不能移动。先切到别的会话,或重启应用后不要打开它,再来移动。",
517
518
  "adopt.title": "补登记游离会话",
518
519
  "adopt.description": "修复会话归属:把“目录属于某工作区却不在任何分组”的会话挂回去,并把仍挂在旧工作区分组里的重复归属清掉。",
519
520
  "adopt.action": "扫描并刷新",
@@ -819,6 +820,7 @@
819
820
  "archive.blank": "blank draft",
820
821
  "archive.workspace": "workspace",
821
822
  "move.failed": "Move failed: ",
823
+ "move.live": "This session is open, so it cannot be moved. Switch to another conversation, or restart the app and do not open it, then move it.",
822
824
  "stats.chart": "Where the tokens went",
823
825
  "stats.family.shell": "shell",
824
826
  "stats.family.files": "files",
@@ -3057,6 +3059,11 @@
3057
3059
  if (result.json.live === true) body.textContent += t("move.doneLive");
3058
3060
  return;
3059
3061
  }
3062
+ /* The raw persistence error names no remedy. */
3063
+ if (result.json !== null && result.json.code === "session-live") {
3064
+ body.textContent = t("move.live");
3065
+ return;
3066
+ }
3060
3067
  var reason = (result.json !== null && result.json.error) || (result.text || "").trim().slice(0, 160) || "(empty response)";
3061
3068
  body.textContent = t("move.failed") + "HTTP " + result.status + " \u00b7 " + reason;
3062
3069
  })