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 +1 -1
- package/lib/client.js +27 -19
- package/lib/client.js.map +1 -1
- package/lib/index.mjs +21 -10
- package/lib/index.mjs.map +1 -1
- package/lib/types/client/summary/search-refs.d.ts +2 -2
- package/lib/types/projection/search-ref-fold.d.ts +20 -9
- package/package.json +1 -1
- package/src/client/summary/SearchRefSection.tsx +30 -20
- package/src/client/summary/search-refs.ts +3 -12
- package/src/projection/register.ts +6 -1
- package/src/projection/search-ref-fold.ts +20 -9
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-brief-sidebar",
|
|
3
|
-
"version": "0.9.
|
|
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"
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2151
|
-
*
|
|
2152
|
-
*
|
|
2153
|
-
*
|
|
2154
|
-
*
|
|
2155
|
-
*
|
|
2156
|
-
*
|
|
2157
|
-
*
|
|
2158
|
-
*
|
|
2159
|
-
*
|
|
2160
|
-
*
|
|
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]
|
|
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}`,
|