dsh-plugin 1.3.7 → 1.3.8
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/client/client.js +318 -307
- package/client/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client/components/PluginHubSection.tsx +4 -0
- package/src/client/components/catalog/CatalogList.tsx +11 -3
- package/src/client/components/views/MarketView.tsx +5 -1
- package/src/client/locales.ts +6 -2
- package/src/client/styles/List.module.css +24 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "A community plugin marketplace for DeepSeek Harness, built to the official plugin spec — browse, search and install 4000+ human-curated community plugins without leaving the app. · DeepSeek Harness 社区插件市场(遵循官方开发规范):4000+ 人工精选社区插件,每日更新。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -412,6 +412,10 @@ export function PluginHubSection({ t: _hostT, locale }: SectionProps) {
|
|
|
412
412
|
queue.clearModalTask()
|
|
413
413
|
setUninstallPlugin(p)
|
|
414
414
|
},
|
|
415
|
+
// 目录加载失败时的精准提示:设置里配了代理 → 提示代理不可达;没配 → 提示网络不通
|
|
416
|
+
hasProxy: (hubSettings.proxy ?? '').trim() !== '',
|
|
417
|
+
// 「去系统诊断检测网络」直达(复用网络失败弹窗的同一跳转:关弹窗 → 设置 → 系统诊断自动跑连通性检测)
|
|
418
|
+
onOpenDiagnostics: openDiagnostics,
|
|
415
419
|
})
|
|
416
420
|
: view === 'installed'
|
|
417
421
|
? h(InstalledView, {
|
|
@@ -15,7 +15,7 @@ import { SITE_URL } from '../../logic/constants.ts'
|
|
|
15
15
|
import { useIncrementalList } from '../../hooks/useIncrementalList.ts'
|
|
16
16
|
import { PluginCard } from './PluginCard.tsx'
|
|
17
17
|
|
|
18
|
-
export function CatalogList({ plugins, failed, visible, total, t, langPath, reload, category, copied, installedName, installedVersion, hasUpdate, langKey, onInstall, onUninstall }: {
|
|
18
|
+
export function CatalogList({ plugins, failed, visible, total, t, langPath, reload, category, copied, installedName, installedVersion, hasUpdate, langKey, onInstall, onUninstall, hasProxy, onOpenDiagnostics }: {
|
|
19
19
|
plugins: HubPlugin[] | null
|
|
20
20
|
failed: boolean
|
|
21
21
|
visible: HubPlugin[]
|
|
@@ -31,6 +31,10 @@ export function CatalogList({ plugins, failed, visible, total, t, langPath, relo
|
|
|
31
31
|
langKey: LocaleId
|
|
32
32
|
onInstall: (p: HubPlugin, opts?: { update?: boolean }) => void
|
|
33
33
|
onUninstall: (p: HubPlugin) => void
|
|
34
|
+
/** 设置里是否配置了 HTTP 代理:目录拉不出来时据此精准提示(网络不通 vs 代理不可达) */
|
|
35
|
+
hasProxy: boolean
|
|
36
|
+
/** 「去系统诊断检测网络」直达:跳到设置 → 系统诊断自动跑连通性检测 */
|
|
37
|
+
onOpenDiagnostics: () => void
|
|
34
38
|
}) {
|
|
35
39
|
/** 列表滚动容器:分类/搜索切换后列表内容替换但 scrollTop 保留,会让用户误以为列表没更新,需重置回顶部 */
|
|
36
40
|
const listRef = useRef<HTMLDivElement | null>(null)
|
|
@@ -46,8 +50,12 @@ export function CatalogList({ plugins, failed, visible, total, t, langPath, relo
|
|
|
46
50
|
plugins === null && !failed && h('div', { className: styles.state }, t('loading')),
|
|
47
51
|
failed && h('div', { className: styles.state },
|
|
48
52
|
h('div', { className: styles.stateTitle }, t('failed')),
|
|
49
|
-
|
|
50
|
-
h('
|
|
53
|
+
// 精准提示:配了代理 → 提示代理可能不可达;没配 → 直接提示网络不通
|
|
54
|
+
h('div', { className: styles.stateDesc }, t(hasProxy ? 'failedDescProxy' : 'failedDescNoProxy')),
|
|
55
|
+
h('div', { className: styles.stateActions },
|
|
56
|
+
h('button', { className: styles.retryBtn, onClick: () => reload() }, t('retry')),
|
|
57
|
+
h('button', { className: styles.diagBtn, onClick: onOpenDiagnostics }, t('failNetworkRunDiag')),
|
|
58
|
+
),
|
|
51
59
|
),
|
|
52
60
|
plugins !== null && !failed && visible.length === 0 && h('div', { className: styles.state },
|
|
53
61
|
h('div', { className: styles.stateTitle }, t('noResult')),
|
|
@@ -17,7 +17,7 @@ import { CatalogList } from '../catalog/CatalogList.tsx'
|
|
|
17
17
|
|
|
18
18
|
type CatalogState = ReturnType<typeof useCatalog>
|
|
19
19
|
|
|
20
|
-
export function MarketView({ catalog, t, langPath, langKey, copied, resultText, onInstall, onUninstall }: {
|
|
20
|
+
export function MarketView({ catalog, t, langPath, langKey, copied, resultText, onInstall, onUninstall, hasProxy, onOpenDiagnostics }: {
|
|
21
21
|
catalog: CatalogState
|
|
22
22
|
t: (key: string, params?: Record<string, string | number>) => string
|
|
23
23
|
langPath: string
|
|
@@ -26,6 +26,8 @@ export function MarketView({ catalog, t, langPath, langKey, copied, resultText,
|
|
|
26
26
|
resultText: string | null
|
|
27
27
|
onInstall: (p: HubPlugin, opts?: { update?: boolean }) => void
|
|
28
28
|
onUninstall: (p: HubPlugin) => void
|
|
29
|
+
hasProxy: boolean
|
|
30
|
+
onOpenDiagnostics: () => void
|
|
29
31
|
}) {
|
|
30
32
|
return h(Fragment, null,
|
|
31
33
|
// 分类行保持原位原样:全部 + 各分类 chips
|
|
@@ -61,6 +63,8 @@ export function MarketView({ catalog, t, langPath, langKey, copied, resultText,
|
|
|
61
63
|
langKey,
|
|
62
64
|
onInstall,
|
|
63
65
|
onUninstall,
|
|
66
|
+
hasProxy,
|
|
67
|
+
onOpenDiagnostics,
|
|
64
68
|
}),
|
|
65
69
|
)
|
|
66
70
|
}
|
package/src/client/locales.ts
CHANGED
|
@@ -25,7 +25,9 @@ export const zh = {
|
|
|
25
25
|
fork: 'Fork',
|
|
26
26
|
loading: '正在加载插件数据…',
|
|
27
27
|
failed: '插件数据加载失败',
|
|
28
|
-
|
|
28
|
+
// 目录拉不出来时的精准提示:按「是否配置了代理」区分,引导排查网络 / 代理
|
|
29
|
+
failedDescNoProxy: '你的网络似乎不通,无法获取插件目录数据。请检查网络连接后重试;或点击右上角按钮在浏览器中打开插件中心。',
|
|
30
|
+
failedDescProxy: '你的网络似乎不通,或设置里的 HTTP 代理地址不可达,无法获取插件目录数据。请检查代理设置与网络连接后重试;或点击右上角按钮在浏览器中打开插件中心。',
|
|
29
31
|
retry: '重试',
|
|
30
32
|
install: '安装',
|
|
31
33
|
// AI 识别可能需要命令行辅助的插件(webInstallable=false):仍可尝试一键安装,失败时复制命令去 dsh 终端
|
|
@@ -368,7 +370,9 @@ export const en = {
|
|
|
368
370
|
fork: 'Fork',
|
|
369
371
|
loading: 'Loading plugin data…',
|
|
370
372
|
failed: 'Failed to load plugin data',
|
|
371
|
-
|
|
373
|
+
// Precise hints when the catalog cannot load: distinguished by whether a proxy is configured
|
|
374
|
+
failedDescNoProxy: 'Your network seems unreachable, so the plugin catalog could not be loaded. Please check your connection and retry; or open the hub in your browser with the button above.',
|
|
375
|
+
failedDescProxy: 'Your network seems unreachable, or the HTTP proxy in Settings is unreachable, so the plugin catalog could not be loaded. Please check the proxy address and your connection, then retry; or open the hub in your browser with the button above.',
|
|
372
376
|
retry: 'Retry',
|
|
373
377
|
install: 'Install',
|
|
374
378
|
// AI-flagged plugins that may need command-line help (webInstallable=false): one-click install still allowed,
|
|
@@ -301,7 +301,6 @@ body[data-ds-dark-theme] .uninstallBtn:hover {
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
.retryBtn {
|
|
304
|
-
margin-top: 4px;
|
|
305
304
|
font-size: 12px;
|
|
306
305
|
line-height: 18px;
|
|
307
306
|
color: var(--hub-text-secondary);
|
|
@@ -318,6 +317,30 @@ body[data-ds-dark-theme] .uninstallBtn:hover {
|
|
|
318
317
|
background: var(--hub-bg-hover);
|
|
319
318
|
}
|
|
320
319
|
|
|
320
|
+
/* 失败态按钮行:重试 + 「去系统诊断检测网络」并排 */
|
|
321
|
+
.stateActions {
|
|
322
|
+
margin-top: 4px;
|
|
323
|
+
display: flex;
|
|
324
|
+
align-items: center;
|
|
325
|
+
gap: 8px;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.diagBtn {
|
|
329
|
+
font-size: 12px;
|
|
330
|
+
line-height: 18px;
|
|
331
|
+
color: #fff;
|
|
332
|
+
border: none;
|
|
333
|
+
border-radius: 6px;
|
|
334
|
+
padding: 4px 12px;
|
|
335
|
+
background: var(--hub-brand);
|
|
336
|
+
cursor: pointer;
|
|
337
|
+
user-select: none;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.diagBtn:hover {
|
|
341
|
+
background: var(--hub-brand-hover);
|
|
342
|
+
}
|
|
343
|
+
|
|
321
344
|
/* —— footer —— */
|
|
322
345
|
|
|
323
346
|
.footer {
|