dsh-brief-sidebar 0.9.26-local.1 → 0.9.26

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,16 +1,16 @@
1
- {
2
- "id": "dsh-external/dsh-brief-sidebar",
3
- "version": "0.9.26-local.1",
4
- "main": "./lib/index.mjs",
5
- "description": "会话简报侧栏页(brief):把会话的 todo 列表(`todos` 投影的进展看板)、产物列表(`dshSummaryDeliverables` 投影的实时产出文件)、引用页签(技能 / 本会话召回 / 常驻槽位 / 回响,附「详细展示 ▾」与行内「查看详情 ▾」经深链打开 dsh-prime-memory 记忆库;回响页签列出本会话被 dsh-spirit 召回的回响段,并可经深链跳到星图与条目)一起渲染成右侧栏的一个「概要」tab,并遮蔽 DSH 官方那条 composer 上方的 todo 面板。只读展示,不做写回。",
6
- "engines": {
7
- "dsh": ">=0.1.0-rc.2 <0.3.0-0"
8
- },
9
- "contributes": {
10
- "tools": [],
11
- "skills": []
12
- },
13
- "client": {
14
- "main": "./lib/client.js"
15
- }
16
- }
1
+ {
2
+ "id": "dsh-external/dsh-brief-sidebar",
3
+ "version": "0.9.26",
4
+ "main": "./lib/index.mjs",
5
+ "description": "会话简报侧栏页(brief):把会话的 todo 列表(`todos` 投影的进展看板)、产物列表(`dshSummaryDeliverables` 投影的实时产出文件)、引用页签(技能 / 本会话召回 / 常驻槽位 / 回响,附「详细展示 ▾」与行内「查看详情 ▾」经深链打开 dsh-prime-memory 记忆库;回响页签列出本会话被 dsh-spirit 召回的回响段,并可经深链跳到星图与条目)一起渲染成右侧栏的一个「概要」tab,并遮蔽 DSH 官方那条 composer 上方的 todo 面板。只读展示,不做写回。",
6
+ "engines": {
7
+ "dsh": ">=0.1.0-rc.2 <0.3.0-0"
8
+ },
9
+ "contributes": {
10
+ "tools": [],
11
+ "skills": []
12
+ },
13
+ "client": {
14
+ "main": "./lib/client.js"
15
+ }
16
+ }
package/lib/client.js CHANGED
@@ -667,6 +667,7 @@ window.__ModuleLoader__.load({
667
667
  "deliverables.empty": "本回合暂无改动文件",
668
668
  "deliverables.emptyHint": "会话里成功写入或修改文件后,它们会实时出现在这里。",
669
669
  "deliverables.history": "更早改动的文件 · {count}",
670
+ "deliverables.historyMore": "还有 {count} 条",
670
671
  "deliverables.currentTurn": "本回合改动 · {count}",
671
672
  "deliverables.historyCapped": "(会话共 {total} 个文件,列表已截断)",
672
673
  "deliverable.codeplanTag": "规划",
@@ -771,6 +772,7 @@ window.__ModuleLoader__.load({
771
772
  "deliverables.empty": "No files changed in this turn",
772
773
  "deliverables.emptyHint": "Files written or edited successfully in the session appear here live.",
773
774
  "deliverables.history": "Earlier changes · {count}",
775
+ "deliverables.historyMore": "{count} more",
774
776
  "deliverables.currentTurn": "This turn · {count}",
775
777
  "deliverables.historyCapped": "(the session produced {total} files; the list is capped)",
776
778
  "deliverable.codeplanTag": "Plan",
@@ -875,6 +877,7 @@ window.__ModuleLoader__.load({
875
877
  "deliverables.empty": "このターンで変更されたファイルはありません",
876
878
  "deliverables.emptyHint": "セッションでファイルの書き込み・変更が成功すると、ここにリアルタイムで表示されます。",
877
879
  "deliverables.history": "以前の変更 · {count}",
880
+ "deliverables.historyMore": "ほか {count} 件",
878
881
  "deliverables.currentTurn": "このターン · {count}",
879
882
  "deliverables.historyCapped": "(セッション全体で {total} ファイル、一覧は上限で省略)",
880
883
  "deliverable.codeplanTag": "計画",
@@ -979,6 +982,7 @@ window.__ModuleLoader__.load({
979
982
  "deliverables.empty": "이번 턴에 변경된 파일이 없습니다",
980
983
  "deliverables.emptyHint": "세션에서 파일을 성공적으로 작성하거나 수정하면 여기에 실시간으로 표시됩니다.",
981
984
  "deliverables.history": "이전 변경 사항 · {count}",
985
+ "deliverables.historyMore": "외 {count}개",
982
986
  "deliverables.currentTurn": "이번 턴 · {count}",
983
987
  "deliverables.historyCapped": "(세션 전체 {total}개 파일, 목록은 잘림)",
984
988
  "deliverable.codeplanTag": "계획",
@@ -1083,6 +1087,7 @@ window.__ModuleLoader__.load({
1083
1087
  "deliverables.empty": "Aucun fichier modifié à ce tour",
1084
1088
  "deliverables.emptyHint": "Les fichiers écrits ou modifiés dans la session apparaissent ici en direct.",
1085
1089
  "deliverables.history": "Modifications antérieures · {count}",
1090
+ "deliverables.historyMore": "{count} de plus",
1086
1091
  "deliverables.currentTurn": "Ce tour-ci · {count}",
1087
1092
  "deliverables.historyCapped": "(la session a produit {total} fichiers ; la liste est tronquée)",
1088
1093
  "deliverable.codeplanTag": "Plan",
@@ -1187,6 +1192,7 @@ window.__ModuleLoader__.load({
1187
1192
  "deliverables.empty": "Keine Dateien in diesem Durchgang geändert",
1188
1193
  "deliverables.emptyHint": "In der Sitzung erfolgreich geschriebene oder geänderte Dateien erscheinen hier live.",
1189
1194
  "deliverables.history": "Frühere Änderungen · {count}",
1195
+ "deliverables.historyMore": "noch {count}",
1190
1196
  "deliverables.currentTurn": "Dieser Durchlauf · {count}",
1191
1197
  "deliverables.historyCapped": "(die Sitzung erzeugte {total} Dateien; die Liste ist gekürzt)",
1192
1198
  "deliverable.codeplanTag": "Plan",
@@ -1291,6 +1297,7 @@ window.__ModuleLoader__.load({
1291
1297
  "deliverables.empty": "Nessun file modificato in questo turno",
1292
1298
  "deliverables.emptyHint": "I file scritti o modificati nella sessione appaiono qui in tempo reale.",
1293
1299
  "deliverables.history": "Modifiche precedenti · {count}",
1300
+ "deliverables.historyMore": "altri {count}",
1294
1301
  "deliverables.currentTurn": "Questo turno · {count}",
1295
1302
  "deliverables.historyCapped": "(la sessione ha prodotto {total} file; l’elenco è troncato)",
1296
1303
  "deliverable.codeplanTag": "Piano",
@@ -1395,6 +1402,7 @@ window.__ModuleLoader__.load({
1395
1402
  "deliverables.empty": "За этот ход файлы не менялись",
1396
1403
  "deliverables.emptyHint": "Успешно записанные или изменённые файлы появляются здесь в реальном времени.",
1397
1404
  "deliverables.history": "Более ранние изменения · {count}",
1405
+ "deliverables.historyMore": "ещё {count}",
1398
1406
  "deliverables.currentTurn": "Этот ход · {count}",
1399
1407
  "deliverables.historyCapped": "(в сессии всего {total} файлов; список усечён)",
1400
1408
  "deliverable.codeplanTag": "План",
@@ -1499,6 +1507,7 @@ window.__ModuleLoader__.load({
1499
1507
  "deliverables.empty": "Ningún archivo modificado en este turno",
1500
1508
  "deliverables.emptyHint": "Los archivos escritos o editados en la sesión aparecen aquí en directo.",
1501
1509
  "deliverables.history": "Cambios anteriores · {count}",
1510
+ "deliverables.historyMore": "{count} más",
1502
1511
  "deliverables.currentTurn": "Este turno · {count}",
1503
1512
  "deliverables.historyCapped": "(la sesión produjo {total} archivos; la lista está truncada)",
1504
1513
  "deliverable.codeplanTag": "Plan",
@@ -1629,6 +1638,13 @@ window.__ModuleLoader__.load({
1629
1638
  flexShrink: 0,
1630
1639
  borderBottom: "1px solid var(--dsw-alias-border-secondary)"
1631
1640
  };
1641
+ /**
1642
+ * How many earlier-change rows a reloaded session shows before the reader asks
1643
+ * for more. Five fills the visible slice of a narrow sidebar without turning
1644
+ * the section into a scroll well — the preview exists to prove "this session
1645
+ * produced files", not to be the full history.
1646
+ */
1647
+ const HISTORY_PREVIEW = 5;
1632
1648
  const HEADER_STYLE$7 = {
1633
1649
  padding: "10px 12px 0",
1634
1650
  color: "var(--dsw-alias-label-secondary)",
@@ -1707,16 +1723,26 @@ window.__ModuleLoader__.load({
1707
1723
  * 分层:本回合改动(latest)与全会话更早改动分成两组各自计数——前者直列,后者
1708
1724
  * 折叠在开关行后面(与活跃文件按归一化路径去重),展开后是与活跃区相同的可点击
1709
1725
  * 文件行。列表有上限时,开关行说折叠区条数、附注说会话真数,两个数不混为一谈。
1726
+ *
1727
+ * **重载语义**:重新打开一个历史会话时,`latest` 要么是空的(还没跑新回合),
1728
+ * 要么指向上一回合——两种情况下「本回合改动」都读不出东西,而历史改动全被
1729
+ * 折叠收起,整节看起来像"没有产物"。所以本回合为空时历史区**默认展开并只
1730
+ * 预览前 {@link HISTORY_PREVIEW} 条**:读者一进来就能看见这个会话改过什么,
1731
+ * 又不至于把侧栏塞满;点「还有 N 条」看全量,点折叠行收起。
1710
1732
  * @param props - translation, client context, session scope.
1711
1733
  */
1712
1734
  function DeliverablesSection(props) {
1713
1735
  const { t, ctx, scope } = props;
1714
- const [historyOpen, setHistoryOpen] = (0, react.useState)(false);
1736
+ const [historyOverride, setHistoryOverride] = (0, react.useState)(void 0);
1715
1737
  const view = readDeliverables(useProjectionValue(ctx, scope?.sessionId, DELIVERABLES_KEY));
1716
1738
  if (view === void 0) return null;
1717
1739
  const open = sidebarFileOpener(ctx, scope?.sessionId);
1718
1740
  const latestPaths = view.latest?.paths ?? [];
1719
1741
  const history = historyPaths(view.sessionPaths, latestPaths);
1742
+ const historyOpen = historyOverride ?? latestPaths.length === 0;
1743
+ const previewing = historyOpen && historyOverride !== true;
1744
+ const shownHistory = !historyOpen ? [] : previewing ? history.slice(0, HISTORY_PREVIEW) : history;
1745
+ const hiddenHistory = history.length - shownHistory.length;
1720
1746
  if (latestPaths.length === 0 && view.sessionTotal === 0) return (0, react.createElement)("div", {
1721
1747
  style: SECTION_STYLE$6,
1722
1748
  "data-dsh-brief-sidebar": "deliverables-section"
@@ -1738,7 +1764,7 @@ window.__ModuleLoader__.load({
1738
1764
  }, (0, react.createElement)("div", { style: HEADER_STYLE$7 }, t("section.deliverables")), latestPaths.length > 0 && (0, react.createElement)(GroupHeader, {
1739
1765
  text: expandCount(t("deliverables.currentTurn"), latestPaths.length),
1740
1766
  marker: "deliverables-current-group"
1741
- }), (0, react.createElement)("ul", { style: LIST_STYLE$4 }, latestPaths.map((path) => (0, react.createElement)(PathRow, {
1767
+ }), latestPaths.length > 0 && (0, react.createElement)("ul", { style: LIST_STYLE$4 }, latestPaths.map((path) => (0, react.createElement)(PathRow, {
1742
1768
  key: path,
1743
1769
  path,
1744
1770
  t,
@@ -1748,17 +1774,24 @@ window.__ModuleLoader__.load({
1748
1774
  open: historyOpen,
1749
1775
  marker: "deliverables-history-toggle",
1750
1776
  onToggle: () => {
1751
- setHistoryOpen((current) => !current);
1777
+ setHistoryOverride(!historyOpen);
1752
1778
  }
1753
1779
  }), history.length > 0 && view.sessionTotal > view.sessionPaths.length && (0, react.createElement)(GroupCaption, {
1754
1780
  text: expandTotal(t("deliverables.historyCapped"), view.sessionTotal),
1755
1781
  marker: "deliverables-history-capped"
1756
- }), historyOpen && (0, react.createElement)("ul", { style: LIST_STYLE$4 }, history.map((path) => (0, react.createElement)(PathRow, {
1782
+ }), shownHistory.length > 0 && (0, react.createElement)("ul", { style: LIST_STYLE$4 }, shownHistory.map((path) => (0, react.createElement)(PathRow, {
1757
1783
  key: path,
1758
1784
  path,
1759
1785
  t,
1760
1786
  open
1761
- }))));
1787
+ }))), previewing && hiddenHistory > 0 && (0, react.createElement)(FoldToggle, {
1788
+ label: expandCount(t("deliverables.historyMore"), hiddenHistory),
1789
+ open: false,
1790
+ marker: "deliverables-history-more",
1791
+ onToggle: () => {
1792
+ setHistoryOverride(true);
1793
+ }
1794
+ }));
1762
1795
  }
1763
1796
  //#endregion
1764
1797
  //#region src/client/summary/skill-usage.ts