dsh-leader-agent 0.7.0 → 0.8.0

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/lib/client.js CHANGED
@@ -51,7 +51,7 @@ __export(index_exports, {
51
51
  module.exports = __toCommonJS(index_exports);
52
52
 
53
53
  // src/client/board.js
54
- var import_react8 = require("react");
54
+ var import_react9 = require("react");
55
55
 
56
56
  // src/client/session-watermark.js
57
57
  var SESSION_WATERMARK_BASE = 5;
@@ -611,11 +611,21 @@ var LOCALE_UI = Object.freeze({
611
611
  "board.fold.expand": "Weitere Karten anzeigen ({count})",
612
612
  "board.leaderDead.hint": "Ersetzen Sie den Leader dieses Projekts im Projektbereich der linken Seitenleiste und \xF6ffnen Sie das Board erneut.",
613
613
  "board.leaderDead.title": "Die Leader-Sitzung dieses Projekts ist nicht mehr verf\xFCgbar",
614
+ "board.mode.cinema.desc": "Nur Demo, f\xFCr Social Media.",
615
+ "board.mode.cinema.title": "Kino",
616
+ "board.mode.work.desc": "Schlichte Liste ohne Bewegung. Zum \xDCberfliegen von Aufgaben.",
617
+ "board.mode.work.title": "Arbeit",
614
618
  "board.noProject.hint": "Das Board ist nach Projekten organisiert: \xD6ffnen Sie es aus einer Projektsitzung (Leader oder Worker).",
615
619
  "board.noProject.title": "Diese Sitzung geh\xF6rt zu keinem Projekt",
616
620
  "board.notProject.hint": "Dies ist eine gew\xF6hnliche Sitzung im Ordner von \u201E{project}\u201C. \xD6ffnen Sie die Leader- oder Worker-Sitzung des Projekts, um dessen Board zu sehen.",
617
621
  "board.notProject.title": "Das Board \xF6ffnet sich nur in Projektsitzungen",
618
622
  "board.notProject.unknown": "Diese Sitzung geh\xF6rt zu keinem Projekt; \xF6ffnen Sie die Leader- oder Worker-Sitzung eines Projekts, um dessen Board zu sehen.",
623
+ "board.rail.leader": "Leader",
624
+ "board.rail.summary": "{running} laufen \xB7 {total} Aufgaben",
625
+ "board.settings.desc": "W\xE4hle die Darstellung des Boards. Die Einstellung wird in diesem Browser gespeichert.",
626
+ "board.settings.nav": "Leader Agent",
627
+ "board.settings.scope": "Gilt nur f\xFCr diesen Browser; Projektdaten bleiben unver\xE4ndert.",
628
+ "board.settings.title": "Aufgabenboard",
619
629
  "board.slot.title": "{name}: {state}",
620
630
  "board.state.attention": "Braucht Aufmerksamkeit",
621
631
  "board.state.empty": "Nicht zugewiesen",
@@ -739,11 +749,21 @@ var LOCALE_UI = Object.freeze({
739
749
  "board.fold.expand": "Show {count} more cards",
740
750
  "board.leaderDead.hint": "Use the project section in the left sidebar to replace this project's Leader, then open the board again.",
741
751
  "board.leaderDead.title": "This project's Leader session is no longer available",
752
+ "board.mode.cinema.desc": "Demo only, for social sharing.",
753
+ "board.mode.cinema.title": "Cinematic",
754
+ "board.mode.work.desc": "Plain list, no motion. Best for scanning tasks.",
755
+ "board.mode.work.title": "Work",
742
756
  "board.noProject.hint": "The board is organized by project: open it from a project session (Leader or worker).",
743
757
  "board.noProject.title": "This session does not belong to a project",
744
758
  "board.notProject.hint": "This is an ordinary session in the folder of \u201C{project}\u201D; open the project's Leader or worker session to see its delivery board.",
745
759
  "board.notProject.title": "The board opens only in project sessions",
746
760
  "board.notProject.unknown": "This session is not connected to a project; open a project's Leader or worker session to see its delivery board.",
761
+ "board.rail.leader": "Leader",
762
+ "board.rail.summary": "{running} running \xB7 {total} tasks",
763
+ "board.settings.desc": "Choose how the board looks. The setting is saved in this browser.",
764
+ "board.settings.nav": "Leader Agent",
765
+ "board.settings.scope": "Applies to this browser only; project data is untouched.",
766
+ "board.settings.title": "Task board",
747
767
  "board.slot.title": "{name}: {state}",
748
768
  "board.state.attention": "Needs attention",
749
769
  "board.state.empty": "Unassigned",
@@ -867,11 +887,21 @@ var LOCALE_UI = Object.freeze({
867
887
  "board.fold.expand": "Mostrar las tarjetas restantes ({count})",
868
888
  "board.leaderDead.hint": "Use la secci\xF3n de proyectos de la barra lateral izquierda para reemplazar el Leader de este proyecto y vuelva a abrir el tablero.",
869
889
  "board.leaderDead.title": "La sesi\xF3n del Leader de este proyecto ya no est\xE1 disponible",
890
+ "board.mode.cinema.desc": "Solo demo, para redes sociales.",
891
+ "board.mode.cinema.title": "Modo espect\xE1culo",
892
+ "board.mode.work.desc": "Lista simple, sin animaci\xF3n. Ideal para revisar tareas.",
893
+ "board.mode.work.title": "Modo trabajo",
870
894
  "board.noProject.hint": "El tablero se organiza por proyecto: \xE1bralo desde una sesi\xF3n del proyecto (Leader o worker).",
871
895
  "board.noProject.title": "Esta sesi\xF3n no pertenece a ning\xFAn proyecto",
872
896
  "board.notProject.hint": "Esta es una sesi\xF3n normal en la carpeta de \xAB{project}\xBB; abra la sesi\xF3n del Leader o de un worker del proyecto para ver su tablero de entregas.",
873
897
  "board.notProject.title": "El tablero solo se abre en sesiones de proyecto",
874
898
  "board.notProject.unknown": "Esta sesi\xF3n no pertenece a ning\xFAn proyecto; abra la sesi\xF3n del Leader o de un worker del proyecto para ver su tablero de entregas.",
899
+ "board.rail.leader": "Leader",
900
+ "board.rail.summary": "{running} en curso \xB7 {total} tareas",
901
+ "board.settings.desc": "Elige c\xF3mo se muestra el tablero. Se guarda en este navegador.",
902
+ "board.settings.nav": "Leader Agent",
903
+ "board.settings.scope": "Solo afecta a este navegador; no modifica los datos del proyecto.",
904
+ "board.settings.title": "Tablero de tareas",
875
905
  "board.slot.title": "{name}: {state}",
876
906
  "board.state.attention": "Requiere atenci\xF3n",
877
907
  "board.state.empty": "Sin asignar",
@@ -995,11 +1025,21 @@ var LOCALE_UI = Object.freeze({
995
1025
  "board.fold.expand": "Afficher les cartes restantes ({count})",
996
1026
  "board.leaderDead.hint": "Utilisez la section projets de la barre lat\xE9rale gauche pour remplacer le Leader de ce projet, puis rouvrez le tableau.",
997
1027
  "board.leaderDead.title": "La session Leader de ce projet n'est plus disponible",
1028
+ "board.mode.cinema.desc": "D\xE9mo uniquement, pour les r\xE9seaux sociaux.",
1029
+ "board.mode.cinema.title": "Mode spectacle",
1030
+ "board.mode.work.desc": "Liste simple, sans animation. Id\xE9al pour parcourir les t\xE2ches.",
1031
+ "board.mode.work.title": "Mode travail",
998
1032
  "board.noProject.hint": "Le tableau est organis\xE9 par projet : ouvrez-le depuis une session du projet (Leader ou worker).",
999
1033
  "board.noProject.title": "Cette session n'appartient \xE0 aucun projet",
1000
1034
  "board.notProject.hint": "Il s'agit d'une session ordinaire dans le dossier de \xAB {project} \xBB ; ouvrez la session Leader ou worker du projet pour voir son tableau de livraison.",
1001
1035
  "board.notProject.title": "Le tableau ne s'ouvre que dans les sessions de projet",
1002
1036
  "board.notProject.unknown": "Cette session n'est li\xE9e \xE0 aucun projet ; ouvrez la session Leader ou worker d'un projet pour voir son tableau de livraison.",
1037
+ "board.rail.leader": "Leader",
1038
+ "board.rail.summary": "{running} en cours \xB7 {total} t\xE2ches",
1039
+ "board.settings.desc": "Choisissez l'apparence du tableau. Le r\xE9glage est enregistr\xE9 dans ce navigateur.",
1040
+ "board.settings.nav": "Leader Agent",
1041
+ "board.settings.scope": "Ne concerne que ce navigateur ; les donn\xE9es du projet ne changent pas.",
1042
+ "board.settings.title": "Tableau des t\xE2ches",
1003
1043
  "board.slot.title": "{name} : {state}",
1004
1044
  "board.state.attention": "N\xE9cessite votre attention",
1005
1045
  "board.state.empty": "Non attribu\xE9",
@@ -1123,11 +1163,21 @@ var LOCALE_UI = Object.freeze({
1123
1163
  "board.fold.expand": "\u6B8B\u308A {count} \u679A\u306E\u30AB\u30FC\u30C9\u3092\u8868\u793A",
1124
1164
  "board.leaderDead.hint": "\u5DE6\u30B5\u30A4\u30C9\u30D0\u30FC\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u6B04\u3067\u3053\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E Leader \u3092\u4EA4\u4EE3\u3057\u3066\u304B\u3089\u3001\u30DC\u30FC\u30C9\u3092\u958B\u304D\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
1125
1165
  "board.leaderDead.title": "\u3053\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E Leader \u30BB\u30C3\u30B7\u30E7\u30F3\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093",
1166
+ "board.mode.cinema.desc": "\u30C7\u30E2\u5C02\u7528\u3001SNS \u5171\u6709\u5411\u3051\u3002",
1167
+ "board.mode.cinema.title": "\u30B7\u30CD\u30DE\u30E2\u30FC\u30C9",
1168
+ "board.mode.work.desc": "\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u306A\u3057\u306E\u4E00\u89A7\u3002\u30BF\u30B9\u30AF\u306E\u78BA\u8A8D\u306B\u3002",
1169
+ "board.mode.work.title": "\u30EF\u30FC\u30AF\u30E2\u30FC\u30C9",
1126
1170
  "board.noProject.hint": "\u30DC\u30FC\u30C9\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5358\u4F4D\u3067\u3059\u3002\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\uFF08Leader \u307E\u305F\u306F\u30EF\u30FC\u30AB\u30FC\uFF09\u304B\u3089\u958B\u3044\u3066\u304F\u3060\u3055\u3044\u3002",
1127
1171
  "board.noProject.title": "\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306F\u3069\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u3082\u5C5E\u3057\u3066\u3044\u307E\u305B\u3093",
1128
1172
  "board.notProject.hint": "\u3053\u308C\u306F\u300C{project}\u300D\u306E\u30D5\u30A9\u30EB\u30C0\u30FC\u306B\u3042\u308B\u901A\u5E38\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u3059\u3002\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E Leader \u307E\u305F\u306F\u30EF\u30FC\u30AB\u30FC\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u30DC\u30FC\u30C9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
1129
1173
  "board.notProject.title": "\u30DC\u30FC\u30C9\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u306E\u307F\u958B\u3051\u307E\u3059",
1130
1174
  "board.notProject.unknown": "\u3053\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u5C5E\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E Leader \u307E\u305F\u306F\u30EF\u30FC\u30AB\u30FC\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3067\u30DC\u30FC\u30C9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
1175
+ "board.rail.leader": "Leader",
1176
+ "board.rail.summary": "{running} \u5B9F\u884C\u4E2D \xB7 {total} \u30BF\u30B9\u30AF",
1177
+ "board.settings.desc": "\u30DC\u30FC\u30C9\u306E\u8868\u793A\u65B9\u6CD5\u3092\u9078\u3073\u307E\u3059\u3002\u8A2D\u5B9A\u306F\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u306B\u4FDD\u5B58\u3055\u308C\u307E\u3059\u3002",
1178
+ "board.settings.nav": "Leader Agent",
1179
+ "board.settings.scope": "\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u306B\u306E\u307F\u9069\u7528\u3055\u308C\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30C7\u30FC\u30BF\u306F\u5909\u66F4\u3057\u307E\u305B\u3093\u3002",
1180
+ "board.settings.title": "\u30BF\u30B9\u30AF\u30DC\u30FC\u30C9",
1131
1181
  "board.slot.title": "{name}\uFF1A{state}",
1132
1182
  "board.state.attention": "\u8981\u6CE8\u610F",
1133
1183
  "board.state.empty": "\u672A\u5272\u308A\u5F53\u3066",
@@ -1251,11 +1301,21 @@ var LOCALE_UI = Object.freeze({
1251
1301
  "board.fold.expand": "Mostrar os cart\xF5es restantes ({count})",
1252
1302
  "board.leaderDead.hint": "Use a se\xE7\xE3o de projetos na barra lateral esquerda para substituir o Leader deste projeto e abra o quadro novamente.",
1253
1303
  "board.leaderDead.title": "A sess\xE3o do Leader deste projeto n\xE3o est\xE1 mais dispon\xEDvel",
1304
+ "board.mode.cinema.desc": "Apenas demonstra\xE7\xE3o, para redes sociais.",
1305
+ "board.mode.cinema.title": "Modo cinema",
1306
+ "board.mode.work.desc": "Lista simples, sem anima\xE7\xE3o. Ideal para revisar tarefas.",
1307
+ "board.mode.work.title": "Modo trabalho",
1254
1308
  "board.noProject.hint": "O quadro \xE9 organizado por projeto: abra-o a partir de uma sess\xE3o do projeto (Leader ou worker).",
1255
1309
  "board.noProject.title": "Esta sess\xE3o n\xE3o pertence a nenhum projeto",
1256
1310
  "board.notProject.hint": "Esta \xE9 uma sess\xE3o comum na pasta de \u201C{project}\u201D; abra a sess\xE3o do Leader ou de um worker do projeto para ver o quadro de entregas.",
1257
1311
  "board.notProject.title": "O quadro s\xF3 abre em sess\xF5es de projeto",
1258
1312
  "board.notProject.unknown": "Esta sess\xE3o n\xE3o pertence a nenhum projeto; abra a sess\xE3o do Leader ou de um worker do projeto para ver o quadro de entregas.",
1313
+ "board.rail.leader": "Leader",
1314
+ "board.rail.summary": "{running} em execu\xE7\xE3o \xB7 {total} tarefas",
1315
+ "board.settings.desc": "Escolha como o quadro aparece. A configura\xE7\xE3o \xE9 salva neste navegador.",
1316
+ "board.settings.nav": "Leader Agent",
1317
+ "board.settings.scope": "Vale apenas para este navegador; n\xE3o altera os dados do projeto.",
1318
+ "board.settings.title": "Quadro de tarefas",
1259
1319
  "board.slot.title": "{name}: {state}",
1260
1320
  "board.state.attention": "Precisa de aten\xE7\xE3o",
1261
1321
  "board.state.empty": "N\xE3o atribu\xEDdo",
@@ -1379,11 +1439,21 @@ var LOCALE_UI = Object.freeze({
1379
1439
  "board.fold.expand": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 ({count})",
1380
1440
  "board.leaderDead.hint": "\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u0435 Leader \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u043E\u0432 \u043D\u0430 \u043B\u0435\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438, \u0437\u0430\u0442\u0435\u043C \u0441\u043D\u043E\u0432\u0430 \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0434\u043E\u0441\u043A\u0443.",
1381
1441
  "board.leaderDead.title": "\u0421\u0435\u0430\u043D\u0441 Leader \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",
1442
+ "board.mode.cinema.desc": "\u0422\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0434\u0435\u043C\u043E\u043D\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043E\u0446\u0441\u0435\u0442\u0435\u0439.",
1443
+ "board.mode.cinema.title": "\u041A\u0438\u043D\u0435\u043C\u0430\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u0447\u043D\u044B\u0439",
1444
+ "board.mode.work.desc": "\u041F\u0440\u043E\u0441\u0442\u043E\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0431\u0435\u0437 \u0430\u043D\u0438\u043C\u0430\u0446\u0438\u0438. \u0414\u043B\u044F \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0437\u0430\u0434\u0430\u0447.",
1445
+ "board.mode.work.title": "\u0420\u0430\u0431\u043E\u0447\u0438\u0439",
1382
1446
  "board.noProject.hint": "\u0414\u043E\u0441\u043A\u0430 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u043E\u0432\u0430\u043D\u0430 \u043F\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430\u043C: \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0435\u0451 \u0438\u0437 \u0441\u0435\u0430\u043D\u0441\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 (Leader \u0438\u043B\u0438 \u0432\u043E\u0440\u043A\u0435\u0440\u0430).",
1383
1447
  "board.noProject.title": "\u042D\u0442\u043E\u0442 \u0441\u0435\u0430\u043D\u0441 \u043D\u0435 \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0441\u044F \u043D\u0438 \u043A \u043E\u0434\u043D\u043E\u043C\u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0443",
1384
1448
  "board.notProject.hint": "\u042D\u0442\u043E \u043E\u0431\u044B\u0447\u043D\u044B\u0439 \u0441\u0435\u0430\u043D\u0441 \u0432 \u043F\u0430\u043F\u043A\u0435 \xAB{project}\xBB. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0435\u0430\u043D\u0441 Leader \u0438\u043B\u0438 \u0432\u043E\u0440\u043A\u0435\u0440\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u0435\u0433\u043E \u0434\u043E\u0441\u043A\u0443 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432.",
1385
1449
  "board.notProject.title": "\u0414\u043E\u0441\u043A\u0430 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0441\u0435\u0430\u043D\u0441\u0430\u0445 \u043F\u0440\u043E\u0435\u043A\u0442\u0430",
1386
1450
  "board.notProject.unknown": "\u042D\u0442\u043E\u0442 \u0441\u0435\u0430\u043D\u0441 \u043D\u0435 \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0441\u044F \u043A \u043F\u0440\u043E\u0435\u043A\u0442\u0443. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0435\u0430\u043D\u0441 Leader \u0438\u043B\u0438 \u0432\u043E\u0440\u043A\u0435\u0440\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u0435\u0433\u043E \u0434\u043E\u0441\u043A\u0443.",
1451
+ "board.rail.leader": "Leader",
1452
+ "board.rail.summary": "{running} \u0432 \u0440\u0430\u0431\u043E\u0442\u0435 \xB7 {total} \u0437\u0430\u0434\u0430\u0447",
1453
+ "board.settings.desc": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0438\u0434 \u0434\u043E\u0441\u043A\u0438. \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435.",
1454
+ "board.settings.nav": "Leader Agent",
1455
+ "board.settings.scope": "\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435; \u0434\u0430\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u043D\u0435 \u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F.",
1456
+ "board.settings.title": "\u0414\u043E\u0441\u043A\u0430 \u0437\u0430\u0434\u0430\u0447",
1387
1457
  "board.slot.title": "{name}: {state}",
1388
1458
  "board.state.attention": "\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F",
1389
1459
  "board.state.empty": "\u041D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u043E",
@@ -1507,11 +1577,21 @@ var LOCALE_UI = Object.freeze({
1507
1577
  "board.fold.expand": "\u5C55\u5F00\u5176\u4F59 {count} \u5F20\u5361",
1508
1578
  "board.leaderDead.hint": "\u8BF7\u5728\u5DE6\u680F\u9879\u76EE\u533A\u5757\u5BF9\u8BE5\u9879\u76EE\u6362\u65B0 Leader\uFF0C\u518D\u6253\u5F00\u770B\u677F\u3002",
1509
1579
  "board.leaderDead.title": "\u8BE5\u9879\u76EE\u7684 leader \u4F1A\u8BDD\u5DF2\u5931\u6548",
1580
+ "board.mode.cinema.desc": "\u7EAF\u6F14\u793A\uFF0C\u793E\u4EA4\u5A92\u4F53\u4F20\u64AD\u7528",
1581
+ "board.mode.cinema.title": "\u70AB\u9177\u6A21\u5F0F",
1582
+ "board.mode.work.desc": "\u7EAF\u5217\u8868\u3001\u65E0\u52A8\u6548\uFF0C\u9002\u5408\u65E5\u5E38\u626B\u4EFB\u52A1\u3002",
1583
+ "board.mode.work.title": "\u5DE5\u4F5C\u6A21\u5F0F",
1510
1584
  "board.noProject.hint": "\u770B\u677F\u6309\u9879\u76EE\u7EC4\u7EC7\uFF1A\u5728\u9879\u76EE\u4F1A\u8BDD\uFF08leader \u6216 worker\uFF09\u91CC\u6253\u5F00\u5B83\u3002",
1511
1585
  "board.noProject.title": "\u5F53\u524D\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u4EFB\u4F55\u9879\u76EE",
1512
1586
  "board.notProject.hint": "\u8FD9\u662F\u300C{project}\u300D\u6240\u5728\u76EE\u5F55\u91CC\u7684\u666E\u901A\u4F1A\u8BDD\uFF1B\u53BB\u8BE5\u9879\u76EE\u7684 leader \u6216 worker \u4F1A\u8BDD\u67E5\u770B\u4EA4\u4ED8\u770B\u677F\u3002",
1513
1587
  "board.notProject.title": "\u770B\u677F\u53EA\u5728\u9879\u76EE\u4F1A\u8BDD\u4E2D\u6253\u5F00",
1514
1588
  "board.notProject.unknown": "\u8FD9\u4E2A\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u4EFB\u4F55\u9879\u76EE\uFF1B\u6253\u5F00\u9879\u76EE\u7684 leader \u6216 worker \u4F1A\u8BDD\u67E5\u770B\u4EA4\u4ED8\u770B\u677F\u3002",
1589
+ "board.rail.leader": "Leader",
1590
+ "board.rail.summary": "{running} \u6267\u884C\u4E2D \xB7 {total} \u4E2A\u4EFB\u52A1",
1591
+ "board.settings.desc": "\u9009\u62E9\u770B\u677F\u7684\u5448\u73B0\u65B9\u5F0F\u3002\u8BBE\u7F6E\u4FDD\u5B58\u5728\u5F53\u524D\u6D4F\u89C8\u5668\u3002",
1592
+ "board.settings.nav": "Leader Agent",
1593
+ "board.settings.scope": "\u53EA\u5F71\u54CD\u5F53\u524D\u6D4F\u89C8\u5668\uFF0C\u4E0D\u5199\u5165\u9879\u76EE\u6570\u636E\u3002",
1594
+ "board.settings.title": "\u4EFB\u52A1\u770B\u677F",
1515
1595
  "board.slot.title": "{name}\uFF1A{state}",
1516
1596
  "board.state.attention": "\u9700\u6CE8\u610F",
1517
1597
  "board.state.empty": "\u672A\u6D3E\u5DE5",
@@ -1831,12 +1911,12 @@ function linkContent(link) {
1831
1911
  }
1832
1912
  function BoardLinks({ links, onOpenDetail, t }) {
1833
1913
  const row = (0, import_react2.useRef)(null);
1834
- const measure = (0, import_react2.useRef)(null);
1914
+ const measure2 = (0, import_react2.useRef)(null);
1835
1915
  const [visibleCount, setVisibleCount] = (0, import_react2.useState)(links.length);
1836
1916
  const [expanded, setExpanded] = (0, import_react2.useState)(false);
1837
1917
  (0, import_react2.useLayoutEffect)(() => {
1838
1918
  const rowElement = row.current;
1839
- const measureElement = measure.current;
1919
+ const measureElement = measure2.current;
1840
1920
  if (rowElement === null || measureElement === null) return void 0;
1841
1921
  const fit = () => {
1842
1922
  if (expanded) return;
@@ -1869,7 +1949,7 @@ function BoardLinks({ links, onOpenDetail, t }) {
1869
1949
  },
1870
1950
  (0, import_react2.createElement)(
1871
1951
  "div",
1872
- { ref: measure, "aria-hidden": "true", className: "dsh-leader-agent-board-links-measure" },
1952
+ { ref: measure2, "aria-hidden": "true", className: "dsh-leader-agent-board-links-measure" },
1873
1953
  links.map((link, index) => isJumpableLink(link) ? (0, import_react2.createElement)("a", {
1874
1954
  key: linkRowKey(link, index),
1875
1955
  href: link.url,
@@ -1955,7 +2035,29 @@ function BoardSlot({ slot, onOpenSession, labels, t }) {
1955
2035
  )
1956
2036
  );
1957
2037
  }
1958
- function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLabels, t }) {
2038
+ function BoardRailSlot({ slot, onOpenSession, labels, t }) {
2039
+ const stateKey = STATE_LABEL_KEYS[slot.state];
2040
+ const stateLabel = stateKey === void 0 ? slot.state : t(stateKey);
2041
+ const name = slotDisplayName(slot.name, labels, t);
2042
+ const label = t("board.slot.title", { name, state: stateLabel });
2043
+ return (0, import_react2.createElement)(
2044
+ "button",
2045
+ {
2046
+ type: "button",
2047
+ className: `dsh-leader-agent-board-rail-slot dsh-leader-agent-board-rail-slot-${slot.state}`,
2048
+ "data-rail-slot": "",
2049
+ "data-rail-state": slot.state,
2050
+ title: label,
2051
+ "aria-label": label,
2052
+ onClick: (event) => {
2053
+ event.stopPropagation();
2054
+ onOpenSession(slot.sessionId);
2055
+ }
2056
+ },
2057
+ name.slice(0, 1)
2058
+ );
2059
+ }
2060
+ function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLabels, t, cinema }) {
1959
2061
  const links = Array.isArray(card.links) ? card.links : [];
1960
2062
  const done = card.status === "done";
1961
2063
  if (done) {
@@ -1983,37 +2085,40 @@ function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLab
1983
2085
  const stalled = isCardStalled(card, states, now);
1984
2086
  const hollow = stalled && signal !== "attention";
1985
2087
  const kind = cardKind(card);
1986
- return (0, import_react2.createElement)(
2088
+ const head = (0, import_react2.createElement)(
2089
+ "div",
2090
+ { className: "dsh-leader-agent-board-card-head" },
2091
+ (0, import_react2.createElement)(
2092
+ "span",
2093
+ { className: "dsh-leader-agent-board-card-id" },
2094
+ (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-number" }, `#${card.number ?? "?"}`),
2095
+ kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind-separator" }, "/"),
2096
+ kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind", title: kind }, kind)
2097
+ ),
2098
+ (0, import_react2.createElement)(
2099
+ "span",
2100
+ { className: "dsh-leader-agent-board-signal-slot" },
2101
+ (0, import_react2.createElement)("span", {
2102
+ className: `dsh-leader-agent-board-signal dsh-leader-agent-board-signal-${signal}${hollow ? " dsh-leader-agent-board-signal-hollow" : ""}`,
2103
+ title: STATE_LABEL_KEYS[signal] === void 0 ? signal : t(STATE_LABEL_KEYS[signal])
2104
+ })
2105
+ )
2106
+ );
2107
+ const cardElement = (0, import_react2.createElement)(
1987
2108
  "div",
1988
2109
  {
1989
- className: "dsh-leader-agent-board-card",
2110
+ className: cinema ? "dsh-leader-agent-board-card dsh-leader-agent-board-card-rail" : "dsh-leader-agent-board-card",
1990
2111
  role: "button",
1991
2112
  tabIndex: 0,
1992
2113
  onClick: (event) => onOpenDetail(card, event.currentTarget),
1993
2114
  onKeyDown: (event) => openDetailOnKey(event, card, onOpenDetail)
1994
2115
  },
1995
- (0, import_react2.createElement)(
1996
- "div",
1997
- { className: "dsh-leader-agent-board-card-head" },
1998
- (0, import_react2.createElement)(
1999
- "span",
2000
- { className: "dsh-leader-agent-board-card-id" },
2001
- (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-number" }, `#${card.number ?? "?"}`),
2002
- kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind-separator" }, "/"),
2003
- kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind", title: kind }, kind)
2004
- ),
2005
- (0, import_react2.createElement)(
2006
- "span",
2007
- { className: "dsh-leader-agent-board-signal-slot" },
2008
- (0, import_react2.createElement)("span", {
2009
- className: `dsh-leader-agent-board-signal dsh-leader-agent-board-signal-${signal}${hollow ? " dsh-leader-agent-board-signal-hollow" : ""}`,
2010
- title: STATE_LABEL_KEYS[signal] === void 0 ? signal : t(STATE_LABEL_KEYS[signal])
2011
- })
2012
- )
2013
- ),
2116
+ head,
2014
2117
  (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-title", title: card.title }, card.title ?? ""),
2015
2118
  links.length > 0 ? (0, import_react2.createElement)(BoardLinks, { links, onOpenDetail: (anchor) => onOpenDetail(card, anchor), t }) : null,
2016
- slots.length > 0 ? (0, import_react2.createElement)(
2119
+ // 线路图模式把执行者移到卡面右侧的竖槽:它要成为图上的独立节点,留在卡里
2120
+ // 就画不出支线(SVG 垫在卡面下面)
2121
+ cinema ? null : slots.length > 0 ? (0, import_react2.createElement)(
2017
2122
  "div",
2018
2123
  { className: "dsh-leader-agent-board-card-slots" },
2019
2124
  slots.map((slot) => (0, import_react2.createElement)(BoardSlot, {
@@ -2025,6 +2130,27 @@ function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLab
2025
2130
  }))
2026
2131
  ) : null
2027
2132
  );
2133
+ if (!cinema) return cardElement;
2134
+ return (0, import_react2.createElement)(
2135
+ "div",
2136
+ {
2137
+ className: "dsh-leader-agent-board-rail-row",
2138
+ "data-rail-row": "",
2139
+ "data-rail-status": signal
2140
+ },
2141
+ cardElement,
2142
+ slots.length > 0 ? (0, import_react2.createElement)(
2143
+ "div",
2144
+ { className: "dsh-leader-agent-board-rail-slots" },
2145
+ slots.map((slot) => (0, import_react2.createElement)(BoardRailSlot, {
2146
+ key: slot.name,
2147
+ slot,
2148
+ onOpenSession,
2149
+ labels: slotLabels,
2150
+ t
2151
+ }))
2152
+ ) : null
2153
+ );
2028
2154
  }
2029
2155
  var BoardCard = (0, import_react2.memo)(BoardCardView);
2030
2156
 
@@ -2959,18 +3085,18 @@ ${signalStyleText("dsh-leader-agent-board-signal")}
2959
3085
  color: var(--dsw-alias-label-tertiary);
2960
3086
  }
2961
3087
 
2962
- /* \u6807\u9898\u72EC\u5360\u4E00\u884C\uFF1A\u7A84\u680F\u5355\u884C\u622A\u65AD\u770B\u4E0D\u6E05\u4EFB\u52A1\u5185\u5BB9\uFF0C\u4E24\u884C\u8986\u76D6\u7EDD\u5927\u591A\u6570\u6807\u9898\uFF1B\u5DE6\u7F18\u4E0E
2963
- \u4E0B\u65B9\u94FE\u63A5/\u4F1A\u8BDD\u4E00\u81F4\u3002medium \u800C\u975E semibold\u2014\u2014\u4FE1\u53F7\u706F\u4E0E\u72B6\u6001\u8272\u5DF2\u627F\u62C5\u5F3A\u8C03 */
3088
+ /* \u6807\u9898\u56FA\u5B9A\u5355\u884C\uFF1A\u884C\u9AD8\u6052\u5B9A\uFF0Crail \u7684\u884C\u4E2D\u5FC3\u4E0E\u6574\u5361\u9AD8\u5EA6\u4E0D\u968F\u6807\u9898\u957F\u5EA6\u53D8\uFF1B\u957F\u6807\u9898\u7528
3089
+ \u7701\u7565\u53F7\u6536\u5C3E\uFF0C\u5B8C\u6574\u6587\u672C\u5728 title \u5C5E\u6027\u91CC\u60AC\u505C\u53EF\u8BFB\u3002\u5DE6\u7F18\u4E0E\u4E0B\u65B9\u94FE\u63A5/\u4F1A\u8BDD\u4E00\u81F4\u3002
3090
+ medium \u800C\u975E semibold\u2014\u2014\u4FE1\u53F7\u706F\u4E0E\u72B6\u6001\u8272\u5DF2\u627F\u62C5\u5F3A\u8C03 */
2964
3091
  .dsh-leader-agent-board-card-title {
2965
- display: -webkit-box;
2966
- -webkit-line-clamp: 2;
2967
- -webkit-box-orient: vertical;
3092
+ display: block;
3093
+ overflow: hidden;
3094
+ white-space: nowrap;
3095
+ text-overflow: ellipsis;
2968
3096
  font-size: 13px;
2969
3097
  line-height: 20px;
2970
3098
  font-weight: 500;
2971
3099
  color: var(--dsw-alias-label-primary);
2972
- overflow: hidden;
2973
- overflow-wrap: anywhere;
2974
3100
  }
2975
3101
 
2976
3102
  /* \u94FE\u63A5\u884C\uFF1A\u4E0E\u6807\u9898\u540C\u5DE6\u7F18\uFF08\u5361\u9762 padding\uFF09\u3002\u9ED8\u8BA4\u4E00\u884C\uFF0C\u653E\u4E0D\u4E0B\u7684\u7531\u300C+N\u300D\u6536\u8D77\uFF1B
@@ -3941,6 +4067,389 @@ ${signalStyleText("dsh-leader-agent-board-signal")}
3941
4067
  gap: 4px;
3942
4068
  margin-left: auto;
3943
4069
  }
4070
+
4071
+ /* ===== \u7EBF\u8DEF\u56FE\u6A21\u5F0F =====
4072
+ \u4E24\u5957\u76AE\u5171\u7528\u540C\u4E00\u5957\u51E0\u4F55\uFF1A\u6D45\u8272\u5BBF\u4E3B\u8D70\u7535\u84DD\u6B63\u4EA4\uFF08\u7535\u8DEF\u56FE\uFF09\uFF0C\u6DF1\u8272\u5BBF\u4E3B\u8D70\u9ED1\u91D1\u66F2\u7EBF\u3002
4073
+ \u989C\u8272\u5168\u90E8\u53D6\u5BBF\u4E3B\u4E0E\u4E3B\u9898\u65E0\u5173\u7684 --dsw-static-* \u6807\u5C3A\uFF0C\u6216\u5BBF\u4E3B\u81EA\u5DF1\u7684 alias \u4EE4\u724C\uFF0C
4074
+ \u4E0D\u5199\u6B7B\u8272\u503C\u3002\u989C\u8272\u53EA\u7ED9\u300C\u6B63\u5728\u6D41\u52A8\u7684\u90A3\u6761\u7EBF\u300D\uFF1A\u7ED3\u6784\u7EBF\u5728\u4E2D\u6027\u6863\uFF0C\u6267\u884C\u4E2D\u7684\u6A2A\u6BB5\u4E0E
4075
+ \u652F\u7EBF\u624D\u4E0A\u5F3A\u8C03\u8272\u3002\u6DF1\u8272\u76AE\u662F\u523B\u610F\u4E0E\u5BBF\u4E3B\u89E3\u8026\u7684\u9ED1\u9762\u677F\uFF1B\u6D45\u8272\u76AE\u76F4\u63A5\u6CBF\u7528\u5BBF\u4E3B\u7684
4076
+ \u5361\u9762\u4E0E\u6587\u5B57\u6863\uFF0C\u53EA\u91CD\u753B\u677F\u5E95\u4E0E\u8F68\u9053\u3002 */
4077
+ .dsh-leader-agent-board-list-cinema {
4078
+ margin: 0;
4079
+ padding: 8px 6px 18px 0;
4080
+ }
4081
+
4082
+ .dsh-leader-agent-board-list-cinema-light {
4083
+ --dla-structure: var(--dsw-static-neutral-bluish-300);
4084
+ --dla-structure-strong: var(--dsw-static-neutral-bluish-400);
4085
+ --dla-accent: var(--dsw-static-blue-600);
4086
+ --dla-danger: var(--dsw-static-red-600);
4087
+ --dla-node-fill: var(--dsw-static-neutral-00);
4088
+ --dla-trail: var(--dsw-static-blue-600);
4089
+ --dla-trail-shadow: none;
4090
+ --dla-comet: var(--dsw-static-blue-600);
4091
+ }
4092
+
4093
+ .dsh-leader-agent-board-list-cinema-dark {
4094
+ --dsw-alias-label-primary: var(--dsw-static-neutral-bluish-100);
4095
+ --dsw-alias-label-secondary: var(--dsw-static-neutral-bluish-300);
4096
+ --dsw-alias-label-tertiary: var(--dsw-static-neutral-bluish-400);
4097
+ --dsw-alias-label-caption: var(--dsw-static-neutral-bluish-500);
4098
+ --dsw-alias-bg-layer-2: var(--dsw-static-neutral-bluish-900);
4099
+ --dsw-alias-bg-layer-3: var(--dsw-static-neutral-bluish-850);
4100
+ --dsw-alias-border-l3: var(--dsw-static-neutral-bluish-800);
4101
+ --dsw-alias-border-l4: var(--dsw-static-neutral-bluish-700);
4102
+ --dsw-alias-interactive-bg-hover: var(--dsw-static-neutral-bluish-800);
4103
+ --dsw-alias-link: var(--dsw-static-blue-500);
4104
+ --dsw-alias-bg-skeleton: var(--dsw-static-neutral-bluish-800);
4105
+ --dla-structure: var(--dsw-static-neutral-bluish-800);
4106
+ --dla-structure-strong: var(--dsw-static-neutral-bluish-600);
4107
+ --dla-accent: var(--dsw-static-amber-500);
4108
+ --dla-danger: var(--dsw-static-red-500);
4109
+ --dla-node-fill: var(--dsw-static-neutral-bluish-1000);
4110
+ --dla-trail: var(--dsw-static-amber-100);
4111
+ --dla-trail-shadow: drop-shadow(0 0 4px var(--dsw-static-amber-400));
4112
+ --dla-comet: var(--dsw-static-amber-100);
4113
+ }
4114
+
4115
+ .dsh-leader-agent-board-stage {
4116
+ position: relative;
4117
+ }
4118
+
4119
+ /* \u5361\u7247\u8981\u538B\u5728 SVG \u4E0A\u9762\uFF1A\u5426\u5219\u7EDD\u5BF9\u5B9A\u4F4D\u7684\u8986\u76D6\u5C42\u4F1A\u76D6\u4F4F\u5361\u9762\u6587\u5B57\u4E0E\u6267\u884C\u8005\u5706\u70B9 */
4120
+ .dsh-leader-agent-board-stage > .dsh-leader-agent-board-group {
4121
+ position: relative;
4122
+ z-index: 1;
4123
+ }
4124
+
4125
+ .dsh-leader-agent-board-list-cinema .dsh-leader-agent-board-stage {
4126
+ padding: 6px 0 12px 44px;
4127
+ }
4128
+
4129
+ .dsh-leader-agent-board-rail {
4130
+ position: absolute;
4131
+ inset: 0;
4132
+ z-index: 0;
4133
+ width: 100%;
4134
+ height: 100%;
4135
+ overflow: visible;
4136
+ pointer-events: none;
4137
+ }
4138
+
4139
+ .dsh-leader-agent-board-rail-head {
4140
+ position: relative;
4141
+ z-index: 1;
4142
+ display: flex;
4143
+ align-items: center;
4144
+ height: 52px;
4145
+ }
4146
+
4147
+ .dsh-leader-agent-board-rail-orb {
4148
+ position: absolute;
4149
+ left: -24px;
4150
+ top: 50%;
4151
+ width: 12px;
4152
+ height: 12px;
4153
+ border-radius: 50%;
4154
+ corner-shape: round;
4155
+ transform: translate(-50%, -50%);
4156
+ background: radial-gradient(
4157
+ circle at 35% 30%,
4158
+ var(--dsw-static-amber-100),
4159
+ var(--dsw-static-amber-400) 55%,
4160
+ var(--dsw-static-amber-600)
4161
+ );
4162
+ box-shadow: 0 0 14px var(--dsw-static-amber-500);
4163
+ }
4164
+
4165
+ /* \u6D45\u8272\u76AE\u7684\u6E90\u70B9\u662F\u84DD\u8272\u5C0F\u65B9\u5757\uFF08\u7535\u8DEF\u56FE\u7684\u8D77\u7B14\uFF09\uFF0C\u4E0D\u662F\u6DF1\u8272\u90A3\u9897\u53D1\u5149\u5706\u7403 */
4166
+ .dsh-leader-agent-board-list-cinema-light .dsh-leader-agent-board-rail-orb {
4167
+ width: 10px;
4168
+ height: 10px;
4169
+ border: 1.5px solid var(--dla-accent);
4170
+ border-radius: 2px;
4171
+ background: var(--dsw-static-neutral-00);
4172
+ box-shadow: none;
4173
+ }
4174
+
4175
+ .dsh-leader-agent-board-list-cinema-light .dsh-leader-agent-board-rail-orb::after {
4176
+ content: "";
4177
+ position: absolute;
4178
+ inset: 2px;
4179
+ border-radius: 1px;
4180
+ background: var(--dla-accent);
4181
+ }
4182
+
4183
+ .dsh-leader-agent-board-rail-meta b {
4184
+ display: block;
4185
+ font-family: ui-monospace, Menlo, monospace;
4186
+ font-size: 11px;
4187
+ font-weight: 700;
4188
+ letter-spacing: 0.14em;
4189
+ text-transform: uppercase;
4190
+ color: var(--dsw-alias-label-primary);
4191
+ }
4192
+
4193
+ .dsh-leader-agent-board-rail-meta span {
4194
+ display: block;
4195
+ margin-top: 1px;
4196
+ font-family: ui-monospace, Menlo, monospace;
4197
+ font-size: 10.5px;
4198
+ color: var(--dsw-alias-label-tertiary);
4199
+ }
4200
+
4201
+ .dsh-leader-agent-board-rail-row {
4202
+ display: grid;
4203
+ grid-template-columns: minmax(0, 1fr) clamp(44px, 17%, 60px);
4204
+ align-items: center;
4205
+ gap: 10px;
4206
+ }
4207
+
4208
+ .dsh-leader-agent-board-rail-slots {
4209
+ display: flex;
4210
+ flex-direction: column;
4211
+ align-items: flex-end;
4212
+ gap: 4px;
4213
+ padding-right: 8px;
4214
+ }
4215
+
4216
+ .dsh-leader-agent-board-rail-slot {
4217
+ display: grid;
4218
+ place-items: center;
4219
+ box-sizing: border-box;
4220
+ width: 24px;
4221
+ height: 24px;
4222
+ padding: 0;
4223
+ border: 1px solid var(--dla-structure-strong);
4224
+ border-radius: 50%;
4225
+ corner-shape: round;
4226
+ background: var(--dsw-alias-bg-layer-2);
4227
+ color: var(--dsw-alias-label-secondary);
4228
+ font: inherit;
4229
+ font-size: 8px;
4230
+ font-weight: 650;
4231
+ line-height: 1;
4232
+ cursor: pointer;
4233
+ }
4234
+
4235
+ .dsh-leader-agent-board-rail-slot:focus-visible {
4236
+ outline: var(--dsw-focus-ring-width, 2px) solid var(--dla-accent);
4237
+ outline-offset: 1px;
4238
+ }
4239
+
4240
+ .dsh-leader-agent-board-rail-slot-running {
4241
+ border-color: var(--dla-accent);
4242
+ }
4243
+
4244
+ .dsh-leader-agent-board-rail-slot-attention {
4245
+ border-color: var(--dla-danger);
4246
+ }
4247
+
4248
+ .dsh-leader-agent-board-rail-slot-idle {
4249
+ color: var(--dsw-alias-label-tertiary);
4250
+ }
4251
+
4252
+ .dsh-leader-agent-board-rail-slot-more {
4253
+ font-size: 7px;
4254
+ color: var(--dsw-alias-label-tertiary);
4255
+ cursor: default;
4256
+ }
4257
+
4258
+ @media (hover: hover) {
4259
+ .dsh-leader-agent-board-list-cinema-dark .dsh-leader-agent-board-card:hover {
4260
+ --dsw-elevation-stroke-color: var(--dsw-static-neutral-bluish-600);
4261
+ }
4262
+ }
4263
+
4264
+ .dsh-leader-agent-board-rail-trunk {
4265
+ fill: none;
4266
+ stroke: var(--dla-structure);
4267
+ stroke-width: 1.2;
4268
+ }
4269
+
4270
+ .dsh-leader-agent-board-rail-edge {
4271
+ fill: none;
4272
+ stroke: var(--dla-structure);
4273
+ stroke-width: 1.2;
4274
+ stroke-linecap: round;
4275
+ }
4276
+
4277
+ .dsh-leader-agent-board-rail-hot {
4278
+ fill: none;
4279
+ stroke: var(--dla-accent);
4280
+ stroke-width: 1.8;
4281
+ stroke-linecap: round;
4282
+ }
4283
+
4284
+ .dsh-leader-agent-board-rail-warn {
4285
+ fill: none;
4286
+ stroke: var(--dla-danger);
4287
+ stroke-width: 1.6;
4288
+ stroke-linecap: round;
4289
+ animation: dsh-leader-agent-rail-breathe 1.8s ease-in-out infinite;
4290
+ }
4291
+
4292
+ .dsh-leader-agent-board-rail-trail {
4293
+ fill: none;
4294
+ stroke: var(--dla-trail);
4295
+ stroke-width: 2.8;
4296
+ stroke-linecap: round;
4297
+ filter: var(--dla-trail-shadow);
4298
+ animation: dsh-leader-agent-rail-flow 2.4s linear infinite;
4299
+ }
4300
+
4301
+ @keyframes dsh-leader-agent-rail-flow {
4302
+ from { stroke-dashoffset: var(--dla-from, 44px); }
4303
+ to { stroke-dashoffset: var(--dla-to, -320px); }
4304
+ }
4305
+
4306
+ @keyframes dsh-leader-agent-rail-breathe {
4307
+ 0%, 100% { opacity: 1; }
4308
+ 50% { opacity: 0.45; }
4309
+ }
4310
+
4311
+ .dsh-leader-agent-board-rail-node {
4312
+ fill: var(--dla-node-fill);
4313
+ stroke: var(--dla-structure-strong);
4314
+ stroke-width: 1.4;
4315
+ }
4316
+
4317
+ .dsh-leader-agent-board-rail-node-running { stroke: var(--dla-accent); }
4318
+ .dsh-leader-agent-board-rail-node-attention { stroke: var(--dla-danger); }
4319
+
4320
+ .dsh-leader-agent-board-rail-halo {
4321
+ fill: none;
4322
+ stroke: var(--dla-accent);
4323
+ stroke-width: 1;
4324
+ animation: dsh-leader-agent-rail-halo 2.2s ease-out infinite;
4325
+ }
4326
+
4327
+ @keyframes dsh-leader-agent-rail-halo {
4328
+ 0% { r: 4; opacity: 0.8; }
4329
+ 100% { r: 13; opacity: 0; }
4330
+ }
4331
+
4332
+ .dsh-leader-agent-board-rail-comet {
4333
+ fill: var(--dla-comet);
4334
+ filter: var(--dla-trail-shadow);
4335
+ }
4336
+
4337
+ @media (prefers-reduced-motion: reduce) {
4338
+ .dsh-leader-agent-board-rail-trail,
4339
+ .dsh-leader-agent-board-rail-warn,
4340
+ .dsh-leader-agent-board-rail-halo {
4341
+ animation: none;
4342
+ }
4343
+ }
4344
+
4345
+ /* ===== \u8BBE\u7F6E\u9875 ===== */
4346
+ .dsh-leader-agent-settings {
4347
+ display: flex;
4348
+ flex-direction: column;
4349
+ gap: 14px;
4350
+ max-width: 720px;
4351
+ color: var(--dsw-alias-label-primary);
4352
+ }
4353
+
4354
+ .dsh-leader-agent-settings-title {
4355
+ margin: 0;
4356
+ font-size: 16px;
4357
+ line-height: 24px;
4358
+ font-weight: 500;
4359
+ }
4360
+
4361
+ .dsh-leader-agent-settings-desc {
4362
+ margin: 0;
4363
+ font-size: 14px;
4364
+ line-height: 22px;
4365
+ color: var(--dsw-alias-label-tertiary);
4366
+ }
4367
+
4368
+ .dsh-leader-agent-settings-options {
4369
+ display: flex;
4370
+ flex-direction: column;
4371
+ gap: 8px;
4372
+ }
4373
+
4374
+ .dsh-leader-agent-settings-option {
4375
+ display: flex;
4376
+ align-items: center;
4377
+ gap: 12px;
4378
+ box-sizing: border-box;
4379
+ width: 100%;
4380
+ padding: 12px 14px;
4381
+ border: 0.5px solid var(--dsw-alias-settings-card-stroke);
4382
+ border-radius: var(--dsw-radius-xl);
4383
+ background: var(--dsw-alias-settings-card-fill);
4384
+ color: inherit;
4385
+ font: inherit;
4386
+ text-align: left;
4387
+ cursor: pointer;
4388
+ }
4389
+
4390
+ .dsh-leader-agent-settings-option:focus-visible {
4391
+ outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-alias-state-business-primary);
4392
+ outline-offset: 1px;
4393
+ }
4394
+
4395
+ .dsh-leader-agent-settings-option-selected {
4396
+ border-color: var(--dsw-alias-state-business-primary);
4397
+ }
4398
+
4399
+ .dsh-leader-agent-settings-preview {
4400
+ flex: none;
4401
+ display: inline-flex;
4402
+ color: var(--dsw-alias-label-secondary);
4403
+ }
4404
+
4405
+ /* \u9884\u89C8\u91CC\u7684\u6267\u884C\u8005\u5706\u70B9\u53D6\u5BBF\u4E3B\u5F3A\u8C03\u8272\uFF1A\u6D45\u8272\u76AE\u7684\u5B9E\u9645 accent \u662F\u84DD\u7684\uFF0C\u56FA\u5B9A\u7425\u73C0\u4F1A
4406
+ \u8BA9\u9884\u89C8\u548C\u770B\u677F\u5404\u8BF4\u4E00\u5957\uFF1B\u5F3A\u8C03\u8272\u672C\u8EAB\u8DDF\u4E3B\u9898\u8D70\uFF0C\u6DF1\u8272\u76AE\u81EA\u7136\u53D8\u4EAE */
4407
+ .dsh-leader-agent-settings-preview-dot {
4408
+ fill: var(--dsw-alias-state-business-primary);
4409
+ }
4410
+
4411
+ .dsh-leader-agent-settings-copy {
4412
+ display: flex;
4413
+ flex-direction: column;
4414
+ gap: 2px;
4415
+ min-width: 0;
4416
+ }
4417
+
4418
+ .dsh-leader-agent-settings-copy b {
4419
+ font-size: 14px;
4420
+ line-height: 22px;
4421
+ font-weight: 500;
4422
+ color: var(--dsw-alias-label-primary);
4423
+ }
4424
+
4425
+ .dsh-leader-agent-settings-copy span {
4426
+ font-size: 12px;
4427
+ line-height: 18px;
4428
+ color: var(--dsw-alias-label-tertiary);
4429
+ }
4430
+
4431
+ .dsh-leader-agent-settings-radio {
4432
+ flex: none;
4433
+ box-sizing: border-box;
4434
+ width: 16px;
4435
+ height: 16px;
4436
+ margin-left: auto;
4437
+ border: 0.5px solid var(--dsw-alias-border-l4);
4438
+ border-radius: 50%;
4439
+ corner-shape: round;
4440
+ }
4441
+
4442
+ .dsh-leader-agent-settings-option-selected .dsh-leader-agent-settings-radio {
4443
+ border: 5px solid var(--dsw-alias-state-business-primary);
4444
+ }
4445
+
4446
+ .dsh-leader-agent-settings-scope {
4447
+ margin: 0;
4448
+ font-size: 12px;
4449
+ line-height: 18px;
4450
+ color: var(--dsw-alias-label-caption);
4451
+ }
4452
+
3944
4453
  `;
3945
4454
  function ensureBoardStyles() {
3946
4455
  if (typeof document === "undefined") return;
@@ -4175,7 +4684,395 @@ function lastBoardForegroundSession() {
4175
4684
  return foregroundSessionId;
4176
4685
  }
4177
4686
 
4687
+ // src/client/board-mode.js
4688
+ var BOARD_MODE_KEY = "dsh-leader-agent.board.mode";
4689
+ var BOARD_MODE_CINEMA = "cinema";
4690
+ var BOARD_MODE_WORK = "work";
4691
+ var BOARD_MODE_DEFAULT = BOARD_MODE_WORK;
4692
+ var BOARD_MODES = Object.freeze([BOARD_MODE_WORK, BOARD_MODE_CINEMA]);
4693
+ function normalizeBoardMode(value) {
4694
+ return value === BOARD_MODE_CINEMA ? BOARD_MODE_CINEMA : BOARD_MODE_WORK;
4695
+ }
4696
+ function readBoardMode(storage) {
4697
+ try {
4698
+ return normalizeBoardMode(storage?.getItem?.(BOARD_MODE_KEY));
4699
+ } catch {
4700
+ return BOARD_MODE_DEFAULT;
4701
+ }
4702
+ }
4703
+ function writeBoardMode(storage, mode) {
4704
+ const next = normalizeBoardMode(mode);
4705
+ try {
4706
+ storage?.setItem?.(BOARD_MODE_KEY, next);
4707
+ } catch {
4708
+ }
4709
+ return next;
4710
+ }
4711
+ var listeners = /* @__PURE__ */ new Set();
4712
+ function subscribeBoardMode(listener) {
4713
+ listeners.add(listener);
4714
+ return () => {
4715
+ listeners.delete(listener);
4716
+ };
4717
+ }
4718
+ function announceBoardMode(mode) {
4719
+ const next = normalizeBoardMode(mode);
4720
+ for (const listener of Array.from(listeners)) listener(next);
4721
+ }
4722
+ function setBoardMode(storage, mode) {
4723
+ const next = writeBoardMode(storage, mode);
4724
+ announceBoardMode(next);
4725
+ return next;
4726
+ }
4727
+
4728
+ // src/client/guide-card-logic.js
4729
+ var GUIDE_DISMISS_PREFIX = "dsh-leader-agent.guide.dismissed.";
4730
+ function guideDismissKey(sessionId) {
4731
+ return `${GUIDE_DISMISS_PREFIX}${sessionId}`;
4732
+ }
4733
+ function shouldShowGuide({ isLeader, blank, dismissed }) {
4734
+ return isLeader === true && blank === true && dismissed !== true;
4735
+ }
4736
+ function readLocalStorage(scope) {
4737
+ try {
4738
+ return scope?.localStorage;
4739
+ } catch {
4740
+ return void 0;
4741
+ }
4742
+ }
4743
+ function sendIntroPrompt(inputActions, prompt) {
4744
+ if (!canSendIntro(inputActions)) return false;
4745
+ inputActions.setDraft(prompt);
4746
+ inputActions.submit();
4747
+ return true;
4748
+ }
4749
+ function canSendIntro(inputActions) {
4750
+ return typeof inputActions?.setDraft === "function" && typeof inputActions?.submit === "function";
4751
+ }
4752
+ function createGuideDismissal(storage) {
4753
+ return {
4754
+ isDismissed: (sessionId) => {
4755
+ if (typeof sessionId !== "string" || sessionId === "") return false;
4756
+ try {
4757
+ return storage?.getItem?.(guideDismissKey(sessionId)) === "1";
4758
+ } catch {
4759
+ return false;
4760
+ }
4761
+ },
4762
+ dismiss: (sessionId) => {
4763
+ if (typeof sessionId !== "string" || sessionId === "") return;
4764
+ try {
4765
+ storage?.setItem?.(guideDismissKey(sessionId), "1");
4766
+ } catch {
4767
+ }
4768
+ }
4769
+ };
4770
+ }
4771
+
4772
+ // src/client/board-rail.js
4773
+ var import_react8 = require("react");
4774
+
4775
+ // src/client/board-rail-plan.js
4776
+ var RAIL_LANE_HOT = "hot";
4777
+ var RAIL_LANE_WARN = "warn";
4778
+ var RAIL_LANE_MUTED = "muted";
4779
+ function railLaneKind(status) {
4780
+ if (status === "running") return RAIL_LANE_HOT;
4781
+ if (status === "attention") return RAIL_LANE_WARN;
4782
+ return RAIL_LANE_MUTED;
4783
+ }
4784
+ function railNodeState(status) {
4785
+ if (status === "running") return "running";
4786
+ if (status === "attention") return "attention";
4787
+ return "idle";
4788
+ }
4789
+ function px(value) {
4790
+ return Math.round(value * 10) / 10;
4791
+ }
4792
+ function railTickPath({ trunkX, fromY, cy, cardX }) {
4793
+ return `M${px(trunkX)},${px(fromY)} L${px(trunkX)},${px(cy)} L${px(cardX)},${px(cy)}`;
4794
+ }
4795
+ function railBranchPath({ cardRight, cy, slotX, slotY }) {
4796
+ const bend = Math.max(10, (slotX - cardRight) / 2);
4797
+ return `M${px(cardRight)},${px(cy)} C${px(cardRight + bend)},${px(cy)} ${px(slotX - bend)},${px(slotY)} ${px(slotX)},${px(slotY)}`;
4798
+ }
4799
+ function railOrthoBranchPath({ cardRight, cy, slotX, slotY }) {
4800
+ const elbow = Math.min(cardRight + 16, slotX - 6);
4801
+ const radius = 5;
4802
+ const dy = slotY - cy;
4803
+ if (Math.abs(dy) < radius * 2 || elbow <= cardRight) {
4804
+ return `M${px(cardRight)},${px(cy)} L${px(slotX)},${px(slotY)}`;
4805
+ }
4806
+ const dir = dy > 0 ? 1 : -1;
4807
+ return [
4808
+ `M${px(cardRight)},${px(cy)}`,
4809
+ `L${px(elbow - radius)},${px(cy)}`,
4810
+ `Q${px(elbow)},${px(cy)} ${px(elbow)},${px(cy + dir * radius)}`,
4811
+ `L${px(elbow)},${px(slotY - dir * radius)}`,
4812
+ `Q${px(elbow)},${px(slotY)} ${px(elbow + radius)},${px(slotY)}`,
4813
+ `L${px(slotX)},${px(slotY)}`
4814
+ ].join(" ");
4815
+ }
4816
+ function planRailLanes({ trunkX, leaderY, rows, orthogonal }) {
4817
+ const lanes = [];
4818
+ let fromY = leaderY;
4819
+ rows.forEach((row, index) => {
4820
+ lanes.push({
4821
+ id: `tick:${index}`,
4822
+ kind: railLaneKind(row.status),
4823
+ d: railTickPath({ trunkX, fromY, cy: row.cy, cardX: row.cardX })
4824
+ });
4825
+ const slots = Array.isArray(row.slots) ? row.slots : [];
4826
+ slots.forEach((slot, slotIndex) => {
4827
+ lanes.push({
4828
+ id: `branch:${index}:${slotIndex}`,
4829
+ kind: railLaneKind(slot.status ?? row.status),
4830
+ d: orthogonal ? railOrthoBranchPath({ cardRight: row.cardRight, cy: row.cy, slotX: slot.x, slotY: slot.y }) : railBranchPath({ cardRight: row.cardRight, cy: row.cy, slotX: slot.x, slotY: slot.y })
4831
+ });
4832
+ });
4833
+ fromY = row.cy;
4834
+ });
4835
+ return lanes;
4836
+ }
4837
+
4838
+ // src/client/motion-preference.js
4839
+ var REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
4840
+ function prefersReducedMotion(scope = globalThis) {
4841
+ try {
4842
+ return scope?.matchMedia?.(REDUCED_MOTION_QUERY)?.matches === true;
4843
+ } catch {
4844
+ return false;
4845
+ }
4846
+ }
4847
+ function watchReducedMotion(scope, onChange) {
4848
+ let query;
4849
+ try {
4850
+ query = scope?.matchMedia?.(REDUCED_MOTION_QUERY);
4851
+ } catch {
4852
+ return () => {
4853
+ };
4854
+ }
4855
+ if (query === void 0 || query === null) return () => {
4856
+ };
4857
+ const listener = () => {
4858
+ onChange(query.matches === true);
4859
+ };
4860
+ if (typeof query.addEventListener === "function") {
4861
+ query.addEventListener("change", listener);
4862
+ return () => {
4863
+ query.removeEventListener("change", listener);
4864
+ };
4865
+ }
4866
+ if (typeof query.addListener === "function") {
4867
+ query.addListener(listener);
4868
+ return () => {
4869
+ query.removeListener(listener);
4870
+ };
4871
+ }
4872
+ return () => {
4873
+ };
4874
+ }
4875
+
4876
+ // src/client/board-rail.js
4877
+ var SVG_NS = "http://www.w3.org/2000/svg";
4878
+ var MAX_ANIMATED_LANES = 6;
4879
+ function svgNode(tag, attrs = {}) {
4880
+ const node = document.createElementNS(SVG_NS, tag);
4881
+ for (const [key, value] of Object.entries(attrs)) node.setAttribute(key, String(value));
4882
+ return node;
4883
+ }
4884
+ function pathNode(d, className) {
4885
+ return svgNode("path", { d, class: className });
4886
+ }
4887
+ function usePrefersReducedMotion() {
4888
+ const [reduced, setReduced] = (0, import_react8.useState)(prefersReducedMotion);
4889
+ (0, import_react8.useEffect)(() => watchReducedMotion(globalThis, setReduced), []);
4890
+ return reduced;
4891
+ }
4892
+ function primeFlow(path, phase) {
4893
+ let length = 200;
4894
+ try {
4895
+ length = path.getTotalLength();
4896
+ } catch {
4897
+ }
4898
+ const dash = Math.min(120, Math.max(44, length * 0.55));
4899
+ path.style.strokeDasharray = `${dash} ${length + dash * 2}`;
4900
+ path.style.setProperty("--dla-from", `${dash}px`);
4901
+ path.style.setProperty("--dla-to", `${-(length + dash * 2)}px`);
4902
+ path.style.animationDelay = `${-(phase % 7) * 0.31}s`;
4903
+ }
4904
+ function measure(element, base) {
4905
+ const rect = element.getBoundingClientRect();
4906
+ return {
4907
+ x: rect.left - base.left,
4908
+ y: rect.top - base.top,
4909
+ cx: rect.left - base.left + rect.width / 2,
4910
+ cy: rect.top - base.top + rect.height / 2,
4911
+ right: rect.right - base.left
4912
+ };
4913
+ }
4914
+ function drawRail(svg, options = {}) {
4915
+ const stage = svg.parentElement;
4916
+ if (stage === null) return;
4917
+ svg.replaceChildren();
4918
+ const rowElements = [...stage.querySelectorAll("[data-rail-row]")];
4919
+ if (rowElements.length === 0) return;
4920
+ const base = stage.getBoundingClientRect();
4921
+ const dot = stage.querySelector("[data-rail-leader-dot]");
4922
+ const leader = dot === null ? { cx: 20, cy: 0 } : measure(dot, base);
4923
+ const rows = [];
4924
+ for (const row of rowElements) {
4925
+ const cardElement = row.querySelector(".dsh-leader-agent-board-card");
4926
+ if (cardElement === null) continue;
4927
+ const card = measure(cardElement, base);
4928
+ const slots = [...row.querySelectorAll("[data-rail-slot]")].map((slot) => {
4929
+ const rect = measure(slot, base);
4930
+ return { x: rect.cx - 12, y: rect.cy, status: slot.dataset.railState };
4931
+ });
4932
+ rows.push({
4933
+ status: row.dataset.railStatus ?? "none",
4934
+ cardX: card.x,
4935
+ cardRight: card.right,
4936
+ cy: card.cy,
4937
+ slots
4938
+ });
4939
+ }
4940
+ if (rows.length === 0) return;
4941
+ const trunkX = leader.cx;
4942
+ const lastY = rows[rows.length - 1].cy;
4943
+ svg.appendChild(pathNode(`M${trunkX},${leader.cy} L${trunkX},${lastY}`, "dsh-leader-agent-board-rail-trunk"));
4944
+ rows.forEach((row) => {
4945
+ const nodeClass = `dsh-leader-agent-board-rail-node dsh-leader-agent-board-rail-node-${railNodeState(row.status)}`;
4946
+ svg.appendChild(options.orthogonal === true ? svgNode("rect", { x: trunkX - 3.2, y: row.cy - 3.2, width: 6.4, height: 6.4, rx: 1.2, class: nodeClass }) : svgNode("circle", { cx: trunkX, cy: row.cy, r: 3.4, class: nodeClass }));
4947
+ if (row.status === "running" && options.theme !== "light") {
4948
+ svg.appendChild(svgNode("circle", {
4949
+ cx: trunkX,
4950
+ cy: row.cy,
4951
+ r: 9,
4952
+ class: "dsh-leader-agent-board-rail-halo"
4953
+ }));
4954
+ }
4955
+ });
4956
+ const reduced = options.reduced === true;
4957
+ let animated = 0;
4958
+ planRailLanes({ trunkX, leaderY: leader.cy, rows, orthogonal: options.orthogonal }).forEach((lane, index) => {
4959
+ if (lane.kind === RAIL_LANE_HOT) {
4960
+ svg.appendChild(pathNode(lane.d, "dsh-leader-agent-board-rail-hot"));
4961
+ if (reduced || animated >= MAX_ANIMATED_LANES) return;
4962
+ animated += 1;
4963
+ const trail = pathNode(lane.d, "dsh-leader-agent-board-rail-trail");
4964
+ svg.appendChild(trail);
4965
+ primeFlow(trail, index);
4966
+ const comet = svgNode("circle", { r: 3, class: "dsh-leader-agent-board-rail-comet" });
4967
+ comet.appendChild(svgNode("animateMotion", {
4968
+ dur: "2400ms",
4969
+ begin: `${index % 7 * 0.28}s`,
4970
+ repeatCount: "indefinite",
4971
+ path: lane.d
4972
+ }));
4973
+ svg.appendChild(comet);
4974
+ return;
4975
+ }
4976
+ if (lane.kind === RAIL_LANE_WARN) {
4977
+ svg.appendChild(pathNode(lane.d, "dsh-leader-agent-board-rail-warn"));
4978
+ return;
4979
+ }
4980
+ svg.appendChild(pathNode(lane.d, "dsh-leader-agent-board-rail-edge"));
4981
+ });
4982
+ }
4983
+ function BoardRail({ railKey, orthogonal, theme }) {
4984
+ const ref = (0, import_react8.useRef)(null);
4985
+ const reduced = usePrefersReducedMotion();
4986
+ const drawnKey = (0, import_react8.useRef)("");
4987
+ (0, import_react8.useLayoutEffect)(() => {
4988
+ const svg = ref.current;
4989
+ if (svg === null) return void 0;
4990
+ const stage = svg.parentElement;
4991
+ if (stage === null) return void 0;
4992
+ let timer = 0;
4993
+ const draw = () => {
4994
+ if (stage.clientWidth === 0 || stage.clientHeight === 0) return;
4995
+ const key = `${railKey}|${orthogonal}|${theme}|${reduced}|${stage.clientWidth}x${stage.clientHeight}`;
4996
+ if (key === drawnKey.current) return;
4997
+ drawnKey.current = key;
4998
+ drawRail(svg, { orthogonal, theme, reduced });
4999
+ };
5000
+ draw();
5001
+ if (typeof ResizeObserver === "undefined") return void 0;
5002
+ const observer = new ResizeObserver(() => {
5003
+ clearTimeout(timer);
5004
+ timer = setTimeout(() => {
5005
+ draw();
5006
+ svg.dataset.railSettled = String(Number(svg.dataset.railSettled ?? "0") + 1);
5007
+ }, 80);
5008
+ });
5009
+ observer.observe(stage);
5010
+ return () => {
5011
+ clearTimeout(timer);
5012
+ observer.disconnect();
5013
+ };
5014
+ }, [railKey, orthogonal, theme, reduced]);
5015
+ return (0, import_react8.createElement)("svg", {
5016
+ ref,
5017
+ className: "dsh-leader-agent-board-rail",
5018
+ "aria-hidden": "true"
5019
+ });
5020
+ }
5021
+
4178
5022
  // src/client/board.js
5023
+ function useBoardMode() {
5024
+ const [mode, setMode] = (0, import_react9.useState)(() => readBoardMode(readLocalStorage(globalThis)));
5025
+ (0, import_react9.useEffect)(() => {
5026
+ const off = subscribeBoardMode(setMode);
5027
+ const onStorage = (event) => {
5028
+ if (event.key !== BOARD_MODE_KEY) return;
5029
+ setMode(readBoardMode(readLocalStorage(globalThis)));
5030
+ };
5031
+ globalThis.addEventListener?.("storage", onStorage);
5032
+ return () => {
5033
+ off();
5034
+ globalThis.removeEventListener?.("storage", onStorage);
5035
+ };
5036
+ }, []);
5037
+ return mode;
5038
+ }
5039
+ function readColorScheme(getTheme) {
5040
+ try {
5041
+ const active = getTheme?.()?.getTheme?.().active;
5042
+ if (active?.colorScheme === "light" || active?.colorScheme === "dark") return active.colorScheme;
5043
+ } catch {
5044
+ }
5045
+ try {
5046
+ return globalThis.matchMedia?.("(prefers-color-scheme: dark)")?.matches === true ? "dark" : "light";
5047
+ } catch {
5048
+ return "light";
5049
+ }
5050
+ }
5051
+ function useHostColorScheme(getTheme, onThemeChange) {
5052
+ const [scheme, setScheme] = (0, import_react9.useState)(() => readColorScheme(getTheme));
5053
+ (0, import_react9.useEffect)(() => {
5054
+ if (typeof onThemeChange !== "function") return void 0;
5055
+ const off = onThemeChange(() => setScheme(readColorScheme(getTheme)));
5056
+ return typeof off === "function" ? off : void 0;
5057
+ }, [getTheme, onThemeChange]);
5058
+ return scheme;
5059
+ }
5060
+ function cinemaListClass(scheme) {
5061
+ return `dsh-leader-agent-board-list dsh-leader-agent-board-list-cinema dsh-leader-agent-board-list-cinema-${scheme}`;
5062
+ }
5063
+ function BoardLeaderRow({ running, total, t }) {
5064
+ return (0, import_react9.createElement)(
5065
+ "div",
5066
+ { className: "dsh-leader-agent-board-rail-head" },
5067
+ (0, import_react9.createElement)("span", { className: "dsh-leader-agent-board-rail-orb", "data-rail-leader-dot": "" }),
5068
+ (0, import_react9.createElement)(
5069
+ "div",
5070
+ { className: "dsh-leader-agent-board-rail-meta" },
5071
+ (0, import_react9.createElement)("b", null, t("board.rail.leader")),
5072
+ (0, import_react9.createElement)("span", null, t("board.rail.summary", { running, total }))
5073
+ )
5074
+ );
5075
+ }
4179
5076
  var PROJECT_RECHECK_MS = 3e4;
4180
5077
  var BOARD_CACHE = /* @__PURE__ */ new Map();
4181
5078
  function cachedBoard(projectId) {
@@ -4185,23 +5082,36 @@ function rememberBoard(projectId, project, cards) {
4185
5082
  BOARD_CACHE.set(projectId, { project, cards });
4186
5083
  }
4187
5084
  function BoardBody(props) {
4188
- const { sessionId, getSessions, getUiWorkspace, useSessionStatus, useTabInfo, getSidebarRight, callRemote, t } = props;
5085
+ const {
5086
+ sessionId,
5087
+ getSessions,
5088
+ getUiWorkspace,
5089
+ useSessionStatus,
5090
+ useTabInfo,
5091
+ getSidebarRight,
5092
+ callRemote,
5093
+ getTheme,
5094
+ onThemeChange,
5095
+ t
5096
+ } = props;
4189
5097
  const useInfo = typeof useTabInfo === "function" ? useTabInfo : useNoTabInfo;
4190
5098
  const tabInfo = useInfo();
4191
5099
  const visible = tabInfo?.tab?.visible !== false;
4192
5100
  const mountedSessionId = getSidebarRight?.()?.mounted?.getSnapshot?.();
4193
- (0, import_react8.useEffect)(() => {
5101
+ (0, import_react9.useEffect)(() => {
4194
5102
  if (visible) noteBoardForeground(sessionId);
4195
5103
  else if (mountedSessionId === sessionId) clearBoardForeground(sessionId);
4196
5104
  }, [visible, mountedSessionId, sessionId]);
4197
5105
  const params = tabInfo?.tab?.navigation?.params;
4198
5106
  const projectHint = typeof params?.projectId === "string" ? params.projectId : void 0;
4199
- return (0, import_react8.createElement)(BoardPanel, {
5107
+ return (0, import_react9.createElement)(BoardPanel, {
4200
5108
  sessionId,
4201
5109
  getSessions,
4202
5110
  getUiWorkspace,
4203
5111
  useSessionStatus,
4204
5112
  callRemote,
5113
+ getTheme,
5114
+ onThemeChange,
4205
5115
  t,
4206
5116
  visible,
4207
5117
  projectHint
@@ -4233,13 +5143,13 @@ function sameStatuses(left, right) {
4233
5143
  return true;
4234
5144
  }
4235
5145
  function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
4236
- const [snapshots, setSnapshots] = (0, import_react8.useState)(() => /* @__PURE__ */ new Map());
4237
- const retention = (0, import_react8.useRef)(void 0);
4238
- const latest = (0, import_react8.useRef)(getSessions);
5146
+ const [snapshots, setSnapshots] = (0, import_react9.useState)(() => /* @__PURE__ */ new Map());
5147
+ const retention = (0, import_react9.useRef)(void 0);
5148
+ const latest = (0, import_react9.useRef)(getSessions);
4239
5149
  latest.current = getSessions;
4240
- const parent = (0, import_react8.useRef)(parentSessionId);
5150
+ const parent = (0, import_react9.useRef)(parentSessionId);
4241
5151
  parent.current = parentSessionId;
4242
- const parentsNow = (0, import_react8.useMemo)(() => {
5152
+ const parentsNow = (0, import_react9.useMemo)(() => {
4243
5153
  const table = /* @__PURE__ */ new Map();
4244
5154
  for (const card of cards) {
4245
5155
  const creator = typeof card.createdBy === "string" && card.createdBy !== "" ? card.createdBy : void 0;
@@ -4252,10 +5162,10 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
4252
5162
  }
4253
5163
  return table;
4254
5164
  }, [cards]);
4255
- const parents = (0, import_react8.useRef)(parentsNow);
5165
+ const parents = (0, import_react9.useRef)(parentsNow);
4256
5166
  parents.current = parentsNow;
4257
- const neededKey = (0, import_react8.useMemo)(() => [...parentsNow.keys()].sort().join("\n"), [parentsNow]);
4258
- const needed = (0, import_react8.useMemo)(
5167
+ const neededKey = (0, import_react9.useMemo)(() => [...parentsNow.keys()].sort().join("\n"), [parentsNow]);
5168
+ const needed = (0, import_react9.useMemo)(
4259
5169
  () => new Set(neededKey === "" ? [] : neededKey.split("\n")),
4260
5170
  [neededKey]
4261
5171
  );
@@ -4310,13 +5220,13 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
4310
5220
  }
4311
5221
  });
4312
5222
  }
4313
- (0, import_react8.useEffect)(() => {
5223
+ (0, import_react9.useEffect)(() => {
4314
5224
  retention.current.sync(needed);
4315
5225
  }, [needed]);
4316
- (0, import_react8.useEffect)(() => () => {
5226
+ (0, import_react9.useEffect)(() => () => {
4317
5227
  retention.current.dispose();
4318
5228
  }, []);
4319
- return (0, import_react8.useMemo)(() => {
5229
+ return (0, import_react9.useMemo)(() => {
4320
5230
  const merged = /* @__PURE__ */ new Map();
4321
5231
  for (const sessionId of needed) {
4322
5232
  merged.set(sessionId, mergeSessionState(
@@ -4328,69 +5238,80 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
4328
5238
  }, [needed, statuses, snapshots]);
4329
5239
  }
4330
5240
  function BoardEmpty({ allDone, projectName, t }) {
4331
- return (0, import_react8.createElement)(
5241
+ return (0, import_react9.createElement)(
4332
5242
  "div",
4333
5243
  { className: "dsh-leader-agent-board-empty" },
4334
- (0, import_react8.createElement)(
5244
+ (0, import_react9.createElement)(
4335
5245
  "div",
4336
5246
  {
4337
5247
  className: allDone ? "dsh-leader-agent-board-empty-icon dsh-leader-agent-board-empty-icon-success" : "dsh-leader-agent-board-empty-icon"
4338
5248
  },
4339
5249
  allDone ? productIcon("check-circle-outline", { size: 24 }) : productIcon("checklist-outline", { size: 24 })
4340
5250
  ),
4341
- (0, import_react8.createElement)(
5251
+ (0, import_react9.createElement)(
4342
5252
  "div",
4343
5253
  { className: "dsh-leader-agent-board-empty-title" },
4344
5254
  allDone ? t("board.empty.doneTitle") : t("board.empty.title")
4345
5255
  ),
4346
- (0, import_react8.createElement)(
5256
+ (0, import_react9.createElement)(
4347
5257
  "div",
4348
5258
  { className: "dsh-leader-agent-board-empty-hint" },
4349
5259
  allDone ? projectName === void 0 ? t("board.empty.doneHintOwn") : t("board.empty.doneHintNamed", { project: projectName }) : t("board.empty.hint")
4350
5260
  )
4351
5261
  );
4352
5262
  }
4353
- function BoardSkeleton() {
4354
- return (0, import_react8.createElement)(
5263
+ function BoardSkeleton({ listClass }) {
5264
+ return (0, import_react9.createElement)(
4355
5265
  "div",
4356
- { className: "dsh-leader-agent-board-list" },
4357
- (0, import_react8.createElement)(
5266
+ { className: listClass },
5267
+ (0, import_react9.createElement)(
4358
5268
  "div",
4359
5269
  { className: "dsh-leader-agent-board-group" },
4360
- (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
4361
- (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
4362
- (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-skeleton" })
5270
+ (0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
5271
+ (0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
5272
+ (0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-skeleton" })
4363
5273
  )
4364
5274
  );
4365
5275
  }
4366
- function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus, callRemote, t, visible, projectHint }) {
5276
+ function BoardPanel({
5277
+ sessionId,
5278
+ getSessions,
5279
+ getUiWorkspace,
5280
+ useSessionStatus,
5281
+ callRemote,
5282
+ getTheme,
5283
+ onThemeChange,
5284
+ t,
5285
+ visible,
5286
+ projectHint
5287
+ }) {
4367
5288
  const cached = projectHint === void 0 ? void 0 : cachedBoard(projectHint);
4368
- const [project, setProject] = (0, import_react8.useState)(cached?.project);
4369
- const [resolved, setResolved] = (0, import_react8.useState)(cached !== void 0);
4370
- const [worker, setWorker] = (0, import_react8.useState)(cached === void 0 ? void 0 : true);
4371
- const [cards, setCards] = (0, import_react8.useState)(() => cached?.cards ?? []);
4372
- const [projectError, setProjectError] = (0, import_react8.useState)(null);
4373
- const [cardsError, setCardsError] = (0, import_react8.useState)(null);
4374
- const [slotLabels, setSlotLabels] = (0, import_react8.useState)(() => ({}));
4375
- const [loaded, setLoaded] = (0, import_react8.useState)(cached !== void 0);
4376
- const prefilled = (0, import_react8.useRef)(cached !== void 0);
4377
- const accessSession = (0, import_react8.useRef)(void 0);
4378
- const [detail, setDetail] = (0, import_react8.useState)(null);
4379
- const [pendingDelete, setPendingDelete] = (0, import_react8.useState)(null);
4380
- const [deleteBusy, setDeleteBusy] = (0, import_react8.useState)(false);
4381
- const [deleteError, setDeleteError] = (0, import_react8.useState)("");
4382
- const deletedCardIds = (0, import_react8.useRef)(/* @__PURE__ */ new Set());
4383
- const [doneOpen, setDoneOpen] = (0, import_react8.useState)(false);
4384
- const [doneWatermark, setDoneWatermark] = (0, import_react8.useState)(0);
4385
- const [now, setNow] = (0, import_react8.useState)(() => Date.now());
4386
- (0, import_react8.useEffect)(() => {
5289
+ const [project, setProject] = (0, import_react9.useState)(cached?.project);
5290
+ const [resolved, setResolved] = (0, import_react9.useState)(cached !== void 0);
5291
+ const [worker, setWorker] = (0, import_react9.useState)(cached === void 0 ? void 0 : true);
5292
+ const [cards, setCards] = (0, import_react9.useState)(() => cached?.cards ?? []);
5293
+ const [projectError, setProjectError] = (0, import_react9.useState)(null);
5294
+ const [cardsError, setCardsError] = (0, import_react9.useState)(null);
5295
+ const [slotLabels, setSlotLabels] = (0, import_react9.useState)(() => ({}));
5296
+ const [loaded, setLoaded] = (0, import_react9.useState)(cached !== void 0);
5297
+ const prefilled = (0, import_react9.useRef)(cached !== void 0);
5298
+ const accessSession = (0, import_react9.useRef)(void 0);
5299
+ const [detail, setDetail] = (0, import_react9.useState)(null);
5300
+ const [pendingDelete, setPendingDelete] = (0, import_react9.useState)(null);
5301
+ const [deleteBusy, setDeleteBusy] = (0, import_react9.useState)(false);
5302
+ const [deleteError, setDeleteError] = (0, import_react9.useState)("");
5303
+ const deletedCardIds = (0, import_react9.useRef)(/* @__PURE__ */ new Set());
5304
+ const [doneOpen, setDoneOpen] = (0, import_react9.useState)(false);
5305
+ const [doneWatermark, setDoneWatermark] = (0, import_react9.useState)(0);
5306
+ const [now, setNow] = (0, import_react9.useState)(() => Date.now());
5307
+ (0, import_react9.useEffect)(() => {
4387
5308
  ensureBoardStyles();
4388
5309
  }, []);
4389
- (0, import_react8.useEffect)(() => {
5310
+ (0, import_react9.useEffect)(() => {
4390
5311
  setPendingDelete(null);
4391
5312
  setDeleteError("");
4392
5313
  }, [project?.id]);
4393
- (0, import_react8.useEffect)(() => {
5314
+ (0, import_react9.useEffect)(() => {
4394
5315
  if (!visible) return void 0;
4395
5316
  setNow(Date.now());
4396
5317
  const timer = setInterval(() => {
@@ -4398,13 +5319,13 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4398
5319
  }, 6e4);
4399
5320
  return () => clearInterval(timer);
4400
5321
  }, [visible]);
4401
- (0, import_react8.useEffect)(() => {
5322
+ (0, import_react9.useEffect)(() => {
4402
5323
  if (visible) return;
4403
5324
  setDetail(null);
4404
5325
  setPendingDelete(null);
4405
5326
  setDeleteError("");
4406
5327
  }, [visible]);
4407
- (0, import_react8.useEffect)(() => {
5328
+ (0, import_react9.useEffect)(() => {
4408
5329
  if (!visible) return void 0;
4409
5330
  let cancelled = false;
4410
5331
  const sameSession = accessSession.current === sessionId;
@@ -4455,7 +5376,7 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4455
5376
  window.removeEventListener("focus", onFocus);
4456
5377
  };
4457
5378
  }, [sessionId, callRemote, visible, t]);
4458
- (0, import_react8.useEffect)(() => {
5379
+ (0, import_react9.useEffect)(() => {
4459
5380
  if (!visible) return void 0;
4460
5381
  if (!isBoardViewable(project, sessionId, worker)) return void 0;
4461
5382
  let cancelled = false;
@@ -4485,13 +5406,13 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4485
5406
  window.removeEventListener("focus", onFocus);
4486
5407
  };
4487
5408
  }, [project, worker, callRemote, sessionId, visible, t]);
4488
- (0, import_react8.useEffect)(() => {
5409
+ (0, import_react9.useEffect)(() => {
4489
5410
  if (project === void 0 || !loaded) return;
4490
5411
  rememberBoard(project.id, project, cards);
4491
5412
  }, [project, cards, loaded]);
4492
5413
  const cardList = cards;
4493
5414
  const states = useSlotStates(cardList, getSessions, useSessionStatus, sessionId);
4494
- const { active, done } = (0, import_react8.useMemo)(() => ({
5415
+ const { active, done } = (0, import_react9.useMemo)(() => ({
4495
5416
  active: sortActiveCards(
4496
5417
  cardList.filter((card) => card.status === "active"),
4497
5418
  states
@@ -4499,29 +5420,48 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4499
5420
  done: sortDoneCards(cardList.filter((card) => card.status === "done"))
4500
5421
  }), [cardList, states]);
4501
5422
  const doneFold = foldDoneCards(done, doneWatermark, t);
4502
- const openSession = (0, import_react8.useCallback)((targetSessionId) => {
5423
+ const mode = useBoardMode();
5424
+ const cinema = mode === "cinema";
5425
+ const scheme = useHostColorScheme(getTheme, onThemeChange);
5426
+ const listClass = cinema ? cinemaListClass(scheme) : "dsh-leader-agent-board-list";
5427
+ const signals = (0, import_react9.useMemo)(
5428
+ () => new Map(active.map((card) => [card.id, cardSignal(card, states)])),
5429
+ [active, states]
5430
+ );
5431
+ const runningCount = (0, import_react9.useMemo)(
5432
+ () => [...signals.values()].filter((signal) => signal === "running").length,
5433
+ [signals]
5434
+ );
5435
+ const railKey = (0, import_react9.useMemo)(
5436
+ () => `${mode}|${scheme}|${active.map((card) => {
5437
+ const slotStates = slotViewsForCard(card, states).filter((slot) => slot.sessionId !== "").map((slot) => slot.state).join(",");
5438
+ return `${card.id}:${signals.get(card.id)}:${slotStates}`;
5439
+ }).join("|")}`,
5440
+ [mode, scheme, active, states, signals]
5441
+ );
5442
+ const openSession = (0, import_react9.useCallback)((targetSessionId) => {
4503
5443
  const uiWorkspace = getUiWorkspace?.();
4504
5444
  if (uiWorkspace === void 0 || uiWorkspace === null) return;
4505
5445
  uiWorkspace.openSession(targetSessionId);
4506
5446
  }, [getUiWorkspace]);
4507
- const openDetail = (0, import_react8.useCallback)((card, anchor) => {
5447
+ const openDetail = (0, import_react9.useCallback)((card, anchor) => {
4508
5448
  setDetail({ card, anchor });
4509
5449
  }, []);
4510
- const cardUpdated = (0, import_react8.useCallback)((updated) => {
5450
+ const cardUpdated = (0, import_react9.useCallback)((updated) => {
4511
5451
  if (updated === null || typeof updated !== "object") return;
4512
5452
  setCards((current2) => mergeCardUpdate(current2, updated));
4513
5453
  setDetail((current2) => mergeDetailCard(current2, updated));
4514
5454
  }, []);
4515
- const requestDelete = (0, import_react8.useCallback)(() => {
5455
+ const requestDelete = (0, import_react9.useCallback)(() => {
4516
5456
  setDeleteError("");
4517
5457
  setPendingDelete(detail?.card ?? null);
4518
5458
  }, [detail]);
4519
- const cancelDelete = (0, import_react8.useCallback)(() => {
5459
+ const cancelDelete = (0, import_react9.useCallback)(() => {
4520
5460
  if (deleteBusy) return;
4521
5461
  setDeleteError("");
4522
5462
  setPendingDelete(null);
4523
5463
  }, [deleteBusy]);
4524
- const confirmDelete = (0, import_react8.useCallback)(async () => {
5464
+ const confirmDelete = (0, import_react9.useCallback)(async () => {
4525
5465
  if (deleteBusy || pendingDelete === null) return;
4526
5466
  setDeleteBusy(true);
4527
5467
  setDeleteError("");
@@ -4540,50 +5480,50 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4540
5480
  const view = boardViewState(project, sessionId, worker);
4541
5481
  const overlays = reconcileBoardOverlays(cards, detail, pendingDelete);
4542
5482
  if (projectError !== null && project === void 0) {
4543
- return (0, import_react8.createElement)(
5483
+ return (0, import_react9.createElement)(
4544
5484
  "div",
4545
5485
  { className: "dsh-leader-agent-board-empty" },
4546
- (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, projectError)
5486
+ (0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, projectError)
4547
5487
  );
4548
5488
  }
4549
5489
  if (view === "no-project") {
4550
- return (0, import_react8.createElement)(
5490
+ return (0, import_react9.createElement)(
4551
5491
  "div",
4552
- { className: "dsh-leader-agent-board-list" },
4553
- resolved ? (0, import_react8.createElement)(
5492
+ { className: listClass },
5493
+ resolved ? (0, import_react9.createElement)(
4554
5494
  "div",
4555
5495
  { className: "dsh-leader-agent-board-empty" },
4556
- (0, import_react8.createElement)(
5496
+ (0, import_react9.createElement)(
4557
5497
  "div",
4558
5498
  { className: "dsh-leader-agent-board-empty-title" },
4559
5499
  t("board.noProject.title")
4560
5500
  ),
4561
- (0, import_react8.createElement)(
5501
+ (0, import_react9.createElement)(
4562
5502
  "div",
4563
5503
  { className: "dsh-leader-agent-board-empty-hint" },
4564
5504
  t("board.noProject.hint")
4565
5505
  )
4566
- ) : (0, import_react8.createElement)(BoardSkeleton)
5506
+ ) : (0, import_react9.createElement)(BoardSkeleton, { listClass })
4567
5507
  );
4568
5508
  }
4569
5509
  if (view === "pending") {
4570
- return (0, import_react8.createElement)(BoardSkeleton);
5510
+ return (0, import_react9.createElement)(BoardSkeleton, { listClass });
4571
5511
  }
4572
5512
  if (view === "leader-dead" || view === "not-viewable") {
4573
5513
  const leaderDead = view === "leader-dead";
4574
5514
  const projectName = project?.name;
4575
- return (0, import_react8.createElement)(
5515
+ return (0, import_react9.createElement)(
4576
5516
  "div",
4577
- { className: "dsh-leader-agent-board-list" },
4578
- (0, import_react8.createElement)(
5517
+ { className: listClass },
5518
+ (0, import_react9.createElement)(
4579
5519
  "div",
4580
5520
  { className: "dsh-leader-agent-board-empty" },
4581
- (0, import_react8.createElement)(
5521
+ (0, import_react9.createElement)(
4582
5522
  "div",
4583
5523
  { className: "dsh-leader-agent-board-empty-title" },
4584
5524
  leaderDead ? t("board.leaderDead.title") : t("board.notProject.title")
4585
5525
  ),
4586
- (0, import_react8.createElement)(
5526
+ (0, import_react9.createElement)(
4587
5527
  "div",
4588
5528
  { className: "dsh-leader-agent-board-empty-hint" },
4589
5529
  leaderDead ? t("board.leaderDead.hint") : projectName ? t("board.notProject.hint", { project: projectName }) : t("board.notProject.unknown")
@@ -4592,23 +5532,23 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4592
5532
  );
4593
5533
  }
4594
5534
  if (cardsError !== null && cards.length === 0) {
4595
- return (0, import_react8.createElement)(
5535
+ return (0, import_react9.createElement)(
4596
5536
  "div",
4597
5537
  { className: "dsh-leader-agent-board-empty" },
4598
- (0, import_react8.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, cardsError)
5538
+ (0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, cardsError)
4599
5539
  );
4600
5540
  }
4601
5541
  if (!loaded) {
4602
- return (0, import_react8.createElement)(BoardSkeleton);
5542
+ return (0, import_react9.createElement)(BoardSkeleton, { listClass });
4603
5543
  }
4604
5544
  if (cards.length === 0) {
4605
- return (0, import_react8.createElement)(
5545
+ return (0, import_react9.createElement)(
4606
5546
  "div",
4607
- { className: "dsh-leader-agent-board-list" },
4608
- (0, import_react8.createElement)(BoardEmpty, { allDone: false, projectName: project.name, t })
5547
+ { className: listClass },
5548
+ (0, import_react9.createElement)(BoardEmpty, { allDone: false, projectName: project.name, t })
4609
5549
  );
4610
5550
  }
4611
- const deleteDialog = (0, import_react8.createElement)(ConfirmDialog, {
5551
+ const deleteDialog = (0, import_react9.createElement)(ConfirmDialog, {
4612
5552
  open: overlays.pendingDelete !== null,
4613
5553
  title: t("board.delete.title"),
4614
5554
  description: overlays.pendingDelete === null ? "" : describeCardRemoval(overlays.pendingDelete, t),
@@ -4622,86 +5562,93 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4622
5562
  },
4623
5563
  onCancel: cancelDelete
4624
5564
  });
4625
- return (0, import_react8.createElement)(
5565
+ return (0, import_react9.createElement)(
4626
5566
  "div",
4627
- { className: "dsh-leader-agent-board" },
4628
- (0, import_react8.createElement)(
5567
+ { className: "dsh-leader-agent-board", "data-mode": mode, "data-theme": scheme },
5568
+ (0, import_react9.createElement)(
4629
5569
  "div",
4630
- { className: "dsh-leader-agent-board-list" },
4631
- active.length > 0 ? (0, import_react8.createElement)(
4632
- "div",
4633
- { className: "dsh-leader-agent-board-group" },
4634
- active.map((card) => (0, import_react8.createElement)(BoardCard, {
4635
- key: card.id,
4636
- card,
4637
- states,
4638
- now,
4639
- slotLabels,
4640
- t,
4641
- onOpenDetail: openDetail,
4642
- onOpenSession: openSession
4643
- }))
4644
- ) : null,
4645
- active.length === 0 ? (0, import_react8.createElement)(BoardEmpty, { allDone: true, projectName: project.name, t }) : null,
4646
- done.length > 0 ? (0, import_react8.createElement)(
5570
+ { className: listClass },
5571
+ (0, import_react9.createElement)(
4647
5572
  "div",
4648
- { className: "dsh-leader-agent-board-done-section" },
4649
- (0, import_react8.createElement)(
4650
- "button",
4651
- {
4652
- type: "button",
4653
- className: "dsh-leader-agent-board-done-toggle",
4654
- "aria-expanded": doneOpen,
4655
- onClick: () => {
4656
- setDoneOpen(!doneOpen);
4657
- }
4658
- },
4659
- (0, import_react8.createElement)(
4660
- "span",
4661
- {
4662
- className: doneOpen ? "dsh-leader-agent-board-done-chevron dsh-leader-agent-board-done-chevron-open" : "dsh-leader-agent-board-done-chevron"
4663
- },
4664
- productIcon("chevron-right-outline", { size: 14 })
4665
- ),
4666
- t("board.done"),
4667
- (0, import_react8.createElement)("span", { className: "dsh-leader-agent-board-done-count" }, String(done.length))
4668
- ),
4669
- doneOpen ? (0, import_react8.createElement)(
5573
+ { className: "dsh-leader-agent-board-stage" },
5574
+ cinema ? (0, import_react9.createElement)(BoardRail, { railKey, orthogonal: scheme === "light", theme: scheme }) : null,
5575
+ cinema ? (0, import_react9.createElement)(BoardLeaderRow, { running: runningCount, total: active.length, t }) : null,
5576
+ active.length > 0 ? (0, import_react9.createElement)(
4670
5577
  "div",
4671
5578
  { className: "dsh-leader-agent-board-group" },
4672
- doneFold.rows.map((card) => (0, import_react8.createElement)(BoardCard, {
5579
+ active.map((card) => (0, import_react9.createElement)(BoardCard, {
4673
5580
  key: card.id,
4674
5581
  card,
4675
5582
  states,
4676
5583
  now,
4677
5584
  slotLabels,
4678
5585
  t,
5586
+ cinema,
4679
5587
  onOpenDetail: openDetail,
4680
5588
  onOpenSession: openSession
4681
- })),
4682
- doneFold.hiddenCount === 0 && !doneFold.expanded ? null : (0, import_react8.createElement)(
5589
+ }))
5590
+ ) : null,
5591
+ active.length === 0 ? (0, import_react9.createElement)(BoardEmpty, { allDone: true, projectName: project.name, t }) : null,
5592
+ done.length > 0 ? (0, import_react9.createElement)(
5593
+ "div",
5594
+ { className: "dsh-leader-agent-board-done-section" },
5595
+ (0, import_react9.createElement)(
4683
5596
  "button",
4684
5597
  {
4685
5598
  type: "button",
4686
- className: "dsh-leader-agent-board-done-more",
4687
- "aria-expanded": doneFold.expanded,
5599
+ className: "dsh-leader-agent-board-done-toggle",
5600
+ "aria-expanded": doneOpen,
4688
5601
  onClick: () => {
4689
- if (doneFold.expanded) {
4690
- setDoneWatermark(0);
4691
- return;
4692
- }
4693
- setDoneWatermark((value) => nextDoneWatermark(
4694
- doneFold.hiddenCount,
4695
- Math.max(value, done.length - doneFold.hiddenCount)
4696
- ));
5602
+ setDoneOpen(!doneOpen);
4697
5603
  }
4698
5604
  },
4699
- doneFold.expanded ? t("common.collapse") : doneFold.expandLabel
4700
- )
5605
+ (0, import_react9.createElement)(
5606
+ "span",
5607
+ {
5608
+ className: doneOpen ? "dsh-leader-agent-board-done-chevron dsh-leader-agent-board-done-chevron-open" : "dsh-leader-agent-board-done-chevron"
5609
+ },
5610
+ productIcon("chevron-right-outline", { size: 14 })
5611
+ ),
5612
+ t("board.done"),
5613
+ (0, import_react9.createElement)("span", { className: "dsh-leader-agent-board-done-count" }, String(done.length))
5614
+ ),
5615
+ doneOpen ? (0, import_react9.createElement)(
5616
+ "div",
5617
+ { className: "dsh-leader-agent-board-group" },
5618
+ doneFold.rows.map((card) => (0, import_react9.createElement)(BoardCard, {
5619
+ key: card.id,
5620
+ card,
5621
+ states,
5622
+ now,
5623
+ slotLabels,
5624
+ t,
5625
+ onOpenDetail: openDetail,
5626
+ onOpenSession: openSession
5627
+ })),
5628
+ doneFold.hiddenCount === 0 && !doneFold.expanded ? null : (0, import_react9.createElement)(
5629
+ "button",
5630
+ {
5631
+ type: "button",
5632
+ className: "dsh-leader-agent-board-done-more",
5633
+ "aria-expanded": doneFold.expanded,
5634
+ onClick: () => {
5635
+ if (doneFold.expanded) {
5636
+ setDoneWatermark(0);
5637
+ return;
5638
+ }
5639
+ setDoneWatermark((value) => nextDoneWatermark(
5640
+ doneFold.hiddenCount,
5641
+ Math.max(value, done.length - doneFold.hiddenCount)
5642
+ ));
5643
+ }
5644
+ },
5645
+ doneFold.expanded ? t("common.collapse") : doneFold.expandLabel
5646
+ )
5647
+ ) : null
4701
5648
  ) : null
4702
- ) : null
5649
+ )
4703
5650
  ),
4704
- overlays.detail === null || overlays.pendingDelete !== null ? null : (0, import_react8.createElement)(CardDetail, {
5651
+ overlays.detail === null || overlays.pendingDelete !== null ? null : (0, import_react9.createElement)(CardDetail, {
4705
5652
  card: overlays.detail.card,
4706
5653
  onClose: () => {
4707
5654
  setDetail(null);
@@ -4716,17 +5663,111 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
4716
5663
  );
4717
5664
  }
4718
5665
 
5666
+ // src/client/board-settings.js
5667
+ var import_react10 = require("react");
5668
+ var SECTION_ID = "dsh-leader-agent";
5669
+ var SECTION_ORDER = 90;
5670
+ var MODE_KEYS = Object.freeze({
5671
+ [BOARD_MODE_CINEMA]: { title: "board.mode.cinema.title", desc: "board.mode.cinema.desc" },
5672
+ [BOARD_MODE_WORK]: { title: "board.mode.work.title", desc: "board.mode.work.desc" }
5673
+ });
5674
+ function ModePreview({ cinema }) {
5675
+ if (cinema) {
5676
+ return (0, import_react10.createElement)(
5677
+ "svg",
5678
+ { width: 44, height: 30, viewBox: "0 0 44 30", fill: "none", "aria-hidden": "true" },
5679
+ (0, import_react10.createElement)("path", { d: "M10 4V26", stroke: "currentColor", strokeOpacity: 0.45, strokeWidth: 1.5 }),
5680
+ (0, import_react10.createElement)("path", { d: "M10 9H20M10 18H20M10 26H20", stroke: "currentColor", strokeOpacity: 0.45, strokeWidth: 1.5 }),
5681
+ (0, import_react10.createElement)("circle", { cx: 10, cy: 9, r: 2, fill: "currentColor" }),
5682
+ (0, import_react10.createElement)("circle", { cx: 10, cy: 18, r: 2, fill: "currentColor" }),
5683
+ (0, import_react10.createElement)("circle", { cx: 10, cy: 26, r: 2, fill: "currentColor" }),
5684
+ (0, import_react10.createElement)("circle", { cx: 36, cy: 9, r: 2.6, className: "dsh-leader-agent-settings-preview-dot" })
5685
+ );
5686
+ }
5687
+ return (0, import_react10.createElement)(
5688
+ "svg",
5689
+ { width: 44, height: 30, viewBox: "0 0 44 30", fill: "none", "aria-hidden": "true" },
5690
+ (0, import_react10.createElement)("rect", { x: 4, y: 4, width: 36, height: 6, rx: 2, fill: "currentColor", fillOpacity: 0.22 }),
5691
+ (0, import_react10.createElement)("rect", { x: 4, y: 12, width: 36, height: 6, rx: 2, fill: "currentColor", fillOpacity: 0.22 }),
5692
+ (0, import_react10.createElement)("rect", { x: 4, y: 20, width: 36, height: 6, rx: 2, fill: "currentColor", fillOpacity: 0.22 })
5693
+ );
5694
+ }
5695
+ function ModeOption({ value, mode, onChoose, t }) {
5696
+ const selected = value === mode;
5697
+ return (0, import_react10.createElement)(
5698
+ "button",
5699
+ {
5700
+ type: "button",
5701
+ role: "radio",
5702
+ "aria-checked": selected,
5703
+ className: selected ? "dsh-leader-agent-settings-option dsh-leader-agent-settings-option-selected" : "dsh-leader-agent-settings-option",
5704
+ onClick: () => {
5705
+ onChoose(value);
5706
+ }
5707
+ },
5708
+ (0, import_react10.createElement)(
5709
+ "span",
5710
+ { className: "dsh-leader-agent-settings-preview" },
5711
+ (0, import_react10.createElement)(ModePreview, { cinema: value === BOARD_MODE_CINEMA })
5712
+ ),
5713
+ (0, import_react10.createElement)(
5714
+ "span",
5715
+ { className: "dsh-leader-agent-settings-copy" },
5716
+ (0, import_react10.createElement)("b", null, t(MODE_KEYS[value].title)),
5717
+ (0, import_react10.createElement)("span", null, t(MODE_KEYS[value].desc))
5718
+ ),
5719
+ (0, import_react10.createElement)("span", { className: "dsh-leader-agent-settings-radio", "aria-hidden": "true" })
5720
+ );
5721
+ }
5722
+ function BoardSettingsSection({ t }) {
5723
+ const storage = readLocalStorage(globalThis);
5724
+ const [mode, setMode] = (0, import_react10.useState)(() => readBoardMode(storage));
5725
+ (0, import_react10.useEffect)(() => subscribeBoardMode(setMode), []);
5726
+ return (0, import_react10.createElement)(
5727
+ "section",
5728
+ { className: "dsh-leader-agent-settings" },
5729
+ (0, import_react10.createElement)("h3", { className: "dsh-leader-agent-settings-title" }, t("board.settings.title")),
5730
+ (0, import_react10.createElement)("p", { className: "dsh-leader-agent-settings-desc" }, t("board.settings.desc")),
5731
+ (0, import_react10.createElement)(
5732
+ "div",
5733
+ {
5734
+ className: "dsh-leader-agent-settings-options",
5735
+ role: "radiogroup",
5736
+ "aria-label": t("board.settings.title")
5737
+ },
5738
+ BOARD_MODES.map((value) => (0, import_react10.createElement)(ModeOption, {
5739
+ key: value,
5740
+ value,
5741
+ mode,
5742
+ onChoose: (next) => setMode(setBoardMode(storage, next)),
5743
+ t
5744
+ }))
5745
+ ),
5746
+ (0, import_react10.createElement)("p", { className: "dsh-leader-agent-settings-scope" }, t("board.settings.scope"))
5747
+ );
5748
+ }
5749
+ function mountBoardSettings(ctx, t) {
5750
+ ensureBoardStyles();
5751
+ ctx.effect(() => ctx.slots.inject("settings.section", () => ctx.slots.register({
5752
+ name: "settings.section",
5753
+ id: SECTION_ID,
5754
+ order: SECTION_ORDER,
5755
+ label: () => t("board.settings.nav"),
5756
+ inject: () => ({ t })
5757
+ }, BoardSettingsSection)), "dsh-leader-agent \u8BBE\u7F6E\u9875");
5758
+ }
5759
+
4719
5760
  // src/client/board-guide-entry.js
4720
- var import_react9 = require("react");
5761
+ var import_react11 = require("react");
4721
5762
 
4722
5763
  // src/client/project-changes.js
4723
- var listeners = /* @__PURE__ */ new Set();
5764
+ var listeners2 = /* @__PURE__ */ new Set();
4724
5765
  function onProjectsChanged(listener) {
4725
- listeners.add(listener);
4726
- return () => listeners.delete(listener);
5766
+ listeners2.add(listener);
5767
+ return () => listeners2.delete(listener);
4727
5768
  }
4728
5769
  function notifyProjectsChanged() {
4729
- for (const listener of Array.from(listeners)) {
5770
+ for (const listener of Array.from(listeners2)) {
4730
5771
  try {
4731
5772
  listener();
4732
5773
  } catch (error) {
@@ -4853,11 +5894,11 @@ function mountProjectBoardMonitor({
4853
5894
  // src/client/board-guide-entry.js
4854
5895
  function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, callRemote }) {
4855
5896
  const { tab } = useTabInfo();
4856
- const [visible, setVisible] = (0, import_react9.useState)(false);
4857
- (0, import_react9.useEffect)(() => {
5897
+ const [visible, setVisible] = (0, import_react11.useState)(false);
5898
+ (0, import_react11.useEffect)(() => {
4858
5899
  ensureBoardStyles();
4859
5900
  }, []);
4860
- (0, import_react9.useEffect)(() => {
5901
+ (0, import_react11.useEffect)(() => {
4861
5902
  let cancelled = false;
4862
5903
  const check = async () => {
4863
5904
  try {
@@ -4887,7 +5928,7 @@ function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, call
4887
5928
  };
4888
5929
  }, [sessionId, callRemote]);
4889
5930
  if (!visible) return null;
4890
- return (0, import_react9.createElement)(
5931
+ return (0, import_react11.createElement)(
4891
5932
  "button",
4892
5933
  {
4893
5934
  type: "button",
@@ -4899,26 +5940,26 @@ function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, call
4899
5940
  tab.actions.openTab(BOARD_TAB_KIND, { replaceTab: true });
4900
5941
  }
4901
5942
  },
4902
- (0, import_react9.createElement)(
5943
+ (0, import_react11.createElement)(
4903
5944
  "span",
4904
5945
  { className: "dsh-leader-agent-guide-entry-icon" },
4905
5946
  productIcon("checklist-outline", { size: description === void 0 ? 22 : 26 })
4906
5947
  ),
4907
- (0, import_react9.createElement)(
5948
+ (0, import_react11.createElement)(
4908
5949
  "span",
4909
5950
  { className: "dsh-leader-agent-guide-entry-text" },
4910
- (0, import_react9.createElement)("span", { className: "dsh-leader-agent-guide-entry-title" }, title),
4911
- description === void 0 ? null : (0, import_react9.createElement)("span", { className: "dsh-leader-agent-guide-entry-description" }, description)
5951
+ (0, import_react11.createElement)("span", { className: "dsh-leader-agent-guide-entry-title" }, title),
5952
+ description === void 0 ? null : (0, import_react11.createElement)("span", { className: "dsh-leader-agent-guide-entry-description" }, description)
4912
5953
  )
4913
5954
  );
4914
5955
  }
4915
5956
 
4916
5957
  // src/client/project-panel.js
4917
- var import_react11 = require("react");
5958
+ var import_react13 = require("react");
4918
5959
  var import_react_dom3 = require("react-dom");
4919
5960
 
4920
5961
  // src/client/project-section.js
4921
- var import_react10 = require("react");
5962
+ var import_react12 = require("react");
4922
5963
  var import_react_dom2 = require("react-dom");
4923
5964
  var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
4924
5965
 
@@ -5604,13 +6645,13 @@ function ProjectSection(props) {
5604
6645
  onReorder,
5605
6646
  t
5606
6647
  } = props;
5607
- (0, import_react10.useEffect)(() => {
6648
+ (0, import_react12.useEffect)(() => {
5608
6649
  ensureStyles2();
5609
6650
  }, []);
5610
- const [draggingId, setDraggingId] = (0, import_react10.useState)(null);
5611
- const dragIdRef = (0, import_react10.useRef)(null);
5612
- const [dropTarget, setDropTarget] = (0, import_react10.useState)(null);
5613
- const projectIds = (0, import_react10.useMemo)(() => projects.map((project) => project.id), [projects]);
6651
+ const [draggingId, setDraggingId] = (0, import_react12.useState)(null);
6652
+ const dragIdRef = (0, import_react12.useRef)(null);
6653
+ const [dropTarget, setDropTarget] = (0, import_react12.useState)(null);
6654
+ const projectIds = (0, import_react12.useMemo)(() => projects.map((project) => project.id), [projects]);
5614
6655
  const beginDrag = (projectId) => {
5615
6656
  dragIdRef.current = projectId;
5616
6657
  setDraggingId(projectId);
@@ -5634,13 +6675,13 @@ function ProjectSection(props) {
5634
6675
  listExpanded,
5635
6676
  projectCount: projects.length
5636
6677
  });
5637
- return (0, import_react10.createElement)(
6678
+ return (0, import_react12.createElement)(
5638
6679
  "div",
5639
6680
  { className: "dsh-leader-agent-project-section" },
5640
- (0, import_react10.createElement)(
6681
+ (0, import_react12.createElement)(
5641
6682
  "div",
5642
6683
  { className: "dsh-leader-agent-project-header" },
5643
- (0, import_react10.createElement)(
6684
+ (0, import_react12.createElement)(
5644
6685
  "button",
5645
6686
  {
5646
6687
  type: "button",
@@ -5649,11 +6690,11 @@ function ProjectSection(props) {
5649
6690
  title: listExpanded ? t("project.collapseList") : t("project.expandList"),
5650
6691
  onClick: onToggleList
5651
6692
  },
5652
- (0, import_react10.createElement)("span", { className: "dsh-leader-agent-project-header-label" }, t("project.label")),
5653
- (0, import_react10.createElement)(
6693
+ (0, import_react12.createElement)("span", { className: "dsh-leader-agent-project-header-label" }, t("project.label")),
6694
+ (0, import_react12.createElement)(
5654
6695
  "span",
5655
6696
  { className: "dsh-leader-agent-project-lead" },
5656
- (0, import_react10.createElement)(
6697
+ (0, import_react12.createElement)(
5657
6698
  "span",
5658
6699
  {
5659
6700
  className: "dsh-leader-agent-project-lead-arrow",
@@ -5663,10 +6704,10 @@ function ProjectSection(props) {
5663
6704
  )
5664
6705
  )
5665
6706
  ),
5666
- (0, import_react10.createElement)(
6707
+ (0, import_react12.createElement)(
5667
6708
  "div",
5668
6709
  { className: "dsh-leader-agent-project-header-actions" },
5669
- (0, import_react10.createElement)(
6710
+ (0, import_react12.createElement)(
5670
6711
  "button",
5671
6712
  {
5672
6713
  type: "button",
@@ -5679,20 +6720,20 @@ function ProjectSection(props) {
5679
6720
  )
5680
6721
  )
5681
6722
  ),
5682
- layout.status === "" ? null : (0, import_react10.createElement)(
6723
+ layout.status === "" ? null : (0, import_react12.createElement)(
5683
6724
  "div",
5684
6725
  { className: "dsh-leader-agent-project-notice" },
5685
6726
  layout.status
5686
6727
  ),
5687
- layout.showEmpty ? (0, import_react10.createElement)(
6728
+ layout.showEmpty ? (0, import_react12.createElement)(
5688
6729
  "div",
5689
6730
  { className: "dsh-leader-agent-project-notice" },
5690
6731
  t("project.empty")
5691
6732
  ) : null,
5692
- layout.showList ? (0, import_react10.createElement)(
6733
+ layout.showList ? (0, import_react12.createElement)(
5693
6734
  "div",
5694
6735
  { className: "dsh-leader-agent-project-list" },
5695
- projects.map((project) => (0, import_react10.createElement)(ProjectRow, {
6736
+ projects.map((project) => (0, import_react12.createElement)(ProjectRow, {
5696
6737
  key: project.id,
5697
6738
  project,
5698
6739
  busy,
@@ -5723,11 +6764,11 @@ function ProjectSection(props) {
5723
6764
  ) : null,
5724
6765
  // 目录名当不了项目名时才出现:这时直接提交只会换回一条没有出口的报错——
5725
6766
  // 项目没建成,列表里就没有那一行,行上的「重命名」也不存在。
5726
- naming === null || naming === void 0 ? null : (0, import_react10.createElement)(
6767
+ naming === null || naming === void 0 ? null : (0, import_react12.createElement)(
5727
6768
  "div",
5728
6769
  { className: "dsh-leader-agent-project-draft" },
5729
- (0, import_react10.createElement)("div", { className: "dsh-leader-agent-project-draft-directory" }, naming.directory),
5730
- (0, import_react10.createElement)("input", {
6770
+ (0, import_react12.createElement)("div", { className: "dsh-leader-agent-project-draft-directory" }, naming.directory),
6771
+ (0, import_react12.createElement)("input", {
5731
6772
  type: "text",
5732
6773
  className: "dsh-leader-agent-project-rename",
5733
6774
  value: naming.name,
@@ -5738,21 +6779,21 @@ function ProjectSection(props) {
5738
6779
  if (event.key === "Escape") onCancelNaming();
5739
6780
  }
5740
6781
  }),
5741
- (0, import_react10.createElement)(
6782
+ (0, import_react12.createElement)(
5742
6783
  "div",
5743
6784
  { style: { display: "flex", gap: "4px" } },
5744
- (0, import_react10.createElement)(
6785
+ (0, import_react12.createElement)(
5745
6786
  "button",
5746
6787
  { type: "button", disabled: busy, className: "dsh-leader-agent-project-draft-action", onClick: onConfirmNaming },
5747
6788
  t("project.create")
5748
6789
  ),
5749
- (0, import_react10.createElement)(
6790
+ (0, import_react12.createElement)(
5750
6791
  "button",
5751
6792
  { type: "button", className: "dsh-leader-agent-project-draft-action", onClick: onCancelNaming },
5752
6793
  t("common.cancel")
5753
6794
  )
5754
6795
  ),
5755
- naming.error === "" || naming.error === void 0 ? null : (0, import_react10.createElement)("div", { className: "dsh-leader-agent-project-notice" }, naming.error)
6796
+ naming.error === "" || naming.error === void 0 ? null : (0, import_react12.createElement)("div", { className: "dsh-leader-agent-project-notice" }, naming.error)
5756
6797
  )
5757
6798
  );
5758
6799
  }
@@ -5786,15 +6827,15 @@ function ProjectRow(props) {
5786
6827
  onDragFinish,
5787
6828
  t
5788
6829
  } = props;
5789
- const [menuOpen, setMenuOpen] = (0, import_react10.useState)(false);
5790
- const [renaming, setRenaming] = (0, import_react10.useState)(false);
5791
- const [name, setName] = (0, import_react10.useState)(project.name);
5792
- const [renameError, setRenameError] = (0, import_react10.useState)("");
5793
- const [menuAnchor, setMenuAnchor] = (0, import_react10.useState)(null);
5794
- const moreRef = (0, import_react10.useRef)(null);
5795
- const leadRef = (0, import_react10.useRef)(null);
6830
+ const [menuOpen, setMenuOpen] = (0, import_react12.useState)(false);
6831
+ const [renaming, setRenaming] = (0, import_react12.useState)(false);
6832
+ const [name, setName] = (0, import_react12.useState)(project.name);
6833
+ const [renameError, setRenameError] = (0, import_react12.useState)("");
6834
+ const [menuAnchor, setMenuAnchor] = (0, import_react12.useState)(null);
6835
+ const moreRef = (0, import_react12.useRef)(null);
6836
+ const leadRef = (0, import_react12.useRef)(null);
5796
6837
  const openable = isProjectOpenable(project);
5797
- (0, import_react10.useEffect)(() => {
6838
+ (0, import_react12.useEffect)(() => {
5798
6839
  if (!menuOpen) return void 0;
5799
6840
  const onDismiss = () => setMenuOpen(false);
5800
6841
  const onKeyDown = (event) => {
@@ -5830,20 +6871,23 @@ function ProjectRow(props) {
5830
6871
  rows: childSessions,
5831
6872
  leaderRunning: isLeaderRunning(project, sessionRows, archivedSessionIds)
5832
6873
  });
5833
- const [watermark, setWatermark] = (0, import_react10.useState)(0);
6874
+ const [watermark, setWatermark] = (0, import_react12.useState)(0);
6875
+ (0, import_react12.useEffect)(() => {
6876
+ if (!expanded) setWatermark(0);
6877
+ }, [expanded]);
5834
6878
  const folded = foldSessions(childSessions, watermark, currentSessionId, t);
5835
6879
  const menuItems = buildProjectMenuItems(project, {
5836
6880
  onRename: () => setRenaming(true),
5837
6881
  onReplace,
5838
6882
  onRemove
5839
6883
  }, t);
5840
- return (0, import_react10.createElement)(
6884
+ return (0, import_react12.createElement)(
5841
6885
  "div",
5842
6886
  {
5843
6887
  className: "dsh-leader-agent-project-block",
5844
6888
  "data-drop": dropHalf
5845
6889
  },
5846
- (0, import_react10.createElement)(
6890
+ (0, import_react12.createElement)(
5847
6891
  "div",
5848
6892
  {
5849
6893
  className: "dsh-leader-agent-project-row",
@@ -5880,7 +6924,7 @@ function ProjectRow(props) {
5880
6924
  onOpen(project);
5881
6925
  }
5882
6926
  },
5883
- (0, import_react10.createElement)(
6927
+ (0, import_react12.createElement)(
5884
6928
  "button",
5885
6929
  {
5886
6930
  type: "button",
@@ -5893,12 +6937,12 @@ function ProjectRow(props) {
5893
6937
  onToggleExpand(project.id);
5894
6938
  }
5895
6939
  },
5896
- (0, import_react10.createElement)(
6940
+ (0, import_react12.createElement)(
5897
6941
  "span",
5898
6942
  { className: "dsh-leader-agent-project-lead-folder" },
5899
- leadActivity ? (0, import_react10.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : productIcon("apps-add-outline", { size: 16 })
6943
+ leadActivity ? (0, import_react12.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : productIcon("apps-add-outline", { size: 16 })
5900
6944
  ),
5901
- (0, import_react10.createElement)(
6945
+ (0, import_react12.createElement)(
5902
6946
  "span",
5903
6947
  {
5904
6948
  className: "dsh-leader-agent-project-lead-arrow",
@@ -5907,7 +6951,7 @@ function ProjectRow(props) {
5907
6951
  productIcon("triangle-right-fill", { size: 14 })
5908
6952
  )
5909
6953
  ),
5910
- renaming ? (0, import_react10.createElement)("input", {
6954
+ renaming ? (0, import_react12.createElement)("input", {
5911
6955
  type: "text",
5912
6956
  className: "dsh-leader-agent-project-rename",
5913
6957
  value: name,
@@ -5926,15 +6970,15 @@ function ProjectRow(props) {
5926
6970
  setRenaming(false);
5927
6971
  }
5928
6972
  }
5929
- }) : (0, import_react10.createElement)(
6973
+ }) : (0, import_react12.createElement)(
5930
6974
  "span",
5931
6975
  { className: "dsh-leader-agent-project-title" },
5932
6976
  project.name
5933
6977
  ),
5934
- (0, import_react10.createElement)(
6978
+ (0, import_react12.createElement)(
5935
6979
  "div",
5936
6980
  { className: "dsh-leader-agent-project-actions" },
5937
- openable ? null : (0, import_react10.createElement)(
6981
+ openable ? null : (0, import_react12.createElement)(
5938
6982
  "button",
5939
6983
  {
5940
6984
  type: "button",
@@ -5948,7 +6992,7 @@ function ProjectRow(props) {
5948
6992
  },
5949
6993
  productIcon("refresh-outline")
5950
6994
  ),
5951
- (0, import_react10.createElement)(
6995
+ (0, import_react12.createElement)(
5952
6996
  "button",
5953
6997
  {
5954
6998
  type: "button",
@@ -5973,20 +7017,20 @@ function ProjectRow(props) {
5973
7017
  )
5974
7018
  ),
5975
7019
  // 校验失败的原因跟着输入框留在行下:提示条五秒后消失,用户要照着它改。
5976
- renaming && renameError !== "" ? (0, import_react10.createElement)(
7020
+ renaming && renameError !== "" ? (0, import_react12.createElement)(
5977
7021
  "div",
5978
7022
  { className: "dsh-leader-agent-project-notice" },
5979
7023
  renameError
5980
7024
  ) : null,
5981
- expanded ? (0, import_react10.createElement)(
7025
+ expanded ? (0, import_react12.createElement)(
5982
7026
  "div",
5983
7027
  { className: "dsh-leader-agent-project-sessions" },
5984
- childSessions.length === 0 ? (0, import_react10.createElement)(
7028
+ childSessions.length === 0 ? (0, import_react12.createElement)(
5985
7029
  "div",
5986
7030
  { className: "dsh-leader-agent-project-notice" },
5987
7031
  t("project.noSessions")
5988
7032
  ) : [
5989
- ...folded.rows.map((row) => (0, import_react10.createElement)(SessionRow, {
7033
+ ...folded.rows.map((row) => (0, import_react12.createElement)(SessionRow, {
5990
7034
  key: row.id,
5991
7035
  row,
5992
7036
  selected: row.id === currentSessionId,
@@ -5995,7 +7039,7 @@ function ProjectRow(props) {
5995
7039
  busy,
5996
7040
  t
5997
7041
  })),
5998
- folded.hiddenCount === 0 && !folded.expanded ? null : (0, import_react10.createElement)(
7042
+ folded.hiddenCount === 0 && !folded.expanded ? null : (0, import_react12.createElement)(
5999
7043
  "button",
6000
7044
  {
6001
7045
  key: "overflow",
@@ -6018,7 +7062,7 @@ function ProjectRow(props) {
6018
7062
  ]
6019
7063
  ) : null,
6020
7064
  menuOpen && menuAnchor !== null ? (0, import_react_dom2.createPortal)(
6021
- (0, import_react10.createElement)(ProjectMenu, {
7065
+ (0, import_react12.createElement)(ProjectMenu, {
6022
7066
  anchor: menuAnchor,
6023
7067
  items: menuItems,
6024
7068
  onClose: () => setMenuOpen(false)
@@ -6029,14 +7073,14 @@ function ProjectRow(props) {
6029
7073
  }
6030
7074
  function ProjectMenu(props) {
6031
7075
  const { anchor, items, onClose } = props;
6032
- const ref = (0, import_react10.useRef)(null);
6033
- const [placement, setPlacement] = (0, import_react10.useState)({ left: anchor.left, top: anchor.bottom + 4 });
6034
- (0, import_react10.useLayoutEffect)(() => {
7076
+ const ref = (0, import_react12.useRef)(null);
7077
+ const [placement, setPlacement] = (0, import_react12.useState)({ left: anchor.left, top: anchor.bottom + 4 });
7078
+ (0, import_react12.useLayoutEffect)(() => {
6035
7079
  const height = ref.current?.offsetHeight ?? 0;
6036
7080
  const fitsBelow = anchor.bottom + 4 + height <= window.innerHeight - 12;
6037
7081
  setPlacement(fitsBelow ? { left: anchor.left, top: anchor.bottom + 4 } : { left: anchor.left, top: Math.max(12, anchor.top - height - 4) });
6038
7082
  }, [anchor]);
6039
- return (0, import_react10.createElement)(
7083
+ return (0, import_react12.createElement)(
6040
7084
  "div",
6041
7085
  {
6042
7086
  ref,
@@ -6046,7 +7090,7 @@ function ProjectMenu(props) {
6046
7090
  style: { left: `${placement.left}px`, top: `${placement.top}px` },
6047
7091
  onClick: (event) => event.stopPropagation()
6048
7092
  },
6049
- items.map((item) => (0, import_react10.createElement)(
7093
+ items.map((item) => (0, import_react12.createElement)(
6050
7094
  "button",
6051
7095
  {
6052
7096
  key: item.id,
@@ -6059,18 +7103,18 @@ function ProjectMenu(props) {
6059
7103
  item.onSelect();
6060
7104
  }
6061
7105
  },
6062
- item.icon === void 0 ? null : (0, import_react10.createElement)(
7106
+ item.icon === void 0 ? null : (0, import_react12.createElement)(
6063
7107
  "span",
6064
7108
  { className: "dsh-leader-agent-project-menu-icon" },
6065
7109
  productIcon(item.icon, { size: 14 })
6066
7110
  ),
6067
- (0, import_react10.createElement)("span", null, item.label)
7111
+ (0, import_react12.createElement)("span", null, item.label)
6068
7112
  ))
6069
7113
  );
6070
7114
  }
6071
7115
  function SessionRow(props) {
6072
7116
  const { row, selected, onOpenSession, onArchiveSession, busy, t } = props;
6073
- return (0, import_react10.createElement)(
7117
+ return (0, import_react12.createElement)(
6074
7118
  "div",
6075
7119
  {
6076
7120
  className: "dsh-leader-agent-session-row",
@@ -6081,20 +7125,20 @@ function SessionRow(props) {
6081
7125
  // 行没有官方那套悬停卡,完成状态拼进行标题里当唯一提示。
6082
7126
  title: `${row.displayTitle ?? row.title ?? row.id}${row.completed === true ? ` \xB7 ${t("project.completedUnread")}` : ""}`
6083
7127
  },
6084
- (0, import_react10.createElement)(
7128
+ (0, import_react12.createElement)(
6085
7129
  "span",
6086
7130
  { className: "dsh-leader-agent-session-status" },
6087
- row.running ? (0, import_react10.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : row.completed === true ? (0, import_react10.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "done" }) : null
7131
+ row.running ? (0, import_react12.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : row.completed === true ? (0, import_react12.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "done" }) : null
6088
7132
  ),
6089
- (0, import_react10.createElement)(
7133
+ (0, import_react12.createElement)(
6090
7134
  "span",
6091
7135
  { className: "dsh-leader-agent-session-title" },
6092
7136
  row.title ?? row.displayTitle ?? row.id
6093
7137
  ),
6094
- (0, import_react10.createElement)(
7138
+ (0, import_react12.createElement)(
6095
7139
  "div",
6096
7140
  { className: "dsh-leader-agent-session-actions" },
6097
- (0, import_react10.createElement)(
7141
+ (0, import_react12.createElement)(
6098
7142
  "button",
6099
7143
  {
6100
7144
  type: "button",
@@ -6163,9 +7207,9 @@ var HOLD_MS = 4e3;
6163
7207
  var FADE_MS = 1e3;
6164
7208
  var current = null;
6165
7209
  var sequence = 0;
6166
- var listeners2 = /* @__PURE__ */ new Set();
7210
+ var listeners3 = /* @__PURE__ */ new Set();
6167
7211
  function emit() {
6168
- for (const listener of listeners2) listener();
7212
+ for (const listener of listeners3) listener();
6169
7213
  }
6170
7214
  function showToast(text) {
6171
7215
  if (typeof text !== "string" || text === "") return;
@@ -6181,9 +7225,9 @@ function currentToast() {
6181
7225
  return current;
6182
7226
  }
6183
7227
  function subscribeToasts(listener) {
6184
- listeners2.add(listener);
7228
+ listeners3.add(listener);
6185
7229
  return () => {
6186
- listeners2.delete(listener);
7230
+ listeners3.delete(listener);
6187
7231
  };
6188
7232
  }
6189
7233
 
@@ -6473,25 +7517,35 @@ function createWorkspaceExclusion() {
6473
7517
  // src/client/project-panel.js
6474
7518
  var PROJECT_REFRESH_INTERVAL_MS = 5e3;
6475
7519
  function ProjectPanel(props) {
6476
- const { wide, callRemote, getUiWorkspace, getSessions, getWorkspaces, onWorkspacesReady, t } = props;
6477
- const [projects, setProjects] = (0, import_react11.useState)([]);
6478
- const [busy, setBusy] = (0, import_react11.useState)(false);
6479
- const [floating, setFloating] = (0, import_react11.useState)(false);
6480
- const [sessionsByProject, setSessionsByProject] = (0, import_react11.useState)(() => /* @__PURE__ */ new Map());
6481
- const [sessionRows, setSessionRows] = (0, import_react11.useState)({});
6482
- const [expandedProjects, setExpandedProjects] = (0, import_react11.useState)(() => /* @__PURE__ */ new Set());
6483
- const [listExpanded, setListExpanded] = (0, import_react11.useState)(true);
6484
- const [pendingDelete, setPendingDelete] = (0, import_react11.useState)(null);
6485
- const [deleteError, setDeleteError] = (0, import_react11.useState)("");
6486
- const [pendingArchive, setPendingArchive] = (0, import_react11.useState)(null);
6487
- const [archiveError, setArchiveError] = (0, import_react11.useState)("");
6488
- const [archivedSessionIds, setArchivedSessionIds] = (0, import_react11.useState)(() => /* @__PURE__ */ new Set());
6489
- const [currentSessionId, setCurrentSessionId] = (0, import_react11.useState)(void 0);
6490
- const [workspaceItems, setWorkspaceItems] = (0, import_react11.useState)([]);
6491
- const [naming, setNaming] = (0, import_react11.useState)(null);
6492
- const [reorderQueue] = (0, import_react11.useState)(() => createWriteQueue());
6493
- const projectsRef = (0, import_react11.useRef)([]);
6494
- const refresh = (0, import_react11.useCallback)(async () => {
7520
+ const {
7521
+ wide,
7522
+ callRemote,
7523
+ getUiWorkspace,
7524
+ getSessions,
7525
+ getWorkspaces,
7526
+ getLayout,
7527
+ onWorkspacesReady,
7528
+ t
7529
+ } = props;
7530
+ const [projects, setProjects] = (0, import_react13.useState)([]);
7531
+ const [busy, setBusy] = (0, import_react13.useState)(false);
7532
+ const [floating, setFloating] = (0, import_react13.useState)(false);
7533
+ const [sessionsByProject, setSessionsByProject] = (0, import_react13.useState)(() => /* @__PURE__ */ new Map());
7534
+ const [sessionRows, setSessionRows] = (0, import_react13.useState)({});
7535
+ const [expandedProjects, setExpandedProjects] = (0, import_react13.useState)(() => /* @__PURE__ */ new Set());
7536
+ const [listExpanded, setListExpanded] = (0, import_react13.useState)(true);
7537
+ const [pendingDelete, setPendingDelete] = (0, import_react13.useState)(null);
7538
+ const [deleteError, setDeleteError] = (0, import_react13.useState)("");
7539
+ const [pendingArchive, setPendingArchive] = (0, import_react13.useState)(null);
7540
+ const [archiveError, setArchiveError] = (0, import_react13.useState)("");
7541
+ const [archivedSessionIds, setArchivedSessionIds] = (0, import_react13.useState)(() => /* @__PURE__ */ new Set());
7542
+ const [currentSessionId, setCurrentSessionId] = (0, import_react13.useState)(void 0);
7543
+ const [activePanelId, setActivePanelId] = (0, import_react13.useState)(null);
7544
+ const [workspaceItems, setWorkspaceItems] = (0, import_react13.useState)([]);
7545
+ const [naming, setNaming] = (0, import_react13.useState)(null);
7546
+ const [reorderQueue] = (0, import_react13.useState)(() => createWriteQueue());
7547
+ const projectsRef = (0, import_react13.useRef)([]);
7548
+ const refresh = (0, import_react13.useCallback)(async () => {
6495
7549
  if (!isProjectRemoteReady()) return;
6496
7550
  try {
6497
7551
  const value = await callRemote("list", []);
@@ -6505,7 +7559,7 @@ function ProjectPanel(props) {
6505
7559
  showToast(projectRemoteErrorText(error, t, "project.error.read"));
6506
7560
  }
6507
7561
  }, [callRemote, t]);
6508
- const refreshSessionIndex = (0, import_react11.useCallback)(async () => {
7562
+ const refreshSessionIndex = (0, import_react13.useCallback)(async () => {
6509
7563
  if (!isProjectRemoteReady()) return;
6510
7564
  try {
6511
7565
  const value = await callRemote("sessionsByProject", []);
@@ -6519,7 +7573,7 @@ function ProjectPanel(props) {
6519
7573
  showToast(projectRemoteErrorText(error, t, "project.error.sessions"));
6520
7574
  }
6521
7575
  }, [callRemote, t]);
6522
- (0, import_react11.useEffect)(() => {
7576
+ (0, import_react13.useEffect)(() => {
6523
7577
  void refresh();
6524
7578
  void refreshSessionIndex();
6525
7579
  const onFocus = () => {
@@ -6529,17 +7583,17 @@ function ProjectPanel(props) {
6529
7583
  window.addEventListener("focus", onFocus);
6530
7584
  return () => window.removeEventListener("focus", onFocus);
6531
7585
  }, [refresh, refreshSessionIndex]);
6532
- const [, setChannelTick] = (0, import_react11.useState)(0);
6533
- (0, import_react11.useEffect)(() => onProjectRemoteReady(() => {
7586
+ const [, setChannelTick] = (0, import_react13.useState)(0);
7587
+ (0, import_react13.useEffect)(() => onProjectRemoteReady(() => {
6534
7588
  setChannelTick((tick) => tick + 1);
6535
7589
  void refresh();
6536
7590
  void refreshSessionIndex();
6537
7591
  }), [refresh, refreshSessionIndex]);
6538
- const sessionsRef = (0, import_react11.useRef)(getSessions);
7592
+ const sessionsRef = (0, import_react13.useRef)(getSessions);
6539
7593
  sessionsRef.current = getSessions;
6540
- const refreshIndexRef = (0, import_react11.useRef)(refreshSessionIndex);
7594
+ const refreshIndexRef = (0, import_react13.useRef)(refreshSessionIndex);
6541
7595
  refreshIndexRef.current = refreshSessionIndex;
6542
- (0, import_react11.useEffect)(() => {
7596
+ (0, import_react13.useEffect)(() => {
6543
7597
  const tick = () => {
6544
7598
  if (document.visibilityState === "visible") void refresh();
6545
7599
  };
@@ -6550,7 +7604,7 @@ function ProjectPanel(props) {
6550
7604
  document.removeEventListener("visibilitychange", tick);
6551
7605
  };
6552
7606
  }, [refresh]);
6553
- (0, import_react11.useEffect)(() => {
7607
+ (0, import_react13.useEffect)(() => {
6554
7608
  let pending = null;
6555
7609
  let unsubscribe = null;
6556
7610
  let lastCurrent;
@@ -6619,7 +7673,7 @@ function ProjectPanel(props) {
6619
7673
  if (pending !== null) clearTimeout(pending);
6620
7674
  };
6621
7675
  }, []);
6622
- (0, import_react11.useEffect)(() => {
7676
+ (0, import_react13.useEffect)(() => {
6623
7677
  let unsubscribe = null;
6624
7678
  const attach = () => {
6625
7679
  if (unsubscribe !== null) return;
@@ -6640,11 +7694,25 @@ function ProjectPanel(props) {
6640
7694
  unsubscribe?.();
6641
7695
  };
6642
7696
  }, [getWorkspaces, onWorkspacesReady]);
6643
- const excludedSessionIds = (0, import_react11.useMemo)(
7697
+ (0, import_react13.useEffect)(() => {
7698
+ const info = getLayout?.()?.panelInfo;
7699
+ if (info === void 0 || typeof info.subscribe !== "function" || typeof info.getSnapshot !== "function") {
7700
+ return void 0;
7701
+ }
7702
+ const sync = () => setActivePanelId(info.getSnapshot().activePanelId ?? null);
7703
+ sync();
7704
+ return info.subscribe(sync);
7705
+ }, [getLayout]);
7706
+ const panelActive = activePanelId !== null;
7707
+ const selectionSessionId = panelActive ? void 0 : currentSessionId;
7708
+ (0, import_react13.useEffect)(() => {
7709
+ if (activePanelId !== null) setFloating(false);
7710
+ }, [activePanelId]);
7711
+ const excludedSessionIds = (0, import_react13.useMemo)(
6644
7712
  () => collectExcludedSessionIds(projects, sessionsByProject),
6645
7713
  [projects, sessionsByProject]
6646
7714
  );
6647
- const excludedCountsByGroup = (0, import_react11.useMemo)(() => {
7715
+ const excludedCountsByGroup = (0, import_react13.useMemo)(() => {
6648
7716
  const counts = excludedSessionCountsByWorkspace({
6649
7717
  workspaceItems,
6650
7718
  excluded: excludedSessionIds,
@@ -6655,18 +7723,18 @@ function ProjectPanel(props) {
6655
7723
  workspaceItems,
6656
7724
  excluded: excludedSessionIds,
6657
7725
  archivedSessionIds,
6658
- currentSessionId
7726
+ currentSessionId: selectionSessionId
6659
7727
  });
6660
7728
  if (ungrouped > 0) counts.set("", ungrouped);
6661
7729
  return counts;
6662
- }, [workspaceItems, excludedSessionIds, archivedSessionIds, sessionRows, currentSessionId]);
6663
- const hideUngrouped = (0, import_react11.useMemo)(() => shouldHideUngroupedHeader({
7730
+ }, [workspaceItems, excludedSessionIds, archivedSessionIds, sessionRows, selectionSessionId]);
7731
+ const hideUngrouped = (0, import_react13.useMemo)(() => shouldHideUngroupedHeader({
6664
7732
  sessionRows,
6665
7733
  workspaceItems,
6666
7734
  excluded: excludedSessionIds,
6667
7735
  archivedSessionIds
6668
7736
  }), [sessionRows, workspaceItems, excludedSessionIds, archivedSessionIds]);
6669
- (0, import_react11.useEffect)(() => {
7737
+ (0, import_react13.useEffect)(() => {
6670
7738
  const exclusion = createWorkspaceExclusion();
6671
7739
  exclusion.update({
6672
7740
  sessionIds: excludedSessionIds,
@@ -6675,7 +7743,7 @@ function ProjectPanel(props) {
6675
7743
  });
6676
7744
  return () => exclusion.dispose();
6677
7745
  }, [excludedSessionIds, excludedCountsByGroup, hideUngrouped]);
6678
- const startAdd = (0, import_react11.useCallback)(async () => {
7746
+ const startAdd = (0, import_react13.useCallback)(async () => {
6679
7747
  if (busy) return;
6680
7748
  setNaming(null);
6681
7749
  const uiWorkspace = getUiWorkspace?.();
@@ -6701,7 +7769,7 @@ function ProjectPanel(props) {
6701
7769
  setBusy(false);
6702
7770
  }
6703
7771
  }, [busy, callRemote, getUiWorkspace, refresh, t]);
6704
- const confirmNaming = (0, import_react11.useCallback)(async () => {
7772
+ const confirmNaming = (0, import_react13.useCallback)(async () => {
6705
7773
  if (busy || naming === null) return;
6706
7774
  const check = validateProjectName(naming.name, t);
6707
7775
  if (!check.ok) {
@@ -6721,13 +7789,13 @@ function ProjectPanel(props) {
6721
7789
  setBusy(false);
6722
7790
  }
6723
7791
  }, [busy, callRemote, naming, refresh, t]);
6724
- const cancelNaming = (0, import_react11.useCallback)(() => {
7792
+ const cancelNaming = (0, import_react13.useCallback)(() => {
6725
7793
  setNaming(null);
6726
7794
  }, []);
6727
- const onNamingChange = (0, import_react11.useCallback)((value) => {
7795
+ const onNamingChange = (0, import_react13.useCallback)((value) => {
6728
7796
  setNaming((current2) => current2 === null ? null : { ...current2, name: value, error: "" });
6729
7797
  }, []);
6730
- const openProject = (0, import_react11.useCallback)(async (project) => {
7798
+ const openProject = (0, import_react13.useCallback)(async (project) => {
6731
7799
  if (!isProjectOpenable(project)) {
6732
7800
  showToast(t("project.leaderDeleted", { name: project.name }));
6733
7801
  return;
@@ -6744,7 +7812,7 @@ function ProjectPanel(props) {
6744
7812
  });
6745
7813
  if (result.ok !== true) showToast(result.message);
6746
7814
  }, [getUiWorkspace, t]);
6747
- const renameProject = (0, import_react11.useCallback)(async (project, name) => {
7815
+ const renameProject = (0, import_react13.useCallback)(async (project, name) => {
6748
7816
  if (busy) return;
6749
7817
  const check = validateProjectName(name, t);
6750
7818
  if (!check.ok) {
@@ -6761,7 +7829,7 @@ function ProjectPanel(props) {
6761
7829
  setBusy(false);
6762
7830
  }
6763
7831
  }, [busy, callRemote, refresh, t]);
6764
- const reorderProject = (0, import_react11.useCallback)((projectId, beforeId) => {
7832
+ const reorderProject = (0, import_react13.useCallback)((projectId, beforeId) => {
6765
7833
  setProjects((current2) => moveProjectBefore(current2, projectId, beforeId));
6766
7834
  return reorderQueue.push(async (isLatest) => {
6767
7835
  try {
@@ -6772,7 +7840,7 @@ function ProjectPanel(props) {
6772
7840
  if (isLatest()) await refresh();
6773
7841
  });
6774
7842
  }, [callRemote, refresh, reorderQueue, t]);
6775
- const replaceLeader = (0, import_react11.useCallback)(async (project) => {
7843
+ const replaceLeader = (0, import_react13.useCallback)(async (project) => {
6776
7844
  if (busy) return;
6777
7845
  setBusy(true);
6778
7846
  try {
@@ -6790,15 +7858,15 @@ function ProjectPanel(props) {
6790
7858
  setBusy(false);
6791
7859
  }
6792
7860
  }, [busy, callRemote, getUiWorkspace, refresh, t]);
6793
- const requestDelete = (0, import_react11.useCallback)((project) => {
7861
+ const requestDelete = (0, import_react13.useCallback)((project) => {
6794
7862
  setDeleteError("");
6795
7863
  setPendingDelete(project);
6796
7864
  }, []);
6797
- const cancelDelete = (0, import_react11.useCallback)(() => {
7865
+ const cancelDelete = (0, import_react13.useCallback)(() => {
6798
7866
  setDeleteError("");
6799
7867
  setPendingDelete(null);
6800
7868
  }, []);
6801
- const confirmDelete = (0, import_react11.useCallback)(async () => {
7869
+ const confirmDelete = (0, import_react13.useCallback)(async () => {
6802
7870
  if (busy || pendingDelete === null) return;
6803
7871
  const project = pendingDelete;
6804
7872
  setBusy(true);
@@ -6819,7 +7887,7 @@ function ProjectPanel(props) {
6819
7887
  setBusy(false);
6820
7888
  }
6821
7889
  }, [busy, callRemote, pendingDelete, refresh, t]);
6822
- const archiveSession = (0, import_react11.useCallback)(async (sessionId, { stopActivity = false } = {}) => {
7890
+ const archiveSession = (0, import_react13.useCallback)(async (sessionId, { stopActivity = false } = {}) => {
6823
7891
  const workspaces = getWorkspaces?.();
6824
7892
  if (workspaces?.archiveSession === void 0) {
6825
7893
  showToast(t("project.error.workspaces"));
@@ -6850,15 +7918,15 @@ function ProjectPanel(props) {
6850
7918
  setBusy(false);
6851
7919
  }
6852
7920
  }, [callRemote, getWorkspaces, refreshSessionIndex, t]);
6853
- const confirmArchive = (0, import_react11.useCallback)(async () => {
7921
+ const confirmArchive = (0, import_react13.useCallback)(async () => {
6854
7922
  if (busy || pendingArchive === null) return;
6855
7923
  await archiveSession(pendingArchive.sessionId, { stopActivity: true });
6856
7924
  }, [archiveSession, busy, pendingArchive]);
6857
- const cancelArchive = (0, import_react11.useCallback)(() => {
7925
+ const cancelArchive = (0, import_react13.useCallback)(() => {
6858
7926
  setArchiveError("");
6859
7927
  setPendingArchive(null);
6860
7928
  }, []);
6861
- const body = (0, import_react11.createElement)(ProjectSection, {
7929
+ const body = (0, import_react13.createElement)(ProjectSection, {
6862
7930
  t,
6863
7931
  projects,
6864
7932
  busy,
@@ -6908,9 +7976,9 @@ function ProjectPanel(props) {
6908
7976
  void archiveSession(sessionId);
6909
7977
  },
6910
7978
  archivedSessionIds,
6911
- currentSessionId
7979
+ currentSessionId: selectionSessionId
6912
7980
  });
6913
- const dialog = (0, import_react11.createElement)(ConfirmDialog, {
7981
+ const dialog = (0, import_react13.createElement)(ConfirmDialog, {
6914
7982
  open: pendingDelete !== null,
6915
7983
  title: t("project.remove.title"),
6916
7984
  description: pendingDelete === null ? "" : describeProjectRemoval(pendingDelete, t),
@@ -6924,7 +7992,7 @@ function ProjectPanel(props) {
6924
7992
  },
6925
7993
  onCancel: cancelDelete
6926
7994
  });
6927
- const archiveDialog = (0, import_react11.createElement)(ConfirmDialog, {
7995
+ const archiveDialog = (0, import_react13.createElement)(ConfirmDialog, {
6928
7996
  open: pendingArchive !== null,
6929
7997
  title: t("project.archive.title"),
6930
7998
  description: t("project.archive.description"),
@@ -6939,15 +8007,16 @@ function ProjectPanel(props) {
6939
8007
  onCancel: cancelArchive
6940
8008
  });
6941
8009
  if (!wide) {
6942
- return (0, import_react11.createElement)(
8010
+ return (0, import_react13.createElement)(
6943
8011
  "div",
6944
8012
  { style: { position: "relative" } },
6945
- (0, import_react11.createElement)(
8013
+ (0, import_react13.createElement)(
6946
8014
  "button",
6947
8015
  {
6948
8016
  type: "button",
6949
8017
  title: t("project.label"),
6950
8018
  "aria-label": t("project.label"),
8019
+ "aria-expanded": floating ? "true" : "false",
6951
8020
  onClick: () => setFloating((value) => !value),
6952
8021
  style: {
6953
8022
  width: "100%",
@@ -6964,7 +8033,7 @@ function ProjectPanel(props) {
6964
8033
  },
6965
8034
  productIcon("workspace-tree-outline")
6966
8035
  ),
6967
- floating ? (0, import_react11.createElement)(
8036
+ floating ? (0, import_react13.createElement)(
6968
8037
  "div",
6969
8038
  {
6970
8039
  style: {
@@ -6988,10 +8057,10 @@ function ProjectPanel(props) {
6988
8057
  archiveDialog
6989
8058
  );
6990
8059
  }
6991
- return (0, import_react11.createElement)(
6992
- import_react11.Fragment,
8060
+ return (0, import_react13.createElement)(
8061
+ import_react13.Fragment,
6993
8062
  null,
6994
- (0, import_react11.createElement)(SidebarPlacement, null, body),
8063
+ (0, import_react13.createElement)(SidebarPlacement, null, body),
6995
8064
  dialog,
6996
8065
  archiveDialog
6997
8066
  );
@@ -7013,9 +8082,9 @@ function placementSpot(root, nav) {
7013
8082
  return { parent: region, before: region.firstElementChild };
7014
8083
  }
7015
8084
  function SidebarPlacement(props) {
7016
- const anchorRef = (0, import_react11.useRef)(null);
7017
- const [container, setContainer] = (0, import_react11.useState)(null);
7018
- (0, import_react11.useEffect)(() => {
8085
+ const anchorRef = (0, import_react13.useRef)(null);
8086
+ const [container, setContainer] = (0, import_react13.useState)(null);
8087
+ (0, import_react13.useEffect)(() => {
7019
8088
  const anchor = anchorRef.current;
7020
8089
  if (anchor === null) return void 0;
7021
8090
  const root = findSidebarRoot(anchor);
@@ -7034,7 +8103,7 @@ function SidebarPlacement(props) {
7034
8103
  setContainer(null);
7035
8104
  };
7036
8105
  }, []);
7037
- return (0, import_react11.createElement)(
8106
+ return (0, import_react13.createElement)(
7038
8107
  "div",
7039
8108
  // 锚点自身不参与布局:内容移到宿主容器后,锚点只剩一个定位点;宿主结构变了
7040
8109
  // 导致没移成时,内容就落回这个锚点里,仍然可见。
@@ -7045,51 +8114,7 @@ function SidebarPlacement(props) {
7045
8114
 
7046
8115
  // src/client/guide-card.js
7047
8116
  var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
7048
- var import_react12 = require("react");
7049
-
7050
- // src/client/guide-card-logic.js
7051
- var GUIDE_DISMISS_PREFIX = "dsh-leader-agent.guide.dismissed.";
7052
- function guideDismissKey(sessionId) {
7053
- return `${GUIDE_DISMISS_PREFIX}${sessionId}`;
7054
- }
7055
- function shouldShowGuide({ isLeader, blank, dismissed }) {
7056
- return isLeader === true && blank === true && dismissed !== true;
7057
- }
7058
- function readLocalStorage(scope) {
7059
- try {
7060
- return scope?.localStorage;
7061
- } catch {
7062
- return void 0;
7063
- }
7064
- }
7065
- function sendIntroPrompt(inputActions, prompt) {
7066
- if (!canSendIntro(inputActions)) return false;
7067
- inputActions.setDraft(prompt);
7068
- inputActions.submit();
7069
- return true;
7070
- }
7071
- function canSendIntro(inputActions) {
7072
- return typeof inputActions?.setDraft === "function" && typeof inputActions?.submit === "function";
7073
- }
7074
- function createGuideDismissal(storage) {
7075
- return {
7076
- isDismissed: (sessionId) => {
7077
- if (typeof sessionId !== "string" || sessionId === "") return false;
7078
- try {
7079
- return storage?.getItem?.(guideDismissKey(sessionId)) === "1";
7080
- } catch {
7081
- return false;
7082
- }
7083
- },
7084
- dismiss: (sessionId) => {
7085
- if (typeof sessionId !== "string" || sessionId === "") return;
7086
- try {
7087
- storage?.setItem?.(guideDismissKey(sessionId), "1");
7088
- } catch {
7089
- }
7090
- }
7091
- };
7092
- }
8117
+ var import_react14 = require("react");
7093
8118
 
7094
8119
  // src/client/leader-view-logic.js
7095
8120
  var LEADER_VIEW_TARGET = "dsh-leader-agent";
@@ -7108,7 +8133,7 @@ function createLeaderViewDefinition() {
7108
8133
  }
7109
8134
  function createLeaderSessionIndex() {
7110
8135
  let ids = /* @__PURE__ */ new Set();
7111
- const listeners3 = /* @__PURE__ */ new Set();
8136
+ const listeners4 = /* @__PURE__ */ new Set();
7112
8137
  return {
7113
8138
  /** @returns {Set<string>} 当前已知的 leader 会话 id */
7114
8139
  getSnapshot: () => ids,
@@ -7118,10 +8143,10 @@ function createLeaderSessionIndex() {
7118
8143
  * @returns {() => void} 退订函数
7119
8144
  */
7120
8145
  subscribe: (listener) => {
7121
- listeners3.add(listener);
8146
+ listeners4.add(listener);
7122
8147
  listener(ids);
7123
8148
  return () => {
7124
- listeners3.delete(listener);
8149
+ listeners4.delete(listener);
7125
8150
  };
7126
8151
  },
7127
8152
  /**
@@ -7133,7 +8158,7 @@ function createLeaderSessionIndex() {
7133
8158
  const nextIds = new Set(next);
7134
8159
  if (nextIds.size === ids.size && [...nextIds].every((id) => ids.has(id))) return;
7135
8160
  ids = nextIds;
7136
- for (const listener of Array.from(listeners3)) listener(ids);
8161
+ for (const listener of Array.from(listeners4)) listener(ids);
7137
8162
  }
7138
8163
  };
7139
8164
  }
@@ -7193,39 +8218,39 @@ function dismissal() {
7193
8218
  }
7194
8219
  function GuideCardEntry(props) {
7195
8220
  const { sessionId, session, inputActions, t } = props;
7196
- const [isLeader, setIsLeader] = (0, import_react12.useState)(() => leaderSessionIndex.getSnapshot().has(sessionId));
7197
- const [dismissed, setDismissed] = (0, import_react12.useState)(() => dismissal().isDismissed(sessionId));
7198
- (0, import_react12.useEffect)(() => leaderSessionIndex.subscribe((ids) => {
8221
+ const [isLeader, setIsLeader] = (0, import_react14.useState)(() => leaderSessionIndex.getSnapshot().has(sessionId));
8222
+ const [dismissed, setDismissed] = (0, import_react14.useState)(() => dismissal().isDismissed(sessionId));
8223
+ (0, import_react14.useEffect)(() => leaderSessionIndex.subscribe((ids) => {
7199
8224
  setIsLeader(ids.has(sessionId));
7200
8225
  }), [sessionId]);
7201
- (0, import_react12.useEffect)(() => {
8226
+ (0, import_react14.useEffect)(() => {
7202
8227
  setDismissed(dismissal().isDismissed(sessionId));
7203
8228
  }, [sessionId]);
7204
- (0, import_react12.useEffect)(() => ensureBoardStyles(), []);
8229
+ (0, import_react14.useEffect)(() => ensureBoardStyles(), []);
7205
8230
  if (!shouldShowGuide({ isLeader, blank: session?.blank === true, dismissed })) return null;
7206
- return (0, import_react12.createElement)(
8231
+ return (0, import_react14.createElement)(
7207
8232
  "div",
7208
8233
  { className: "dsh-leader-agent-guide-card" },
7209
- (0, import_react12.createElement)("span", { className: "dsh-leader-agent-guide-icon" }, productIcon("checklist-outline", { size: 16 })),
7210
- (0, import_react12.createElement)(
8234
+ (0, import_react14.createElement)("span", { className: "dsh-leader-agent-guide-icon" }, productIcon("checklist-outline", { size: 16 })),
8235
+ (0, import_react14.createElement)(
7211
8236
  "div",
7212
8237
  { className: "dsh-leader-agent-guide-body" },
7213
- (0, import_react12.createElement)("div", { className: "dsh-leader-agent-guide-title" }, t("guide.title")),
7214
- (0, import_react12.createElement)("div", { className: "dsh-leader-agent-guide-steps" }, t("guide.steps"))
8238
+ (0, import_react14.createElement)("div", { className: "dsh-leader-agent-guide-title" }, t("guide.title")),
8239
+ (0, import_react14.createElement)("div", { className: "dsh-leader-agent-guide-steps" }, t("guide.steps"))
7215
8240
  ),
7216
- (0, import_react12.createElement)(
8241
+ (0, import_react14.createElement)(
7217
8242
  "div",
7218
8243
  { className: "dsh-leader-agent-guide-actions" },
7219
8244
  // 与 sendIntroPrompt 共用同一个判定:只差一半能力时(比如有 submit 没有
7220
8245
  // setDraft)宁可不画,也不留一个点了没反应的按钮。
7221
- canSendIntro(inputActions) === false ? null : (0, import_react12.createElement)(import_dsh_client_ui_primitives3.Button, {
8246
+ canSendIntro(inputActions) === false ? null : (0, import_react14.createElement)(import_dsh_client_ui_primitives3.Button, {
7222
8247
  size: "sm",
7223
8248
  variant: "outline",
7224
8249
  onClick: () => {
7225
8250
  sendIntroPrompt(inputActions, t("guide.intro.prompt"));
7226
8251
  }
7227
8252
  }, t("guide.action.intro")),
7228
- (0, import_react12.createElement)(import_dsh_client_ui_primitives3.Button, {
8253
+ (0, import_react14.createElement)(import_dsh_client_ui_primitives3.Button, {
7229
8254
  size: "sm",
7230
8255
  variant: "ghost",
7231
8256
  onClick: () => {
@@ -7246,7 +8271,7 @@ function mountGuideCard(ctx) {
7246
8271
  }
7247
8272
 
7248
8273
  // src/client/leader-changes-anchor.js
7249
- var import_react13 = require("react");
8274
+ var import_react15 = require("react");
7250
8275
 
7251
8276
  // src/client/main-panel.js
7252
8277
  function findMainPanel() {
@@ -7349,22 +8374,22 @@ function watchLeaderChanges(hide, {
7349
8374
  // src/client/leader-changes-anchor.js
7350
8375
  function LeaderChangesAnchor({ getSessions }) {
7351
8376
  const sessions = getSessions?.();
7352
- const [snapshot, setSnapshot] = (0, import_react13.useState)(() => sessions?.list?.getSnapshot?.() ?? {
8377
+ const [snapshot, setSnapshot] = (0, import_react15.useState)(() => sessions?.list?.getSnapshot?.() ?? {
7353
8378
  phase: "pending",
7354
8379
  ids: [],
7355
8380
  byId: {}
7356
8381
  });
7357
- const [leaderIds, setLeaderIds] = (0, import_react13.useState)(() => leaderSessionIndex.getSnapshot());
7358
- (0, import_react13.useEffect)(() => {
8382
+ const [leaderIds, setLeaderIds] = (0, import_react15.useState)(() => leaderSessionIndex.getSnapshot());
8383
+ (0, import_react15.useEffect)(() => {
7359
8384
  if (typeof sessions?.list?.subscribe !== "function") return void 0;
7360
8385
  const sync = () => setSnapshot(sessions.list.getSnapshot());
7361
8386
  sync();
7362
8387
  return sessions.list.subscribe(sync);
7363
8388
  }, [sessions]);
7364
- (0, import_react13.useEffect)(() => leaderSessionIndex.subscribe(setLeaderIds), []);
8389
+ (0, import_react15.useEffect)(() => leaderSessionIndex.subscribe(setLeaderIds), []);
7365
8390
  const currentSessionId = currentSessionIdOf(snapshot.byId);
7366
8391
  const hide = isLeaderSession(leaderIds, currentSessionId);
7367
- (0, import_react13.useEffect)(() => {
8392
+ (0, import_react15.useEffect)(() => {
7368
8393
  ensureLeaderChangesStyles();
7369
8394
  return watchLeaderChanges(hide);
7370
8395
  }, [hide]);
@@ -7372,10 +8397,10 @@ function LeaderChangesAnchor({ getSessions }) {
7372
8397
  }
7373
8398
 
7374
8399
  // src/client/leader-view.js
7375
- var import_react14 = require("react");
8400
+ var import_react16 = require("react");
7376
8401
  function LeaderViewEntry(props) {
7377
8402
  const { sessionId, getUiConversation } = props;
7378
- (0, import_react14.useLayoutEffect)(() => leaderSessionIndex.subscribe((ids) => {
8403
+ (0, import_react16.useLayoutEffect)(() => leaderSessionIndex.subscribe((ids) => {
7379
8404
  if (!ids.has(sessionId)) return;
7380
8405
  activateLeaderView(getUiConversation?.(), sessionId);
7381
8406
  }), [getUiConversation, sessionId]);
@@ -7401,7 +8426,7 @@ function mountLeaderView(ctx) {
7401
8426
 
7402
8427
  // src/client/ready-signal.js
7403
8428
  function createReadySignal() {
7404
- const listeners3 = /* @__PURE__ */ new Set();
8429
+ const listeners4 = /* @__PURE__ */ new Set();
7405
8430
  let ready2 = false;
7406
8431
  const notify = (listener) => {
7407
8432
  try {
@@ -7415,7 +8440,7 @@ function createReadySignal() {
7415
8440
  mark() {
7416
8441
  if (ready2) return;
7417
8442
  ready2 = true;
7418
- for (const listener of Array.from(listeners3)) notify(listener);
8443
+ for (const listener of Array.from(listeners4)) notify(listener);
7419
8444
  },
7420
8445
  /**
7421
8446
  * 订阅就绪。已就绪时用微任务补一次通知——调用方通常在同步代码里先判空再订阅,
@@ -7432,18 +8457,18 @@ function createReadySignal() {
7432
8457
  if (!active) return;
7433
8458
  notify(listener);
7434
8459
  };
7435
- listeners3.add(run);
8460
+ listeners4.add(run);
7436
8461
  if (ready2) queueMicrotask(run);
7437
8462
  return () => {
7438
8463
  active = false;
7439
- listeners3.delete(run);
8464
+ listeners4.delete(run);
7440
8465
  };
7441
8466
  }
7442
8467
  };
7443
8468
  }
7444
8469
 
7445
8470
  // src/client/session-tabs.js
7446
- var import_react15 = require("react");
8471
+ var import_react17 = require("react");
7447
8472
  var import_react_dom4 = require("react-dom");
7448
8473
 
7449
8474
  // src/client/session-tabs-logic.js
@@ -7649,20 +8674,30 @@ var STYLE_TEXT6 = `
7649
8674
  display: flex;
7650
8675
  align-items: center;
7651
8676
  gap: 4px;
7652
- height: 38px;
8677
+ height: 48px;
7653
8678
  min-width: 0;
7654
8679
  box-sizing: border-box;
7655
- padding-block: 0;
8680
+ /* \u5BBF\u4E3B\u53F3\u680F\u9876\u884C\u662F 28px \u5185\u5BB9\u5E26 + 10px \u4E0A\u7559\u767D\uFF0C\u4E0B\u65B9\u6CA1\u6709\u5206\u5272\u7EBF\u3002\u6807\u7B7E\u680F\u5185\u5BB9
8681
+ \u4E0E\u5B83\u538B\u5728\u540C\u4E00\u6761\u5E26\u4E0A\uFF0810px \u4E0A\u7559\u767D\uFF09\uFF0C\u518D\u8865 10px \u4E0B\u7559\u767D\uFF1A\u8BA9\u5E95\u90E8\u5206\u9694\u7EBF\u843D\u5728
8682
+ chip \u4E0B\u65B9\uFF0C\u800C\u4E0D\u662F\u7D27\u8D34 chip \u4E0B\u6CBF\u3002 */
8683
+ padding-block: 10px;
7656
8684
  padding-inline-start: max(20px, var(--dsh-frame-leading-clearance, 0px));
7657
8685
  /* \u53F3\u4FA7\u53EA\u7559\u53F3\u680F\u5F00\u5173\uFF1A\u5B83\u88AB\u9489\u5230\u6807\u7B7E\u680F\u8FD9\u4E00\u884C\uFF08\u89C1\u4E0B\uFF09\uFF0C\u6807\u7B7E\u6EDA\u52A8\u533A\u5FC5\u987B\u5728\u5B83
7658
8686
  \u5DE6\u8FB9\u7ED3\u675F\uFF0C\u5426\u5219\u957F\u6807\u7B7E\u4F1A\u94BB\u5230\u6309\u94AE\u4E0B\u9762\u3002\u4F1A\u8BDD\u300C\u66F4\u591A\u300D\u662F\u672C\u63D2\u4EF6\u81EA\u5DF1\u6E32\u67D3\u7684
7659
8687
  flex \u5B50\u9879\uFF0C\u4E0D\u5360\u8FD9\u6BB5\u7559\u767D\u3002 */
7660
8688
  padding-inline-end: 42px;
7661
8689
  background: var(--dsw-alias-bg-base);
7662
- border-bottom: .5px solid var(--dsw-alias-border-l3);
8690
+ /* \u5206\u9694\u7EBF\u753B\u6210 inset shadow\uFF1Aborder \u4F1A\u5360\u6389 border-box \u7684 0.5px\uFF0C\u5185\u5BB9\u5E26\u5C31
8691
+ \u51D1\u4E0D\u6EE1 28px\uFF0C\u4E0E\u53F3\u680F\u6761\u5E26\u5BF9\u4E0D\u9F50\u3002 */
8692
+ box-shadow: inset 0 -0.5px 0 var(--dsw-alias-border-l3);
7663
8693
  -webkit-app-region: drag;
7664
8694
  overflow: hidden;
7665
8695
  }
8696
+ /* \u53F3\u680F\u5C55\u5F00\u540E\u6536\u8D77\u6309\u94AE\u5728\u9762\u677F\u81EA\u5DF1\u7684\u9876\u6761\u91CC\uFF0C\u4E3B\u5217\u53F3\u7F18\u4E0D\u518D\u6709\u5F00\u5173\uFF1B42px \u7684\u5F00\u5173
8697
+ \u7559\u767D\u6B64\u65F6\u53EA\u5269\u7A7A\u6863\uFF0C\u628A\u300C\u66F4\u591A\u300D\u6536\u56DE\u5230 6px \u8FB9\u8DDD\uFF0C\u4E0E\u5F39\u51FA\u65F6\u540C\u4E00\u5217\u3002 */
8698
+ body:has([data-sidebar-right-session]:not([hidden]) [data-sidebar-right-open]) .dsh-leader-agent-tabs {
8699
+ padding-inline-end: 6px;
8700
+ }
7666
8701
  /* \u53F3\u680F\u5F00\u5173\u672C\u6765\u5728\u4F1A\u8BDD\u5934\u7684\u6807\u9898\u884C\uFF08\u6807\u7B7E\u680F\u4E0B\u4E00\u884C\uFF09\u3002\u6536\u8D77\u53F3\u680F\u65F6\u5B83\u5728\u4E0B\u9762\uFF0C
7667
8702
  \u5C55\u5F00\u540E\u5BBF\u4E3B\u628A\u9762\u677F\u7684\u6536\u8D77\u6309\u94AE\u753B\u5728\u9762\u677F\u81EA\u5DF1\u7684\u9876\u90E8\u6761\uFF08\u6807\u7B7E\u680F\u8FD9\u4E00\u884C\uFF09\u2014\u2014
7668
8703
  \u540C\u4E00\u4E2A\u5F00\u5173\u4F1A\u4E0A\u4E0B\u8DF3\u4E00\u884C\u3002\u8FD9\u91CC\u628A\u5F00\u5173\u9489\u5230\u6807\u7B7E\u680F\u8FD9\u4E00\u884C\uFF1A\u6536\u8D77\u65F6\u5B83\u5728
@@ -7817,15 +8852,15 @@ function ensureStyles4() {
7817
8852
  document.head.append(style);
7818
8853
  }
7819
8854
  function SessionTabsAnchor(props) {
7820
- const [host, setHost] = (0, import_react15.useState)(null);
7821
- const visibleRef = (0, import_react15.useRef)(false);
7822
- const applyRef = (0, import_react15.useRef)(null);
7823
- const reportVisible = (0, import_react15.useCallback)((next) => {
8855
+ const [host, setHost] = (0, import_react17.useState)(null);
8856
+ const visibleRef = (0, import_react17.useRef)(false);
8857
+ const applyRef = (0, import_react17.useRef)(null);
8858
+ const reportVisible = (0, import_react17.useCallback)((next) => {
7824
8859
  if (visibleRef.current === next) return;
7825
8860
  visibleRef.current = next;
7826
8861
  applyRef.current?.();
7827
8862
  }, []);
7828
- (0, import_react15.useEffect)(() => {
8863
+ (0, import_react17.useEffect)(() => {
7829
8864
  ensureStyles4();
7830
8865
  const created = document.createElement("div");
7831
8866
  created.setAttribute("data-dsh-leader-agent-session-tabs", "");
@@ -7893,27 +8928,27 @@ function SessionTabsAnchor(props) {
7893
8928
  document.getElementById(STYLE_ID6)?.remove();
7894
8929
  };
7895
8930
  }, []);
7896
- return host === null ? null : (0, import_react_dom4.createPortal)((0, import_react15.createElement)(SessionTabBar, { ...props, reportVisible }), host);
8931
+ return host === null ? null : (0, import_react_dom4.createPortal)((0, import_react17.createElement)(SessionTabBar, { ...props, reportVisible }), host);
7897
8932
  }
7898
8933
  function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout, getSidebarRight, getContextMenus, reportVisible }) {
7899
8934
  const sessions = getSessions?.();
7900
8935
  const menus = getContextMenus?.() ?? null;
7901
8936
  const hasMenu = hasSessionMenu(menus);
7902
- const [snapshot, setSnapshot] = (0, import_react15.useState)(() => sessions?.list?.getSnapshot?.() ?? {
8937
+ const [snapshot, setSnapshot] = (0, import_react17.useState)(() => sessions?.list?.getSnapshot?.() ?? {
7903
8938
  phase: "pending",
7904
8939
  ids: [],
7905
8940
  byId: {}
7906
8941
  });
7907
- const [completed, setCompleted] = (0, import_react15.useState)(() => /* @__PURE__ */ new Set());
7908
- const [projects, setProjects] = (0, import_react15.useState)([]);
7909
- const [groups, setGroups] = (0, import_react15.useState)([]);
7910
- const [store, setStore] = (0, import_react15.useState)(readStore);
7911
- const [panelActive, setPanelActive] = (0, import_react15.useState)(false);
7912
- const [menuOpen, setMenuOpen] = (0, import_react15.useState)(false);
7913
- const lastCurrent = (0, import_react15.useRef)(void 0);
7914
- const tabRefs = (0, import_react15.useRef)(/* @__PURE__ */ new Map());
7915
- const pendingFocus = (0, import_react15.useRef)(void 0);
7916
- const refresh = (0, import_react15.useCallback)(async () => {
8942
+ const [completed, setCompleted] = (0, import_react17.useState)(() => /* @__PURE__ */ new Set());
8943
+ const [projects, setProjects] = (0, import_react17.useState)([]);
8944
+ const [groups, setGroups] = (0, import_react17.useState)([]);
8945
+ const [store, setStore] = (0, import_react17.useState)(readStore);
8946
+ const [panelActive, setPanelActive] = (0, import_react17.useState)(false);
8947
+ const [menuOpen, setMenuOpen] = (0, import_react17.useState)(false);
8948
+ const lastCurrent = (0, import_react17.useRef)(void 0);
8949
+ const tabRefs = (0, import_react17.useRef)(/* @__PURE__ */ new Map());
8950
+ const pendingFocus = (0, import_react17.useRef)(void 0);
8951
+ const refresh = (0, import_react17.useCallback)(async () => {
7917
8952
  if (!isProjectRemoteReady()) return;
7918
8953
  try {
7919
8954
  const [nextProjects, nextGroups] = await Promise.all([
@@ -7926,7 +8961,7 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
7926
8961
  console.error("dsh-leader-agent: \u8BFB\u53D6\u9879\u76EE\u6807\u7B7E\u6570\u636E\u5931\u8D25", error);
7927
8962
  }
7928
8963
  }, [callRemote]);
7929
- (0, import_react15.useEffect)(() => {
8964
+ (0, import_react17.useEffect)(() => {
7930
8965
  if (!sessions?.list?.subscribe) return void 0;
7931
8966
  const tracker = createSessionCompletionTracker();
7932
8967
  const sync = () => {
@@ -7937,10 +8972,10 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
7937
8972
  sync();
7938
8973
  return sessions.list.subscribe(sync);
7939
8974
  }, [sessions]);
7940
- (0, import_react15.useEffect)(() => onProjectRemoteReady(() => {
8975
+ (0, import_react17.useEffect)(() => onProjectRemoteReady(() => {
7941
8976
  void refresh();
7942
8977
  }), [refresh]);
7943
- (0, import_react15.useEffect)(() => {
8978
+ (0, import_react17.useEffect)(() => {
7944
8979
  const stop = onProjectsChanged(() => {
7945
8980
  void refresh();
7946
8981
  });
@@ -7953,15 +8988,15 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
7953
8988
  window.removeEventListener("focus", onFocus);
7954
8989
  };
7955
8990
  }, [refresh]);
7956
- (0, import_react15.useEffect)(() => {
8991
+ (0, import_react17.useEffect)(() => {
7957
8992
  const info = getLayout?.()?.panelInfo;
7958
8993
  if (info === void 0 || typeof info.subscribe !== "function") return void 0;
7959
8994
  const sync = () => setPanelActive(info.getSnapshot().activePanelId !== null);
7960
8995
  sync();
7961
8996
  return info.subscribe(sync);
7962
8997
  }, [getLayout]);
7963
- const currentSessionId = (0, import_react15.useMemo)(() => currentSessionIdOf(snapshot.byId), [snapshot]);
7964
- (0, import_react15.useEffect)(() => {
8998
+ const currentSessionId = (0, import_react17.useMemo)(() => currentSessionIdOf(snapshot.byId), [snapshot]);
8999
+ (0, import_react17.useEffect)(() => {
7965
9000
  const active = menus?.active;
7966
9001
  if (active === void 0 || typeof active.subscribe !== "function") return void 0;
7967
9002
  const sync = () => {
@@ -7971,7 +9006,7 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
7971
9006
  sync();
7972
9007
  return active.subscribe(sync);
7973
9008
  }, [menus, currentSessionId]);
7974
- (0, import_react15.useEffect)(() => {
9009
+ (0, import_react17.useEffect)(() => {
7975
9010
  const active = menus?.active;
7976
9011
  if (active === void 0 || typeof active.getSnapshot !== "function" || typeof menus.close !== "function") return;
7977
9012
  const target = active.getSnapshot();
@@ -7979,20 +9014,20 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
7979
9014
  menus.close();
7980
9015
  }
7981
9016
  }, [menus, currentSessionId]);
7982
- (0, import_react15.useEffect)(() => {
9017
+ (0, import_react17.useEffect)(() => {
7983
9018
  const previous = lastCurrent.current;
7984
9019
  lastCurrent.current = currentSessionId;
7985
9020
  if (previous !== void 0 && currentSessionId !== void 0 && previous !== currentSessionId) {
7986
9021
  void refresh();
7987
9022
  }
7988
9023
  }, [currentSessionId, refresh]);
7989
- (0, import_react15.useEffect)(() => {
9024
+ (0, import_react17.useEffect)(() => {
7990
9025
  try {
7991
9026
  window.localStorage.setItem(SESSION_TABS_STORAGE_KEY, serializeTabStore(store));
7992
9027
  } catch {
7993
9028
  }
7994
9029
  }, [store]);
7995
- const rows = (0, import_react15.useMemo)(() => {
9030
+ const rows = (0, import_react17.useMemo)(() => {
7996
9031
  const next = {};
7997
9032
  for (const [id, row] of Object.entries(snapshot.byId ?? {})) {
7998
9033
  next[id] = {
@@ -8005,14 +9040,14 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
8005
9040
  }
8006
9041
  return next;
8007
9042
  }, [snapshot, completed]);
8008
- const view = (0, import_react15.useMemo)(() => resolveTabView({
9043
+ const view = (0, import_react17.useMemo)(() => resolveTabView({
8009
9044
  projects,
8010
9045
  groups,
8011
9046
  rows,
8012
9047
  currentSessionId,
8013
9048
  store
8014
9049
  }), [projects, groups, rows, currentSessionId, store]);
8015
- (0, import_react15.useEffect)(() => {
9050
+ (0, import_react17.useEffect)(() => {
8016
9051
  const id = pendingFocus.current;
8017
9052
  if (id === void 0 || view.activeSessionId !== id) return void 0;
8018
9053
  pendingFocus.current = void 0;
@@ -8021,13 +9056,13 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
8021
9056
  });
8022
9057
  return () => cancelAnimationFrame(frame);
8023
9058
  }, [view.activeSessionId]);
8024
- (0, import_react15.useEffect)(() => {
9059
+ (0, import_react17.useEffect)(() => {
8025
9060
  if (!view.visible || !view.isWorkerCurrent || currentSessionId === void 0) return;
8026
9061
  if (hasOpenTab(store, view.project.id, currentSessionId)) return;
8027
9062
  setStore((current2) => addOpenTab(current2, view.project.id, currentSessionId));
8028
9063
  }, [view.visible, view.isWorkerCurrent, view.project?.id, currentSessionId]);
8029
- const lastBoardCarry = (0, import_react15.useRef)(void 0);
8030
- const carryBoard = (0, import_react15.useCallback)(() => {
9064
+ const lastBoardCarry = (0, import_react17.useRef)(void 0);
9065
+ const carryBoard = (0, import_react17.useCallback)(() => {
8031
9066
  if (panelActive || currentSessionId === void 0) return;
8032
9067
  if (!view.visible || !view.isWorkerCurrent) {
8033
9068
  lastBoardCarry.current = void 0;
@@ -8055,14 +9090,14 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
8055
9090
  }
8056
9091
  lastBoardCarry.current = currentSessionId;
8057
9092
  }, [currentSessionId, getSidebarRight, panelActive, view.visible, view.isWorkerCurrent, view.project?.id, view.project?.leaderSessionId]);
8058
- (0, import_react15.useLayoutEffect)(() => {
9093
+ (0, import_react17.useLayoutEffect)(() => {
8059
9094
  carryBoard();
8060
9095
  }, [carryBoard]);
8061
- (0, import_react15.useEffect)(() => {
9096
+ (0, import_react17.useEffect)(() => {
8062
9097
  carryBoard();
8063
9098
  }, [carryBoard]);
8064
9099
  const barVisible = view.visible && !panelActive;
8065
- (0, import_react15.useLayoutEffect)(() => {
9100
+ (0, import_react17.useLayoutEffect)(() => {
8066
9101
  reportVisible?.(barVisible);
8067
9102
  }, [barVisible, reportVisible]);
8068
9103
  if (!barVisible) return null;
@@ -8098,17 +9133,17 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
8098
9133
  }
8099
9134
  setStore((current2) => removeOpenTab(current2, view.project.id, sessionId));
8100
9135
  };
8101
- return (0, import_react15.createElement)(
9136
+ return (0, import_react17.createElement)(
8102
9137
  "div",
8103
9138
  {
8104
9139
  className: "dsh-leader-agent-tabs",
8105
9140
  "data-dsh-leader-agent-session-tabs-bar": "",
8106
9141
  ...hasMenu ? { "data-dsh-leader-agent-tabs-menu": "" } : {}
8107
9142
  },
8108
- (0, import_react15.createElement)(
9143
+ (0, import_react17.createElement)(
8109
9144
  "div",
8110
9145
  { className: "dsh-leader-agent-tabs-scroll", role: "tablist", "aria-label": listLabel },
8111
- ...view.tabs.map((tab) => (0, import_react15.createElement)(
9146
+ ...view.tabs.map((tab) => (0, import_react17.createElement)(
8112
9147
  "div",
8113
9148
  {
8114
9149
  key: tab.id,
@@ -8142,14 +9177,14 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
8142
9177
  openSession(nextId);
8143
9178
  }
8144
9179
  },
8145
- tab.kind === "leader" ? (0, import_react15.createElement)(
9180
+ tab.kind === "leader" ? (0, import_react17.createElement)(
8146
9181
  "span",
8147
9182
  { className: "dsh-leader-agent-tab-icon" },
8148
9183
  productIcon("apps-add-outline", { size: 14 })
8149
- ) : (0, import_react15.createElement)(
9184
+ ) : (0, import_react17.createElement)(
8150
9185
  "span",
8151
9186
  { className: "dsh-leader-agent-tab-dot" },
8152
- (0, import_react15.createElement)("span", {
9187
+ (0, import_react17.createElement)("span", {
8153
9188
  className: `dsh-leader-agent-tab-signal dsh-leader-agent-tab-signal-${tab.state}`,
8154
9189
  "data-signal": tab.state,
8155
9190
  role: "img",
@@ -8157,8 +9192,8 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
8157
9192
  title: t(SIGNAL_LABEL_KEYS[tab.state])
8158
9193
  })
8159
9194
  ),
8160
- (0, import_react15.createElement)("span", { className: "dsh-leader-agent-tab-label" }, tab.label),
8161
- tab.kind === "worker" ? (0, import_react15.createElement)(
9195
+ (0, import_react17.createElement)("span", { className: "dsh-leader-agent-tab-label" }, tab.label),
9196
+ tab.kind === "worker" ? (0, import_react17.createElement)(
8162
9197
  "button",
8163
9198
  {
8164
9199
  type: "button",
@@ -8174,7 +9209,7 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
8174
9209
  ) : null
8175
9210
  ))
8176
9211
  ),
8177
- !hasMenu ? null : (0, import_react15.createElement)(
9212
+ !hasMenu ? null : (0, import_react17.createElement)(
8178
9213
  "button",
8179
9214
  {
8180
9215
  type: "button",
@@ -8201,7 +9236,7 @@ function readStore() {
8201
9236
  }
8202
9237
 
8203
9238
  // src/client/toast-view.js
8204
- var import_react16 = require("react");
9239
+ var import_react18 = require("react");
8205
9240
  var STYLE_ID7 = "dsh-leader-agent-toast-style";
8206
9241
  var STYLE_TEXT7 = `
8207
9242
  .dsh-leader-agent-toast {
@@ -8247,23 +9282,23 @@ function ensureStyles5() {
8247
9282
  document.head.append(style);
8248
9283
  }
8249
9284
  function ToastOverlay() {
8250
- const [toast, setToast] = (0, import_react16.useState)(currentToast);
8251
- (0, import_react16.useEffect)(() => {
9285
+ const [toast, setToast] = (0, import_react18.useState)(currentToast);
9286
+ (0, import_react18.useEffect)(() => {
8252
9287
  ensureStyles5();
8253
9288
  setToast(currentToast());
8254
9289
  return subscribeToasts(() => setToast(currentToast()));
8255
9290
  }, []);
8256
- (0, import_react16.useEffect)(() => {
9291
+ (0, import_react18.useEffect)(() => {
8257
9292
  if (toast === null) return void 0;
8258
9293
  const timer = setTimeout(() => dismissToast(toast.id), toast.holdMs + toast.fadeMs);
8259
9294
  return () => clearTimeout(timer);
8260
9295
  }, [toast]);
8261
9296
  if (toast === null) return null;
8262
- return (0, import_react16.createElement)(
8263
- import_react16.Fragment,
9297
+ return (0, import_react18.createElement)(
9298
+ import_react18.Fragment,
8264
9299
  // key 跟着每次弹出换:同一条文案连着出现两次时重挂载,动画与计时都重来。
8265
9300
  { key: toast.id },
8266
- (0, import_react16.createElement)(
9301
+ (0, import_react18.createElement)(
8267
9302
  "div",
8268
9303
  {
8269
9304
  className: "dsh-leader-agent-toast",
@@ -8382,10 +9417,10 @@ var workerReportDefinition = {
8382
9417
  };
8383
9418
 
8384
9419
  // src/client/worker-report-view.js
8385
- var import_react18 = require("react");
9420
+ var import_react20 = require("react");
8386
9421
 
8387
9422
  // src/client/agent-bubble-view.js
8388
- var import_react17 = require("react");
9423
+ var import_react19 = require("react");
8389
9424
 
8390
9425
  // node_modules/blobatar/dist/index.js
8391
9426
  function I({ l: t, c: e, h: n }) {
@@ -8963,22 +9998,22 @@ function formatBubbleClock(time, t) {
8963
9998
 
8964
9999
  // src/client/agent-bubble-view.js
8965
10000
  function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, time, t }) {
8966
- const [copied, setCopied] = (0, import_react17.useState)(false);
8967
- const [expanded, setExpanded] = (0, import_react17.useState)(false);
8968
- const [overflowing, setOverflowing] = (0, import_react17.useState)(false);
8969
- const bubbleRef = (0, import_react17.useRef)(null);
8970
- (0, import_react17.useLayoutEffect)(() => {
10001
+ const [copied, setCopied] = (0, import_react19.useState)(false);
10002
+ const [expanded, setExpanded] = (0, import_react19.useState)(false);
10003
+ const [overflowing, setOverflowing] = (0, import_react19.useState)(false);
10004
+ const bubbleRef = (0, import_react19.useRef)(null);
10005
+ (0, import_react19.useLayoutEffect)(() => {
8971
10006
  ensureAgentBubbleStyles();
8972
10007
  const element = bubbleRef.current;
8973
10008
  if (element === null || expanded) return void 0;
8974
- const measure = () => {
10009
+ const measure2 = () => {
8975
10010
  setOverflowing(element.scrollHeight > element.clientHeight + 1);
8976
10011
  };
8977
10012
  if (typeof ResizeObserver === "undefined") {
8978
- measure();
10013
+ measure2();
8979
10014
  return void 0;
8980
10015
  }
8981
- const observer = new ResizeObserver(measure);
10016
+ const observer = new ResizeObserver(measure2);
8982
10017
  observer.observe(element);
8983
10018
  return () => observer.disconnect();
8984
10019
  }, [body, expanded]);
@@ -8992,31 +10027,31 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
8992
10027
  setTimeout(() => setCopied(false), 1500);
8993
10028
  };
8994
10029
  const avatar = buildAvatar(avatarSeed);
8995
- return (0, import_react17.createElement)(
10030
+ return (0, import_react19.createElement)(
8996
10031
  "div",
8997
10032
  { className: "dsh-leader-agent-agent-bubble" },
8998
- (0, import_react17.createElement)(
10033
+ (0, import_react19.createElement)(
8999
10034
  "div",
9000
10035
  { className: "dsh-leader-agent-agent-bubble__identity" },
9001
- (0, import_react17.createElement)(
10036
+ (0, import_react19.createElement)(
9002
10037
  "span",
9003
10038
  { className: "dsh-leader-agent-agent-bubble__avatar", "aria-hidden": "true" },
9004
- (0, import_react17.createElement)(
10039
+ (0, import_react19.createElement)(
9005
10040
  "svg",
9006
10041
  { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", focusable: "false", "data-shape": avatar.shape },
9007
- (0, import_react17.createElement)(
10042
+ (0, import_react19.createElement)(
9008
10043
  "g",
9009
10044
  { fill: avatar.head, stroke: avatar.stroke, strokeWidth: avatar.strokeWidth, strokeLinejoin: "round" },
9010
- avatar.body.map((d, index) => (0, import_react17.createElement)("path", { key: index, d }))
10045
+ avatar.body.map((d, index) => (0, import_react19.createElement)("path", { key: index, d }))
9011
10046
  ),
9012
- (0, import_react17.createElement)(
10047
+ (0, import_react19.createElement)(
9013
10048
  "g",
9014
10049
  { className: AVATAR_EYE_CLASS, fill: avatar.eye },
9015
- avatar.eyes.map((d, index) => (0, import_react17.createElement)("path", { key: index, d }))
10050
+ avatar.eyes.map((d, index) => (0, import_react19.createElement)("path", { key: index, d }))
9016
10051
  )
9017
10052
  )
9018
10053
  ),
9019
- (0, import_react17.createElement)(
10054
+ (0, import_react19.createElement)(
9020
10055
  "button",
9021
10056
  {
9022
10057
  type: "button",
@@ -9027,20 +10062,20 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
9027
10062
  name
9028
10063
  )
9029
10064
  ),
9030
- (0, import_react17.createElement)(
10065
+ (0, import_react19.createElement)(
9031
10066
  "div",
9032
10067
  { className: "dsh-leader-agent-agent-bubble__bubble" },
9033
10068
  // 裁剪只发生在正文层:按钮在气泡内、正文外,否则展开开关会跟着两行水位被裁掉
9034
- (0, import_react17.createElement)(
10069
+ (0, import_react19.createElement)(
9035
10070
  "div",
9036
10071
  {
9037
10072
  ref: bubbleRef,
9038
10073
  className: "dsh-leader-agent-agent-bubble__content",
9039
10074
  "data-collapsed": expanded ? void 0 : "true"
9040
10075
  },
9041
- format === "markdown" ? (0, import_react17.createElement)(Markdown, { source: body, t }) : (0, import_react17.createElement)("div", { className: "dsh-leader-agent-agent-bubble__plain" }, body)
10076
+ format === "markdown" ? (0, import_react19.createElement)(Markdown, { source: body, t }) : (0, import_react19.createElement)("div", { className: "dsh-leader-agent-agent-bubble__plain" }, body)
9042
10077
  ),
9043
- overflowing ? (0, import_react17.createElement)(
10078
+ overflowing ? (0, import_react19.createElement)(
9044
10079
  "button",
9045
10080
  {
9046
10081
  type: "button",
@@ -9051,11 +10086,11 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
9051
10086
  expanded ? t("common.collapse") : t("bubble.more")
9052
10087
  ) : null
9053
10088
  ),
9054
- (0, import_react17.createElement)(
10089
+ (0, import_react19.createElement)(
9055
10090
  "div",
9056
10091
  { className: "dsh-leader-agent-agent-bubble__meta" },
9057
- (0, import_react17.createElement)("span", { className: "dsh-leader-agent-agent-bubble__time" }, formatBubbleClock(time, t)),
9058
- (0, import_react17.createElement)(
10092
+ (0, import_react19.createElement)("span", { className: "dsh-leader-agent-agent-bubble__time" }, formatBubbleClock(time, t)),
10093
+ (0, import_react19.createElement)(
9059
10094
  "button",
9060
10095
  {
9061
10096
  type: "button",
@@ -9076,7 +10111,7 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
9076
10111
  function WorkerReportView({ node, openSession, t }) {
9077
10112
  const data = node?.data;
9078
10113
  if (data === void 0) return null;
9079
- return (0, import_react18.createElement)(AgentBubble, {
10114
+ return (0, import_react20.createElement)(AgentBubble, {
9080
10115
  name: data.name,
9081
10116
  avatarSeed: data.name,
9082
10117
  openTitle: t("bubble.openSession", { name: data.name }),
@@ -9144,7 +10179,7 @@ var workerTaskDefinition = {
9144
10179
  };
9145
10180
 
9146
10181
  // src/client/worker-task-view.js
9147
- var import_react19 = require("react");
10182
+ var import_react21 = require("react");
9148
10183
 
9149
10184
  // src/client/worker-task-styles.js
9150
10185
  var STYLE_ID9 = "dsh-leader-agent-worker-task";
@@ -9225,8 +10260,8 @@ function ensureWorkerTaskStyles() {
9225
10260
  // src/client/worker-task-view.js
9226
10261
  function WorkerTaskView({ node, t }) {
9227
10262
  const data = node?.data;
9228
- const [copied, setCopied] = (0, import_react19.useState)(false);
9229
- (0, import_react19.useLayoutEffect)(() => {
10263
+ const [copied, setCopied] = (0, import_react21.useState)(false);
10264
+ (0, import_react21.useLayoutEffect)(() => {
9230
10265
  ensureWorkerTaskStyles();
9231
10266
  }, []);
9232
10267
  if (data === void 0) return null;
@@ -9240,10 +10275,10 @@ function WorkerTaskView({ node, t }) {
9240
10275
  setCopied(true);
9241
10276
  setTimeout(() => setCopied(false), 1500);
9242
10277
  };
9243
- return (0, import_react19.createElement)(
10278
+ return (0, import_react21.createElement)(
9244
10279
  "div",
9245
10280
  { className: "dsh-leader-agent-worker-task" },
9246
- (0, import_react19.createElement)(
10281
+ (0, import_react21.createElement)(
9247
10282
  "div",
9248
10283
  {
9249
10284
  className: "dsh-leader-agent-worker-task__bubble",
@@ -9255,13 +10290,13 @@ function WorkerTaskView({ node, t }) {
9255
10290
  },
9256
10291
  // 与 assistant 内容同套 Markdown:原文直接交给基线 MarkdownText,不补硬换行、
9257
10292
  // 不做行级改写;单换行按 Markdown 合并。
9258
- (0, import_react19.createElement)(Markdown, { source: body, variant: "compact", t })
10293
+ (0, import_react21.createElement)(Markdown, { source: body, variant: "compact", t })
9259
10294
  ),
9260
- (0, import_react19.createElement)(
10295
+ (0, import_react21.createElement)(
9261
10296
  "div",
9262
10297
  { className: "dsh-leader-agent-worker-task__meta" },
9263
- (0, import_react19.createElement)("span", { className: "dsh-leader-agent-worker-task__time" }, formatBubbleClock(data.time, t)),
9264
- (0, import_react19.createElement)(
10298
+ (0, import_react21.createElement)("span", { className: "dsh-leader-agent-worker-task__time" }, formatBubbleClock(data.time, t)),
10299
+ (0, import_react21.createElement)(
9265
10300
  "button",
9266
10301
  {
9267
10302
  type: "button",
@@ -9324,9 +10359,13 @@ function apply(ctx) {
9324
10359
  getSessions: () => ctx.sessions,
9325
10360
  getUiWorkspace: () => ctx.get("uiWorkspace"),
9326
10361
  getSidebarRight: () => ctx.get("sidebarRight"),
9327
- callRemote: (method, args) => callProjectRemote(ctx, method, args)
10362
+ callRemote: (method, args) => callProjectRemote(ctx, method, args),
10363
+ // 线路图有两套皮:浅色宿主走电蓝正交,深色宿主走黑金曲线
10364
+ getTheme: () => ctx.get("theme"),
10365
+ onThemeChange: (listener) => ctx.on("theme/change", listener)
9328
10366
  })
9329
10367
  }, BoardBody)), "dsh-leader-agent \u770B\u677F\u9762\u677F");
10368
+ mountBoardSettings(ctx, t);
9330
10369
  ctx.effect(() => ctx.slots.inject("sidebar.right.tab.guide.entry", () => ctx.slots.register({
9331
10370
  name: "sidebar.right.tab.guide.entry",
9332
10371
  key: PLUGIN_ID,
@@ -9350,6 +10389,8 @@ function apply(ctx) {
9350
10389
  getSessions: () => ctx.sessions,
9351
10390
  // 归档走宿主的工作区服务:它是既有能力,别处归档的会话这里也要跟着消失。
9352
10391
  getWorkspaces: () => ctx.get("workspaces"),
10392
+ // 面板页是否接管主区域:宿主会话树据此不选中任何行,项目区块要同一个口径。
10393
+ getLayout: () => ctx.get("layout"),
9353
10394
  onWorkspacesReady: (listener) => workspacesReady.subscribe(listener)
9354
10395
  })
9355
10396
  }, ProjectPanel)), "dsh-leader-agent \u5DE6\u680F\u9879\u76EE\u533A\u5757");
@@ -9388,7 +10429,7 @@ function apply(ctx) {
9388
10429
  ctx.inject(["remote"], function mountProjectChannel(remoteCtx) {
9389
10430
  void mountProjectRemote(remoteCtx).catch((error) => {
9390
10431
  const message = error instanceof Error ? error.message : String(error);
9391
- remoteCtx.logger?.warn?.(`dsh-leader-agent: \u9879\u76EE\u901A\u9053\u6302\u8F7D\u5931\u8D25\uFF1A${message}`);
10432
+ remoteCtx.logger?.warn?.(`dsh-leader-agent: \u9879\u76EE\u901A\u9053\u521D\u59CB\u5316\u5931\u8D25\uFF1A${message}`);
9392
10433
  });
9393
10434
  watchLeaderSessions(remoteCtx);
9394
10435
  mountBoardMonitor(ctx);