@ggboy123/dsh-paper-reader 0.6.1 → 0.6.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.
@@ -93,7 +93,9 @@ export async function testTranslateEndpoint(ep) {
93
93
  if (r.ok) {
94
94
  // 智谱系网关切错路径时(如 /api/v1)会回 HTTP 200 + {"code":1001,"success":false},
95
95
  // 只看状态码会误判成功,babeldoc 跑起来才炸。真成功必须有 choices。
96
- const text = (await r.text().catch(() => '')).slice(0, 300);
96
+ // 上限放宽到 4000:GLM 等响应字段多,max_tokens:1 也有几百字节;
97
+ // 历史上 slice(0,300) 把合法 JSON 截断导致 parse 失败、误报「不是补全结果」(0.6.2 修复)
98
+ const text = (await r.text().catch(() => '')).slice(0, 4000);
97
99
  try {
98
100
  const data = JSON.parse(text);
99
101
  if (Array.isArray(data.choices))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggboy123/dsh-paper-reader",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "DeepSeek Harness 插件:论文伴读工作台 — PDF 转录 / 检索 / 原生对话伴读 + 内置阅读器页面。",
5
5
  "license": "MIT",
6
6
  "type": "module",