dsh-content-search-ad 0.26.0 → 0.26.2
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 +23 -11
- package/client.js +43 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,20 +69,28 @@ is a subsequence, which turns the list into match-everything noise.
|
|
|
69
69
|
The panel is split in two, and the lower frame never moves:
|
|
70
70
|
|
|
71
71
|
```
|
|
72
|
-
┌ search field + scope
|
|
73
|
-
│ results
|
|
74
|
-
├ This chat · 24
|
|
75
|
-
│
|
|
76
|
-
│ …
|
|
77
|
-
|
|
72
|
+
┌ search field + scope ──────────────────────────┐
|
|
73
|
+
│ results │ ← search output, scrolls
|
|
74
|
+
├ This chat list · 24 ────────────────────────────┤
|
|
75
|
+
│ every question you asked, oldest first │ ← fixed frame, scrolls alone
|
|
76
|
+
│ … │
|
|
77
|
+
├──────────────── [A−] [A+] ──────── v0.26.x ─────┤
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
- The lower frame
|
|
81
|
-
(injected context and tool output are
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
- The lower frame is titled **This chat list** and holds every question **you**
|
|
81
|
+
asked in the current conversation (injected context and tool output are
|
|
82
|
+
filtered out by the message source).
|
|
83
|
+
- It reads the **raw session log** once per conversation, so a conversation that
|
|
84
|
+
was compacted still lists its older prompts; a cache plus the cheap surface
|
|
85
|
+
read keep later refreshes fast.
|
|
86
|
+
- A prompt you send appears within about a second (a document observer watches
|
|
87
|
+
for the new chat node), and the frame keeps the newest question in view unless
|
|
88
|
+
you have scrolled up to read older ones. A 20 s poll is the fallback.
|
|
84
89
|
- Typing a query does **not** filter or reorder that list: matching rows are
|
|
85
90
|
highlighted in place, and clicking any row still jumps to it in the transcript.
|
|
91
|
+
- **A− / A+** in the footer change the panel's text size between 12 and 24 px and
|
|
92
|
+
the choice is remembered per browser. Every size in the panel is in `em`, so
|
|
93
|
+
text, padding and control heights scale together.
|
|
86
94
|
- The running version is printed in the footer of both the list and the detail
|
|
87
95
|
view, so a build can be identified (and rolled back) without opening the
|
|
88
96
|
plugin's files.
|
|
@@ -123,7 +131,7 @@ This build ships the session-content index switched off
|
|
|
123
131
|
|
|
124
132
|
| Half | Job |
|
|
125
133
|
|---|---|
|
|
126
|
-
| `index.js` (Host) | `/content-search/query?q=…&focus=…&scope=…` — extracts prose once per conversation and caches it, then scans it literally. `anchor`/`snippet` are computed from that prose. |
|
|
134
|
+
| `index.js` (Host) | `/content-search/query?q=…&focus=…&scope=…` — extracts prose once per conversation and caches it, then scans it literally. `anchor`/`snippet` are computed from that prose. `/content-search/questions?focus=…` — the raw-log question list for one conversation. |
|
|
127
135
|
| `client.js` (Browser) | The tab: field, scope switch, list, detail view, anchors, highlights, jumps, shortcut, recents. |
|
|
128
136
|
|
|
129
137
|
Cache lifetimes: a quiet conversation 10 min, one still attached to a live agent
|
|
@@ -154,6 +162,10 @@ that happens after a restart and before the warm-up finishes.
|
|
|
154
162
|
the footer says when the answer was truncated.
|
|
155
163
|
- Code the user or the model typed **as plain text** in a message is prose, not a
|
|
156
164
|
code block: it stays searchable by design.
|
|
165
|
+
- Search reads the current model **surface**, so a conversation that was
|
|
166
|
+
compacted may not return matches from its folded-away history. The question
|
|
167
|
+
list does not have this limit: it reads the raw log of the conversation the
|
|
168
|
+
panel belongs to.
|
|
157
169
|
- No semantic search: there is no embedding model in this build, so synonyms and
|
|
158
170
|
meaning-level matches are out of scope.
|
|
159
171
|
|
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.2'
|
|
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.2",
|
|
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",
|