@ggboy123/dsh-paper-reader 0.6.1 → 1.0.0

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/README.md CHANGED
@@ -31,6 +31,23 @@ dsh plugin --profile web add @ggboy123/dsh-paper-reader
31
31
  > npm 包名走 `@ggboy123` 作用域:裸名 `dsh-paper-reader` 已被另一个插件占用(那是「输入文献、吐精读报告」的一次性分析工具,与本插件的「阅读器 + 会话伴读」定位不同)。
32
32
  > 不要用 `github:GGboya/dsh-paper-reader` 安装 —— dist 不入库,git 安装会导致 profile 起不来(构建产物只随 npm 包分发)。
33
33
 
34
+ ### 升级
35
+
36
+ **已装过的用户升级必须带显式版本号**——不带版本的 `add` 对已存在的依赖是 no-op(pnpm 按首次安装时记录的版本范围解析,不会追新):
37
+
38
+ ```bash
39
+ dsh plugin --profile web add @ggboy123/dsh-paper-reader@1.0.0
40
+ # 重启 dsh web 生效;浏览器 Cmd+Shift+R 强刷,避免旧阅读器页面缓存
41
+ ```
42
+
43
+ 确认当前装的是哪个版本:
44
+
45
+ ```bash
46
+ grep '"version"' ~/.dsh/profiles/web/node_modules/@ggboy123/dsh-paper-reader/package.json
47
+ ```
48
+
49
+ > pnpm 若开了供应链策略 `minimumReleaseAge`(发布 N 小时内的新包拒装):要么等过窗口期,要么在 `~/.dsh/profiles/web/.npmrc` 加一行 `minimum-release-age-exclude[]=@ggboy123/dsh-paper-reader`(只豁免本插件,不动全局策略)。
50
+
34
51
  本地开发:
35
52
 
36
53
  ```bash
@@ -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": "1.0.0",
4
4
  "description": "DeepSeek Harness 插件:论文伴读工作台 — PDF 转录 / 检索 / 原生对话伴读 + 内置阅读器页面。",
5
5
  "license": "MIT",
6
6
  "type": "module",