dsh-ws-recency 0.34.0 → 0.34.2
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/client.js +12 -0
- package/index.js +2618 -2598
- 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. Restart the app, do not open it, then move it from the list.",
|
|
822
824
|
"stats.chart": "Where the tokens went",
|
|
823
825
|
"stats.family.shell": "shell",
|
|
824
826
|
"stats.family.files": "files",
|
|
@@ -3013,6 +3015,11 @@
|
|
|
3013
3015
|
panel.appendChild(body);
|
|
3014
3016
|
body.appendChild(statsDiv("wsr-stats-note", t("move.note")));
|
|
3015
3017
|
body.appendChild(statsDiv("wsr-move-warning", t("move.warning")));
|
|
3018
|
+
if (currentConversationId() === sessionId) {
|
|
3019
|
+
var liveNote = statsDiv("wsr-move-warning", t("move.live"));
|
|
3020
|
+
liveNote.setAttribute("data-wsr-move-live", "true");
|
|
3021
|
+
body.appendChild(liveNote);
|
|
3022
|
+
}
|
|
3016
3023
|
|
|
3017
3024
|
var current = workspaceOfSession(sessionId);
|
|
3018
3025
|
var items = (data.workspaces && data.workspaces.items) || [];
|
|
@@ -3057,6 +3064,11 @@
|
|
|
3057
3064
|
if (result.json.live === true) body.textContent += t("move.doneLive");
|
|
3058
3065
|
return;
|
|
3059
3066
|
}
|
|
3067
|
+
/* The raw persistence error names no remedy. */
|
|
3068
|
+
if (result.json !== null && result.json.code === "session-live") {
|
|
3069
|
+
body.textContent = t("move.live");
|
|
3070
|
+
return;
|
|
3071
|
+
}
|
|
3060
3072
|
var reason = (result.json !== null && result.json.error) || (result.text || "").trim().slice(0, 160) || "(empty response)";
|
|
3061
3073
|
body.textContent = t("move.failed") + "HTTP " + result.status + " \u00b7 " + reason;
|
|
3062
3074
|
})
|