dsh-multipane 1.0.51 → 1.0.53
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/LICENSE +21 -21
- package/README.md +265 -253
- package/cordis.patch.yml +11 -11
- package/lib/client.js +19 -14
- package/lib/index.js +529 -241
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -17,7 +17,7 @@ window.__ModuleLoader__.load({
|
|
|
17
17
|
*/
|
|
18
18
|
const PLUGIN_LABEL = "多栏视图";
|
|
19
19
|
/* 与 package.json 的 version 必须一致(发版时两处同改;check-names.cjs 会校验)。 */
|
|
20
|
-
const PLUGIN_VERSION = "1.0.
|
|
20
|
+
const PLUGIN_VERSION = "1.0.53";
|
|
21
21
|
const NPM_LATEST_URL = "https://registry.npmjs.org/dsh-multipane/latest";
|
|
22
22
|
|
|
23
23
|
|
|
@@ -229,6 +229,7 @@ const PLUGIN_VERSION = "1.0.51";
|
|
|
229
229
|
"检查失败:{0}": "Check failed: {0}",
|
|
230
230
|
"正在从 npm 下载…": "Downloading from npm…",
|
|
231
231
|
"已更新到 {0},重启 App 后生效": "Updated to {0}; restart the app to apply",
|
|
232
|
+
"已更新到 {0},但依赖登记没同步({1}):下次装/卸别的插件可能把它退回旧版": "Updated to {0}, but the profile's dependency record was not synced ({1}) — installing or removing another plugin later may roll it back",
|
|
232
233
|
"更新失败:{0}": "Update failed: {0}",
|
|
233
234
|
"正在更新…": "Updating…",
|
|
234
235
|
"现在有 {0} 个会话正在运行。更新会替换插件文件,那个会话可能在半路读到新旧混着的代码而报错。确定要继续,就再点一次「仍然更新」。": "{0} sessions are running now. Updating replaces plugin files, so a running session may read a mix of old and new code and fail. Click \"Update anyway\" again to continue.",
|
|
@@ -2328,14 +2329,14 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
|
|
|
2328
2329
|
.dsv-pane .dsv-body [data-content-phase="active"] .an3WzG_scrollBody:has([data-chat-flow])>.an3WzG_composerSeat{margin-top:0}
|
|
2329
2330
|
/* 宿主聊天滚动管理器在「工具/明细折叠」后会在内容下方预留最多半个滚动区高度的空白,
|
|
2330
2331
|
在窄栏里尤其明显;这里把它的预留位清零。 */
|
|
2331
|
-
.dsv-pane .dsv-body [data-chat-turn-spacer]{height:0!important}
|
|
2332
|
-
|
|
2333
|
-
/* ==== 1.0.46:窗格里的「轮次导航条」不再忽隐忽现(会话右侧那列短横线)====
|
|
2334
|
-
宿主在会话宽度 ≤900px 时整条 display:none,分栏后每栏必然更窄,于是开着插件
|
|
2335
|
-
它就没了。1.0.45 把它放开,却又用 display:none 在窄窗格里收回:来回切 display
|
|
2336
|
-
会让宿主的虚拟滚动把可用高度量成 0 并留在状态里,宽度回来也没人重算 ——
|
|
2337
|
-
拉窄消失后拖回原宽度也回不来(单向棘轮)。现在显示恒为 block(布局与测量
|
|
2338
|
-
一直在),只有窄到放不下时才隐藏**可见性**,恢复宽度立刻可见。
|
|
2332
|
+
.dsv-pane .dsv-body [data-chat-turn-spacer]{height:0!important}
|
|
2333
|
+
|
|
2334
|
+
/* ==== 1.0.46:窗格里的「轮次导航条」不再忽隐忽现(会话右侧那列短横线)====
|
|
2335
|
+
宿主在会话宽度 ≤900px 时整条 display:none,分栏后每栏必然更窄,于是开着插件
|
|
2336
|
+
它就没了。1.0.45 把它放开,却又用 display:none 在窄窗格里收回:来回切 display
|
|
2337
|
+
会让宿主的虚拟滚动把可用高度量成 0 并留在状态里,宽度回来也没人重算 ——
|
|
2338
|
+
拉窄消失后拖回原宽度也回不来(单向棘轮)。现在显示恒为 block(布局与测量
|
|
2339
|
+
一直在),只有窄到放不下时才隐藏**可见性**,恢复宽度立刻可见。
|
|
2339
2340
|
选择器用结构条件、不写宿主的哈希类名(如 SNx2jG_*),宿主升级换了哈希也不会失效。
|
|
2340
2341
|
|
|
2341
2342
|
⚠️ 1.0.50 修正:不能用 nav:has(button[data-index]) 当开关。宿主在容器宽度
|
|
@@ -3506,8 +3507,8 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
|
|
|
3506
3507
|
return null;
|
|
3507
3508
|
}, []);
|
|
3508
3509
|
|
|
3509
|
-
const paneId = react.useContext(PaneIdCtx);
|
|
3510
|
-
|
|
3510
|
+
const paneId = react.useContext(PaneIdCtx);
|
|
3511
|
+
|
|
3511
3512
|
/* ── 1.0.49:轮次导航条在窗格里不出现的取证 + 修正刺激 ──────────────────
|
|
3512
3513
|
宿主源码(app.asar → dsh-client-ui-chat/lib/client.js)里,那条短横线要同时满足:
|
|
3513
3514
|
1) `scroll.initialized === true` 才渲染 TurnNavigator(第 3622 行);
|
|
@@ -3624,7 +3625,7 @@ const TAB_LABEL_CHROME_DOT_PX = 46;
|
|
|
3624
3625
|
sessionId,
|
|
3625
3626
|
paneId
|
|
3626
3627
|
]);
|
|
3627
|
-
|
|
3628
|
+
|
|
3628
3629
|
if (typeof renderFactorySlot !== "function") return h("div", { className: "dsv-empty" }, t("这个版本没有提供会话内容区域"));
|
|
3629
3630
|
|
|
3630
3631
|
// A blank tab is the host's own "new session" page: the content factory
|
|
@@ -4952,7 +4953,7 @@ if (typeof renderFactorySlot !== "function") return h("div", { className: "dsv-e
|
|
|
4952
4953
|
h(TabContentMemo, {
|
|
4953
4954
|
sessionId: tabSessionId,
|
|
4954
4955
|
hero: tabHero,
|
|
4955
|
-
active: tabActive,
|
|
4956
|
+
active: tabActive,
|
|
4956
4957
|
sessions,
|
|
4957
4958
|
renderFactorySlot,
|
|
4958
4959
|
SessionProvider,
|
|
@@ -7764,10 +7765,14 @@ if (typeof renderFactorySlot !== "function") return h("div", { className: "dsv-e
|
|
|
7764
7765
|
const why = body === null || body === void 0 ? `HTTP ${res.status}` : hostMessage(String(body.message ?? ""));
|
|
7765
7766
|
throw new Error(why === "" ? `HTTP ${res.status}` : why);
|
|
7766
7767
|
}
|
|
7768
|
+
/* 宿主会在 warn 里说明「文件装好了,但 profile 的 package.json / pnpm-lock
|
|
7769
|
+
没改成功」。这种情况不能报成功就完事:下一次装别的插件还是会把它退回旧版,
|
|
7770
|
+
用户会再看到一模一样的「发现新版本」。 */
|
|
7771
|
+
const warn = body !== null && typeof body.warn === "string" ? body.warn.trim() : "";
|
|
7767
7772
|
setUpdate((prev) => ({
|
|
7768
7773
|
...prev,
|
|
7769
7774
|
phase: "done",
|
|
7770
|
-
text: t("已更新到 {0},重启 App 后生效", [target]),
|
|
7775
|
+
text: warn === "" ? t("已更新到 {0},重启 App 后生效", [target]) : t("已更新到 {0},但依赖登记没同步({1}):下次装/卸别的插件可能把它退回旧版", [target, hostMessage(warn)]),
|
|
7771
7776
|
canUpdate: false,
|
|
7772
7777
|
progress: 100,
|
|
7773
7778
|
forceHint: ""
|