dsh-share-html 0.1.2 → 0.2.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/README.md CHANGED
@@ -52,7 +52,18 @@ dsh plugin --profile web add github:unknown3310v0/dsh-share-html
52
52
  | **过程** | 再加思考、工具调用、检索结果 | 展示推理过程 |
53
53
  | **完整** | 再加工具结果全文、附件、模型信息 | 完整存档、复盘 |
54
54
 
55
- 三档严格递增,另有逐项开关可以单独控制每一项。
55
+ 三档严格递增。档位只是起点 —— 下面的开关(思考过程 / 检索结果 / 工具调用 / 工具结果 / 附件 / 深度研究 / 模型信息)每一项都能单独开关。
56
+
57
+ **手动改过任一开关后,档位会标为「自定义」**,并且不再高亮任何一档,这样就不会出现「明明改了,顶上还显示对话」的错觉。再点任一档位即恢复该档默认。
58
+
59
+ ### 选择轮次
60
+
61
+ 会话很长时,可以只导出其中几轮。展开「导出轮次」后按轮勾选:
62
+
63
+ - 每行显示该轮的用户提问摘要、回复条数、工具调用次数
64
+ - **默认全选**;全选时请求里不带轮次过滤,会话后续新增的轮次也会一并包含
65
+ - 支持「全选 / 全不选」;一轮都不选时下载按钮会禁用
66
+ - 选中的轮次在产物里会重新编号为 1、2、3…
56
67
 
57
68
  ### 脱敏
58
69
 
package/lib/client.js CHANGED
@@ -192,34 +192,113 @@ window.__ModuleLoader__.load({
192
192
  h('span', { key: 't' }, props.label),
193
193
  props.hint ? h('span', { key: 'h', style: { fontSize: 12, color: LABEL_3, lineHeight: '16px' } }, props.hint) : null,
194
194
  ]),
195
- h('span', {
196
- key: 'box',
197
- style: {
198
- flex: 'none',
199
- width: 32,
200
- height: 18,
201
- borderRadius: 9,
202
- background: on ? LABEL : 'var(--dsw-alias-border-l4, rgba(0,0,0,.16))',
203
- position: 'relative',
204
- transition: 'background 120ms',
205
- },
206
- }, h('span', {
207
- style: {
208
- position: 'absolute',
209
- top: 2,
210
- left: on ? 16 : 2,
211
- width: 14,
212
- height: 14,
213
- borderRadius: 7,
214
- background: 'var(--dsw-alias-switch-thumb, #fff)',
215
- transition: 'left 120ms',
216
- },
217
- })),
195
+ h('span', { key: 'box', style: {
196
+ flex: 'none', width: 32, height: 18, position: 'relative', display: 'inline-block',
197
+ } }, [
198
+ // 真正的 checkbox:视觉上隐藏但保留语义与键盘可达性。
199
+ // 之前这里只有一个画出来的 span,label 里没有 input,onChange 永远不会触发——
200
+ // 开关看起来是"仅展示",实际是点不动。
201
+ h('input', {
202
+ key: 'i', type: 'checkbox',
203
+ checked: on,
204
+ disabled: props.disabled,
205
+ onChange: function () { if (!props.disabled) props.onChange() },
206
+ style: {
207
+ position: 'absolute', opacity: 0, width: '100%', height: '100%',
208
+ margin: 0, cursor: 'inherit',
209
+ },
210
+ }),
211
+ h('span', {
212
+ key: 'track',
213
+ 'aria-hidden': true,
214
+ style: {
215
+ display: 'block',
216
+ width: 32,
217
+ height: 18,
218
+ borderRadius: 9,
219
+ background: on ? LABEL : 'var(--dsw-alias-border-l4, rgba(0,0,0,.16))',
220
+ transition: 'background 120ms',
221
+ pointerEvents: 'none',
222
+ },
223
+ }, h('span', {
224
+ style: {
225
+ position: 'absolute',
226
+ top: 2,
227
+ left: on ? 16 : 2,
228
+ width: 14,
229
+ height: 14,
230
+ borderRadius: 7,
231
+ background: 'var(--dsw-alias-switch-thumb, #fff)',
232
+ transition: 'left 120ms',
233
+ pointerEvents: 'none',
234
+ },
235
+ })),
236
+ ]),
218
237
  ])
219
238
  }
220
239
 
221
240
  // ---- 弹窗(M10) ----------------------------------------------------------
222
241
 
242
+ // ---- 轮次选择(M12) ------------------------------------------------------
243
+ //
244
+ // 目录与内容分开取:`turns` 只回摘要和计数,选完再走 render 拿真产物。
245
+ // 勾选状态用 `null` 表示「全部轮次」——这样会话里后续新增的轮次也会被包含,
246
+ // 而不是被一个在打开弹窗时定格的数组漏掉。
247
+
248
+ /** 轮次摘要行。整行可点,键盘焦点辅助。 */
249
+ function TurnRow(props) {
250
+ var on = Boolean(props.checked)
251
+ return h('label', {
252
+ style: {
253
+ display: 'flex', alignItems: 'flex-start', gap: 8,
254
+ padding: '6px 8px', borderRadius: RADIUS_SM,
255
+ cursor: props.disabled ? 'not-allowed' : 'pointer',
256
+ opacity: props.disabled ? 0.55 : 1,
257
+ background: on ? 'var(--dsw-alias-interactive-bg-hover, rgba(38,49,72,.05))' : 'transparent',
258
+ },
259
+ }, [
260
+ h('input', {
261
+ key: 'c', type: 'checkbox', checked: on,
262
+ disabled: props.disabled,
263
+ onChange: props.onToggle,
264
+ style: { marginTop: 3, flex: 'none', cursor: 'inherit' },
265
+ }),
266
+ h('span', { key: 'b', style: { display: 'flex', flexDirection: 'column', gap: 1, minWidth: 0 } }, [
267
+ h('span', { key: 's', style: {
268
+ fontSize: 13, lineHeight: '18px', color: LABEL,
269
+ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap',
270
+ } }, props.summary || '(无文本提问)'),
271
+ h('span', { key: 'm', style: { fontSize: 11, lineHeight: '15px', color: LABEL_3 } }, props.meta),
272
+ ]),
273
+ ])
274
+ }
275
+
276
+ /** 把轮次摘要压成一行元信息:第 N 轮 · M 条回复 · K 次工具调用。 */
277
+ function turnMeta(t) {
278
+ var parts = ['第 ' + t.index + ' 轮', t.assistants + ' 条回复']
279
+ if (t.toolCalls > 0) parts.push(t.toolCalls + ' 次工具调用')
280
+ return parts.join(' · ')
281
+ }
282
+
283
+ /** 折叠行右侧的状态文字:全部 / 选了几轮 / 一轮都没选。 */
284
+ function turnsSummaryText(catalog, selection) {
285
+ if (!catalog) return ''
286
+ var total = catalog.turns.length
287
+ if (total === 0) return '无轮次'
288
+ if (selection === null) return '全部 ' + total + ' 轮'
289
+ if (selection.length === 0) return '未选'
290
+ return '已选 ' + selection.length + ' / ' + total + ' 轮'
291
+ }
292
+
293
+ /** 文字按钮(全选 / 全不选)的统一样式。 */
294
+ function linkBtnStyle() {
295
+ return {
296
+ border: 'none', background: 'transparent', padding: 0,
297
+ cursor: 'pointer', fontFamily: FONT_TEXT, fontSize: 12,
298
+ color: 'var(--dsw-alias-link, #4176e6)',
299
+ }
300
+ }
301
+
223
302
  var PRESETS = [
224
303
  { value: 'conversation', label: '对话', hint: '提问 + 最终回复' },
225
304
  { value: 'process', label: '过程', hint: '加上思考、工具调用与检索' },
@@ -298,16 +377,102 @@ window.__ModuleLoader__.load({
298
377
  var busy = busyState[0]
299
378
  var setBusy = busyState[1]
300
379
 
380
+ // 轮次选择:turns 为 null 表示「全部轮次」
381
+ var turnsCatalogState = useState(null)
382
+ var turnsCatalog = turnsCatalogState[0]
383
+ var setTurnsCatalog = turnsCatalogState[1]
384
+ var turnsErrorState = useState(null)
385
+ var turnsError = turnsErrorState[0]
386
+ var setTurnsError = turnsErrorState[1]
387
+ var selectionState = useState(null)
388
+ var selection = selectionState[0]
389
+ var setSelection = selectionState[1]
390
+ var turnsOpenState = useState(false)
391
+ var turnsOpen = turnsOpenState[0]
392
+ var setTurnsOpen = turnsOpenState[1]
393
+
301
394
  var seq = useRef(0)
302
395
 
303
- // 档位切换:把开关重置成该档默认(逐项开关仍可再改)
396
+ // 打开弹窗时拉一次轮次目录(内容不随粒度变化,所以只拉一次)
397
+ useEffect(function () {
398
+ if (!sessionId) return
399
+ var alive = true
400
+ invoke(ctx, 'share-html/turns', { sessionId: sessionId }).then(function (value) {
401
+ if (!alive) return
402
+ setTurnsCatalog(value)
403
+ setTurnsError(null)
404
+ }).catch(function (err) {
405
+ if (!alive) return
406
+ setTurnsCatalog(null)
407
+ setTurnsError(err)
408
+ })
409
+ return function () { alive = false }
410
+ }, [sessionId])
411
+
412
+ /** 某个轮次是否处于选中态。selection 为 null = 全选。 */
413
+ var isTurnOn = function (index) {
414
+ return selection === null || selection.indexOf(index) !== -1
415
+ }
416
+
417
+ /** 切换某一轮。从「全选」切到「部分选」时,把当前全部轮次展开成显式集合。 */
418
+ var toggleTurn = function (index) {
419
+ var total = turnsCatalog ? turnsCatalog.turns.length : 0
420
+ var all = []
421
+ for (var i = 1; i <= total; i++) all.push(i)
422
+ var current = selection === null ? all : selection.slice()
423
+ var at = current.indexOf(index)
424
+ if (at === -1) current.push(index)
425
+ else current.splice(at, 1)
426
+ current.sort(function (a, b) { return a - b })
427
+ // 全选回退成 null,这样后续新增轮次仍会被包含
428
+ setSelection(current.length === total ? null : current)
429
+ }
430
+
431
+ /** 全选 / 全不选。 */
432
+ var selectAll = function (on) {
433
+ if (on) { setSelection(null); return }
434
+ setSelection([])
435
+ }
436
+
437
+ /** 发给 Host 的 turns 字段:null 表示全部轮次。 */
438
+ var turnsForRequest = function () {
439
+ return selection
440
+ }
441
+
442
+ /** 用户把所有轮次都取消勾选了:这时不该导出,也不该发一个注定为空的渲染请求。 */
443
+ var noTurnsPicked = selection !== null && selection.length === 0
444
+
445
+ // 用户手动改过逐项开关后为 true:此时档位不再是"真相",显示为「自定义」。
446
+ // 这样档位按钮与开关不会互相打架——读者改了开关,顶上的档位会诚实地说
447
+ // "你现在不是任何一档",而不是继续高亮「对话」让人以为改没生效。
448
+ var customState = useState(false)
449
+ var customized = customState[0]
450
+ var setCustomized = customState[1]
451
+
452
+ // 档位切换:把开关重置成该档默认,并退出自定义态
304
453
  useEffect(function () {
305
454
  setInclude(presetInclude(preset))
455
+ setCustomized(false)
306
456
  }, [preset])
307
457
 
458
+ /** 手动改一个开关:同时把档位标记成「自定义」。 */
459
+ var toggleInclude = function (key) {
460
+ var next = Object.assign({}, include)
461
+ next[key] = !next[key]
462
+ setInclude(next)
463
+ setCustomized(true)
464
+ }
465
+
308
466
  // 预览实时更新:任一选项变化就重渲染,用序号丢弃过期结果
309
467
  useEffect(function () {
310
468
  if (!sessionId) return
469
+ // 一轮都没选:清空预览,不要发一个注定为空的请求
470
+ if (selection !== null && selection.length === 0) {
471
+ setResult(null)
472
+ setError(null)
473
+ setBusy(false)
474
+ return
475
+ }
311
476
  if (!redact && !needConfirm) {
312
477
  setNeedConfirm(true)
313
478
  return
@@ -321,6 +486,7 @@ window.__ModuleLoader__.load({
321
486
  include: include,
322
487
  redact: redact,
323
488
  redactMode: redactMode,
489
+ turns: turnsForRequest(),
324
490
  }
325
491
  var timer = setTimeout(function () {
326
492
  invoke(ctx, 'share-html/render', request).then(function (value) {
@@ -337,7 +503,7 @@ window.__ModuleLoader__.load({
337
503
  })
338
504
  }, 180)
339
505
  return function () { clearTimeout(timer) }
340
- }, [sessionId, preset, JSON.stringify(include), redact, redactMode])
506
+ }, [sessionId, preset, JSON.stringify(include), redact, redactMode, JSON.stringify(selection)])
341
507
 
342
508
  var download = function () {
343
509
  if (!result || !result.html) return
@@ -415,13 +581,70 @@ window.__ModuleLoader__.load({
415
581
  },
416
582
  }, [
417
583
  h('div', { key: 'p', style: { display: 'flex', flexDirection: 'column', gap: 8 } }, [
418
- h('div', { key: 'l', style: { fontSize: 12, color: LABEL_3 } }, '分享粒度'),
584
+ h('div', { key: 'l', style: { display: 'flex', alignItems: 'center', gap: 6, fontSize: 12, color: LABEL_3 } }, [
585
+ h('span', { key: 'a' }, '分享粒度'),
586
+ customized
587
+ ? h('span', { key: 'c', style: { color: LABEL_2 } }, '· 自定义(已手动调整)')
588
+ : null,
589
+ ]),
419
590
  h(Segmented, {
420
- key: 's', value: preset, options: PRESETS,
591
+ // 自定义态下不把任何一档标成选中,避免"高亮对话但其实已经改了"的错觉
592
+ key: 's', value: customized ? null : preset, options: PRESETS,
421
593
  onChange: function (v) { setPreset(v) },
422
594
  }),
423
595
  h('div', { key: 'h', style: { fontSize: 12, color: LABEL_3, lineHeight: '16px' } },
424
- (PRESETS.filter(function (p) { return p.value === preset })[0] || {}).hint || ''),
596
+ customized
597
+ ? '下方开关已按你的选择生效;再点任一档位会重置为那一档的默认。'
598
+ : ((PRESETS.filter(function (p) { return p.value === preset })[0] || {}).hint || '')),
599
+ ]),
600
+
601
+ // 轮次选择:默认收起,只显示一行摘要,避免长会话把左栏撑满
602
+ h('div', { key: 'tn', style: { display: 'flex', flexDirection: 'column', gap: 6, borderTop: '1px solid ' + BORDER_2, paddingTop: 10 } }, [
603
+ h('button', {
604
+ key: 'tg', type: 'button',
605
+ onClick: function () { setTurnsOpen(!turnsOpen) },
606
+ 'aria-expanded': turnsOpen,
607
+ style: {
608
+ display: 'flex', alignItems: 'center', gap: 6, width: '100%',
609
+ border: 'none', background: 'transparent', padding: 0,
610
+ cursor: 'pointer', fontFamily: FONT_TEXT, textAlign: 'left',
611
+ fontSize: 12, color: LABEL_3,
612
+ },
613
+ }, [
614
+ h('span', { key: 'a', style: { transition: 'transform 120ms', transform: turnsOpen ? 'rotate(90deg)' : 'none' } }, '›'),
615
+ h('span', { key: 'b', style: { flex: 1 } }, '导出轮次'),
616
+ h('span', { key: 'c', style: { fontSize: 12, color: LABEL_2 } }, turnsSummaryText(turnsCatalog, selection)),
617
+ ]),
618
+
619
+ turnsOpen ? h('div', { key: 'list', style: { display: 'flex', flexDirection: 'column', gap: 2 } }, [
620
+ turnsError
621
+ ? h('div', { key: 'e', style: { fontSize: 12, color: LABEL_3, padding: '4px 8px' } },
622
+ '轮次读取失败:' + turnsError.message)
623
+ : !turnsCatalog
624
+ ? h('div', { key: 'l', style: { fontSize: 12, color: LABEL_3, padding: '4px 8px' } }, '读取中…')
625
+ : h('div', { key: 'wrap', style: { display: 'flex', flexDirection: 'column', gap: 2 } }, [
626
+ h('div', { key: 'all', style: { display: 'flex', gap: 10, padding: '2px 8px 4px' } }, [
627
+ h('button', {
628
+ key: 'y', type: 'button', onClick: function () { selectAll(true) },
629
+ style: linkBtnStyle(),
630
+ }, '全选'),
631
+ h('button', {
632
+ key: 'n', type: 'button', onClick: function () { selectAll(false) },
633
+ style: linkBtnStyle(),
634
+ }, '全不选'),
635
+ ]),
636
+ h('div', { key: 'rows', style: { maxHeight: 220, overflowY: 'auto', display: 'flex', flexDirection: 'column', gap: 1 } },
637
+ turnsCatalog.turns.map(function (t) {
638
+ return h(TurnRow, {
639
+ key: t.index,
640
+ checked: isTurnOn(t.index),
641
+ summary: t.summary,
642
+ meta: turnMeta(t),
643
+ onToggle: function () { toggleTurn(t.index) },
644
+ })
645
+ })),
646
+ ]),
647
+ ]) : null,
425
648
  ]),
426
649
 
427
650
  h('div', { key: 'i', style: { display: 'flex', flexDirection: 'column', gap: 2 } },
@@ -431,11 +654,7 @@ window.__ModuleLoader__.load({
431
654
  label: INCLUDE_LABELS[key].label,
432
655
  hint: INCLUDE_LABELS[key].hint,
433
656
  checked: Boolean(include[key]),
434
- onChange: function () {
435
- var next = Object.assign({}, include)
436
- next[key] = !next[key]
437
- setInclude(next)
438
- },
657
+ onChange: function () { toggleInclude(key) },
439
658
  })
440
659
  })),
441
660
 
@@ -530,8 +749,10 @@ window.__ModuleLoader__.load({
530
749
  }, [
531
750
  h(Button, { key: 'c', onClick: onClose }, '取消'),
532
751
  h(Button, {
533
- key: 'd', primary: true, disabled: !result || busy, onClick: download,
534
- title: result ? '下载 ' + result.filename : '尚无可用产物',
752
+ key: 'd', primary: true,
753
+ disabled: !result || busy || noTurnsPicked,
754
+ onClick: download,
755
+ title: noTurnsPicked ? '至少勾选一轮才能导出' : (result ? '下载 ' + result.filename : '尚无可用产物'),
535
756
  }, '下载 .html'),
536
757
  ]),
537
758
  ]))
package/lib/kernel.js CHANGED
@@ -1564,14 +1564,19 @@ main { display: flex; flex-direction: column; gap: 28px; }
1564
1564
  word-break: break-word;
1565
1565
  }
1566
1566
 
1567
+ /* \u6D88\u606F\u5934\u90E8\uFF1A\u6A21\u578B\u540D\u653E\u5DE6\u4FA7\uFF0C\u4E0E DSH \u539F\u4F1A\u8BDD\u4E00\u81F4\u3002
1568
+ \u6CA1\u6709\u6A21\u578B\u4FE1\u606F\u65F6\u6574\u4E2A header \u4E0D\u6E32\u67D3\uFF0C\u4E0D\u7559\u7A7A\u884C\u3002 */
1569
+ .msg-head {
1570
+ display: flex;
1571
+ align-items: center;
1572
+ min-height: 24px;
1573
+ margin-bottom: 2px;
1574
+ }
1575
+
1567
1576
  .msg-model {
1568
- margin-top: 6px;
1569
1577
  color: var(--dsh-label-tertiary);
1570
1578
  font-size: 12px;
1571
1579
  line-height: 18px;
1572
- display: flex;
1573
- gap: 10px;
1574
- flex-wrap: wrap;
1575
1580
  font-variant-numeric: tabular-nums;
1576
1581
  }
1577
1582
 
@@ -2008,14 +2013,18 @@ function renderHtml(model, meta = {}) {
2008
2013
  body.push(renderUserMessage(turn.user));
2009
2014
  }
2010
2015
  const assistantBlocks = [];
2016
+ const turnModels = [];
2011
2017
  for (const msg of turn.assistants) {
2012
2018
  stats.messages += 1;
2013
2019
  stats.toolCalls += msg.blocks.filter((b) => b.kind === "tool").length;
2020
+ if (msg.model && !turnModels.includes(msg.model)) turnModels.push(msg.model);
2014
2021
  assistantBlocks.push(renderAssistantMessage(msg));
2015
2022
  }
2016
2023
  if (assistantBlocks.length) {
2024
+ const head = turnModels.length ? `<header class="msg-head"><span class="msg-model">${turnModels.map(esc).join(" \xB7 ")}</span></header>
2025
+ ` : "";
2017
2026
  body.push(`<article class="msg" data-role="assistant">
2018
- ${assistantBlocks.join("\n")}
2027
+ ${head}${assistantBlocks.join("\n")}
2019
2028
  </article>`);
2020
2029
  }
2021
2030
  }
@@ -2126,9 +2135,6 @@ function renderAssistantMessage(msg) {
2126
2135
  for (const block of msg.blocks) {
2127
2136
  parts.push(renderBlock(block));
2128
2137
  }
2129
- if (msg.model) {
2130
- parts.push(`<div class="msg-model"><span>${esc(msg.model)}</span></div>`);
2131
- }
2132
2138
  return parts.filter(Boolean).join("\n");
2133
2139
  }
2134
2140
  function renderBlock(block) {
@@ -2330,7 +2336,7 @@ function filenameStamp(epochMs, timeZone) {
2330
2336
  }
2331
2337
 
2332
2338
  // src/host/index.ts
2333
- var VERSION = "0.1.0";
2339
+ var VERSION = "0.2.1";
2334
2340
  function exportSession(input) {
2335
2341
  const preset = input.preset ?? "conversation";
2336
2342
  const opts = shareOptions(preset, input.options ?? {});
@@ -2584,6 +2590,51 @@ function capabilitiesForRequest(rawRequest) {
2584
2590
  fileBytes: false
2585
2591
  };
2586
2592
  }
2593
+ var SUMMARY_MAX = 80;
2594
+ function oneLine(text, max) {
2595
+ const flat = text.replace(/\s+/g, " ").trim();
2596
+ return flat.length > max ? flat.slice(0, max - 1) + "\u2026" : flat;
2597
+ }
2598
+ function userSummary(turn) {
2599
+ const blocks = turn.user?.blocks ?? [];
2600
+ for (const block of blocks) {
2601
+ if (block.kind === "text" && block.md.trim()) {
2602
+ return oneLine(block.md, SUMMARY_MAX);
2603
+ }
2604
+ }
2605
+ return "";
2606
+ }
2607
+ function countToolCalls(turn) {
2608
+ let n = 0;
2609
+ for (const message of turn.assistants) {
2610
+ for (const block of message.blocks) {
2611
+ if (block.kind === "tool") n += 1;
2612
+ }
2613
+ }
2614
+ return n;
2615
+ }
2616
+ async function turnSummariesForRequest(ctx, rawRequest, _options = {}) {
2617
+ try {
2618
+ const request = parseRenderRequest({ ...rawRequest, preset: "full" });
2619
+ const snapshot = await ctx.sessionQuery.readSession(request.sessionId);
2620
+ const events = toRawEvents(snapshot);
2621
+ const truncated = events.length > MAX_EVENTS ? events.slice(0, MAX_EVENTS) : events;
2622
+ const model = project(truncated, { sessionId: request.sessionId });
2623
+ const turns = model.turns.map((turn) => {
2624
+ const summary = {
2625
+ index: turn.index,
2626
+ summary: userSummary(turn),
2627
+ assistants: turn.assistants.length,
2628
+ toolCalls: countToolCalls(turn)
2629
+ };
2630
+ if (turn.user?.at !== void 0) summary.at = turn.user.at;
2631
+ return summary;
2632
+ });
2633
+ return { turns, total: model.turns.length };
2634
+ } catch (error) {
2635
+ return errorResponse(error);
2636
+ }
2637
+ }
2587
2638
  function toRawEvents(snapshot) {
2588
2639
  const events = Array.isArray(snapshot.events) ? snapshot.events : [];
2589
2640
  const out = [];
@@ -2609,6 +2660,7 @@ function defaultTimeZone() {
2609
2660
  function createHandlers(ctx, options = {}) {
2610
2661
  return {
2611
2662
  "share-html/capabilities": (args) => capabilitiesForRequest(args),
2663
+ "share-html/turns": (args) => turnSummariesForRequest(ctx, args, options),
2612
2664
  "share-html/render": (args) => renderForRequest(ctx, args, options),
2613
2665
  "share-html/inspect": async (args) => {
2614
2666
  const result = await renderForRequest(ctx, args, options);
@@ -2628,5 +2680,6 @@ export {
2628
2680
  capabilitiesForRequest,
2629
2681
  createHandlers,
2630
2682
  renderForRequest,
2631
- toRawEvents
2683
+ toRawEvents,
2684
+ turnSummariesForRequest
2632
2685
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-share-html",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "Export a DSH session as one self-contained, offline HTML file that looks like the original conversation: three detail presets, per-block switches, built-in redaction, zero scripts and zero external requests.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",