dsh-pdf-jump 0.1.3 → 0.1.4
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.en.md +7 -0
- package/README.md +9 -0
- package/index.js +4 -1
- package/package.json +3 -2
package/README.en.md
CHANGED
|
@@ -98,6 +98,13 @@ Optional, in the profile patch row (affects `pdf-view` only):
|
|
|
98
98
|
- **The sidebar shows a blank page or "blocked"** (for `pdf-view` URLs): the in-app Sidebar Browser blocks loopback addresses unless they are allowlisted. Add `127.0.0.1:8731` (and whichever port in 8732–8750 is in use), or set *Settings → General → Open chat links in* to the default browser.
|
|
99
99
|
- **A link from an older conversation says "connection refused"**: either the viewer port changed (another program holds 8731) or the PDF file moved. Call the tool again for a fresh link; `pdf-open` paths are unaffected.
|
|
100
100
|
|
|
101
|
+
## Feedback
|
|
102
|
+
|
|
103
|
+
- Open an issue: https://github.com/taoziliyouchong/dsh-pdf-jump/issues — searchable, and others can help.
|
|
104
|
+
- Or reach me on QQ: **2171960697** (mention which plugin you installed when adding the contact).
|
|
105
|
+
|
|
106
|
+
Please include: DSH version, plugin version, the exact error text, and a screenshot.
|
|
107
|
+
|
|
101
108
|
## License
|
|
102
109
|
|
|
103
110
|
MIT
|
package/README.md
CHANGED
|
@@ -98,6 +98,15 @@ dsh plugin --profile web add github:taoziliyouchong/dsh-pdf-jump
|
|
|
98
98
|
- **侧栏空白或提示「已阻止」**:应用内侧栏浏览器默认拦截本机回环地址。把 `127.0.0.1:8731`(及 8732–8750 中实际用到的)加进侧栏设置的「允许访问的本机地址」,或把「设置 → 通用 → 网页链接默认打开方式」改成「默认浏览器」。
|
|
99
99
|
- **旧对话里的链接提示「拒绝连接」**:要么端口被别的程序占了导致换了端口,要么 PDF 文件被移动/删除。重新调用一次工具取新地址;`pdf-open` 返回的文件路径不受影响。
|
|
100
100
|
|
|
101
|
+
## 反馈
|
|
102
|
+
|
|
103
|
+
插件有问题,按这个顺序:
|
|
104
|
+
|
|
105
|
+
1. 开 Issue:https://github.com/taoziliyouchong/dsh-pdf-jump/issues —— 能留痕、能搜历史,别人也可能已经遇过;
|
|
106
|
+
2. 急着问或不想开 Issue,QQ 号:**2171960697**(加好友请注明装的是哪个插件)。
|
|
107
|
+
|
|
108
|
+
反馈时带上:DSH 版本、插件版本、报错原文、截图。少一样多半要再问一轮。
|
|
109
|
+
|
|
101
110
|
## 许可
|
|
102
111
|
|
|
103
112
|
MIT
|
package/index.js
CHANGED
|
@@ -15,6 +15,9 @@ export const name = 'dsh-pdf-jump'
|
|
|
15
15
|
/** 需要的服务:工具注册表 + 系统提示(让模型知道什么时候该用它)+ 命令注册表(/pdf)。 */
|
|
16
16
|
export const inject = ['tools', 'systemPrompt', 'commands']
|
|
17
17
|
|
|
18
|
+
/** 报错尾行:插件出问题时,使用者第一眼看的就是错误文本。 */
|
|
19
|
+
const FEEDBACK_HINT = '遇到问题:加 QQ 号 2171960697,或开 Issue https://github.com/taoziliyouchong/dsh-pdf-jump/issues'
|
|
20
|
+
|
|
18
21
|
/**
|
|
19
22
|
* 每轮都在模型上下文里的使用说明。工具描述只在工具列表里出现一次,
|
|
20
23
|
* 这段公告把「什么时候用 / 什么时候不用」说清楚,保证模型选得对。
|
|
@@ -160,7 +163,7 @@ export function apply(ctx, config = {}) {
|
|
|
160
163
|
if (config.prefetch !== false) viewer.prefetch(pdf, page)
|
|
161
164
|
return { kind: 'success', text: `[📄 ${basename(pdf)} · 第 ${page} 页](<http://127.0.0.1:${port}/v/${id}/${page}>)` }
|
|
162
165
|
} catch (error) {
|
|
163
|
-
return { kind: 'error', text: error instanceof Error ? error.message : String(error) }
|
|
166
|
+
return { kind: 'error', text: (error instanceof Error ? error.message : String(error)) + '\n\n' + FEEDBACK_HINT }
|
|
164
167
|
}
|
|
165
168
|
},
|
|
166
169
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-pdf-jump",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "在 DSH
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "在 DSH 侧栏里看本地 PDF:跳到任意一页,整本连着看。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"exports": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"scripts": {
|
|
45
45
|
"smoke": "node scripts/smoke.mjs"
|
|
46
46
|
},
|
|
47
|
+
"author": "taoziliyouchong",
|
|
47
48
|
"license": "MIT",
|
|
48
49
|
"repository": {
|
|
49
50
|
"type": "git",
|