dsh-links-panel 0.79.1 → 0.80.1
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/lib/client.js +23 -11
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -3172,7 +3172,8 @@ window.__ModuleLoader__.load({
|
|
|
3172
3172
|
domain: rootDomain(reference.host),
|
|
3173
3173
|
}))
|
|
3174
3174
|
.find((item) => {
|
|
3175
|
-
|
|
3175
|
+
const cached = [faviconLibrary[item.host], faviconLibrary[item.domain]]
|
|
3176
|
+
if (cached.some((value) => typeof value === 'string' && value.indexOf('data:') === 0)) return false
|
|
3176
3177
|
if (faviconQueueRef.current.has(item.host)) return false
|
|
3177
3178
|
const failedAt = faviconFailedRef.current.get(item.host)
|
|
3178
3179
|
return failedAt === undefined || Date.now() - failedAt >= 10 * 60 * 1000
|
|
@@ -3321,7 +3322,8 @@ window.__ModuleLoader__.load({
|
|
|
3321
3322
|
(reference) => {
|
|
3322
3323
|
const host = reference.host.replace(/^www\./, '')
|
|
3323
3324
|
const domain = rootDomain(reference.host)
|
|
3324
|
-
|
|
3325
|
+
const cached = [faviconLibrary[host], faviconLibrary[domain]]
|
|
3326
|
+
if (cached.some((value) => typeof value === 'string' && value.indexOf('data:') === 0)) return
|
|
3325
3327
|
const requestFavicon = async (iconUrl) => {
|
|
3326
3328
|
try {
|
|
3327
3329
|
const url = new URL('/dsh-links/favicon', document.baseURI)
|
|
@@ -3365,17 +3367,27 @@ window.__ModuleLoader__.load({
|
|
|
3365
3367
|
const openReference = React.useCallback(
|
|
3366
3368
|
(reference, event) => {
|
|
3367
3369
|
const external = !!(event && (event.metaKey || event.ctrlKey || event.altKey))
|
|
3368
|
-
if (!external
|
|
3370
|
+
if (!external) {
|
|
3369
3371
|
try {
|
|
3370
3372
|
warmFavicon(reference)
|
|
3371
3373
|
} catch (error) {
|
|
3372
3374
|
/* caching is best-effort */
|
|
3373
3375
|
}
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3376
|
+
if (tab && tab.actions && typeof tab.actions.openTab === 'function') {
|
|
3377
|
+
try {
|
|
3378
|
+
tab.actions.openTab(BROWSER_KIND, { params: { url: reference.url } })
|
|
3379
|
+
return
|
|
3380
|
+
} catch (error) {
|
|
3381
|
+
/* fall through to the sidebar service */
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3384
|
+
if (ctx && ctx.sidebarRight && typeof ctx.sidebarRight.openTab === 'function') {
|
|
3385
|
+
try {
|
|
3386
|
+
ctx.sidebarRight.openTab(BROWSER_KIND, { params: { url: reference.url } })
|
|
3387
|
+
return
|
|
3388
|
+
} catch (error) {
|
|
3389
|
+
/* fall through to the system browser */
|
|
3390
|
+
}
|
|
3379
3391
|
}
|
|
3380
3392
|
}
|
|
3381
3393
|
try {
|
|
@@ -3384,7 +3396,7 @@ window.__ModuleLoader__.load({
|
|
|
3384
3396
|
window.location.href = reference.url
|
|
3385
3397
|
}
|
|
3386
3398
|
},
|
|
3387
|
-
[tab, warmFavicon],
|
|
3399
|
+
[tab, warmFavicon, ctx],
|
|
3388
3400
|
)
|
|
3389
3401
|
|
|
3390
3402
|
const copyList = React.useCallback(() => {
|
|
@@ -4138,10 +4150,10 @@ window.__ModuleLoader__.load({
|
|
|
4138
4150
|
// ------------------------------------------------------------------
|
|
4139
4151
|
|
|
4140
4152
|
/** Required browser services: the tab registry and the keyed seat. */
|
|
4141
|
-
const inject = ['slots', 'sidebarRightTabs', 'sessions', 'locale']
|
|
4153
|
+
const inject = ['slots', 'sidebarRightTabs', 'sidebarRight', 'sessions', 'locale']
|
|
4142
4154
|
|
|
4143
4155
|
/** Build stamp shown in the footer, so a stale bundle is visible at a glance. */
|
|
4144
|
-
const BUILD = 'v0.
|
|
4156
|
+
const BUILD = 'v0.80.1'
|
|
4145
4157
|
/**
|
|
4146
4158
|
* Translate one key and fill `{name}` placeholders.
|
|
4147
4159
|
* @param {string} key - dictionary key.
|
package/lib/index.js
CHANGED
|
@@ -37,7 +37,7 @@ function withOutboundLock(task) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/** Host build stamp, echoed to the panel so a stale bundle is detectable. */
|
|
40
|
-
export const BUILD = 'v0.
|
|
40
|
+
export const BUILD = 'v0.80.1'
|
|
41
41
|
/**
|
|
42
42
|
* The desktop browser reaches the network through the system proxy; the Host's own
|
|
43
43
|
* Node requests bypass it. Detect that proxy so probes can use the same route.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-links-panel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.1",
|
|
4
4
|
"description": "Reference links panel for DeepSeek Harness: collects every URL of a conversation into the right sidebar with pins, turn counts, metadata and favicon caching. DSH 右栏「应用链接」面板。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|