dsh-content-search-ad 0.26.0 → 0.26.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/client.js +43 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -19,7 +19,7 @@ window.__ModuleLoader__.load({
|
|
|
19
19
|
/** Locale namespace owned by this plugin. */
|
|
20
20
|
const NS = 'contentSearch'
|
|
21
21
|
/** Plugin version, shown in the panel so a running build can be identified. */
|
|
22
|
-
const PLUGIN_VERSION = '0.26.
|
|
22
|
+
const PLUGIN_VERSION = '0.26.1'
|
|
23
23
|
/** Tab-type identity; the body slot registers under the same key. */
|
|
24
24
|
const TAB_ID = 'dsh-content-search-ad/panel'
|
|
25
25
|
/** Page kind opened by the guide card and the strip's add control. */
|
|
@@ -1260,6 +1260,48 @@ window.__ModuleLoader__.load({
|
|
|
1260
1260
|
node.scrollTop = node.scrollHeight
|
|
1261
1261
|
}, [questions])
|
|
1262
1262
|
|
|
1263
|
+
|
|
1264
|
+
// A prompt is appended to the transcript the moment it is sent: watch for
|
|
1265
|
+
// new chat nodes so the list updates then, not on the next poll.
|
|
1266
|
+
React.useEffect(() => {
|
|
1267
|
+
if (typeof MutationObserver !== 'function' || typeof document === 'undefined') return undefined
|
|
1268
|
+
if (typeof focusSessionId !== 'string' || focusSessionId.length === 0) return undefined
|
|
1269
|
+
let timer = 0
|
|
1270
|
+
const refresh = () => {
|
|
1271
|
+
if (timer !== 0) return
|
|
1272
|
+
timer = setTimeout(() => {
|
|
1273
|
+
timer = 0
|
|
1274
|
+
const controller = new AbortController()
|
|
1275
|
+
fetchQuestions(focusSessionId, controller.signal).then((outcome) => {
|
|
1276
|
+
if (controller.signal.aborted) return
|
|
1277
|
+
setQuestions((current) => (current.length === outcome.questions.length ? current : outcome.questions))
|
|
1278
|
+
setQuestionCount(outcome.count)
|
|
1279
|
+
}).catch(() => {})
|
|
1280
|
+
}, 600)
|
|
1281
|
+
}
|
|
1282
|
+
const observer = new MutationObserver((records) => {
|
|
1283
|
+
for (const record of records) {
|
|
1284
|
+
const added = record.addedNodes
|
|
1285
|
+
for (let index = 0; index < added.length; index += 1) {
|
|
1286
|
+
const node = added[index]
|
|
1287
|
+
if (node === null || node.nodeType !== 1) continue
|
|
1288
|
+
if (typeof node.matches === 'function' && node.matches('[data-chat-node-key]')) {
|
|
1289
|
+
refresh()
|
|
1290
|
+
return
|
|
1291
|
+
}
|
|
1292
|
+
if (typeof node.querySelector === 'function' && node.querySelector('[data-chat-node-key]') !== null) {
|
|
1293
|
+
refresh()
|
|
1294
|
+
return
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
})
|
|
1299
|
+
observer.observe(document.body, { childList: true, subtree: true })
|
|
1300
|
+
return () => {
|
|
1301
|
+
observer.disconnect()
|
|
1302
|
+
if (timer !== 0) clearTimeout(timer)
|
|
1303
|
+
}
|
|
1304
|
+
}, [focusSessionId])
|
|
1263
1305
|
// The zoom buttons move this; the choice is remembered per browser.
|
|
1264
1306
|
const stepFont = React.useCallback((delta) => {
|
|
1265
1307
|
setFontPx((value) => {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-content-search-ad",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.1",
|
|
4
4
|
"description": "DeepSeek Harness (DSH) plugin: full-text search over every conversation's prose from a right sidebar tab, with a jump-to-match detail view.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "zmq6931",
|