dsh-deepseek-web-login 0.6.10 → 0.6.11
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 +26 -0
- package/lib/client.js +20 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +64 -5
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循大致语义化版本;日期为本地时间。
|
|
4
4
|
|
|
5
|
+
## 0.6.11 — 2026-09-30
|
|
6
|
+
|
|
7
|
+
**清理策略按投喂模式分开:链式模式不自动清理、改为手动;链式下也不再按轮数轮换会话。**
|
|
8
|
+
|
|
9
|
+
用户的原话:「全量模式跟链式模式的清理应该分开来算……全量模式下可以自动清理,但是链式模式
|
|
10
|
+
应该来个选项自己手动清理。不然以后链式还没结束,就已经清理了,当然在网页版上面不会有上下文。」
|
|
11
|
+
|
|
12
|
+
三条改动:
|
|
13
|
+
|
|
14
|
+
1. **链式模式下不按轮数轮换会话**(`effectiveReuseLimit`)。原来 `sessionReuseTurns` 默认 20 ——
|
|
15
|
+
全量模式下轮换是对的(每轮都是根消息,会话只是"壳"),但**链式下会话就是链的载体**:
|
|
16
|
+
轮换 = 每 20 轮定期把上下文清掉,模型那边真的会断。现在链式下上限取 ∞;
|
|
17
|
+
用户显式设成 0(每次新会话)时不改写他。
|
|
18
|
+
2. **链式模式下清理只手动**(`SessionCleaner.setManualOnly`)。自动到点删队列这条路在链式下关闭,
|
|
19
|
+
队列只攒着;全量模式保持原来的「延迟 / 立即 / 不删」三档。
|
|
20
|
+
⚠️ 只拦**自动**那一路:`flush()` 是显式动作,任何时候照样执行。
|
|
21
|
+
3. **面板新增「立即清理」**(`POST /cleanup`:`清掉当前网页端会话` + 立刻清空待删队列)。
|
|
22
|
+
链式模式下没有自动清理,所以必须给一个"现在就把网页端弄干净"的动作;清完之后下一轮会
|
|
23
|
+
重新当链首(全量发一次)。
|
|
24
|
+
|
|
25
|
+
另外:切换投喂模式时会**同步**清理策略(链式 ⇒ 手动;全量 ⇒ 自动),不用重启。
|
|
26
|
+
|
|
27
|
+
⚠️ 仍未解决(需要先确认能力):"每个 DSH 会话各用一个网页端会话"。DSH 目前没有把会话身份交给
|
|
28
|
+
适配器(请求头只有 `config / adapterDefaults / tools`;会话日志里 `sessionId` / `conversationId`
|
|
29
|
+
出现 0 次),所以现在只能做到"不污染、不造分支",做不到"按窗口各用各的会话"。
|
|
30
|
+
|
|
5
31
|
## 0.6.10 — 2026-09-30
|
|
6
32
|
|
|
7
33
|
**修「换个窗口聊天就把上下文清一次」:重开链时不再往复用来的会话里塞根消息。**
|
package/lib/client.js
CHANGED
|
@@ -1756,6 +1756,26 @@ background:var(--bg2);white-space:pre-wrap;font-size:12px}
|
|
|
1756
1756
|
cleanupRow.append(btn);
|
|
1757
1757
|
}
|
|
1758
1758
|
gateCard.append(cleanupRow);
|
|
1759
|
+
const cleanupNowRow = el("div", "dsw-gate-row");
|
|
1760
|
+
cleanupNowRow.append(el("span", "dsw-gate-label", "立即清理"));
|
|
1761
|
+
const cleanupNowBtn = el("button", "dsw-btn ghost", "清掉当前网页端会话");
|
|
1762
|
+
const cleanupNowHint = el("span", "dsw-hint", "");
|
|
1763
|
+
cleanupNowBtn.addEventListener("click", () => {
|
|
1764
|
+
cleanupNowBtn.disabled = true;
|
|
1765
|
+
cleanupNowHint.textContent = "清理中…";
|
|
1766
|
+
api("/cleanup", {
|
|
1767
|
+
method: "POST",
|
|
1768
|
+
body: "{}"
|
|
1769
|
+
}).then((result) => {
|
|
1770
|
+
cleanupNowHint.textContent = result?.cleared ? `已退出会话 ${String(result.cleared).slice(0, 8)}…,队列剩 ${result?.pending ?? 0} 个;下一轮会重新当链首(全量发一次)` : `没有在用会话;队列剩 ${result?.pending ?? 0} 个`;
|
|
1771
|
+
}).catch((error) => {
|
|
1772
|
+
cleanupNowHint.textContent = `清理失败:${error?.message ?? error}`;
|
|
1773
|
+
}).finally(() => {
|
|
1774
|
+
cleanupNowBtn.disabled = false;
|
|
1775
|
+
});
|
|
1776
|
+
});
|
|
1777
|
+
cleanupNowRow.append(cleanupNowBtn, cleanupNowHint);
|
|
1778
|
+
gateCard.append(cleanupNowRow);
|
|
1759
1779
|
const cleanupHint = el("p", "dsw-hint", "");
|
|
1760
1780
|
gateCard.append(cleanupHint);
|
|
1761
1781
|
const cleanupRanges = el("div");
|