dsh-deepseek-web-login 0.6.17 → 0.6.19

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/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
2
 
3
3
  本项目遵循大致语义化版本;日期为本地时间。
4
4
 
5
+ ## 0.6.19 — 2026-10-01
6
+
7
+ **面板文案:传输层统一称为 Chrome 网络栈。**
8
+
9
+ - 设置页按钮、状态提示、切换反馈、降级提示、tooltip 中的「Chromium 网络栈」全部改为「Chrome 网络栈」,
10
+ 与实际要模仿的指纹(Chrome)保持一致。
11
+ - tooltip 增加原因说明:官方 DSH 桌面端把插件跑成 `ELECTRON_RUN_AS_NODE=1` 的 Node 子进程,
12
+ 拿不到 `electron.net.fetch`,因此不支持 Chrome 网络栈,只能降级为 Node fetch。
13
+ - 内部实现、传输层类型、默认值仍保持 `chromium` 不变(底层就是 Chromium 网络库,指纹与 Chrome 一致)。
14
+
15
+ ## 0.6.18 — 2026-10-01
16
+
17
+ **修会话爆炸:token 刷新/内部请求不再冲掉 chat 的网页端会话。**
18
+
19
+ 用户现场:链式投喂下,一个窗口聊了几句后网页端突然多出几个新会话,上一句的会话也没了;
20
+ 刷新后只剩一个。根因有两个,合在一起触发:
21
+
22
+ 1. **`accountKey` 用 `token|cookie` 当账号身份** —— token 每 2 小时左右就会刷新(自动/手动重登),
23
+ 刷新后插件认为"换了账号",旧网页端会话被退役,投喂链也断了。
24
+ 2. **内部请求(`session-title`、`compaction` 等)也传 `promptParts` 走链式** —— 这些请求的条目
25
+ 和 chat 的链不匹配,触发了「历史不是严格追加 → 重开链 → 强制换新会话」,于是每个标题/压缩
26
+ 请求都把当前 chat 会话冲掉,旧的删、新的建。
27
+
28
+ ### 改动
29
+
30
+ - `webapi.ts`:`accountKey` 优先用服务端返回的 `user.id` 当稳定身份;没有 `user.id` 时才回退到
31
+ `token|cookie`(兼容手动粘 token 的老记录)。
32
+ - `adapter.ts`:只有用户可见的 `chat` 才把 `promptParts` 传下去;`session-title` / `compaction`
33
+ 等内部调用走全量,不再抢 chat 的链。
34
+ - `context-feed.ts` / `webapi.ts`:没有 `promptParts` 的请求不触发「强制换新会话」,也不会因为
35
+ 没 ready 而把 chat 的链删掉。
36
+ - 回归用例:`check-session-reuse` +2(token 刷新稳定性/回退)、`check-context-chain` +1、
37
+ `check-context-feed` +1,全部反向验证。
38
+
5
39
  ## 0.6.17 — 2026-10-01
6
40
 
7
41
  **增量投喂不再重发「模型上一句回答」(用户反馈:完全没必要)。**
package/lib/client.js CHANGED
@@ -2162,7 +2162,7 @@ background:var(--bg2);white-space:pre-wrap;font-size:12px}
2162
2162
  const transportRow = el("div", "dsw-gate-row");
2163
2163
  transportRow.append(el("span", "dsw-gate-label", "请求从哪出去"));
2164
2164
  const transportBtns = {};
2165
- for (const pair of [["chromium", "Chromium 网络栈(推荐)"], ["node", "Node"]]) {
2165
+ for (const pair of [["chromium", "Chrome 网络栈(推荐)"], ["node", "Node"]]) {
2166
2166
  const key = pair[0];
2167
2167
  const btn = el("button", "dsw-btn ghost dsw-preset", pair[1]);
2168
2168
  btn.addEventListener("click", () => void saveTransport(key));
@@ -2306,9 +2306,9 @@ background:var(--bg2);white-space:pre-wrap;font-size:12px}
2306
2306
  for (const key of Object.keys(transportBtns)) transportBtns[key].classList.toggle("active", key === requested);
2307
2307
  const available = info.chromiumAvailable !== false;
2308
2308
  transportBtns.chromium.disabled = !available;
2309
- transportBtns.chromium.title = available ? "" : "本环境拿不到 electron.net.fetch(只有 Electron 的 utility 进程里有)";
2310
- const parts = [effective === "chromium" ? "实际生效:Chromium 网络栈" : "实际生效:Node fetch"];
2311
- if (info.degraded) parts.push("配置要求 Chromium,但本环境不支持,已降级为 Node");
2309
+ transportBtns.chromium.title = available ? "" : "本环境拿不到 electron.net.fetch(官方 DSH 桌面端把插件跑成 Node 子进程,不支持 Chrome 网络栈)";
2310
+ const parts = [effective === "chromium" ? "实际生效:Chrome 网络栈" : "实际生效:Node fetch"];
2311
+ if (info.degraded) parts.push("配置要求 Chrome,但本环境不支持,已降级为 Node");
2312
2312
  if (effective === "chromium") parts.push("cipher 列表哈希与 Chrome 一致、ALPN 走 h2");
2313
2313
  transportHint.textContent = parts.join(" · ");
2314
2314
  transportProxyHint.textContent = String(info.hint ?? "");
@@ -2322,7 +2322,7 @@ background:var(--bg2);white-space:pre-wrap;font-size:12px}
2322
2322
  });
2323
2323
  if (result?.ok) {
2324
2324
  applyTransportCard(result);
2325
- transportMsg.textContent = `已切换到 ${result.effective === "chromium" ? "Chromium 网络栈" : "Node fetch"},即时生效` + (result.persisted === false ? "(未能写入配置,重启后会回到上次保存的值)" : "(已写入配置,重启后仍生效)");
2325
+ transportMsg.textContent = `已切换到 ${result.effective === "chromium" ? "Chrome 网络栈" : "Node fetch"},即时生效` + (result.persisted === false ? "(未能写入配置,重启后会回到上次保存的值)" : "(已写入配置,重启后仍生效)");
2326
2326
  } else transportMsg.textContent = `切换失败:${result?.error ?? "未知原因"}`;
2327
2327
  } catch (error) {
2328
2328
  transportMsg.textContent = `切换失败:${error?.message ?? error}`;