dsh-brief-sidebar 0.9.4 → 0.9.5
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 +36 -22
- package/lib/client.js.map +1 -1
- package/lib/index.mjs +61 -31
- package/lib/index.mjs.map +1 -1
- package/lib/types/client/summary/search-refs.d.ts +5 -4
- package/lib/types/projection/keys.d.ts +7 -2
- package/lib/types/projection/search-ref-fold.d.ts +37 -17
- package/package.json +1 -1
- package/src/client/locales.ts +9 -9
- package/src/client/summary/SearchRefSection.tsx +13 -6
- package/src/client/summary/search-refs.ts +16 -5
- package/src/projection/keys.ts +7 -2
- package/src/projection/register.ts +22 -3
- package/src/projection/search-ref-fold.ts +83 -35
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.5",
|
|
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
|
@@ -364,8 +364,9 @@ window.__ModuleLoader__.load({
|
|
|
364
364
|
const SKILL_USAGE_KEY = "dshSummarySkillUsage";
|
|
365
365
|
/**
|
|
366
366
|
* The search-reference key (queries and returned sources of this session's
|
|
367
|
-
*
|
|
368
|
-
* host-side unit can answer
|
|
367
|
+
* web searches — the plugin's `advanced_search` and the harness's `web_search`).
|
|
368
|
+
* Same rule as above: the name is ours, so no other host-side unit can answer
|
|
369
|
+
* for it by accident.
|
|
369
370
|
*/
|
|
370
371
|
const SEARCH_REFS_KEY = "dshSummarySearchRefs";
|
|
371
372
|
//#endregion
|
|
@@ -708,7 +709,7 @@ window.__ModuleLoader__.load({
|
|
|
708
709
|
"section.searchRefs": "搜索引用",
|
|
709
710
|
"references.tabSearch": "搜索",
|
|
710
711
|
"searchRefs.empty": "本会话还没搜索过",
|
|
711
|
-
"searchRefs.emptyHint": "模型调用 advanced_search
|
|
712
|
+
"searchRefs.emptyHint": "模型调用 web_search 或 advanced_search 之后,查询与取回的来源会实时出现在这里。",
|
|
712
713
|
"searchRefs.queryGroup": "查询 · {count}",
|
|
713
714
|
"searchRefs.sourceGroup": "来源 · {count}",
|
|
714
715
|
"searchRefs.hits": "返回 {count} 条",
|
|
@@ -781,7 +782,7 @@ window.__ModuleLoader__.load({
|
|
|
781
782
|
"section.searchRefs": "Web searches",
|
|
782
783
|
"references.tabSearch": "Searches",
|
|
783
784
|
"searchRefs.empty": "No searches in this session",
|
|
784
|
-
"searchRefs.emptyHint": "Queries and the
|
|
785
|
+
"searchRefs.emptyHint": "Queries and the sources they returned appear here once the model calls web_search or advanced_search.",
|
|
785
786
|
"searchRefs.queryGroup": "Queries · {count}",
|
|
786
787
|
"searchRefs.sourceGroup": "Sources · {count}",
|
|
787
788
|
"searchRefs.hits": "{count} returned",
|
|
@@ -854,7 +855,7 @@ window.__ModuleLoader__.load({
|
|
|
854
855
|
"section.searchRefs": "Web 検索",
|
|
855
856
|
"references.tabSearch": "検索",
|
|
856
857
|
"searchRefs.empty": "このセッションではまだ検索していません",
|
|
857
|
-
"searchRefs.emptyHint": "モデルが advanced_search
|
|
858
|
+
"searchRefs.emptyHint": "モデルが web_search または advanced_search を呼び出すと、クエリと取得した出典がここに表示されます。",
|
|
858
859
|
"searchRefs.queryGroup": "クエリ · {count}",
|
|
859
860
|
"searchRefs.sourceGroup": "ソース · {count}",
|
|
860
861
|
"searchRefs.hits": "{count} 件返却",
|
|
@@ -927,7 +928,7 @@ window.__ModuleLoader__.load({
|
|
|
927
928
|
"section.searchRefs": "웹 검색",
|
|
928
929
|
"references.tabSearch": "검색",
|
|
929
930
|
"searchRefs.empty": "이 세션에서는 아직 검색하지 않았습니다",
|
|
930
|
-
"searchRefs.emptyHint": "모델이 advanced_search를 호출하면 쿼리와 가져온
|
|
931
|
+
"searchRefs.emptyHint": "모델이 web_search 또는 advanced_search를 호출하면 쿼리와 가져온 출처가 여기에 표시됩니다.",
|
|
931
932
|
"searchRefs.queryGroup": "쿼리 · {count}",
|
|
932
933
|
"searchRefs.sourceGroup": "소스 · {count}",
|
|
933
934
|
"searchRefs.hits": "{count}件 반환",
|
|
@@ -1000,7 +1001,7 @@ window.__ModuleLoader__.load({
|
|
|
1000
1001
|
"section.searchRefs": "Recherches web",
|
|
1001
1002
|
"references.tabSearch": "Recherches",
|
|
1002
1003
|
"searchRefs.empty": "Aucune recherche dans cette session",
|
|
1003
|
-
"searchRefs.emptyHint": "Les requêtes et les sources
|
|
1004
|
+
"searchRefs.emptyHint": "Les requêtes et les sources obtenues s’affichent ici dès que le modèle appelle web_search ou advanced_search.",
|
|
1004
1005
|
"searchRefs.queryGroup": "Requêtes · {count}",
|
|
1005
1006
|
"searchRefs.sourceGroup": "Sources · {count}",
|
|
1006
1007
|
"searchRefs.hits": "{count} renvoyées",
|
|
@@ -1073,7 +1074,7 @@ window.__ModuleLoader__.load({
|
|
|
1073
1074
|
"section.searchRefs": "Websuchen",
|
|
1074
1075
|
"references.tabSearch": "Suchen",
|
|
1075
1076
|
"searchRefs.empty": "Keine Suchen in dieser Sitzung",
|
|
1076
|
-
"searchRefs.emptyHint": "Abfragen und die
|
|
1077
|
+
"searchRefs.emptyHint": "Abfragen und die gelieferten Quellen erscheinen hier, sobald das Modell web_search oder advanced_search aufruft.",
|
|
1077
1078
|
"searchRefs.queryGroup": "Abfragen · {count}",
|
|
1078
1079
|
"searchRefs.sourceGroup": "Quellen · {count}",
|
|
1079
1080
|
"searchRefs.hits": "{count} zurückgegeben",
|
|
@@ -1146,7 +1147,7 @@ window.__ModuleLoader__.load({
|
|
|
1146
1147
|
"section.searchRefs": "Ricerche web",
|
|
1147
1148
|
"references.tabSearch": "Ricerche",
|
|
1148
1149
|
"searchRefs.empty": "Nessuna ricerca in questa sessione",
|
|
1149
|
-
"searchRefs.emptyHint": "Le query e le fonti
|
|
1150
|
+
"searchRefs.emptyHint": "Le query e le fonti ottenute compaiono qui quando il modello chiama web_search o advanced_search.",
|
|
1150
1151
|
"searchRefs.queryGroup": "Query · {count}",
|
|
1151
1152
|
"searchRefs.sourceGroup": "Fonti · {count}",
|
|
1152
1153
|
"searchRefs.hits": "{count} restituite",
|
|
@@ -1219,7 +1220,7 @@ window.__ModuleLoader__.load({
|
|
|
1219
1220
|
"section.searchRefs": "Поиск в сети",
|
|
1220
1221
|
"references.tabSearch": "Поиск",
|
|
1221
1222
|
"searchRefs.empty": "В этой сессии ещё не было поиска",
|
|
1222
|
-
"searchRefs.emptyHint": "Запросы и
|
|
1223
|
+
"searchRefs.emptyHint": "Запросы и полученные источники появятся здесь, когда модель вызовет web_search или advanced_search.",
|
|
1223
1224
|
"searchRefs.queryGroup": "Запросы · {count}",
|
|
1224
1225
|
"searchRefs.sourceGroup": "Источники · {count}",
|
|
1225
1226
|
"searchRefs.hits": "возвращено {count}",
|
|
@@ -1292,7 +1293,7 @@ window.__ModuleLoader__.load({
|
|
|
1292
1293
|
"section.searchRefs": "Búsquedas web",
|
|
1293
1294
|
"references.tabSearch": "Búsquedas",
|
|
1294
1295
|
"searchRefs.empty": "Sin búsquedas en esta sesión",
|
|
1295
|
-
"searchRefs.emptyHint": "Las consultas y las fuentes
|
|
1296
|
+
"searchRefs.emptyHint": "Las consultas y las fuentes obtenidas aparecen aquí cuando el modelo llama a web_search o advanced_search.",
|
|
1296
1297
|
"searchRefs.queryGroup": "Consultas · {count}",
|
|
1297
1298
|
"searchRefs.sourceGroup": "Fuentes · {count}",
|
|
1298
1299
|
"searchRefs.hits": "{count} devueltas",
|
|
@@ -1595,10 +1596,11 @@ window.__ModuleLoader__.load({
|
|
|
1595
1596
|
* The `dshSummarySearchRefs` projection — reading it.
|
|
1596
1597
|
*
|
|
1597
1598
|
* The unit is registered by THIS plugin's host half (key `dshSummarySearchRefs`):
|
|
1598
|
-
* the queries this session ran through `
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1601
|
-
*
|
|
1599
|
+
* the queries this session ran — through the harness's `web_search` or the
|
|
1600
|
+
* user's own `advanced_search` — and the sources those searches brought back.
|
|
1601
|
+
* It answers "what did the session pull in from outside" — where the skill tab
|
|
1602
|
+
* says which instruction packs were loaded and the memory tab says which of the
|
|
1603
|
+
* user's own knowledge was injected.
|
|
1602
1604
|
*
|
|
1603
1605
|
* Reading discipline, same as every other brief section:
|
|
1604
1606
|
* - `undefined` = the capability is ABSENT (no projection registry, or a frame
|
|
@@ -1612,6 +1614,14 @@ window.__ModuleLoader__.load({
|
|
|
1612
1614
|
function isCounter$2(value) {
|
|
1613
1615
|
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
1614
1616
|
}
|
|
1617
|
+
/**
|
|
1618
|
+
* The tool a row came from, defaulting to the plugin's own for a frame written
|
|
1619
|
+
* before the host half started publishing `tool`. Absent is "we do not know",
|
|
1620
|
+
* never "not a search", so the row still shows.
|
|
1621
|
+
*/
|
|
1622
|
+
function readTool(value) {
|
|
1623
|
+
return typeof value === "string" && value.length > 0 ? value : "advanced_search";
|
|
1624
|
+
}
|
|
1615
1625
|
/** Narrow one source row; `undefined` = malformed, dropped. */
|
|
1616
1626
|
function readItem$1(value) {
|
|
1617
1627
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
@@ -1624,6 +1634,7 @@ window.__ModuleLoader__.load({
|
|
|
1624
1634
|
url: raw["url"],
|
|
1625
1635
|
host: raw["host"],
|
|
1626
1636
|
query: raw["query"],
|
|
1637
|
+
tool: readTool(raw["tool"]),
|
|
1627
1638
|
count: raw["count"],
|
|
1628
1639
|
lastTurn: raw["lastTurn"]
|
|
1629
1640
|
};
|
|
@@ -1639,6 +1650,7 @@ window.__ModuleLoader__.load({
|
|
|
1639
1650
|
if (!isCounter$2(raw["turn"]) || !isCounter$2(raw["hits"])) return void 0;
|
|
1640
1651
|
return {
|
|
1641
1652
|
query: raw["query"],
|
|
1653
|
+
tool: readTool(raw["tool"]),
|
|
1642
1654
|
turn: raw["turn"],
|
|
1643
1655
|
hits: raw["hits"]
|
|
1644
1656
|
};
|
|
@@ -2085,12 +2097,14 @@ window.__ModuleLoader__.load({
|
|
|
2085
2097
|
* one tab of the references section.
|
|
2086
2098
|
*
|
|
2087
2099
|
* It answers "what did this session pull in from outside": the queries it ran
|
|
2088
|
-
*
|
|
2089
|
-
*
|
|
2090
|
-
*
|
|
2091
|
-
*
|
|
2092
|
-
*
|
|
2093
|
-
*
|
|
2100
|
+
* — via the harness's `web_search` or the user's own `advanced_search` — and the
|
|
2101
|
+
* sources those searches returned. Each query row carries its tool name, because
|
|
2102
|
+
* which of the two answered is a fact the reader asks about. Two groups, because
|
|
2103
|
+
* they are two different facts — a query says what was asked, a source says what
|
|
2104
|
+
* came back, and an older `dsh-free-search` without `presentationMeta` produces
|
|
2105
|
+
* queries with no sources at all. That degraded case is stated rather than
|
|
2106
|
+
* hidden, because an empty source list would otherwise read as "the search found
|
|
2107
|
+
* nothing".
|
|
2094
2108
|
*
|
|
2095
2109
|
* Optional on both sides: no registry, or a host half that never registered the
|
|
2096
2110
|
* unit, means the client reads capability absence and the section hides.
|
|
@@ -2213,7 +2227,7 @@ window.__ModuleLoader__.load({
|
|
|
2213
2227
|
key: `${row.turn}:${row.query}`,
|
|
2214
2228
|
style: ROW_STYLE$3,
|
|
2215
2229
|
"data-dsh-brief-sidebar": "search-refs-query"
|
|
2216
|
-
}, (0, react.createElement)("span", { style: QUERY_STYLE }, row.query), (0, react.createElement)("span", { style: META_STYLE$2 }, expandCount(t("searchRefs.hits"), row.hits))))));
|
|
2230
|
+
}, (0, react.createElement)("span", { style: QUERY_STYLE }, row.query), (0, react.createElement)("span", { style: TAG_STYLE }, row.tool), (0, react.createElement)("span", { style: META_STYLE$2 }, expandCount(t("searchRefs.hits"), row.hits))))));
|
|
2217
2231
|
}
|
|
2218
2232
|
if (view.sources.length > 0) {
|
|
2219
2233
|
body.push((0, react.createElement)(GroupHeader, {
|