dsh-content-search-ad 0.23.0 → 0.24.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.
Files changed (4) hide show
  1. package/README.md +23 -4
  2. package/client.js +94 -40
  3. package/index.js +1 -1
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -63,10 +63,29 @@ is a subsequence, which turns the list into match-everything noise.
63
63
  - Ordering is legible: more hits first, then the most recent match. Title-only
64
64
  matches come last.
65
65
  - **Recent searches** appear in the empty state; one click re-runs one.
66
- - **This chat** is listed under them: every question **you** asked in the current
67
- conversation, one row each (injected context and tool output are filtered out
68
- by the message source). Clicking a row scrolls to that message in the
69
- transcript and marks it red, paging history first when it is not loaded yet.
66
+
67
+ ## Two frames
68
+
69
+ The panel is split in two, and the lower frame never moves:
70
+
71
+ ```
72
+ ┌ search field + scope ─────────────────────┐
73
+ │ results │ ← search output, scrolls
74
+ ├ This chat · 24 questions ──────────────────┤
75
+ │ the questions you asked, oldest first │ ← fixed list, scrolls on its own
76
+ │ … │
77
+ ├──────────────────────────────── v0.24.0 ───┤
78
+ ```
79
+
80
+ - The lower frame lists every question **you** asked in the current conversation
81
+ (injected context and tool output are filtered out by the message source). It
82
+ refreshes itself every few seconds, so a prompt you send shows up without
83
+ reopening the panel.
84
+ - Typing a query does **not** filter or reorder that list: matching rows are
85
+ highlighted in place, and clicking any row still jumps to it in the transcript.
86
+ - The running version is printed in the footer of both the list and the detail
87
+ view, so a build can be identified (and rolled back) without opening the
88
+ plugin's files.
70
89
 
71
90
  ## The detail view
72
91
 
package/client.js CHANGED
@@ -18,6 +18,8 @@ window.__ModuleLoader__.load({
18
18
  //#region contract
19
19
  /** Locale namespace owned by this plugin. */
20
20
  const NS = 'contentSearch'
21
+ /** Plugin version, shown in the panel so a running build can be identified. */
22
+ const PLUGIN_VERSION = '0.24.1'
21
23
  /** Tab-type identity; the body slot registers under the same key. */
22
24
  const TAB_ID = 'dsh-content-search-ad/panel'
23
25
  /** Page kind opened by the guide card and the strip's add control. */
@@ -49,7 +51,7 @@ window.__ModuleLoader__.load({
49
51
  'field.placeholder': 'Search the content of every conversation…',
50
52
  'field.clear': 'Clear search',
51
53
  'recent.title': 'Recent searches',
52
- 'questions.title': 'This chat · {n} questions',
54
+ 'questions.title': 'This chat list · {n}',
53
55
  'command.open': 'Search conversation content',
54
56
  'hint.idle': 'Type a keyword to search every conversation body and title.',
55
57
  'hint.shortcut': 'Press {keys} anywhere to open this panel.',
@@ -170,6 +172,29 @@ window.__ModuleLoader__.load({
170
172
  return String(text === undefined || text === null ? '' : text).replace(/\s+/gu, ' ').trim()
171
173
  }
172
174
 
175
+ /** Positive terms of a query, the same shape the Host parses. */
176
+ function queryTerms(raw) {
177
+ const text = String(raw === undefined || raw === null ? '' : raw)
178
+ const terms = []
179
+ const pattern = /(-?)"([^"]*)"|(-?)(\S+)/gu
180
+ let match = pattern.exec(text)
181
+ while (match !== null) {
182
+ const negative = (match[1] !== undefined ? match[1] : match[3]) === '-'
183
+ const value = String(match[2] !== undefined ? match[2] : match[4]).toLowerCase()
184
+ if (!negative && value.length > 0) terms.push(value)
185
+ match = pattern.exec(text)
186
+ }
187
+ return terms
188
+ }
189
+
190
+ /** Whether every positive term of the query appears in the text. */
191
+ function matchesQuery(text, raw) {
192
+ const terms = queryTerms(raw)
193
+ if (terms.length === 0) return false
194
+ const haystack = normalize(text)
195
+ return terms.every((term) => haystack.includes(term))
196
+ }
197
+
173
198
  /** Drop the ellipsis the Host puts around an excerpt. */
174
199
  function trimEllipsis(text) {
175
200
  return oneLine(text).replace(/^…+/u, '').replace(/…+$/u, '').trim()
@@ -743,56 +768,63 @@ window.__ModuleLoader__.load({
743
768
 
744
769
  //#region styles
745
770
  const STYLES = `
746
- .dcs-root{display:flex;flex-direction:column;min-height:0;height:100%;font-size:13px;line-height:1.5;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family,var(--dsw-font,system-ui))}
771
+ .dcs-root{display:flex;flex-direction:column;min-height:0;height:100%;font-size:14.5px;line-height:1.5;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family,var(--dsw-font,system-ui))}
747
772
  .dcs-head{flex:0 0 auto;padding:10px 10px 8px;border-bottom:1px solid var(--dsw-alias-border-l1)}
748
- .dcs-field{display:flex;align-items:center;gap:8px;height:32px;padding:0 9px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2)}
773
+ .dcs-field{display:flex;align-items:center;gap:8px;height:34px;padding:0 9px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2)}
749
774
  .dcs-field:focus-within{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 var(--dsw-focus-ring-width,2px) var(--dsw-focus-ring-color,rgba(47,111,235,.28))}
750
775
  .dcs-field input{flex:1 1 auto;min-width:0;height:100%;border:0;outline:0;background:transparent;color:inherit;font:inherit;padding:0}
751
776
  .dcs-field input::placeholder{color:var(--dsw-alias-label-tertiary)}
752
777
  .dcs-glyph{flex:0 0 auto;display:flex;color:var(--dsw-alias-label-tertiary)}
753
- .dcs-clear{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:0;border-radius:50%;background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1;cursor:pointer}
778
+ .dcs-clear{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:19px;height:19px;padding:0;border:0;border-radius:50%;background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1;cursor:pointer}
754
779
  .dcs-clear:hover{background:var(--dsw-alias-interactive-bg-hover-accent);color:var(--dsw-alias-label-primary)}
755
780
  .dcs-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px 6px 10px}
756
- .dcs-note{margin:0;padding:14px 10px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.6}
757
- .dcs-retry{margin-left:6px;padding:0 6px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;line-height:20px;cursor:pointer}
781
+ .dcs-note{margin:0;padding:12px 10px;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.6}
782
+ .dcs-retry{margin-left:6px;padding:0 8px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;line-height:22px;cursor:pointer}
758
783
  .dcs-retry:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
759
- .dcs-row{display:flex;flex-direction:column;gap:2px;width:100%;box-sizing:border-box;padding:8px 10px;border:0;border-radius:var(--dsw-radius-md);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
784
+ .dcs-row{display:flex;flex-direction:column;gap:3px;width:100%;box-sizing:border-box;padding:9px 10px;border:0;border-radius:var(--dsw-radius-md);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
760
785
  .dcs-row:hover{background:var(--dsw-alias-interactive-bg-hover)}
761
786
  .dcs-row[data-active="true"]{background:var(--dsw-alias-interactive-bg-hover-accent)}
762
787
  .dcs-row:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}
763
788
  .dcs-row-head{display:flex;align-items:baseline;gap:8px;min-width:0}
764
- .dcs-row-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary)}
765
- .dcs-row-time{flex:0 0 auto;font-size:11px;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-tertiary)}
766
- .dcs-count{flex:0 0 auto;padding:0 6px;border-radius:999px;background:var(--dsw-alias-interactive-bg-hover-accent,var(--dsw-alias-bg-layer-3));font-size:11px;line-height:17px;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary)}
767
- .dcs-row-snippet{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.55;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}
768
- .dcs-row-meta{font-size:11px;color:var(--dsw-alias-label-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
769
- .dcs-chevron{flex:0 0 auto;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1}.dcs-questions{display:flex;flex-direction:column;gap:2px;padding:0 6px 6px}
770
- .dcs-question{width:100%;box-sizing:border-box;padding:6px 8px;border:0;border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;line-height:1.5;text-align:left;cursor:pointer;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
789
+ .dcs-row-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14.5px;font-weight:600;color:var(--dsw-alias-label-primary)}
790
+ .dcs-row-time{flex:0 0 auto;font-size:12px;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-tertiary)}
791
+ .dcs-count{flex:0 0 auto;padding:0 7px;border-radius:999px;background:var(--dsw-alias-interactive-bg-hover-accent,var(--dsw-alias-bg-layer-3));font-size:12px;line-height:19px;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary)}
792
+ .dcs-row-snippet{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13.5px;line-height:1.55;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}
793
+ .dcs-row-meta{font-size:12px;color:var(--dsw-alias-label-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
794
+ .dcs-chevron{flex:0 0 auto;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:1}
795
+ .dcs-results{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px 6px 10px}
796
+ .dcs-chat{flex:0 0 auto;display:flex;flex-direction:column;max-height:42%;border-top:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1)}
797
+ .dcs-chat-head{flex:0 0 auto;margin:9px 10px 5px;font-size:13px}
798
+ .dcs-chat-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 6px 8px;display:flex;flex-direction:column;gap:2px}
799
+ .dcs-question{width:100%;box-sizing:border-box;padding:7px 9px;border:0;border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:14px;line-height:1.55;text-align:left;cursor:pointer;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
771
800
  .dcs-question:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
801
+ .dcs-question[data-hit="true"]{background:var(--dsw-alias-interactive-bg-hover-accent,var(--dsw-alias-bg-layer-3));color:var(--dsw-alias-label-primary);font-weight:600}
802
+ .dcs-version{flex:0 0 auto;font-variant-numeric:tabular-nums;opacity:.7}
803
+ .dcs-questions{display:flex;flex-direction:column;gap:2px;padding:0 6px 6px}
772
804
  .dcs-recent{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px 4px}
773
- .dcs-recent-chip{max-width:100%;padding:0 9px;height:24px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
805
+ .dcs-recent-chip{max-width:100%;padding:0 10px;height:26px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
774
806
  .dcs-recent-chip:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
775
807
  .dcs-scope{display:flex;gap:2px;margin-top:8px;padding:2px;border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1)}
776
- .dcs-scope-button{flex:1 1 0;min-width:0;padding:0 6px;height:22px;border:0;border-radius:calc(var(--dsw-radius-sm) - 1px);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:11.5px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
808
+ .dcs-scope-button{flex:1 1 0;min-width:0;padding:0 6px;height:26px;border:0;border-radius:calc(var(--dsw-radius-sm) - 1px);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
777
809
  .dcs-scope-button:hover{background:var(--dsw-alias-interactive-bg-hover)}
778
810
  .dcs-scope-button[data-active="true"]{background:var(--dsw-alias-interactive-bg-hover-accent,var(--dsw-alias-bg-layer-3));color:var(--dsw-alias-label-primary);font-weight:600}
779
- .dcs-badge{flex:0 0 auto;padding:0 5px;border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-interactive-bg-hover);font-size:10px;line-height:15px;color:var(--dsw-alias-label-tertiary)}
811
+ .dcs-badge{flex:0 0 auto;padding:0 5px;border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-interactive-bg-hover);font-size:11.5px;line-height:17px;color:var(--dsw-alias-label-tertiary)}
780
812
  .dcs-hit{padding:0 1px;border-radius:2px;background:var(--dsw-alias-interactive-bg-hover-accent,var(--dsw-alias-bg-layer-3));color:var(--dsw-alias-label-primary)}
781
- .dcs-section{margin:10px 10px 4px;font-size:11px;font-weight:600;letter-spacing:.02em;color:var(--dsw-alias-label-tertiary)}
813
+ .dcs-section{margin:10px 10px 4px;font-size:13px;font-weight:600;letter-spacing:.02em;color:var(--dsw-alias-label-tertiary)}
782
814
  .dcs-section:first-child{margin-top:2px}
783
- .dcs-foot{flex:0 0 auto;padding:7px 12px;border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:1.5;display:flex;justify-content:space-between;gap:10px}
815
+ .dcs-foot{flex:0 0 auto;padding:7px 12px;border-top:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5;display:flex;justify-content:space-between;gap:10px}
784
816
  .dcs-detail{display:flex;flex-direction:column;min-height:0;height:100%}
785
817
  .dcs-detail-head{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:8px 8px 6px}
786
- .dcs-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:14px;line-height:1;cursor:pointer}
818
+ .dcs-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:15px;line-height:1;cursor:pointer}
787
819
  .dcs-icon:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
788
820
  .dcs-icon:disabled{opacity:.4;cursor:default}
789
- .dcs-detail-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600}
821
+ .dcs-detail-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14.5px;font-weight:600}
790
822
  .dcs-detail-body{flex:1 1 auto;min-height:0;overflow-y:auto;padding:12px}
791
- .dcs-detail-position{font-size:11px;color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums}
792
- .dcs-detail-snippet{margin:0;padding:10px 12px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);font-size:12.5px;line-height:1.65;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;white-space:pre-wrap}
793
- .dcs-detail-status{margin:8px 0 0;font-size:11px;color:var(--dsw-alias-label-tertiary)}
823
+ .dcs-detail-position{font-size:12.5px;color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums}
824
+ .dcs-detail-snippet{margin:0;padding:10px 12px;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);font-size:14.5px;line-height:1.65;color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;white-space:pre-wrap}
825
+ .dcs-detail-status{margin:8px 0 0;font-size:12.5px;color:var(--dsw-alias-label-tertiary)}
794
826
  .dcs-detail-nav{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;border-bottom:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1)}
795
- .dcs-nav-button{display:flex;align-items:center;gap:6px;padding:0 10px;height:28px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;cursor:pointer}
827
+ .dcs-nav-button{display:flex;align-items:center;gap:6px;padding:0 10px;height:30px;border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13.5px;cursor:pointer}
796
828
  .dcs-nav-button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
797
829
  .dcs-nav-button:disabled{opacity:.4;cursor:default}
798
830
  `
@@ -1162,6 +1194,21 @@ window.__ModuleLoader__.load({
1162
1194
  return () => controller.abort()
1163
1195
  }, [focusSessionId])
1164
1196
 
1197
+ // The question list is live: a new prompt the user sends shows up without
1198
+ // reopening the panel. Cheap enough — the Host reads the in-memory log.
1199
+ React.useEffect(() => {
1200
+ if (typeof focusSessionId !== 'string' || focusSessionId.length === 0) return undefined
1201
+ const timer = setInterval(() => {
1202
+ const controller = new AbortController()
1203
+ fetchQuestions(focusSessionId, controller.signal).then((outcome) => {
1204
+ if (controller.signal.aborted) return
1205
+ setQuestions((current) => (current.length === outcome.questions.length ? current : outcome.questions))
1206
+ setQuestionCount(outcome.count)
1207
+ }).catch(() => {})
1208
+ }, 8000)
1209
+ return () => clearInterval(timer)
1210
+ }, [focusSessionId])
1211
+
1165
1212
  const trimmed = query.trim()
1166
1213
 
1167
1214
  React.useEffect(() => {
@@ -1378,6 +1425,9 @@ window.__ModuleLoader__.load({
1378
1425
  ? h('p', { className: 'dcs-detail-status' }, t('detail.missing'))
1379
1426
  : null,
1380
1427
  ),
1428
+ h('div', { className: 'dcs-foot' },
1429
+ h('span', { key: 'spacer' }, ''),
1430
+ h('span', { key: 'version', className: 'dcs-version' }, 'v' + PLUGIN_VERSION)),
1381
1431
  )
1382
1432
  }
1383
1433
 
@@ -1410,19 +1460,6 @@ window.__ModuleLoader__.load({
1410
1460
  },
1411
1461
  }, value))))
1412
1462
  }
1413
- if (questions.length > 0) {
1414
- body.push(h('p', { key: 'questions-title', className: 'dcs-section' },
1415
- t('questions.title', { n: questionCount })))
1416
- body.push(h('div', { key: 'questions', className: 'dcs-questions' }, questions.map((question, index) => h('button', {
1417
- key: String(question.seq) + ':' + index,
1418
- type: 'button',
1419
- className: 'dcs-question',
1420
- title: question.text,
1421
- onClick: () => {
1422
- revealText(focusSessionId, question.anchor, question.seq)
1423
- },
1424
- }, question.text))))
1425
- }
1426
1463
  } else if (phase === 'ready' && ordered.length === 0) {
1427
1464
  body.push(h('p', { key: 'empty', className: 'dcs-note' }, t('hint.empty')))
1428
1465
  } else {
@@ -1524,8 +1561,25 @@ window.__ModuleLoader__.load({
1524
1561
  onClick: () => setScope(value),
1525
1562
  }, t('scope.' + value)))),
1526
1563
  ),
1527
- h('div', { className: 'dcs-body', role: 'listbox', 'aria-label': t('field.label') }, body),
1528
- footer.length > 0 ? h('div', { className: 'dcs-foot' }, footer) : null,
1564
+ h('div', { className: 'dcs-results', role: 'listbox', 'aria-label': t('field.label') }, body),
1565
+ questions.length > 0
1566
+ ? h('div', { className: 'dcs-chat' },
1567
+ h('p', { className: 'dcs-section dcs-chat-head' }, t('questions.title', { n: questionCount })),
1568
+ h('div', { className: 'dcs-chat-list' }, questions.map((question, index) => {
1569
+ const hit = trimmed.length > 0 && matchesQuery(question.text, query)
1570
+ return h('button', {
1571
+ key: String(question.seq) + ':' + index,
1572
+ type: 'button',
1573
+ className: 'dcs-question',
1574
+ 'data-hit': hit ? 'true' : 'false',
1575
+ title: question.text,
1576
+ onClick: () => revealText(focusSessionId, question.anchor, question.seq),
1577
+ }, hit ? highlight(question.text, query, 'q' + index) : question.text)
1578
+ })))
1579
+ : null,
1580
+ h('div', { className: 'dcs-foot' },
1581
+ h('span', { key: 'hint' }, footer),
1582
+ h('span', { key: 'version', className: 'dcs-version' }, 'v' + PLUGIN_VERSION)),
1529
1583
  )
1530
1584
  }
1531
1585
  //#endregion
package/index.js CHANGED
@@ -64,7 +64,7 @@ const FUZZY_MAX_CHARS = 12
64
64
  /** Shortest query, in code points, still worth a fuzzy pass. */
65
65
  const FUZZY_MIN_CHARS = 4
66
66
 
67
- const VERSION = '0.23.0'
67
+ const VERSION = '0.24.1'
68
68
 
69
69
  //#region http helpers
70
70
  function writeJson(res, status, value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-content-search-ad",
3
- "version": "0.23.0",
3
+ "version": "0.24.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",