dsh-deepseek-web-login 0.6.35 → 0.6.36

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.36 — 2026-10-02
6
+
7
+ **把"提示词里到底有什么"变成可查的事实(诊断),并顺带给出这次现场的完整核对结论。**
8
+
9
+ 用户反复问「是不是把答案直接告诉模型了」—— 这个问题**只靠字符数回答不了**:一个 25k 的提示词
10
+ 既可能是"把模型的旧回答又发了一遍"(缺陷),也可能是"工具返回"(**正常且必要**)。
11
+ 两者在网页端看起来一模一样,但一个是 bug、另一个是机制。所以每轮额外落盘**结构计数**:
12
+
13
+ ```
14
+ "stats": { "assistant": 0, "user": 1, "toolResult": 1, "systemBlocks": 0 }
15
+ ```
16
+
17
+ `assistant > 0` 才是"把模型自己说过的话又发了一遍"。以后不用读分享页**估**,直接查这个文件。
18
+
19
+ **本次现场的核对结论**(`dev/replay-turn-prompts.mjs` 新增,用会话日志重放**真实发出去的**提示词):
20
+
21
+ | 轮次 | 实发字符 | 里面有什么 |
22
+ |---|---|---|
23
+ | "现在几点了" | **11** | 只有 `User: 现在几点了` |
24
+ | 下一轮 | **12** | 只有新增那一条 |
25
+ | 天气那轮的搜索返回 | 25491 | `[Tool Result for call_…]`(工具返回,必须回灌) |
26
+
27
+ **真实发送里 `Assistant:` 是 0 条** —— 模型的旧回答没有被发回去。
28
+ 分享页里能看到的 `[Tool Result for call_055551695bfc4f82b3e9] 2026-10-02 19:34:10 星期五`
29
+ **正是 0.6.35 生效的证据**(改之前这里会是 `User: 2026-10-02 19:34:10 星期五`);
30
+ `Assistant: ` 前缀 0 次、`Tool Calling Protocol` 只出现 1 次(没有重复的固定头)。
31
+
32
+ > ⚠️ 说明一件事,免得再被误读:**"网页端的提示词里出现了时间/天气"本身不是 bug** ——
33
+ > 那是 agent 自己调了 `Get-Date` / `web_fetch`,工具输出必须回灌,否则模型无从得知。
34
+ > 判断标准只有一条:**它是 `[Tool Result for …]`(正常)还是 `User: …`(缺陷)**。
35
+
36
+ **新增** `dev/replay-turn-prompts.mjs`:把某会话每一轮真实发出去的提示词重放出来并给出结构统计。
37
+ 以后再遇到"提示词里有什么"的疑问,一条命令即可,不必依赖分享页的二手转述。
38
+
5
39
  ## 0.6.35 — 2026-10-02
6
40
 
7
41
  **纠正 0.6.34:真正的原因是 DSH 的工具返回是 `role: "tool"`,而我们没有这个分支。**
package/lib/index.js CHANGED
@@ -5578,6 +5578,12 @@ async function openCompletion(auth, params, signal, transport, keepIds) {
5578
5578
  promptChars: feed.prompt.length,
5579
5579
  headChars: params.promptParts ? String(params.promptParts.head ?? "").length : null,
5580
5580
  firstDiff: !chainEntries || !currentEntries ? null : firstDifference(chainEntries, currentEntries),
5581
+ stats: {
5582
+ assistant: (feed.prompt.match(/^Assistant: /gm) ?? []).length,
5583
+ user: (feed.prompt.match(/^User: /gm) ?? []).length,
5584
+ toolResult: (feed.prompt.match(/^\[Tool Result/gm) ?? []).length,
5585
+ systemBlocks: (feed.prompt.match(/^\[System\]/gm) ?? []).length
5586
+ },
5581
5587
  tailSame: !chainEntries || !currentEntries ? null : currentEntries.length <= chainEntries.length ? false : currentEntries[chainEntries.length - 1] === chainEntries[chainEntries.length - 1]
5582
5588
  });
5583
5589
  }
@@ -10448,7 +10454,7 @@ async function checkForUpdate(current, fetchImpl) {
10448
10454
  * 兜底常量与 package.json 的一致性由 `tests/check-smoke.mjs` 守着,不会漂。
10449
10455
  */
10450
10456
  /** 与 package.json 保持一致的兜底版本(由测试保证不会漂)。 */
10451
- const FALLBACK_VERSION = "0.6.35";
10457
+ const FALLBACK_VERSION = "0.6.36";
10452
10458
  let cached;
10453
10459
  /** 本插件版本(如 `0.1.26`)。 */
10454
10460
  function pluginVersion() {