dsh-brief-sidebar 0.9.8 → 0.9.10

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/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-brief-sidebar",
3
- "version": "0.9.8",
3
+ "version": "0.9.10",
4
4
  "main": "./lib/index.mjs",
5
5
  "description": "会话简报侧栏页(brief):把会话的 todo 列表(`todos` 投影的进展看板)、产物列表(`dshSummaryDeliverables` 投影的实时产出文件)与记忆槽位(`memorySlots` 投影,来自 dsh-prime-memory,开关可关)一起渲染成右侧栏的一个「概要」tab,并遮蔽 DSH 官方那条 composer 上方的 todo 面板。只读展示,不做写回。",
6
6
  "engines": {
package/lib/client.js CHANGED
@@ -1719,9 +1719,10 @@ window.__ModuleLoader__.load({
1719
1719
  * disagree with the cards on screen. Queries come newest-first from the fold;
1720
1720
  * a source no listed query claims (its query aged out of the capped list, or a
1721
1721
  * pre-cluster frame) lands in a tail group rather than disappearing.
1722
+ *
1723
+ * The section renders every cluster folded; nothing here decides what opens.
1722
1724
  */
1723
1725
  function clusterByQuery(view) {
1724
- const latestTurn = view.latest?.turn;
1725
1726
  const claimed = /* @__PURE__ */ new Set();
1726
1727
  const out = [];
1727
1728
  for (const row of view.queries) {
@@ -1732,8 +1733,7 @@ window.__ModuleLoader__.load({
1732
1733
  tool: row.tool,
1733
1734
  turn: row.turn,
1734
1735
  hits: row.hits,
1735
- items,
1736
- latest: latestTurn !== void 0 && row.turn === latestTurn
1736
+ items
1737
1737
  });
1738
1738
  }
1739
1739
  const rest = view.sources.filter((item) => !claimed.has(item.url));
@@ -1742,8 +1742,7 @@ window.__ModuleLoader__.load({
1742
1742
  tool: rest[0]?.tool ?? "",
1743
1743
  turn: rest[0]?.lastTurn ?? 0,
1744
1744
  hits: rest.length,
1745
- items: rest,
1746
- latest: false
1745
+ items: rest
1747
1746
  });
1748
1747
  return out;
1749
1748
  }
@@ -2145,19 +2144,28 @@ window.__ModuleLoader__.load({
2145
2144
  * The search-reference section: the `dshSummarySearchRefs` projection drawn as
2146
2145
  * one tab of the references section.
2147
2146
  *
2148
- * It answers "what did this session pull in from outside", and it answers it the
2149
- * way the conversation to its left does: **one left-aligned bubble per source**,
2150
- * title as a link, host and provider snippet under it. No group headers, no list
2151
- * of query titles — that wall duplicated what the transcript already shows, and a
2152
- * reader who opens this tab is looking for the results, not for a restatement of
2153
- * the questions.
2154
- *
2155
- * The fold still records which query and which tool (`web_search` or the user's
2156
- * own `advanced_search`) surfaced each source; that data stays in the frame for
2157
- * any surface that wants it, it is just no longer drawn here. An older
2158
- * `dsh-free-search` without `presentationMeta` yields queries with no sources —
2159
- * that degraded case is stated (`searchRefs.noSourcesHint`) rather than left as
2160
- * an empty pane, because an empty list reads as "the search found nothing".
2147
+ * It answers "what did this session pull in from outside" as a list of the
2148
+ * questions the session asked: **one line per query, every one folded**. Opening
2149
+ * a line reveals that query's results as left-aligned bubbles — title as a link,
2150
+ * host and provider snippet under it — in the same reading idiom as the
2151
+ * conversation to the left.
2152
+ *
2153
+ * Folded-by-default is a deliberate call, not a leftover: a tab that spills its
2154
+ * whole result set the moment it is clicked buries the question list the reader
2155
+ * came to scan, and one session can carry forty results across eight queries.
2156
+ *
2157
+ * Each line counts what it actually holds, never what the call returned: a query
2158
+ * whose results aged out of the capped source list reads "0" and is drawn as a
2159
+ * plain line with no chevron, because a switch that opens onto nothing is worse
2160
+ * than no switch. Sources no listed query claims (their query aged out, or the
2161
+ * frame predates the cluster change) collect in a tail group rather than vanish.
2162
+ *
2163
+ * The fold still records which tool (`web_search` or the user's own
2164
+ * `advanced_search`) answered each query; that stays in the frame for any surface
2165
+ * that wants it and is not drawn here. An older `dsh-free-search` without
2166
+ * `presentationMeta` yields queries with no sources at all — that degraded case
2167
+ * is stated (`searchRefs.noSourcesHint`) rather than left as an empty pane,
2168
+ * because an empty list reads as "the search found nothing".
2161
2169
  *
2162
2170
  * Optional on both sides: no registry, or a host half that never registered the
2163
2171
  * unit, means the client reads capability absence and the section hides.
@@ -2320,7 +2328,7 @@ window.__ModuleLoader__.load({
2320
2328
  }));
2321
2329
  continue;
2322
2330
  }
2323
- const open = openMap[key] ?? cluster.latest;
2331
+ const open = openMap[key] === true;
2324
2332
  body.push((0, react.createElement)(FoldToggle, {
2325
2333
  key: `h:${key}`,
2326
2334
  label: cluster.query === "" ? expandCount(t("searchRefs.sourceGroup"), cluster.items.length) : `${cluster.query} · ${shown}`,