dsh-leader-agent 0.7.0 → 0.9.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/.agents/skills/e2e-scenarios/SKILL.md +3 -2
- package/.agents/skills/init-leader-agent/SKILL.md +2 -1
- package/.agents/skills/init-leader-agent/references/SLOTS.md +6 -1
- package/.agents/skills/leader-mode/SKILL.md +3 -2
- package/.agents/skills/leader-mode/playbooks/implementation.md +1 -1
- package/.agents/skills/leader-mode/playbooks/program.md +3 -2
- package/.agents/skills/leader-mode/playbooks/testing.md +46 -0
- package/README.md +21 -16
- package/README_ZH.md +21 -16
- package/lib/client.js +1943 -550
- package/locale/de.json +21 -1
- package/locale/en.json +21 -1
- package/locale/es.json +21 -1
- package/locale/fr.json +21 -1
- package/locale/ja.json +21 -1
- package/locale/pt.json +21 -1
- package/locale/ru.json +21 -1
- package/locale/zh.json +21 -1
- package/package.json +2 -1
- package/src/client/agent-bubble-styles.js +4 -7
- package/src/client/board-card.js +99 -28
- package/src/client/board-mode.js +74 -0
- package/src/client/board-rail-plan.js +159 -0
- package/src/client/board-rail.js +254 -0
- package/src/client/board-settings.js +433 -0
- package/src/client/board-styles.js +490 -20
- package/src/client/board.js +188 -13
- package/src/client/index.js +11 -1
- package/src/client/leader-changes.js +3 -7
- package/src/client/locales.generated.js +168 -8
- package/src/client/modal-shell.js +5 -9
- package/src/client/motion-preference.js +59 -0
- package/src/client/project-panel-logic.js +3 -2
- package/src/client/project-panel.js +37 -4
- package/src/client/project-remote.js +22 -3
- package/src/client/project-section.js +9 -8
- package/src/client/session-tabs.js +16 -12
- package/src/client/style-sheet.js +32 -0
- package/src/client/toast-view.js +3 -7
- package/src/client/worker-task-styles.js +4 -7
- package/src/client/workspace-exclusion.js +4 -7
- package/src/host/dispatch.js +367 -86
- package/src/host/index.js +70 -12
- package/src/host/leader-context.js +7 -4
- package/src/host/message.js +6 -2
- package/src/host/projects/remote.js +45 -3
- package/src/host/projects/service.js +19 -1
- package/src/host/projects/session-index.js +20 -0
- package/src/host/settings-store.js +231 -0
- package/src/host/slots/slot-templates.js +71 -16
- package/src/host/tools/gate.js +2 -1
- package/src/host/tools/list-worker-models.js +204 -0
- package/src/host/tools/read-worker.js +15 -3
- package/src/host/tools/spawn-worker.js +46 -3
- package/src/host/worker-model.js +274 -0
- package/src/host/worker-sessions.js +42 -11
- package/src/host/worker-transcript.js +49 -52
- package/src/shared/projects.js +8 -2
- package/src/shared/settings.js +81 -0
- package/src/shared/truncate.js +49 -0
- package/src/shared/turn-failure.js +25 -0
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
|
|
54
|
+
var import_react9 = require("react");
|
|
55
55
|
|
|
56
56
|
// src/client/session-watermark.js
|
|
57
57
|
var SESSION_WATERMARK_BASE = 5;
|
|
@@ -66,8 +66,8 @@ function requiredWatermark(rows, currentSessionId) {
|
|
|
66
66
|
const position = index + 1;
|
|
67
67
|
if (position > SESSION_WATERMARK_AUTO_MAX) break;
|
|
68
68
|
const row = rows[index];
|
|
69
|
-
const
|
|
70
|
-
if (row?.running === true || row?.completed === true ||
|
|
69
|
+
const current3 = currentSessionId !== void 0 && row?.id === currentSessionId;
|
|
70
|
+
if (row?.running === true || row?.completed === true || current3) required = position;
|
|
71
71
|
}
|
|
72
72
|
return required;
|
|
73
73
|
}
|
|
@@ -239,10 +239,10 @@ function removeCardFromList(cards, id) {
|
|
|
239
239
|
if (!Array.isArray(cards)) return [];
|
|
240
240
|
return cards.filter((card) => card?.id !== id);
|
|
241
241
|
}
|
|
242
|
-
function mergeDetailCard(
|
|
243
|
-
if (
|
|
244
|
-
if (updated === null || typeof updated !== "object") return
|
|
245
|
-
return
|
|
242
|
+
function mergeDetailCard(current3, updated) {
|
|
243
|
+
if (current3 === null || current3 === void 0) return null;
|
|
244
|
+
if (updated === null || typeof updated !== "object") return current3;
|
|
245
|
+
return current3.card?.id === updated.id ? { ...current3, card: updated } : current3;
|
|
246
246
|
}
|
|
247
247
|
function reconcileBoardOverlays(cards, detail, pendingDelete) {
|
|
248
248
|
const ids = new Set(Array.isArray(cards) ? cards.map((card) => card?.id) : []);
|
|
@@ -251,8 +251,8 @@ function reconcileBoardOverlays(cards, detail, pendingDelete) {
|
|
|
251
251
|
pendingDelete: pendingDelete !== null && pendingDelete !== void 0 && ids.has(pendingDelete.id) ? pendingDelete : null
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
function mergeCardSnapshot(
|
|
255
|
-
const byId = new Map(
|
|
254
|
+
function mergeCardSnapshot(current3, next) {
|
|
255
|
+
const byId = new Map(current3.map((card) => [card.id, card]));
|
|
256
256
|
return next.map((card) => {
|
|
257
257
|
const kept = byId.get(card.id);
|
|
258
258
|
return kept !== void 0 && (kept.revision ?? 0) > (card.revision ?? 0) ? kept : card;
|
|
@@ -611,11 +611,23 @@ 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 f\xFCr Social-Media-Traffic gebaut.",
|
|
615
|
+
"board.mode.cinema.title": "Kino",
|
|
616
|
+
"board.mode.work.desc": "Schlicht und effizient. Empfohlen.",
|
|
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.",
|
|
626
|
+
"board.settings.loadFailed": "Board-Einstellung konnte nicht gelesen werden: {message}",
|
|
627
|
+
"board.settings.nav": "Leader Agent",
|
|
628
|
+
"board.settings.retry": "Erneut versuchen",
|
|
629
|
+
"board.settings.saveFailed": "Board-Einstellung konnte nicht gespeichert werden: {message}",
|
|
630
|
+
"board.settings.title": "Aufgabenboard",
|
|
619
631
|
"board.slot.title": "{name}: {state}",
|
|
620
632
|
"board.state.attention": "Braucht Aufmerksamkeit",
|
|
621
633
|
"board.state.empty": "Nicht zugewiesen",
|
|
@@ -665,7 +677,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
665
677
|
"common.saving": "Wird gespeichert\u2026",
|
|
666
678
|
"guide.action.dismiss": "Verstanden",
|
|
667
679
|
"guide.action.intro": "Zeigen Sie mir, wie es funktioniert",
|
|
668
|
-
"guide.intro.prompt": "
|
|
680
|
+
"guide.intro.prompt": "Zeigen Sie mir, wie dsh-leader-agent funktioniert; lesen, \xE4ndern oder erstellen Sie beim Erkl\xE4ren keine Dateien.",
|
|
669
681
|
"guide.steps": "Aufgabenkarten anlegen, Arbeit an Agenten \xFCbergeben und den Fortschritt im Board verfolgen",
|
|
670
682
|
"guide.title": "Dieses Verzeichnis hat einen Leader",
|
|
671
683
|
"markdown.code": "Code",
|
|
@@ -716,6 +728,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
716
728
|
"project.rename": "Umbenennen",
|
|
717
729
|
"project.replaceLeader": "Leader ersetzen",
|
|
718
730
|
"session.fold.expand": "Weitere Sitzungen anzeigen ({count})",
|
|
731
|
+
"settings.autoResume.desc": "Wie oft der Leader Agent von Workern geweckt werden darf.",
|
|
732
|
+
"settings.autoResume.invalid": "Gib eine ganze Zahl zwischen {min} und {max} ein.",
|
|
733
|
+
"settings.autoResume.loadFailed": "Einstellungen konnten nicht gelesen werden: {message}",
|
|
734
|
+
"settings.autoResume.retry": "Erneut versuchen",
|
|
735
|
+
"settings.autoResume.saveFailed": "Speichern fehlgeschlagen: {message}",
|
|
736
|
+
"settings.autoResume.saved": "Gespeichert",
|
|
737
|
+
"settings.autoResume.title": "Automatische Fortsetzung",
|
|
738
|
+
"settings.autoResume.unit": "Mal",
|
|
719
739
|
"slot.dev": "Entwicklung",
|
|
720
740
|
"slot.discuss": "Diskussion",
|
|
721
741
|
"slot.review": "Review",
|
|
@@ -739,11 +759,23 @@ var LOCALE_UI = Object.freeze({
|
|
|
739
759
|
"board.fold.expand": "Show {count} more cards",
|
|
740
760
|
"board.leaderDead.hint": "Use the project section in the left sidebar to replace this project's Leader, then open the board again.",
|
|
741
761
|
"board.leaderDead.title": "This project's Leader session is no longer available",
|
|
762
|
+
"board.mode.cinema.desc": "Built purely to pull social media traffic.",
|
|
763
|
+
"board.mode.cinema.title": "Cinematic",
|
|
764
|
+
"board.mode.work.desc": "Clean and efficient. Recommended.",
|
|
765
|
+
"board.mode.work.title": "Work",
|
|
742
766
|
"board.noProject.hint": "The board is organized by project: open it from a project session (Leader or worker).",
|
|
743
767
|
"board.noProject.title": "This session does not belong to a project",
|
|
744
768
|
"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
769
|
"board.notProject.title": "The board opens only in project sessions",
|
|
746
770
|
"board.notProject.unknown": "This session is not connected to a project; open a project's Leader or worker session to see its delivery board.",
|
|
771
|
+
"board.rail.leader": "Leader",
|
|
772
|
+
"board.rail.summary": "{running} running \xB7 {total} tasks",
|
|
773
|
+
"board.settings.desc": "Choose how the board looks.",
|
|
774
|
+
"board.settings.loadFailed": "Failed to read the board setting: {message}",
|
|
775
|
+
"board.settings.nav": "Leader Agent",
|
|
776
|
+
"board.settings.retry": "Retry",
|
|
777
|
+
"board.settings.saveFailed": "Failed to save the board setting: {message}",
|
|
778
|
+
"board.settings.title": "Task board",
|
|
747
779
|
"board.slot.title": "{name}: {state}",
|
|
748
780
|
"board.state.attention": "Needs attention",
|
|
749
781
|
"board.state.empty": "Unassigned",
|
|
@@ -793,7 +825,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
793
825
|
"common.saving": "Saving\u2026",
|
|
794
826
|
"guide.action.dismiss": "Got it",
|
|
795
827
|
"guide.action.intro": "Show me how to use it",
|
|
796
|
-
"guide.intro.prompt": "
|
|
828
|
+
"guide.intro.prompt": "Show me how dsh-leader-agent works; while explaining, don't read, modify, or create any files.",
|
|
797
829
|
"guide.steps": "Open task cards, hand work to Agents, track progress in the board",
|
|
798
830
|
"guide.title": "This directory has a Leader",
|
|
799
831
|
"markdown.code": "Code",
|
|
@@ -844,6 +876,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
844
876
|
"project.rename": "Rename",
|
|
845
877
|
"project.replaceLeader": "Replace Leader",
|
|
846
878
|
"session.fold.expand": "Show {count} more sessions",
|
|
879
|
+
"settings.autoResume.desc": "How many times can the Leader Agent be woken by Workers?",
|
|
880
|
+
"settings.autoResume.invalid": "Enter a whole number between {min} and {max}.",
|
|
881
|
+
"settings.autoResume.loadFailed": "Failed to read settings: {message}",
|
|
882
|
+
"settings.autoResume.retry": "Retry",
|
|
883
|
+
"settings.autoResume.saveFailed": "Failed to save: {message}",
|
|
884
|
+
"settings.autoResume.saved": "Saved",
|
|
885
|
+
"settings.autoResume.title": "Auto-resume",
|
|
886
|
+
"settings.autoResume.unit": "times",
|
|
847
887
|
"slot.dev": "Dev",
|
|
848
888
|
"slot.discuss": "Discuss",
|
|
849
889
|
"slot.review": "Review",
|
|
@@ -867,11 +907,23 @@ var LOCALE_UI = Object.freeze({
|
|
|
867
907
|
"board.fold.expand": "Mostrar las tarjetas restantes ({count})",
|
|
868
908
|
"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
909
|
"board.leaderDead.title": "La sesi\xF3n del Leader de este proyecto ya no est\xE1 disponible",
|
|
910
|
+
"board.mode.cinema.desc": "Hecho solo para atraer tr\xE1fico en redes sociales.",
|
|
911
|
+
"board.mode.cinema.title": "Modo espect\xE1culo",
|
|
912
|
+
"board.mode.work.desc": "Simple y eficiente. Recomendado.",
|
|
913
|
+
"board.mode.work.title": "Modo trabajo",
|
|
870
914
|
"board.noProject.hint": "El tablero se organiza por proyecto: \xE1bralo desde una sesi\xF3n del proyecto (Leader o worker).",
|
|
871
915
|
"board.noProject.title": "Esta sesi\xF3n no pertenece a ning\xFAn proyecto",
|
|
872
916
|
"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
917
|
"board.notProject.title": "El tablero solo se abre en sesiones de proyecto",
|
|
874
918
|
"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.",
|
|
919
|
+
"board.rail.leader": "Leader",
|
|
920
|
+
"board.rail.summary": "{running} en curso \xB7 {total} tareas",
|
|
921
|
+
"board.settings.desc": "Elige c\xF3mo se ve el tablero.",
|
|
922
|
+
"board.settings.loadFailed": "No se pudo leer la configuraci\xF3n del tablero: {message}",
|
|
923
|
+
"board.settings.nav": "Leader Agent",
|
|
924
|
+
"board.settings.retry": "Reintentar",
|
|
925
|
+
"board.settings.saveFailed": "No se pudo guardar la configuraci\xF3n del tablero: {message}",
|
|
926
|
+
"board.settings.title": "Tablero de tareas",
|
|
875
927
|
"board.slot.title": "{name}: {state}",
|
|
876
928
|
"board.state.attention": "Requiere atenci\xF3n",
|
|
877
929
|
"board.state.empty": "Sin asignar",
|
|
@@ -921,7 +973,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
921
973
|
"common.saving": "Guardando\u2026",
|
|
922
974
|
"guide.action.dismiss": "Entendido",
|
|
923
975
|
"guide.action.intro": "Mu\xE9streme c\xF3mo se usa",
|
|
924
|
-
"guide.intro.prompt": "
|
|
976
|
+
"guide.intro.prompt": "Mu\xE9streme c\xF3mo funciona dsh-leader-agent; al explicar, no lea, modifique ni cree ning\xFAn archivo.",
|
|
925
977
|
"guide.steps": "Cree tarjetas de tareas, delegue trabajo en agentes y siga el progreso en el tablero",
|
|
926
978
|
"guide.title": "Este directorio tiene un Leader",
|
|
927
979
|
"markdown.code": "C\xF3digo",
|
|
@@ -972,6 +1024,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
972
1024
|
"project.rename": "Renombrar",
|
|
973
1025
|
"project.replaceLeader": "Reemplazar Leader",
|
|
974
1026
|
"session.fold.expand": "Mostrar las sesiones restantes ({count})",
|
|
1027
|
+
"settings.autoResume.desc": "\xBFCu\xE1ntas veces pueden despertar los Workers al Leader Agent?",
|
|
1028
|
+
"settings.autoResume.invalid": "Introduce un n\xFAmero entero entre {min} y {max}.",
|
|
1029
|
+
"settings.autoResume.loadFailed": "No se pudo leer la configuraci\xF3n: {message}",
|
|
1030
|
+
"settings.autoResume.retry": "Reintentar",
|
|
1031
|
+
"settings.autoResume.saveFailed": "No se pudo guardar: {message}",
|
|
1032
|
+
"settings.autoResume.saved": "Guardado",
|
|
1033
|
+
"settings.autoResume.title": "Reanudaci\xF3n autom\xE1tica",
|
|
1034
|
+
"settings.autoResume.unit": "veces",
|
|
975
1035
|
"slot.dev": "Desarrollo",
|
|
976
1036
|
"slot.discuss": "Discusi\xF3n",
|
|
977
1037
|
"slot.review": "Revisi\xF3n",
|
|
@@ -995,11 +1055,23 @@ var LOCALE_UI = Object.freeze({
|
|
|
995
1055
|
"board.fold.expand": "Afficher les cartes restantes ({count})",
|
|
996
1056
|
"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
1057
|
"board.leaderDead.title": "La session Leader de ce projet n'est plus disponible",
|
|
1058
|
+
"board.mode.cinema.desc": "Con\xE7u uniquement pour attirer du trafic sur les r\xE9seaux sociaux.",
|
|
1059
|
+
"board.mode.cinema.title": "Mode spectacle",
|
|
1060
|
+
"board.mode.work.desc": "Simple et efficace. Recommand\xE9.",
|
|
1061
|
+
"board.mode.work.title": "Mode travail",
|
|
998
1062
|
"board.noProject.hint": "Le tableau est organis\xE9 par projet : ouvrez-le depuis une session du projet (Leader ou worker).",
|
|
999
1063
|
"board.noProject.title": "Cette session n'appartient \xE0 aucun projet",
|
|
1000
1064
|
"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
1065
|
"board.notProject.title": "Le tableau ne s'ouvre que dans les sessions de projet",
|
|
1002
1066
|
"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.",
|
|
1067
|
+
"board.rail.leader": "Leader",
|
|
1068
|
+
"board.rail.summary": "{running} en cours \xB7 {total} t\xE2ches",
|
|
1069
|
+
"board.settings.desc": "Choisissez l\u2019apparence du tableau.",
|
|
1070
|
+
"board.settings.loadFailed": "Impossible de lire le r\xE9glage du tableau : {message}",
|
|
1071
|
+
"board.settings.nav": "Leader Agent",
|
|
1072
|
+
"board.settings.retry": "R\xE9essayer",
|
|
1073
|
+
"board.settings.saveFailed": "Impossible d\u2019enregistrer le r\xE9glage du tableau : {message}",
|
|
1074
|
+
"board.settings.title": "Tableau des t\xE2ches",
|
|
1003
1075
|
"board.slot.title": "{name} : {state}",
|
|
1004
1076
|
"board.state.attention": "N\xE9cessite votre attention",
|
|
1005
1077
|
"board.state.empty": "Non attribu\xE9",
|
|
@@ -1049,7 +1121,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
1049
1121
|
"common.saving": "Enregistrement\u2026",
|
|
1050
1122
|
"guide.action.dismiss": "Compris",
|
|
1051
1123
|
"guide.action.intro": "Montrez-moi comment l'utiliser",
|
|
1052
|
-
"guide.intro.prompt": "
|
|
1124
|
+
"guide.intro.prompt": "Montrez-moi comment fonctionne dsh-leader-agent ; pendant l'explication, ne lisez, ne modifiez ni ne cr\xE9ez aucun fichier.",
|
|
1053
1125
|
"guide.steps": "Cr\xE9ez des cartes de t\xE2ches, confiez le travail aux agents et suivez l'avancement dans le tableau",
|
|
1054
1126
|
"guide.title": "Ce dossier a un Leader",
|
|
1055
1127
|
"markdown.code": "Code",
|
|
@@ -1100,6 +1172,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
1100
1172
|
"project.rename": "Renommer",
|
|
1101
1173
|
"project.replaceLeader": "Remplacer le Leader",
|
|
1102
1174
|
"session.fold.expand": "Afficher les sessions restantes ({count})",
|
|
1175
|
+
"settings.autoResume.desc": "Nombre de fois o\xF9 le Leader Agent peut \xEAtre r\xE9veill\xE9 par des Workers.",
|
|
1176
|
+
"settings.autoResume.invalid": "Saisissez un nombre entier entre {min} et {max}.",
|
|
1177
|
+
"settings.autoResume.loadFailed": "Impossible de lire les r\xE9glages : {message}",
|
|
1178
|
+
"settings.autoResume.retry": "R\xE9essayer",
|
|
1179
|
+
"settings.autoResume.saveFailed": "\xC9chec de l'enregistrement : {message}",
|
|
1180
|
+
"settings.autoResume.saved": "Enregistr\xE9",
|
|
1181
|
+
"settings.autoResume.title": "Reprise automatique",
|
|
1182
|
+
"settings.autoResume.unit": "fois",
|
|
1103
1183
|
"slot.dev": "D\xE9veloppement",
|
|
1104
1184
|
"slot.discuss": "Discussion",
|
|
1105
1185
|
"slot.review": "Revue",
|
|
@@ -1123,11 +1203,23 @@ var LOCALE_UI = Object.freeze({
|
|
|
1123
1203
|
"board.fold.expand": "\u6B8B\u308A {count} \u679A\u306E\u30AB\u30FC\u30C9\u3092\u8868\u793A",
|
|
1124
1204
|
"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
1205
|
"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",
|
|
1206
|
+
"board.mode.cinema.desc": "SNS \u306E\u6CE8\u76EE\u3092\u96C6\u3081\u308B\u305F\u3081\u3060\u3051\u306B\u958B\u767A\u3002",
|
|
1207
|
+
"board.mode.cinema.title": "\u30B7\u30CD\u30DE\u30E2\u30FC\u30C9",
|
|
1208
|
+
"board.mode.work.desc": "\u30B7\u30F3\u30D7\u30EB\u3067\u52B9\u7387\u7684\u3002\u304A\u3059\u3059\u3081\u3002",
|
|
1209
|
+
"board.mode.work.title": "\u30EF\u30FC\u30AF\u30E2\u30FC\u30C9",
|
|
1126
1210
|
"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
1211
|
"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
1212
|
"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
1213
|
"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
1214
|
"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",
|
|
1215
|
+
"board.rail.leader": "Leader",
|
|
1216
|
+
"board.rail.summary": "{running} \u5B9F\u884C\u4E2D \xB7 {total} \u30BF\u30B9\u30AF",
|
|
1217
|
+
"board.settings.desc": "\u30DC\u30FC\u30C9\u306E\u8868\u793A\u65B9\u6CD5\u3092\u9078\u629E\u3057\u307E\u3059\u3002",
|
|
1218
|
+
"board.settings.loadFailed": "\u30DC\u30FC\u30C9\u8A2D\u5B9A\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF1A{message}",
|
|
1219
|
+
"board.settings.nav": "Leader Agent",
|
|
1220
|
+
"board.settings.retry": "\u518D\u8A66\u884C",
|
|
1221
|
+
"board.settings.saveFailed": "\u30DC\u30FC\u30C9\u8A2D\u5B9A\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF1A{message}",
|
|
1222
|
+
"board.settings.title": "\u30BF\u30B9\u30AF\u30DC\u30FC\u30C9",
|
|
1131
1223
|
"board.slot.title": "{name}\uFF1A{state}",
|
|
1132
1224
|
"board.state.attention": "\u8981\u6CE8\u610F",
|
|
1133
1225
|
"board.state.empty": "\u672A\u5272\u308A\u5F53\u3066",
|
|
@@ -1177,7 +1269,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
1177
1269
|
"common.saving": "\u4FDD\u5B58\u4E2D\u2026",
|
|
1178
1270
|
"guide.action.dismiss": "\u4E86\u89E3",
|
|
1179
1271
|
"guide.action.intro": "\u4F7F\u3044\u65B9\u3092\u898B\u308B",
|
|
1180
|
-
"guide.intro.prompt": "\
|
|
1272
|
+
"guide.intro.prompt": "dsh-leader-agent \u306E\u4F7F\u3044\u65B9\u3092\u6559\u3048\u3066\u304F\u3060\u3055\u3044\u3002\u8AAC\u660E\u3059\u308B\u3068\u304D\u306F\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3093\u3060\u308A\u3001\u5909\u66F4\u3057\u305F\u308A\u3001\u4F5C\u6210\u3057\u305F\u308A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002",
|
|
1181
1273
|
"guide.steps": "\u30BF\u30B9\u30AF\u30AB\u30FC\u30C9\u3092\u4F5C\u6210\u3057\u3001\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306B\u4F5C\u696D\u3092\u4EFB\u305B\u3001\u30DC\u30FC\u30C9\u3067\u9032\u6357\u3092\u78BA\u8A8D\u3067\u304D\u307E\u3059",
|
|
1182
1274
|
"guide.title": "\u3053\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u306F Leader \u304C\u3044\u307E\u3059",
|
|
1183
1275
|
"markdown.code": "\u30B3\u30FC\u30C9",
|
|
@@ -1228,6 +1320,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
1228
1320
|
"project.rename": "\u540D\u524D\u3092\u5909\u66F4",
|
|
1229
1321
|
"project.replaceLeader": "Leader \u3092\u4EA4\u4EE3",
|
|
1230
1322
|
"session.fold.expand": "\u6B8B\u308A {count} \u4EF6\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3092\u8868\u793A",
|
|
1323
|
+
"settings.autoResume.desc": "Leader Agent \u304C Worker \u304B\u3089\u8D77\u3053\u3055\u308C\u308B\u6700\u5927\u56DE\u6570\u3067\u3059\u3002",
|
|
1324
|
+
"settings.autoResume.invalid": "{min}\u2013{max} \u306E\u6574\u6570\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
1325
|
+
"settings.autoResume.loadFailed": "\u8A2D\u5B9A\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF1A{message}",
|
|
1326
|
+
"settings.autoResume.retry": "\u518D\u8A66\u884C",
|
|
1327
|
+
"settings.autoResume.saveFailed": "\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F\uFF1A{message}",
|
|
1328
|
+
"settings.autoResume.saved": "\u4FDD\u5B58\u3057\u307E\u3057\u305F",
|
|
1329
|
+
"settings.autoResume.title": "\u81EA\u52D5\u518D\u958B",
|
|
1330
|
+
"settings.autoResume.unit": "\u56DE",
|
|
1231
1331
|
"slot.dev": "\u958B\u767A",
|
|
1232
1332
|
"slot.discuss": "\u30C7\u30A3\u30B9\u30AB\u30C3\u30B7\u30E7\u30F3",
|
|
1233
1333
|
"slot.review": "\u30EC\u30D3\u30E5\u30FC",
|
|
@@ -1251,11 +1351,23 @@ var LOCALE_UI = Object.freeze({
|
|
|
1251
1351
|
"board.fold.expand": "Mostrar os cart\xF5es restantes ({count})",
|
|
1252
1352
|
"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
1353
|
"board.leaderDead.title": "A sess\xE3o do Leader deste projeto n\xE3o est\xE1 mais dispon\xEDvel",
|
|
1354
|
+
"board.mode.cinema.desc": "Feito apenas para atrair tr\xE1fego nas redes sociais.",
|
|
1355
|
+
"board.mode.cinema.title": "Modo cinema",
|
|
1356
|
+
"board.mode.work.desc": "Simples e eficiente. Recomendado.",
|
|
1357
|
+
"board.mode.work.title": "Modo trabalho",
|
|
1254
1358
|
"board.noProject.hint": "O quadro \xE9 organizado por projeto: abra-o a partir de uma sess\xE3o do projeto (Leader ou worker).",
|
|
1255
1359
|
"board.noProject.title": "Esta sess\xE3o n\xE3o pertence a nenhum projeto",
|
|
1256
1360
|
"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
1361
|
"board.notProject.title": "O quadro s\xF3 abre em sess\xF5es de projeto",
|
|
1258
1362
|
"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.",
|
|
1363
|
+
"board.rail.leader": "Leader",
|
|
1364
|
+
"board.rail.summary": "{running} em execu\xE7\xE3o \xB7 {total} tarefas",
|
|
1365
|
+
"board.settings.desc": "Escolha como o quadro aparece.",
|
|
1366
|
+
"board.settings.loadFailed": "Falha ao ler a configura\xE7\xE3o do quadro: {message}",
|
|
1367
|
+
"board.settings.nav": "Leader Agent",
|
|
1368
|
+
"board.settings.retry": "Tentar novamente",
|
|
1369
|
+
"board.settings.saveFailed": "Falha ao salvar a configura\xE7\xE3o do quadro: {message}",
|
|
1370
|
+
"board.settings.title": "Quadro de tarefas",
|
|
1259
1371
|
"board.slot.title": "{name}: {state}",
|
|
1260
1372
|
"board.state.attention": "Precisa de aten\xE7\xE3o",
|
|
1261
1373
|
"board.state.empty": "N\xE3o atribu\xEDdo",
|
|
@@ -1305,7 +1417,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
1305
1417
|
"common.saving": "Salvando\u2026",
|
|
1306
1418
|
"guide.action.dismiss": "Entendi",
|
|
1307
1419
|
"guide.action.intro": "Mostre-me como us\xE1-lo",
|
|
1308
|
-
"guide.intro.prompt": "
|
|
1420
|
+
"guide.intro.prompt": "Mostre-me como o dsh-leader-agent funciona; ao explicar, n\xE3o leia, modifique nem crie nenhum arquivo.",
|
|
1309
1421
|
"guide.steps": "Crie cart\xF5es de tarefas, entregue o trabalho aos agentes e acompanhe o progresso no quadro",
|
|
1310
1422
|
"guide.title": "Este diret\xF3rio tem um Leader",
|
|
1311
1423
|
"markdown.code": "C\xF3digo",
|
|
@@ -1356,6 +1468,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
1356
1468
|
"project.rename": "Renomear",
|
|
1357
1469
|
"project.replaceLeader": "Substituir Leader",
|
|
1358
1470
|
"session.fold.expand": "Mostrar as sess\xF5es restantes ({count})",
|
|
1471
|
+
"settings.autoResume.desc": "Quantas vezes os Workers podem despertar o Leader Agent?",
|
|
1472
|
+
"settings.autoResume.invalid": "Digite um n\xFAmero inteiro entre {min} e {max}.",
|
|
1473
|
+
"settings.autoResume.loadFailed": "Falha ao ler as configura\xE7\xF5es: {message}",
|
|
1474
|
+
"settings.autoResume.retry": "Tentar novamente",
|
|
1475
|
+
"settings.autoResume.saveFailed": "Falha ao salvar: {message}",
|
|
1476
|
+
"settings.autoResume.saved": "Salvo",
|
|
1477
|
+
"settings.autoResume.title": "Retomada autom\xE1tica",
|
|
1478
|
+
"settings.autoResume.unit": "vezes",
|
|
1359
1479
|
"slot.dev": "Desenvolvimento",
|
|
1360
1480
|
"slot.discuss": "Discuss\xE3o",
|
|
1361
1481
|
"slot.review": "Revis\xE3o",
|
|
@@ -1379,11 +1499,23 @@ var LOCALE_UI = Object.freeze({
|
|
|
1379
1499
|
"board.fold.expand": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 ({count})",
|
|
1380
1500
|
"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
1501
|
"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",
|
|
1502
|
+
"board.mode.cinema.desc": "\u0421\u043E\u0437\u0434\u0430\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u043F\u0440\u0438\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u044F \u0442\u0440\u0430\u0444\u0438\u043A\u0430 \u0432 \u0441\u043E\u0446\u0441\u0435\u0442\u044F\u0445.",
|
|
1503
|
+
"board.mode.cinema.title": "\u041A\u0438\u043D\u0435\u043C\u0430\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u0447\u043D\u044B\u0439",
|
|
1504
|
+
"board.mode.work.desc": "\u041F\u0440\u043E\u0441\u0442\u043E \u0438 \u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u043E. \u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F.",
|
|
1505
|
+
"board.mode.work.title": "\u0420\u0430\u0431\u043E\u0447\u0438\u0439",
|
|
1382
1506
|
"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
1507
|
"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
1508
|
"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
1509
|
"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
1510
|
"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.",
|
|
1511
|
+
"board.rail.leader": "Leader",
|
|
1512
|
+
"board.rail.summary": "{running} \u0432 \u0440\u0430\u0431\u043E\u0442\u0435 \xB7 {total} \u0437\u0430\u0434\u0430\u0447",
|
|
1513
|
+
"board.settings.desc": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u043A\u0430\u043A \u0432\u044B\u0433\u043B\u044F\u0434\u0438\u0442 \u0434\u043E\u0441\u043A\u0430.",
|
|
1514
|
+
"board.settings.loadFailed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u0434\u043E\u0441\u043A\u0438: {message}",
|
|
1515
|
+
"board.settings.nav": "Leader Agent",
|
|
1516
|
+
"board.settings.retry": "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",
|
|
1517
|
+
"board.settings.saveFailed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u0434\u043E\u0441\u043A\u0438: {message}",
|
|
1518
|
+
"board.settings.title": "\u0414\u043E\u0441\u043A\u0430 \u0437\u0430\u0434\u0430\u0447",
|
|
1387
1519
|
"board.slot.title": "{name}: {state}",
|
|
1388
1520
|
"board.state.attention": "\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F",
|
|
1389
1521
|
"board.state.empty": "\u041D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u043E",
|
|
@@ -1433,7 +1565,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
1433
1565
|
"common.saving": "\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435\u2026",
|
|
1434
1566
|
"guide.action.dismiss": "\u041F\u043E\u043D\u044F\u0442\u043D\u043E",
|
|
1435
1567
|
"guide.action.intro": "\u041F\u043E\u043A\u0430\u0436\u0438\u0442\u0435, \u043A\u0430\u043A \u044D\u0442\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C",
|
|
1436
|
-
"guide.intro.prompt": "\
|
|
1568
|
+
"guide.intro.prompt": "\u041F\u043E\u043A\u0430\u0436\u0438\u0442\u0435, \u043A\u0430\u043A \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 dsh-leader-agent; \u043E\u0431\u044A\u044F\u0441\u043D\u044F\u044F, \u043D\u0435 \u0447\u0438\u0442\u0430\u0439\u0442\u0435, \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u044F\u0439\u0442\u0435 \u0438 \u043D\u0435 \u0441\u043E\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043D\u0438\u043A\u0430\u043A\u0438\u0445 \u0444\u0430\u0439\u043B\u043E\u0432.",
|
|
1437
1569
|
"guide.steps": "\u0421\u043E\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u0437\u0430\u0434\u0430\u0447, \u043F\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0431\u043E\u0442\u0443 \u0430\u0433\u0435\u043D\u0442\u0430\u043C \u0438 \u0441\u043B\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u043E\u043C \u043D\u0430 \u0434\u043E\u0441\u043A\u0435",
|
|
1438
1570
|
"guide.title": "\u0412 \u044D\u0442\u043E\u043C \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 \u0435\u0441\u0442\u044C Leader",
|
|
1439
1571
|
"markdown.code": "\u041A\u043E\u0434",
|
|
@@ -1484,6 +1616,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
1484
1616
|
"project.rename": "\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C",
|
|
1485
1617
|
"project.replaceLeader": "\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C Leader",
|
|
1486
1618
|
"session.fold.expand": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 \u0441\u0435\u0430\u043D\u0441\u044B ({count})",
|
|
1619
|
+
"settings.autoResume.desc": "\u0421\u043A\u043E\u043B\u044C\u043A\u043E \u0440\u0430\u0437 Worker \u043C\u043E\u0433\u0443\u0442 \u0440\u0430\u0437\u0431\u0443\u0434\u0438\u0442\u044C Leader Agent.",
|
|
1620
|
+
"settings.autoResume.invalid": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u043E\u0442 {min} \u0434\u043E {max}.",
|
|
1621
|
+
"settings.autoResume.loadFailed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438: {message}",
|
|
1622
|
+
"settings.autoResume.retry": "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",
|
|
1623
|
+
"settings.autoResume.saveFailed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C: {message}",
|
|
1624
|
+
"settings.autoResume.saved": "\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E",
|
|
1625
|
+
"settings.autoResume.title": "\u0410\u0432\u0442\u043E\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u0435",
|
|
1626
|
+
"settings.autoResume.unit": "\u0440\u0430\u0437",
|
|
1487
1627
|
"slot.dev": "\u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0430",
|
|
1488
1628
|
"slot.discuss": "\u041E\u0431\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u0435",
|
|
1489
1629
|
"slot.review": "\u0420\u0435\u0432\u044C\u044E",
|
|
@@ -1507,11 +1647,23 @@ var LOCALE_UI = Object.freeze({
|
|
|
1507
1647
|
"board.fold.expand": "\u5C55\u5F00\u5176\u4F59 {count} \u5F20\u5361",
|
|
1508
1648
|
"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
1649
|
"board.leaderDead.title": "\u8BE5\u9879\u76EE\u7684 leader \u4F1A\u8BDD\u5DF2\u5931\u6548",
|
|
1650
|
+
"board.mode.cinema.desc": "\u7EAF\u4E3A\u793E\u4EA4\u5A92\u4F53\u5438\u6D41\u91CF\u5F00\u53D1",
|
|
1651
|
+
"board.mode.cinema.title": "\u70AB\u9177\u6A21\u5F0F",
|
|
1652
|
+
"board.mode.work.desc": "\u7B80\u6D01\u9AD8\u6548\uFF0C\u63A8\u8350\u4F7F\u7528",
|
|
1653
|
+
"board.mode.work.title": "\u5DE5\u4F5C\u6A21\u5F0F",
|
|
1510
1654
|
"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
1655
|
"board.noProject.title": "\u5F53\u524D\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u4EFB\u4F55\u9879\u76EE",
|
|
1512
1656
|
"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
1657
|
"board.notProject.title": "\u770B\u677F\u53EA\u5728\u9879\u76EE\u4F1A\u8BDD\u4E2D\u6253\u5F00",
|
|
1514
1658
|
"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",
|
|
1659
|
+
"board.rail.leader": "Leader",
|
|
1660
|
+
"board.rail.summary": "{running} \u6267\u884C\u4E2D \xB7 {total} \u4E2A\u4EFB\u52A1",
|
|
1661
|
+
"board.settings.desc": "\u9009\u62E9\u770B\u677F\u7684\u5448\u73B0\u65B9\u5F0F\u3002",
|
|
1662
|
+
"board.settings.loadFailed": "\u8BFB\u53D6\u770B\u677F\u8BBE\u7F6E\u5931\u8D25\uFF1A{message}",
|
|
1663
|
+
"board.settings.nav": "Leader Agent",
|
|
1664
|
+
"board.settings.retry": "\u91CD\u8BD5",
|
|
1665
|
+
"board.settings.saveFailed": "\u4FDD\u5B58\u770B\u677F\u8BBE\u7F6E\u5931\u8D25\uFF1A{message}",
|
|
1666
|
+
"board.settings.title": "\u4EFB\u52A1\u770B\u677F",
|
|
1515
1667
|
"board.slot.title": "{name}\uFF1A{state}",
|
|
1516
1668
|
"board.state.attention": "\u9700\u6CE8\u610F",
|
|
1517
1669
|
"board.state.empty": "\u672A\u6D3E\u5DE5",
|
|
@@ -1561,7 +1713,7 @@ var LOCALE_UI = Object.freeze({
|
|
|
1561
1713
|
"common.saving": "\u4FDD\u5B58\u4E2D\u2026",
|
|
1562
1714
|
"guide.action.dismiss": "\u77E5\u9053\u4E86",
|
|
1563
1715
|
"guide.action.intro": "\u4E86\u89E3\u600E\u4E48\u7528",
|
|
1564
|
-
"guide.intro.prompt": "\
|
|
1716
|
+
"guide.intro.prompt": "\u5148\u8BB2\u8BB2 dsh-leader-agent \u600E\u4E48\u7528\uFF1B\u8BB2\u7528\u6CD5\u65F6\u4E0D\u8981\u8BFB\u53D6\u3001\u4FEE\u6539\u6216\u521B\u5EFA\u4EFB\u4F55\u6587\u4EF6\u3002",
|
|
1565
1717
|
"guide.steps": "\u4F60\u53EF\u4EE5\u8BA9\u5B83\u5EFA\u4EFB\u52A1\u5361\u3001\u7ED9 Agent \u6D3E\u6D3B\uFF0C\u5728\u53F3\u680F\u770B\u677F\u8DDF\u8FDB",
|
|
1566
1718
|
"guide.title": "\u8FD9\u4E2A\u76EE\u5F55\u6709\u4E00\u4E2A Leader \u4E86",
|
|
1567
1719
|
"markdown.code": "\u4EE3\u7801",
|
|
@@ -1612,6 +1764,14 @@ var LOCALE_UI = Object.freeze({
|
|
|
1612
1764
|
"project.rename": "\u91CD\u547D\u540D",
|
|
1613
1765
|
"project.replaceLeader": "\u6362\u65B0 Leader",
|
|
1614
1766
|
"session.fold.expand": "\u5C55\u5F00\u5176\u4F59 {count} \u4E2A\u4F1A\u8BDD",
|
|
1767
|
+
"settings.autoResume.desc": "Leader Agent \u6700\u591A\u88AB Worker \u5524\u9192\u591A\u5C11\u6B21\u3002",
|
|
1768
|
+
"settings.autoResume.invalid": "\u8BF7\u8F93\u5165 {min}\u2013{max} \u4E4B\u95F4\u7684\u6574\u6570\u3002",
|
|
1769
|
+
"settings.autoResume.loadFailed": "\u8BFB\u53D6\u8BBE\u7F6E\u5931\u8D25\uFF1A{message}",
|
|
1770
|
+
"settings.autoResume.retry": "\u91CD\u8BD5",
|
|
1771
|
+
"settings.autoResume.saveFailed": "\u4FDD\u5B58\u5931\u8D25\uFF1A{message}",
|
|
1772
|
+
"settings.autoResume.saved": "\u4FDD\u5B58\u6210\u529F",
|
|
1773
|
+
"settings.autoResume.title": "\u81EA\u52A8\u7EED\u884C",
|
|
1774
|
+
"settings.autoResume.unit": "\u6B21",
|
|
1615
1775
|
"slot.dev": "\u5F00\u53D1",
|
|
1616
1776
|
"slot.discuss": "\u8BA8\u8BBA",
|
|
1617
1777
|
"slot.review": "\u5BA1\u6838",
|
|
@@ -1831,12 +1991,12 @@ function linkContent(link) {
|
|
|
1831
1991
|
}
|
|
1832
1992
|
function BoardLinks({ links, onOpenDetail, t }) {
|
|
1833
1993
|
const row = (0, import_react2.useRef)(null);
|
|
1834
|
-
const
|
|
1994
|
+
const measure2 = (0, import_react2.useRef)(null);
|
|
1835
1995
|
const [visibleCount, setVisibleCount] = (0, import_react2.useState)(links.length);
|
|
1836
1996
|
const [expanded, setExpanded] = (0, import_react2.useState)(false);
|
|
1837
1997
|
(0, import_react2.useLayoutEffect)(() => {
|
|
1838
1998
|
const rowElement = row.current;
|
|
1839
|
-
const measureElement =
|
|
1999
|
+
const measureElement = measure2.current;
|
|
1840
2000
|
if (rowElement === null || measureElement === null) return void 0;
|
|
1841
2001
|
const fit = () => {
|
|
1842
2002
|
if (expanded) return;
|
|
@@ -1869,7 +2029,7 @@ function BoardLinks({ links, onOpenDetail, t }) {
|
|
|
1869
2029
|
},
|
|
1870
2030
|
(0, import_react2.createElement)(
|
|
1871
2031
|
"div",
|
|
1872
|
-
{ ref:
|
|
2032
|
+
{ ref: measure2, "aria-hidden": "true", className: "dsh-leader-agent-board-links-measure" },
|
|
1873
2033
|
links.map((link, index) => isJumpableLink(link) ? (0, import_react2.createElement)("a", {
|
|
1874
2034
|
key: linkRowKey(link, index),
|
|
1875
2035
|
href: link.url,
|
|
@@ -1955,7 +2115,29 @@ function BoardSlot({ slot, onOpenSession, labels, t }) {
|
|
|
1955
2115
|
)
|
|
1956
2116
|
);
|
|
1957
2117
|
}
|
|
1958
|
-
function
|
|
2118
|
+
function BoardRailSlot({ slot, onOpenSession, labels, t }) {
|
|
2119
|
+
const stateKey = STATE_LABEL_KEYS[slot.state];
|
|
2120
|
+
const stateLabel = stateKey === void 0 ? slot.state : t(stateKey);
|
|
2121
|
+
const name = slotDisplayName(slot.name, labels, t);
|
|
2122
|
+
const label = t("board.slot.title", { name, state: stateLabel });
|
|
2123
|
+
return (0, import_react2.createElement)(
|
|
2124
|
+
"button",
|
|
2125
|
+
{
|
|
2126
|
+
type: "button",
|
|
2127
|
+
className: `dsh-leader-agent-board-rail-slot dsh-leader-agent-board-rail-slot-${slot.state}`,
|
|
2128
|
+
"data-rail-slot": "",
|
|
2129
|
+
"data-rail-state": slot.state,
|
|
2130
|
+
title: label,
|
|
2131
|
+
"aria-label": label,
|
|
2132
|
+
onClick: (event) => {
|
|
2133
|
+
event.stopPropagation();
|
|
2134
|
+
onOpenSession(slot.sessionId);
|
|
2135
|
+
}
|
|
2136
|
+
},
|
|
2137
|
+
name.slice(0, 1)
|
|
2138
|
+
);
|
|
2139
|
+
}
|
|
2140
|
+
function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLabels, t, cinema }) {
|
|
1959
2141
|
const links = Array.isArray(card.links) ? card.links : [];
|
|
1960
2142
|
const done = card.status === "done";
|
|
1961
2143
|
if (done) {
|
|
@@ -1983,37 +2165,40 @@ function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLab
|
|
|
1983
2165
|
const stalled = isCardStalled(card, states, now);
|
|
1984
2166
|
const hollow = stalled && signal !== "attention";
|
|
1985
2167
|
const kind = cardKind(card);
|
|
1986
|
-
|
|
2168
|
+
const head = (0, import_react2.createElement)(
|
|
2169
|
+
"div",
|
|
2170
|
+
{ className: "dsh-leader-agent-board-card-head" },
|
|
2171
|
+
(0, import_react2.createElement)(
|
|
2172
|
+
"span",
|
|
2173
|
+
{ className: "dsh-leader-agent-board-card-id" },
|
|
2174
|
+
(0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-number" }, `#${card.number ?? "?"}`),
|
|
2175
|
+
kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind-separator" }, "/"),
|
|
2176
|
+
kind === null ? null : (0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-kind", title: kind }, kind)
|
|
2177
|
+
),
|
|
2178
|
+
(0, import_react2.createElement)(
|
|
2179
|
+
"span",
|
|
2180
|
+
{ className: "dsh-leader-agent-board-signal-slot" },
|
|
2181
|
+
(0, import_react2.createElement)("span", {
|
|
2182
|
+
className: `dsh-leader-agent-board-signal dsh-leader-agent-board-signal-${signal}${hollow ? " dsh-leader-agent-board-signal-hollow" : ""}`,
|
|
2183
|
+
title: STATE_LABEL_KEYS[signal] === void 0 ? signal : t(STATE_LABEL_KEYS[signal])
|
|
2184
|
+
})
|
|
2185
|
+
)
|
|
2186
|
+
);
|
|
2187
|
+
const cardElement = (0, import_react2.createElement)(
|
|
1987
2188
|
"div",
|
|
1988
2189
|
{
|
|
1989
|
-
className: "dsh-leader-agent-board-card",
|
|
2190
|
+
className: cinema ? "dsh-leader-agent-board-card dsh-leader-agent-board-card-rail" : "dsh-leader-agent-board-card",
|
|
1990
2191
|
role: "button",
|
|
1991
2192
|
tabIndex: 0,
|
|
1992
2193
|
onClick: (event) => onOpenDetail(card, event.currentTarget),
|
|
1993
2194
|
onKeyDown: (event) => openDetailOnKey(event, card, onOpenDetail)
|
|
1994
2195
|
},
|
|
1995
|
-
|
|
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
|
-
),
|
|
2196
|
+
head,
|
|
2014
2197
|
(0, import_react2.createElement)("span", { className: "dsh-leader-agent-board-card-title", title: card.title }, card.title ?? ""),
|
|
2015
2198
|
links.length > 0 ? (0, import_react2.createElement)(BoardLinks, { links, onOpenDetail: (anchor) => onOpenDetail(card, anchor), t }) : null,
|
|
2016
|
-
|
|
2199
|
+
// 线路图模式把执行者移到卡面右侧的竖槽:它要成为图上的独立节点,留在卡里
|
|
2200
|
+
// 就画不出支线(SVG 垫在卡面下面)
|
|
2201
|
+
cinema ? null : slots.length > 0 ? (0, import_react2.createElement)(
|
|
2017
2202
|
"div",
|
|
2018
2203
|
{ className: "dsh-leader-agent-board-card-slots" },
|
|
2019
2204
|
slots.map((slot) => (0, import_react2.createElement)(BoardSlot, {
|
|
@@ -2025,6 +2210,27 @@ function BoardCardView({ card, states, now, onOpenDetail, onOpenSession, slotLab
|
|
|
2025
2210
|
}))
|
|
2026
2211
|
) : null
|
|
2027
2212
|
);
|
|
2213
|
+
if (!cinema) return cardElement;
|
|
2214
|
+
return (0, import_react2.createElement)(
|
|
2215
|
+
"div",
|
|
2216
|
+
{
|
|
2217
|
+
className: "dsh-leader-agent-board-rail-row",
|
|
2218
|
+
"data-rail-row": "",
|
|
2219
|
+
"data-rail-status": signal
|
|
2220
|
+
},
|
|
2221
|
+
cardElement,
|
|
2222
|
+
slots.length > 0 ? (0, import_react2.createElement)(
|
|
2223
|
+
"div",
|
|
2224
|
+
{ className: "dsh-leader-agent-board-rail-slots" },
|
|
2225
|
+
slots.map((slot) => (0, import_react2.createElement)(BoardRailSlot, {
|
|
2226
|
+
key: slot.name,
|
|
2227
|
+
slot,
|
|
2228
|
+
onOpenSession,
|
|
2229
|
+
labels: slotLabels,
|
|
2230
|
+
t
|
|
2231
|
+
}))
|
|
2232
|
+
) : null
|
|
2233
|
+
);
|
|
2028
2234
|
}
|
|
2029
2235
|
var BoardCard = (0, import_react2.memo)(BoardCardView);
|
|
2030
2236
|
|
|
@@ -2059,6 +2265,20 @@ function escapeAction(event) {
|
|
|
2059
2265
|
return event.repeat === true ? "prevent-only" : "close";
|
|
2060
2266
|
}
|
|
2061
2267
|
|
|
2268
|
+
// src/client/style-sheet.js
|
|
2269
|
+
function ensureStyleSheet(id, text) {
|
|
2270
|
+
if (typeof document === "undefined") return;
|
|
2271
|
+
const existing = document.getElementById(id);
|
|
2272
|
+
if (existing !== null) {
|
|
2273
|
+
if (existing.textContent !== text) existing.textContent = text;
|
|
2274
|
+
return;
|
|
2275
|
+
}
|
|
2276
|
+
const style = document.createElement("style");
|
|
2277
|
+
style.id = id;
|
|
2278
|
+
style.textContent = text;
|
|
2279
|
+
document.head.append(style);
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2062
2282
|
// src/client/modal-shell.js
|
|
2063
2283
|
var STYLE_ID = "dsh-leader-agent-modal";
|
|
2064
2284
|
var STYLE_TEXT = `
|
|
@@ -2236,12 +2456,7 @@ var STYLE_TEXT = `
|
|
|
2236
2456
|
}
|
|
2237
2457
|
`;
|
|
2238
2458
|
function ensureStyles() {
|
|
2239
|
-
|
|
2240
|
-
if (document.getElementById(STYLE_ID) !== null) return;
|
|
2241
|
-
const style = document.createElement("style");
|
|
2242
|
-
style.id = STYLE_ID;
|
|
2243
|
-
style.textContent = STYLE_TEXT;
|
|
2244
|
-
document.head.append(style);
|
|
2459
|
+
ensureStyleSheet(STYLE_ID, STYLE_TEXT);
|
|
2245
2460
|
}
|
|
2246
2461
|
var AUTOMATIC_FOCUS_ATTRIBUTE = "data-dsh-automatic-focus";
|
|
2247
2462
|
var NAVIGATION_KEYS = /* @__PURE__ */ new Set(["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"]);
|
|
@@ -2416,7 +2631,13 @@ var PROJECT_REMOTE_METHODS = Object.freeze({
|
|
|
2416
2631
|
projectSlots: Object.freeze({ projectId: "string" }),
|
|
2417
2632
|
detachSession: Object.freeze({ sessionId: "string" }),
|
|
2418
2633
|
updateCardLinks: Object.freeze({ id: "string", links: "links" }),
|
|
2419
|
-
deleteCard: Object.freeze({ id: "string" })
|
|
2634
|
+
deleteCard: Object.freeze({ id: "string" }),
|
|
2635
|
+
// 设置页也走这条通道:浏览器侧没有文件系统,护栏必须由宿主读写。命名空间
|
|
2636
|
+
// 仍是 projects,它是本插件唯一的 client→host RPC 面;方法名带 Settings
|
|
2637
|
+
// 以示与业务数据分开。
|
|
2638
|
+
readSettings: Object.freeze({}),
|
|
2639
|
+
updateAutoResumeLimit: Object.freeze({ autoResumeLimit: "number" }),
|
|
2640
|
+
setBoardMode: Object.freeze({ boardMode: "string" })
|
|
2420
2641
|
});
|
|
2421
2642
|
|
|
2422
2643
|
// src/client/project-remote.js
|
|
@@ -2444,7 +2665,21 @@ function linksCodec() {
|
|
|
2444
2665
|
})
|
|
2445
2666
|
};
|
|
2446
2667
|
}
|
|
2447
|
-
|
|
2668
|
+
function numberCodec() {
|
|
2669
|
+
return {
|
|
2670
|
+
mode: "strict",
|
|
2671
|
+
typeSymbol: "number",
|
|
2672
|
+
create: () => ({
|
|
2673
|
+
parse: (value) => {
|
|
2674
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
2675
|
+
throw new TypeError(`\u671F\u671B\u6570\u5B57\uFF0C\u6536\u5230 ${typeof value}`);
|
|
2676
|
+
}
|
|
2677
|
+
return value;
|
|
2678
|
+
}
|
|
2679
|
+
})
|
|
2680
|
+
};
|
|
2681
|
+
}
|
|
2682
|
+
var CODEC_FACTORIES = Object.assign(/* @__PURE__ */ Object.create(null), { string: stringCodec, links: linksCodec, number: numberCodec });
|
|
2448
2683
|
function codecFor(type) {
|
|
2449
2684
|
return CODEC_FACTORIES[type]();
|
|
2450
2685
|
}
|
|
@@ -2588,15 +2823,15 @@ function CardLinksEditor({ card, onSave, onCancel, t }) {
|
|
|
2588
2823
|
}, [saving]);
|
|
2589
2824
|
function update(key, field, value) {
|
|
2590
2825
|
setError("");
|
|
2591
|
-
setDrafts((
|
|
2826
|
+
setDrafts((current3) => current3.map((draft) => draft.key === key ? { ...draft, [field]: value } : draft));
|
|
2592
2827
|
}
|
|
2593
2828
|
function remove(key) {
|
|
2594
2829
|
setError("");
|
|
2595
|
-
setDrafts((
|
|
2830
|
+
setDrafts((current3) => current3.filter((draft) => draft.key !== key));
|
|
2596
2831
|
}
|
|
2597
2832
|
function add() {
|
|
2598
2833
|
setError("");
|
|
2599
|
-
setDrafts((
|
|
2834
|
+
setDrafts((current3) => [...current3, { key: nextDraftKey(), label: "", url: "" }]);
|
|
2600
2835
|
}
|
|
2601
2836
|
async function submit() {
|
|
2602
2837
|
if (saving) return;
|
|
@@ -2959,18 +3194,18 @@ ${signalStyleText("dsh-leader-agent-board-signal")}
|
|
|
2959
3194
|
color: var(--dsw-alias-label-tertiary);
|
|
2960
3195
|
}
|
|
2961
3196
|
|
|
2962
|
-
/* \u6807\u9898\
|
|
2963
|
-
\
|
|
3197
|
+
/* \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
|
|
3198
|
+
\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
|
|
3199
|
+
medium \u800C\u975E semibold\u2014\u2014\u4FE1\u53F7\u706F\u4E0E\u72B6\u6001\u8272\u5DF2\u627F\u62C5\u5F3A\u8C03 */
|
|
2964
3200
|
.dsh-leader-agent-board-card-title {
|
|
2965
|
-
display:
|
|
2966
|
-
|
|
2967
|
-
-
|
|
3201
|
+
display: block;
|
|
3202
|
+
overflow: hidden;
|
|
3203
|
+
white-space: nowrap;
|
|
3204
|
+
text-overflow: ellipsis;
|
|
2968
3205
|
font-size: 13px;
|
|
2969
3206
|
line-height: 20px;
|
|
2970
3207
|
font-weight: 500;
|
|
2971
3208
|
color: var(--dsw-alias-label-primary);
|
|
2972
|
-
overflow: hidden;
|
|
2973
|
-
overflow-wrap: anywhere;
|
|
2974
3209
|
}
|
|
2975
3210
|
|
|
2976
3211
|
/* \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
|
|
@@ -3888,17 +4123,19 @@ ${signalStyleText("dsh-leader-agent-board-signal")}
|
|
|
3888
4123
|
|
|
3889
4124
|
/* leader \u4F1A\u8BDD\u7684\u4E00\u6B21\u6027\u5F15\u5BFC\u6761\uFF1A\u4E0E\u8F93\u5165\u6846\u540C\u4E00\u5957\u51E0\u4F55\u2014\u2014\u5BBD\u5EA6\u5171\u7528\u5BBF\u4E3B\u7ED9\u8F93\u5165\u6846\u5916\u58F3\u7684
|
|
3890
4125
|
--dsh-composer-card-max-width\uFF08\u540C\u4E00\u4E2A token\uFF0C\u7A97\u53E3\u53D8\u7A84\u65F6\u4E00\u8D77\u6536\uFF09\uFF0C\u5706\u89D2\u540C\u53D6
|
|
3891
|
-
--dsw-radius-panel\u3002\
|
|
3892
|
-
\
|
|
3893
|
-
\
|
|
3894
|
-
\
|
|
4126
|
+
--dsw-radius-panel\u3002\u5BBF\u4E3B\u8F93\u5165\u6761\u5728\u5916\u5C42 root \u4E0A\u6309 --dsh-composer-side-clearance
|
|
4127
|
+
\u5DE6\u53F3\u5185\u7F29\uFF1B\u672C\u6761\u7684\u69FD\u4F4D\u5728 padding \u4E4B\u5916\uFF0C\u5FC5\u987B\u81EA\u5DF1\u51CF\u6389\u540C\u4E00\u6761 clearance\uFF0C\u5426\u5219\u7A84\u7A97\u53E3
|
|
4128
|
+
\u4E0B\u4F1A\u6BD4\u8F93\u5165\u6846\u4E24\u8FB9\u5404\u5BBD\u4E00\u622A\u3001\u770B\u8D77\u6765\u6CA1\u5BF9\u9F50\u3002\u6750\u8D28\u523B\u610F\u6BD4\u8F93\u5165\u6846\u8F7B\u4E00\u6863\uFF1A\u8F93\u5165\u6846\u662F\u767D\u9762 +
|
|
4129
|
+
elevation-soft\uFF0C\u5F15\u5BFC\u6761\u53D6\u4EA4\u4E92\u60AC\u505C\u6863\u7684\u6D45\u5E95\u3001\u4E0D\u53E0\u6295\u5F71\uFF0C\u4E24\u5757\u53E0\u5728\u4E00\u8D77\u624D\u4E0D\u4F1A\u88AB\u8BFB\u6210
|
|
4130
|
+
\u4E24\u4E2A\u8F93\u5165\u6846\u3002\u6587\u5B57\u6863\u5BF9\u9F50\u5BBF\u4E3B\u6B63\u6587\uFF1A\u6807\u9898 14/22 500\uFF0C\u6B65\u9AA4 13/20\uFF08\u5BBF\u4E3B\u91CC 11/12 \u53EA
|
|
4131
|
+
\u7528\u4E8E\u5143\u4FE1\u606F\uFF0C\u63D0\u793A\u6B63\u6587\u4E0D\u8BE5\u6BD4\u5B83\u66F4\u5C0F\uFF09\u3002 */
|
|
3895
4132
|
.dsh-leader-agent-guide-card {
|
|
3896
4133
|
display: flex;
|
|
3897
4134
|
flex-wrap: wrap;
|
|
3898
4135
|
align-items: flex-start;
|
|
3899
4136
|
gap: 8px 10px;
|
|
3900
4137
|
box-sizing: border-box;
|
|
3901
|
-
width: 100
|
|
4138
|
+
width: calc(100% - 2 * var(--dsh-composer-side-clearance, 16px));
|
|
3902
4139
|
max-width: var(--dsh-composer-card-max-width, 952px);
|
|
3903
4140
|
margin: 0 auto 8px;
|
|
3904
4141
|
padding: 10px 14px;
|
|
@@ -3941,14 +4178,481 @@ ${signalStyleText("dsh-leader-agent-board-signal")}
|
|
|
3941
4178
|
gap: 4px;
|
|
3942
4179
|
margin-left: auto;
|
|
3943
4180
|
}
|
|
4181
|
+
|
|
4182
|
+
/* ===== \u7EBF\u8DEF\u56FE\u6A21\u5F0F =====
|
|
4183
|
+
\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
|
|
4184
|
+
\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
|
|
4185
|
+
\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
|
|
4186
|
+
\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
|
|
4187
|
+
\u5361\u9762\u4E0E\u6587\u5B57\u6863\uFF0C\u53EA\u91CD\u753B\u677F\u5E95\u4E0E\u8F68\u9053\u3002 */
|
|
4188
|
+
.dsh-leader-agent-board-list-cinema {
|
|
4189
|
+
margin: 0;
|
|
4190
|
+
padding: 8px 6px 18px 0;
|
|
4191
|
+
}
|
|
4192
|
+
|
|
4193
|
+
.dsh-leader-agent-board-list-cinema-light {
|
|
4194
|
+
--dla-structure: var(--dsw-static-neutral-bluish-300);
|
|
4195
|
+
--dla-structure-strong: var(--dsw-static-neutral-bluish-400);
|
|
4196
|
+
--dla-accent: var(--dsw-static-blue-600);
|
|
4197
|
+
--dla-danger: var(--dsw-static-red-600);
|
|
4198
|
+
--dla-node-fill: var(--dsw-static-neutral-00);
|
|
4199
|
+
--dla-trail: var(--dsw-static-blue-600);
|
|
4200
|
+
--dla-trail-shadow: none;
|
|
4201
|
+
--dla-comet: var(--dsw-static-blue-600);
|
|
4202
|
+
}
|
|
4203
|
+
|
|
4204
|
+
.dsh-leader-agent-board-list-cinema-dark {
|
|
4205
|
+
--dsw-alias-label-primary: var(--dsw-static-neutral-bluish-100);
|
|
4206
|
+
--dsw-alias-label-secondary: var(--dsw-static-neutral-bluish-300);
|
|
4207
|
+
--dsw-alias-label-tertiary: var(--dsw-static-neutral-bluish-400);
|
|
4208
|
+
--dsw-alias-label-caption: var(--dsw-static-neutral-bluish-500);
|
|
4209
|
+
--dsw-alias-bg-layer-2: var(--dsw-static-neutral-bluish-900);
|
|
4210
|
+
--dsw-alias-bg-layer-3: var(--dsw-static-neutral-bluish-850);
|
|
4211
|
+
--dsw-alias-border-l3: var(--dsw-static-neutral-bluish-800);
|
|
4212
|
+
--dsw-alias-border-l4: var(--dsw-static-neutral-bluish-700);
|
|
4213
|
+
--dsw-alias-interactive-bg-hover: var(--dsw-static-neutral-bluish-800);
|
|
4214
|
+
--dsw-alias-link: var(--dsw-static-blue-500);
|
|
4215
|
+
--dsw-alias-bg-skeleton: var(--dsw-static-neutral-bluish-800);
|
|
4216
|
+
--dla-structure: var(--dsw-static-neutral-bluish-800);
|
|
4217
|
+
--dla-structure-strong: var(--dsw-static-neutral-bluish-600);
|
|
4218
|
+
--dla-accent: var(--dsw-static-amber-500);
|
|
4219
|
+
--dla-danger: var(--dsw-static-red-500);
|
|
4220
|
+
--dla-node-fill: var(--dsw-static-neutral-bluish-1000);
|
|
4221
|
+
--dla-trail: var(--dsw-static-amber-100);
|
|
4222
|
+
--dla-trail-shadow: drop-shadow(0 0 4px var(--dsw-static-amber-400));
|
|
4223
|
+
--dla-comet: var(--dsw-static-amber-100);
|
|
4224
|
+
}
|
|
4225
|
+
|
|
4226
|
+
.dsh-leader-agent-board-stage {
|
|
4227
|
+
position: relative;
|
|
4228
|
+
}
|
|
4229
|
+
|
|
4230
|
+
/* \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 */
|
|
4231
|
+
.dsh-leader-agent-board-stage > .dsh-leader-agent-board-group {
|
|
4232
|
+
position: relative;
|
|
4233
|
+
z-index: 1;
|
|
4234
|
+
}
|
|
4235
|
+
|
|
4236
|
+
.dsh-leader-agent-board-list-cinema .dsh-leader-agent-board-stage {
|
|
4237
|
+
padding: 6px 0 12px 44px;
|
|
4238
|
+
}
|
|
4239
|
+
|
|
4240
|
+
.dsh-leader-agent-board-rail {
|
|
4241
|
+
position: absolute;
|
|
4242
|
+
inset: 0;
|
|
4243
|
+
z-index: 0;
|
|
4244
|
+
width: 100%;
|
|
4245
|
+
height: 100%;
|
|
4246
|
+
overflow: visible;
|
|
4247
|
+
pointer-events: none;
|
|
4248
|
+
}
|
|
4249
|
+
|
|
4250
|
+
.dsh-leader-agent-board-rail-head {
|
|
4251
|
+
position: relative;
|
|
4252
|
+
z-index: 1;
|
|
4253
|
+
display: flex;
|
|
4254
|
+
align-items: center;
|
|
4255
|
+
height: 52px;
|
|
4256
|
+
}
|
|
4257
|
+
|
|
4258
|
+
.dsh-leader-agent-board-rail-orb {
|
|
4259
|
+
position: absolute;
|
|
4260
|
+
left: -24px;
|
|
4261
|
+
top: 50%;
|
|
4262
|
+
width: 12px;
|
|
4263
|
+
height: 12px;
|
|
4264
|
+
border-radius: 50%;
|
|
4265
|
+
corner-shape: round;
|
|
4266
|
+
transform: translate(-50%, -50%);
|
|
4267
|
+
background: radial-gradient(
|
|
4268
|
+
circle at 35% 30%,
|
|
4269
|
+
var(--dsw-static-amber-100),
|
|
4270
|
+
var(--dsw-static-amber-400) 55%,
|
|
4271
|
+
var(--dsw-static-amber-600)
|
|
4272
|
+
);
|
|
4273
|
+
box-shadow: 0 0 14px var(--dsw-static-amber-500);
|
|
4274
|
+
}
|
|
4275
|
+
|
|
4276
|
+
/* \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 */
|
|
4277
|
+
.dsh-leader-agent-board-list-cinema-light .dsh-leader-agent-board-rail-orb {
|
|
4278
|
+
width: 10px;
|
|
4279
|
+
height: 10px;
|
|
4280
|
+
border: 1.5px solid var(--dla-accent);
|
|
4281
|
+
border-radius: 2px;
|
|
4282
|
+
background: var(--dsw-static-neutral-00);
|
|
4283
|
+
box-shadow: none;
|
|
4284
|
+
}
|
|
4285
|
+
|
|
4286
|
+
.dsh-leader-agent-board-list-cinema-light .dsh-leader-agent-board-rail-orb::after {
|
|
4287
|
+
content: "";
|
|
4288
|
+
position: absolute;
|
|
4289
|
+
inset: 2px;
|
|
4290
|
+
border-radius: 1px;
|
|
4291
|
+
background: var(--dla-accent);
|
|
4292
|
+
}
|
|
4293
|
+
|
|
4294
|
+
.dsh-leader-agent-board-rail-meta b {
|
|
4295
|
+
display: block;
|
|
4296
|
+
font-family: ui-monospace, Menlo, monospace;
|
|
4297
|
+
font-size: 11px;
|
|
4298
|
+
font-weight: 700;
|
|
4299
|
+
letter-spacing: 0.14em;
|
|
4300
|
+
text-transform: uppercase;
|
|
4301
|
+
color: var(--dsw-alias-label-primary);
|
|
4302
|
+
}
|
|
4303
|
+
|
|
4304
|
+
.dsh-leader-agent-board-rail-meta span {
|
|
4305
|
+
display: block;
|
|
4306
|
+
margin-top: 1px;
|
|
4307
|
+
font-family: ui-monospace, Menlo, monospace;
|
|
4308
|
+
font-size: 10.5px;
|
|
4309
|
+
color: var(--dsw-alias-label-tertiary);
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4312
|
+
.dsh-leader-agent-board-rail-row {
|
|
4313
|
+
display: grid;
|
|
4314
|
+
grid-template-columns: minmax(0, 1fr) clamp(44px, 17%, 60px);
|
|
4315
|
+
align-items: center;
|
|
4316
|
+
gap: 10px;
|
|
4317
|
+
}
|
|
4318
|
+
|
|
4319
|
+
.dsh-leader-agent-board-rail-slots {
|
|
4320
|
+
display: flex;
|
|
4321
|
+
flex-direction: column;
|
|
4322
|
+
align-items: flex-end;
|
|
4323
|
+
gap: 4px;
|
|
4324
|
+
padding-right: 8px;
|
|
4325
|
+
}
|
|
4326
|
+
|
|
4327
|
+
.dsh-leader-agent-board-rail-slot {
|
|
4328
|
+
display: grid;
|
|
4329
|
+
place-items: center;
|
|
4330
|
+
box-sizing: border-box;
|
|
4331
|
+
width: 24px;
|
|
4332
|
+
height: 24px;
|
|
4333
|
+
padding: 0;
|
|
4334
|
+
border: 1px solid var(--dla-structure-strong);
|
|
4335
|
+
border-radius: 50%;
|
|
4336
|
+
corner-shape: round;
|
|
4337
|
+
background: var(--dsw-alias-bg-layer-2);
|
|
4338
|
+
color: var(--dsw-alias-label-secondary);
|
|
4339
|
+
font: inherit;
|
|
4340
|
+
font-size: 8px;
|
|
4341
|
+
font-weight: 650;
|
|
4342
|
+
line-height: 1;
|
|
4343
|
+
cursor: pointer;
|
|
4344
|
+
}
|
|
4345
|
+
|
|
4346
|
+
.dsh-leader-agent-board-rail-slot:focus-visible {
|
|
4347
|
+
outline: var(--dsw-focus-ring-width, 2px) solid var(--dla-accent);
|
|
4348
|
+
outline-offset: 1px;
|
|
4349
|
+
}
|
|
4350
|
+
|
|
4351
|
+
.dsh-leader-agent-board-rail-slot-running {
|
|
4352
|
+
border-color: var(--dla-accent);
|
|
4353
|
+
}
|
|
4354
|
+
|
|
4355
|
+
.dsh-leader-agent-board-rail-slot-attention {
|
|
4356
|
+
border-color: var(--dla-danger);
|
|
4357
|
+
}
|
|
4358
|
+
|
|
4359
|
+
.dsh-leader-agent-board-rail-slot-idle {
|
|
4360
|
+
color: var(--dsw-alias-label-tertiary);
|
|
4361
|
+
}
|
|
4362
|
+
|
|
4363
|
+
.dsh-leader-agent-board-rail-slot-more {
|
|
4364
|
+
font-size: 7px;
|
|
4365
|
+
color: var(--dsw-alias-label-tertiary);
|
|
4366
|
+
cursor: default;
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4369
|
+
@media (hover: hover) {
|
|
4370
|
+
.dsh-leader-agent-board-list-cinema-dark .dsh-leader-agent-board-card:hover {
|
|
4371
|
+
--dsw-elevation-stroke-color: var(--dsw-static-neutral-bluish-600);
|
|
4372
|
+
}
|
|
4373
|
+
}
|
|
4374
|
+
|
|
4375
|
+
.dsh-leader-agent-board-rail-trunk {
|
|
4376
|
+
fill: none;
|
|
4377
|
+
stroke: var(--dla-structure);
|
|
4378
|
+
stroke-width: 1.2;
|
|
4379
|
+
}
|
|
4380
|
+
|
|
4381
|
+
.dsh-leader-agent-board-rail-edge {
|
|
4382
|
+
fill: none;
|
|
4383
|
+
stroke: var(--dla-structure);
|
|
4384
|
+
stroke-width: 1.2;
|
|
4385
|
+
stroke-linecap: round;
|
|
4386
|
+
}
|
|
4387
|
+
|
|
4388
|
+
.dsh-leader-agent-board-rail-hot {
|
|
4389
|
+
fill: none;
|
|
4390
|
+
stroke: var(--dla-accent);
|
|
4391
|
+
stroke-width: 1.8;
|
|
4392
|
+
stroke-linecap: round;
|
|
4393
|
+
}
|
|
4394
|
+
|
|
4395
|
+
.dsh-leader-agent-board-rail-warn {
|
|
4396
|
+
fill: none;
|
|
4397
|
+
stroke: var(--dla-danger);
|
|
4398
|
+
stroke-width: 1.6;
|
|
4399
|
+
stroke-linecap: round;
|
|
4400
|
+
animation: dsh-leader-agent-rail-breathe 1.8s ease-in-out infinite;
|
|
4401
|
+
}
|
|
4402
|
+
|
|
4403
|
+
.dsh-leader-agent-board-rail-trail {
|
|
4404
|
+
fill: none;
|
|
4405
|
+
stroke: var(--dla-trail);
|
|
4406
|
+
stroke-width: 2.8;
|
|
4407
|
+
stroke-linecap: round;
|
|
4408
|
+
filter: var(--dla-trail-shadow);
|
|
4409
|
+
animation: dsh-leader-agent-rail-flow 2.4s linear infinite;
|
|
4410
|
+
}
|
|
4411
|
+
|
|
4412
|
+
@keyframes dsh-leader-agent-rail-flow {
|
|
4413
|
+
from { stroke-dashoffset: var(--dla-from, 44px); }
|
|
4414
|
+
to { stroke-dashoffset: var(--dla-to, -320px); }
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
@keyframes dsh-leader-agent-rail-breathe {
|
|
4418
|
+
0%, 100% { opacity: 1; }
|
|
4419
|
+
50% { opacity: 0.45; }
|
|
4420
|
+
}
|
|
4421
|
+
|
|
4422
|
+
.dsh-leader-agent-board-rail-node {
|
|
4423
|
+
fill: var(--dla-node-fill);
|
|
4424
|
+
stroke: var(--dla-structure-strong);
|
|
4425
|
+
stroke-width: 1.4;
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
.dsh-leader-agent-board-rail-node-running { stroke: var(--dla-accent); }
|
|
4429
|
+
.dsh-leader-agent-board-rail-node-attention { stroke: var(--dla-danger); }
|
|
4430
|
+
|
|
4431
|
+
.dsh-leader-agent-board-rail-halo {
|
|
4432
|
+
fill: none;
|
|
4433
|
+
stroke: var(--dla-accent);
|
|
4434
|
+
stroke-width: 1;
|
|
4435
|
+
animation: dsh-leader-agent-rail-halo 2.2s ease-out infinite;
|
|
4436
|
+
}
|
|
4437
|
+
|
|
4438
|
+
@keyframes dsh-leader-agent-rail-halo {
|
|
4439
|
+
0% { r: 4; opacity: 0.8; }
|
|
4440
|
+
100% { r: 13; opacity: 0; }
|
|
4441
|
+
}
|
|
4442
|
+
|
|
4443
|
+
.dsh-leader-agent-board-rail-comet {
|
|
4444
|
+
fill: var(--dla-comet);
|
|
4445
|
+
filter: var(--dla-trail-shadow);
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4449
|
+
.dsh-leader-agent-board-rail-trail,
|
|
4450
|
+
.dsh-leader-agent-board-rail-warn,
|
|
4451
|
+
.dsh-leader-agent-board-rail-halo {
|
|
4452
|
+
animation: none;
|
|
4453
|
+
}
|
|
4454
|
+
}
|
|
4455
|
+
|
|
4456
|
+
/* ===== \u8BBE\u7F6E\u9875 ===== */
|
|
4457
|
+
/* \u5BF9\u9F50\u5BBF\u4E3B\u7684\u8BBE\u7F6E\u884C\uFF1A564px \u5185\u5BB9\u5BBD\u300114/22 \u6807\u9898\u300112/18 \u8BF4\u660E\u300116px \u4E0A\u4E0B\u5185\u8FB9\u8DDD\u3001
|
|
4458
|
+
1px \u5E95\u90E8\u5206\u9694\u7EBF\uFF1B\u63A7\u4EF6\u653E\u5728\u53F3\u4FA7\uFF0C\u4E0D\u518D\u7528\u63D2\u4EF6\u81EA\u5DF1\u7684\u5361\u7247\u58F3\u3002 */
|
|
4459
|
+
.dsh-leader-agent-settings {
|
|
4460
|
+
display: flex;
|
|
4461
|
+
flex-direction: column;
|
|
4462
|
+
max-width: 564px;
|
|
4463
|
+
color: var(--dsw-alias-label-primary);
|
|
4464
|
+
}
|
|
4465
|
+
|
|
4466
|
+
.dsh-leader-agent-settings-section {
|
|
4467
|
+
display: flex;
|
|
4468
|
+
flex-direction: column;
|
|
4469
|
+
gap: 8px;
|
|
4470
|
+
padding: 16px 0;
|
|
4471
|
+
border-bottom: 0.5px solid var(--dsw-alias-border-l3);
|
|
4472
|
+
}
|
|
4473
|
+
|
|
4474
|
+
.dsh-leader-agent-settings-section:last-child {
|
|
4475
|
+
border-bottom: 0;
|
|
4476
|
+
}
|
|
4477
|
+
|
|
4478
|
+
.dsh-leader-agent-settings-title,
|
|
4479
|
+
.dsh-leader-agent-settings-subtitle {
|
|
4480
|
+
margin: 0;
|
|
4481
|
+
font-size: 14px;
|
|
4482
|
+
line-height: 22px;
|
|
4483
|
+
font-weight: 400;
|
|
4484
|
+
color: var(--dsw-alias-label-primary);
|
|
4485
|
+
}
|
|
4486
|
+
|
|
4487
|
+
.dsh-leader-agent-settings-desc {
|
|
4488
|
+
margin: 0;
|
|
4489
|
+
font-size: 12px;
|
|
4490
|
+
line-height: 18px;
|
|
4491
|
+
color: var(--dsw-alias-label-tertiary);
|
|
4492
|
+
}
|
|
4493
|
+
|
|
4494
|
+
.dsh-leader-agent-settings-options {
|
|
4495
|
+
display: flex;
|
|
4496
|
+
gap: 8px;
|
|
4497
|
+
}
|
|
4498
|
+
|
|
4499
|
+
.dsh-leader-agent-settings-option {
|
|
4500
|
+
display: flex;
|
|
4501
|
+
flex: 1 1 180px;
|
|
4502
|
+
flex-direction: column;
|
|
4503
|
+
align-items: center;
|
|
4504
|
+
justify-content: center;
|
|
4505
|
+
gap: 4px;
|
|
4506
|
+
box-sizing: border-box;
|
|
4507
|
+
min-height: 96px;
|
|
4508
|
+
padding: 16px 20px;
|
|
4509
|
+
border: 1px solid var(--dsw-alias-settings-card-stroke);
|
|
4510
|
+
border-radius: var(--dsw-radius-xl);
|
|
4511
|
+
background: transparent;
|
|
4512
|
+
color: var(--dsw-alias-label-primary);
|
|
4513
|
+
font: inherit;
|
|
4514
|
+
font-size: 14px;
|
|
4515
|
+
line-height: 22px;
|
|
4516
|
+
text-align: center;
|
|
4517
|
+
cursor: pointer;
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4520
|
+
@media (hover: hover) {
|
|
4521
|
+
.dsh-leader-agent-settings-option:hover:not(:disabled) {
|
|
4522
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
4523
|
+
}
|
|
4524
|
+
}
|
|
4525
|
+
|
|
4526
|
+
.dsh-leader-agent-settings-option:focus-visible {
|
|
4527
|
+
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-alias-state-business-primary);
|
|
4528
|
+
outline-offset: 1px;
|
|
4529
|
+
}
|
|
4530
|
+
|
|
4531
|
+
.dsh-leader-agent-settings-option:disabled {
|
|
4532
|
+
opacity: 0.6;
|
|
4533
|
+
cursor: default;
|
|
4534
|
+
}
|
|
4535
|
+
|
|
4536
|
+
.dsh-leader-agent-settings-option-selected {
|
|
4537
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
4538
|
+
border-color: var(--dsw-static-neutral-bluish-400);
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4541
|
+
.dsh-leader-agent-settings-option-icon {
|
|
4542
|
+
display: inline-flex;
|
|
4543
|
+
color: var(--dsw-alias-label-primary);
|
|
4544
|
+
}
|
|
4545
|
+
|
|
4546
|
+
.dsh-leader-agent-settings-option-label {
|
|
4547
|
+
display: block;
|
|
4548
|
+
}
|
|
4549
|
+
|
|
4550
|
+
.dsh-leader-agent-settings-option-desc {
|
|
4551
|
+
font-size: 12px;
|
|
4552
|
+
line-height: 18px;
|
|
4553
|
+
color: var(--dsw-alias-label-tertiary);
|
|
4554
|
+
}
|
|
4555
|
+
|
|
4556
|
+
.dsh-leader-agent-settings-row {
|
|
4557
|
+
display: flex;
|
|
4558
|
+
align-items: center;
|
|
4559
|
+
gap: 8px;
|
|
4560
|
+
}
|
|
4561
|
+
|
|
4562
|
+
.dsh-leader-agent-settings-row-text {
|
|
4563
|
+
display: flex;
|
|
4564
|
+
flex: 1;
|
|
4565
|
+
flex-direction: column;
|
|
4566
|
+
gap: 4px;
|
|
4567
|
+
padding-right: 48px;
|
|
4568
|
+
}
|
|
4569
|
+
|
|
4570
|
+
.dsh-leader-agent-settings-control {
|
|
4571
|
+
display: flex;
|
|
4572
|
+
flex: none;
|
|
4573
|
+
align-items: center;
|
|
4574
|
+
gap: 6px;
|
|
4575
|
+
height: 36px;
|
|
4576
|
+
}
|
|
4577
|
+
|
|
4578
|
+
.dsh-leader-agent-settings-input {
|
|
4579
|
+
box-sizing: border-box;
|
|
4580
|
+
width: 72px;
|
|
4581
|
+
height: 36px;
|
|
4582
|
+
padding: 0 10px;
|
|
4583
|
+
border: 0.5px solid var(--dsw-alias-border-l4);
|
|
4584
|
+
border-radius: var(--dsw-radius-md);
|
|
4585
|
+
outline: none;
|
|
4586
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
4587
|
+
color: var(--dsw-alias-label-primary);
|
|
4588
|
+
font: inherit;
|
|
4589
|
+
font-size: 14px;
|
|
4590
|
+
line-height: 22px;
|
|
4591
|
+
text-align: center;
|
|
4592
|
+
font-variant-numeric: tabular-nums;
|
|
4593
|
+
}
|
|
4594
|
+
|
|
4595
|
+
.dsh-leader-agent-settings-control input.dsh-leader-agent-settings-input:focus-visible {
|
|
4596
|
+
border-color: var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
4597
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)) 18%, transparent);
|
|
4598
|
+
outline: none;
|
|
4599
|
+
}
|
|
4600
|
+
|
|
4601
|
+
.dsh-leader-agent-settings-input:disabled {
|
|
4602
|
+
opacity: 0.6;
|
|
4603
|
+
}
|
|
4604
|
+
|
|
4605
|
+
.dsh-leader-agent-settings-input[aria-invalid="true"] {
|
|
4606
|
+
color: var(--dsw-alias-state-error-primary);
|
|
4607
|
+
}
|
|
4608
|
+
|
|
4609
|
+
.dsh-leader-agent-settings-unit {
|
|
4610
|
+
font-size: 14px;
|
|
4611
|
+
line-height: 22px;
|
|
4612
|
+
color: var(--dsw-alias-label-tertiary);
|
|
4613
|
+
}
|
|
4614
|
+
|
|
4615
|
+
.dsh-leader-agent-settings-error,
|
|
4616
|
+
.dsh-leader-agent-settings-saved {
|
|
4617
|
+
margin: 0;
|
|
4618
|
+
font-size: 12px;
|
|
4619
|
+
line-height: 18px;
|
|
4620
|
+
}
|
|
4621
|
+
|
|
4622
|
+
.dsh-leader-agent-settings-error {
|
|
4623
|
+
color: var(--dsw-alias-state-error-primary);
|
|
4624
|
+
}
|
|
4625
|
+
|
|
4626
|
+
.dsh-leader-agent-settings-saved {
|
|
4627
|
+
color: var(--dsw-alias-state-success-primary);
|
|
4628
|
+
}
|
|
4629
|
+
|
|
4630
|
+
.dsh-leader-agent-settings-retry-row {
|
|
4631
|
+
display: flex;
|
|
4632
|
+
align-items: center;
|
|
4633
|
+
gap: 8px;
|
|
4634
|
+
flex-wrap: wrap;
|
|
4635
|
+
}
|
|
4636
|
+
|
|
4637
|
+
.dsh-leader-agent-settings-retry {
|
|
4638
|
+
padding: 0;
|
|
4639
|
+
border: 0;
|
|
4640
|
+
background: none;
|
|
4641
|
+
color: var(--dsw-alias-link);
|
|
4642
|
+
font: inherit;
|
|
4643
|
+
font-size: 12px;
|
|
4644
|
+
line-height: 18px;
|
|
4645
|
+
cursor: pointer;
|
|
4646
|
+
}
|
|
4647
|
+
|
|
4648
|
+
.dsh-leader-agent-settings-retry:focus-visible {
|
|
4649
|
+
outline: var(--dsw-focus-ring-width, 2px) solid var(--dsw-alias-state-business-primary);
|
|
4650
|
+
outline-offset: 2px;
|
|
4651
|
+
}
|
|
4652
|
+
|
|
3944
4653
|
`;
|
|
3945
4654
|
function ensureBoardStyles() {
|
|
3946
|
-
|
|
3947
|
-
if (document.getElementById(STYLE_ID2) !== null) return;
|
|
3948
|
-
const style = document.createElement("style");
|
|
3949
|
-
style.id = STYLE_ID2;
|
|
3950
|
-
style.textContent = STYLE_TEXT2;
|
|
3951
|
-
document.head.append(style);
|
|
4655
|
+
ensureStyleSheet(STYLE_ID2, STYLE_TEXT2);
|
|
3952
4656
|
}
|
|
3953
4657
|
|
|
3954
4658
|
// src/client/card-detail.js
|
|
@@ -4175,7 +4879,357 @@ function lastBoardForegroundSession() {
|
|
|
4175
4879
|
return foregroundSessionId;
|
|
4176
4880
|
}
|
|
4177
4881
|
|
|
4882
|
+
// src/shared/settings.js
|
|
4883
|
+
var AUTO_RESUME_LIMIT_DEFAULT = 200;
|
|
4884
|
+
var AUTO_RESUME_LIMIT_MIN = 1;
|
|
4885
|
+
var AUTO_RESUME_LIMIT_MAX = 1e4;
|
|
4886
|
+
function parseAutoResumeLimit(raw) {
|
|
4887
|
+
const value = typeof raw === "string" ? Number(raw.trim()) : raw;
|
|
4888
|
+
if (typeof value !== "number" || !Number.isInteger(value)) return void 0;
|
|
4889
|
+
if (value < AUTO_RESUME_LIMIT_MIN || value > AUTO_RESUME_LIMIT_MAX) return void 0;
|
|
4890
|
+
return value;
|
|
4891
|
+
}
|
|
4892
|
+
var BOARD_MODE_WORK = "work";
|
|
4893
|
+
var BOARD_MODE_CINEMA = "cinema";
|
|
4894
|
+
var BOARD_MODE_DEFAULT = BOARD_MODE_WORK;
|
|
4895
|
+
var BOARD_MODES = Object.freeze([BOARD_MODE_WORK, BOARD_MODE_CINEMA]);
|
|
4896
|
+
function normalizeBoardMode(value) {
|
|
4897
|
+
return value === BOARD_MODE_CINEMA ? BOARD_MODE_CINEMA : BOARD_MODE_WORK;
|
|
4898
|
+
}
|
|
4899
|
+
|
|
4900
|
+
// src/client/board-mode.js
|
|
4901
|
+
var current = BOARD_MODE_DEFAULT;
|
|
4902
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
4903
|
+
function getBoardMode() {
|
|
4904
|
+
return current;
|
|
4905
|
+
}
|
|
4906
|
+
function subscribeBoardMode(listener) {
|
|
4907
|
+
listeners.add(listener);
|
|
4908
|
+
return () => {
|
|
4909
|
+
listeners.delete(listener);
|
|
4910
|
+
};
|
|
4911
|
+
}
|
|
4912
|
+
function setBoardMode(mode) {
|
|
4913
|
+
const next = normalizeBoardMode(mode);
|
|
4914
|
+
if (next === current) return next;
|
|
4915
|
+
current = next;
|
|
4916
|
+
for (const listener of Array.from(listeners)) listener(next);
|
|
4917
|
+
return next;
|
|
4918
|
+
}
|
|
4919
|
+
|
|
4920
|
+
// src/client/board-rail.js
|
|
4921
|
+
var import_react8 = require("react");
|
|
4922
|
+
|
|
4923
|
+
// src/client/board-rail-plan.js
|
|
4924
|
+
var RAIL_LANE_HOT = "hot";
|
|
4925
|
+
var RAIL_LANE_WARN = "warn";
|
|
4926
|
+
var RAIL_LANE_MUTED = "muted";
|
|
4927
|
+
function railLaneKind(status) {
|
|
4928
|
+
if (status === "running") return RAIL_LANE_HOT;
|
|
4929
|
+
if (status === "attention") return RAIL_LANE_WARN;
|
|
4930
|
+
return RAIL_LANE_MUTED;
|
|
4931
|
+
}
|
|
4932
|
+
function railNodeState(status) {
|
|
4933
|
+
if (status === "running") return "running";
|
|
4934
|
+
if (status === "attention") return "attention";
|
|
4935
|
+
return "idle";
|
|
4936
|
+
}
|
|
4937
|
+
function px(value) {
|
|
4938
|
+
return Math.round(value * 10) / 10;
|
|
4939
|
+
}
|
|
4940
|
+
function railTickPath({ trunkX, fromY, cy, cardX }) {
|
|
4941
|
+
return `M${px(trunkX)},${px(fromY)} L${px(trunkX)},${px(cy)} L${px(cardX)},${px(cy)}`;
|
|
4942
|
+
}
|
|
4943
|
+
function railBranchPath({ cardRight, cy, slotX, slotY }) {
|
|
4944
|
+
const bend = Math.max(10, (slotX - cardRight) / 2);
|
|
4945
|
+
return `M${px(cardRight)},${px(cy)} C${px(cardRight + bend)},${px(cy)} ${px(slotX - bend)},${px(slotY)} ${px(slotX)},${px(slotY)}`;
|
|
4946
|
+
}
|
|
4947
|
+
function railOrthoBranchPath({ cardRight, cy, slotX, slotY }) {
|
|
4948
|
+
const elbow = Math.min(cardRight + 16, slotX - 6);
|
|
4949
|
+
const radius = 5;
|
|
4950
|
+
const dy = slotY - cy;
|
|
4951
|
+
if (Math.abs(dy) < radius * 2 || elbow <= cardRight) {
|
|
4952
|
+
return `M${px(cardRight)},${px(cy)} L${px(slotX)},${px(slotY)}`;
|
|
4953
|
+
}
|
|
4954
|
+
const dir = dy > 0 ? 1 : -1;
|
|
4955
|
+
return [
|
|
4956
|
+
`M${px(cardRight)},${px(cy)}`,
|
|
4957
|
+
`L${px(elbow - radius)},${px(cy)}`,
|
|
4958
|
+
`Q${px(elbow)},${px(cy)} ${px(elbow)},${px(cy + dir * radius)}`,
|
|
4959
|
+
`L${px(elbow)},${px(slotY - dir * radius)}`,
|
|
4960
|
+
`Q${px(elbow)},${px(slotY)} ${px(elbow + radius)},${px(slotY)}`,
|
|
4961
|
+
`L${px(slotX)},${px(slotY)}`
|
|
4962
|
+
].join(" ");
|
|
4963
|
+
}
|
|
4964
|
+
function planRailLanes({ trunkX, leaderY, rows, orthogonal }) {
|
|
4965
|
+
const lanes = [];
|
|
4966
|
+
let fromY = leaderY;
|
|
4967
|
+
rows.forEach((row, index) => {
|
|
4968
|
+
lanes.push({
|
|
4969
|
+
id: `tick:${index}`,
|
|
4970
|
+
kind: railLaneKind(row.status),
|
|
4971
|
+
d: railTickPath({ trunkX, fromY, cy: row.cy, cardX: row.cardX })
|
|
4972
|
+
});
|
|
4973
|
+
const slots = Array.isArray(row.slots) ? row.slots : [];
|
|
4974
|
+
slots.forEach((slot, slotIndex) => {
|
|
4975
|
+
lanes.push({
|
|
4976
|
+
id: `branch:${index}:${slotIndex}`,
|
|
4977
|
+
kind: railLaneKind(slot.status ?? row.status),
|
|
4978
|
+
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 })
|
|
4979
|
+
});
|
|
4980
|
+
});
|
|
4981
|
+
fromY = row.cy;
|
|
4982
|
+
});
|
|
4983
|
+
return lanes;
|
|
4984
|
+
}
|
|
4985
|
+
|
|
4986
|
+
// src/client/motion-preference.js
|
|
4987
|
+
var REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
4988
|
+
function prefersReducedMotion(scope = globalThis) {
|
|
4989
|
+
try {
|
|
4990
|
+
return scope?.matchMedia?.(REDUCED_MOTION_QUERY)?.matches === true;
|
|
4991
|
+
} catch {
|
|
4992
|
+
return false;
|
|
4993
|
+
}
|
|
4994
|
+
}
|
|
4995
|
+
function watchReducedMotion(scope, onChange) {
|
|
4996
|
+
let query;
|
|
4997
|
+
try {
|
|
4998
|
+
query = scope?.matchMedia?.(REDUCED_MOTION_QUERY);
|
|
4999
|
+
} catch {
|
|
5000
|
+
return () => {
|
|
5001
|
+
};
|
|
5002
|
+
}
|
|
5003
|
+
if (query === void 0 || query === null) return () => {
|
|
5004
|
+
};
|
|
5005
|
+
const listener = () => {
|
|
5006
|
+
onChange(query.matches === true);
|
|
5007
|
+
};
|
|
5008
|
+
if (typeof query.addEventListener === "function") {
|
|
5009
|
+
query.addEventListener("change", listener);
|
|
5010
|
+
return () => {
|
|
5011
|
+
query.removeEventListener("change", listener);
|
|
5012
|
+
};
|
|
5013
|
+
}
|
|
5014
|
+
if (typeof query.addListener === "function") {
|
|
5015
|
+
query.addListener(listener);
|
|
5016
|
+
return () => {
|
|
5017
|
+
query.removeListener(listener);
|
|
5018
|
+
};
|
|
5019
|
+
}
|
|
5020
|
+
return () => {
|
|
5021
|
+
};
|
|
5022
|
+
}
|
|
5023
|
+
|
|
5024
|
+
// src/client/board-rail.js
|
|
5025
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
5026
|
+
var MAX_ANIMATED_LANES = 6;
|
|
5027
|
+
function svgNode(tag, attrs = {}) {
|
|
5028
|
+
const node = document.createElementNS(SVG_NS, tag);
|
|
5029
|
+
for (const [key, value] of Object.entries(attrs)) node.setAttribute(key, String(value));
|
|
5030
|
+
return node;
|
|
5031
|
+
}
|
|
5032
|
+
function pathNode(d, className) {
|
|
5033
|
+
return svgNode("path", { d, class: className });
|
|
5034
|
+
}
|
|
5035
|
+
function usePrefersReducedMotion() {
|
|
5036
|
+
const [reduced, setReduced] = (0, import_react8.useState)(prefersReducedMotion);
|
|
5037
|
+
(0, import_react8.useEffect)(() => watchReducedMotion(globalThis, setReduced), []);
|
|
5038
|
+
return reduced;
|
|
5039
|
+
}
|
|
5040
|
+
function primeFlow(path, phase) {
|
|
5041
|
+
let length = 200;
|
|
5042
|
+
try {
|
|
5043
|
+
length = path.getTotalLength();
|
|
5044
|
+
} catch {
|
|
5045
|
+
}
|
|
5046
|
+
const dash = Math.min(120, Math.max(44, length * 0.55));
|
|
5047
|
+
path.style.strokeDasharray = `${dash} ${length + dash * 2}`;
|
|
5048
|
+
path.style.setProperty("--dla-from", `${dash}px`);
|
|
5049
|
+
path.style.setProperty("--dla-to", `${-(length + dash * 2)}px`);
|
|
5050
|
+
path.style.animationDelay = `${-(phase % 7) * 0.31}s`;
|
|
5051
|
+
}
|
|
5052
|
+
function measure(element, base) {
|
|
5053
|
+
const rect = element.getBoundingClientRect();
|
|
5054
|
+
return {
|
|
5055
|
+
x: rect.left - base.left,
|
|
5056
|
+
y: rect.top - base.top,
|
|
5057
|
+
cx: rect.left - base.left + rect.width / 2,
|
|
5058
|
+
cy: rect.top - base.top + rect.height / 2,
|
|
5059
|
+
right: rect.right - base.left
|
|
5060
|
+
};
|
|
5061
|
+
}
|
|
5062
|
+
function drawRail(svg, options = {}) {
|
|
5063
|
+
const stage = svg.parentElement;
|
|
5064
|
+
if (stage === null) return;
|
|
5065
|
+
svg.replaceChildren();
|
|
5066
|
+
const rowElements = [...stage.querySelectorAll("[data-rail-row]")];
|
|
5067
|
+
if (rowElements.length === 0) return;
|
|
5068
|
+
const base = stage.getBoundingClientRect();
|
|
5069
|
+
const dot = stage.querySelector("[data-rail-leader-dot]");
|
|
5070
|
+
const leader = dot === null ? { cx: 20, cy: 0 } : measure(dot, base);
|
|
5071
|
+
const rows = [];
|
|
5072
|
+
for (const row of rowElements) {
|
|
5073
|
+
const cardElement = row.querySelector(".dsh-leader-agent-board-card");
|
|
5074
|
+
if (cardElement === null) continue;
|
|
5075
|
+
const card = measure(cardElement, base);
|
|
5076
|
+
const slots = [...row.querySelectorAll("[data-rail-slot]")].map((slot) => {
|
|
5077
|
+
const rect = measure(slot, base);
|
|
5078
|
+
return { x: rect.cx - 12, y: rect.cy, status: slot.dataset.railState };
|
|
5079
|
+
});
|
|
5080
|
+
rows.push({
|
|
5081
|
+
status: row.dataset.railStatus ?? "none",
|
|
5082
|
+
cardX: card.x,
|
|
5083
|
+
cardRight: card.right,
|
|
5084
|
+
cy: card.cy,
|
|
5085
|
+
slots
|
|
5086
|
+
});
|
|
5087
|
+
}
|
|
5088
|
+
if (rows.length === 0) return;
|
|
5089
|
+
const trunkX = leader.cx;
|
|
5090
|
+
const lastY = rows[rows.length - 1].cy;
|
|
5091
|
+
svg.appendChild(pathNode(`M${trunkX},${leader.cy} L${trunkX},${lastY}`, "dsh-leader-agent-board-rail-trunk"));
|
|
5092
|
+
rows.forEach((row) => {
|
|
5093
|
+
const nodeClass = `dsh-leader-agent-board-rail-node dsh-leader-agent-board-rail-node-${railNodeState(row.status)}`;
|
|
5094
|
+
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 }));
|
|
5095
|
+
if (row.status === "running" && options.theme !== "light") {
|
|
5096
|
+
svg.appendChild(svgNode("circle", {
|
|
5097
|
+
cx: trunkX,
|
|
5098
|
+
cy: row.cy,
|
|
5099
|
+
r: 9,
|
|
5100
|
+
class: "dsh-leader-agent-board-rail-halo"
|
|
5101
|
+
}));
|
|
5102
|
+
}
|
|
5103
|
+
});
|
|
5104
|
+
const reduced = options.reduced === true;
|
|
5105
|
+
let animated = 0;
|
|
5106
|
+
planRailLanes({ trunkX, leaderY: leader.cy, rows, orthogonal: options.orthogonal }).forEach((lane, index) => {
|
|
5107
|
+
if (lane.kind === RAIL_LANE_HOT) {
|
|
5108
|
+
svg.appendChild(pathNode(lane.d, "dsh-leader-agent-board-rail-hot"));
|
|
5109
|
+
if (reduced || animated >= MAX_ANIMATED_LANES) return;
|
|
5110
|
+
animated += 1;
|
|
5111
|
+
const trail = pathNode(lane.d, "dsh-leader-agent-board-rail-trail");
|
|
5112
|
+
svg.appendChild(trail);
|
|
5113
|
+
primeFlow(trail, index);
|
|
5114
|
+
const comet = svgNode("circle", { r: 3, class: "dsh-leader-agent-board-rail-comet" });
|
|
5115
|
+
comet.appendChild(svgNode("animateMotion", {
|
|
5116
|
+
dur: "2400ms",
|
|
5117
|
+
begin: `${index % 7 * 0.28}s`,
|
|
5118
|
+
repeatCount: "indefinite",
|
|
5119
|
+
path: lane.d
|
|
5120
|
+
}));
|
|
5121
|
+
svg.appendChild(comet);
|
|
5122
|
+
return;
|
|
5123
|
+
}
|
|
5124
|
+
if (lane.kind === RAIL_LANE_WARN) {
|
|
5125
|
+
svg.appendChild(pathNode(lane.d, "dsh-leader-agent-board-rail-warn"));
|
|
5126
|
+
return;
|
|
5127
|
+
}
|
|
5128
|
+
svg.appendChild(pathNode(lane.d, "dsh-leader-agent-board-rail-edge"));
|
|
5129
|
+
});
|
|
5130
|
+
}
|
|
5131
|
+
function BoardRail({ railKey, orthogonal, theme }) {
|
|
5132
|
+
const ref = (0, import_react8.useRef)(null);
|
|
5133
|
+
const reduced = usePrefersReducedMotion();
|
|
5134
|
+
const drawnKey = (0, import_react8.useRef)("");
|
|
5135
|
+
(0, import_react8.useLayoutEffect)(() => {
|
|
5136
|
+
const svg = ref.current;
|
|
5137
|
+
if (svg === null) return void 0;
|
|
5138
|
+
const stage = svg.parentElement;
|
|
5139
|
+
if (stage === null) return void 0;
|
|
5140
|
+
let timer = 0;
|
|
5141
|
+
const draw = () => {
|
|
5142
|
+
if (stage.clientWidth === 0 || stage.clientHeight === 0) return;
|
|
5143
|
+
const key = `${railKey}|${orthogonal}|${theme}|${reduced}|${stage.clientWidth}x${stage.clientHeight}`;
|
|
5144
|
+
if (key === drawnKey.current) return;
|
|
5145
|
+
drawnKey.current = key;
|
|
5146
|
+
drawRail(svg, { orthogonal, theme, reduced });
|
|
5147
|
+
};
|
|
5148
|
+
draw();
|
|
5149
|
+
if (typeof ResizeObserver === "undefined") return void 0;
|
|
5150
|
+
const observer = new ResizeObserver(() => {
|
|
5151
|
+
clearTimeout(timer);
|
|
5152
|
+
timer = setTimeout(() => {
|
|
5153
|
+
draw();
|
|
5154
|
+
svg.dataset.railSettled = String(Number(svg.dataset.railSettled ?? "0") + 1);
|
|
5155
|
+
}, 80);
|
|
5156
|
+
});
|
|
5157
|
+
observer.observe(stage);
|
|
5158
|
+
return () => {
|
|
5159
|
+
clearTimeout(timer);
|
|
5160
|
+
observer.disconnect();
|
|
5161
|
+
};
|
|
5162
|
+
}, [railKey, orthogonal, theme, reduced]);
|
|
5163
|
+
return (0, import_react8.createElement)("svg", {
|
|
5164
|
+
ref,
|
|
5165
|
+
className: "dsh-leader-agent-board-rail",
|
|
5166
|
+
"aria-hidden": "true"
|
|
5167
|
+
});
|
|
5168
|
+
}
|
|
5169
|
+
|
|
4178
5170
|
// src/client/board.js
|
|
5171
|
+
function useBoardMode(callRemote) {
|
|
5172
|
+
const [mode, setMode] = (0, import_react9.useState)(getBoardMode);
|
|
5173
|
+
(0, import_react9.useEffect)(() => {
|
|
5174
|
+
let cancelled = false;
|
|
5175
|
+
const off = subscribeBoardMode(setMode);
|
|
5176
|
+
const load = () => {
|
|
5177
|
+
callRemote("readSettings", []).then((value) => {
|
|
5178
|
+
if (cancelled) return;
|
|
5179
|
+
setBoardMode(value?.boardMode);
|
|
5180
|
+
}).catch(() => {
|
|
5181
|
+
});
|
|
5182
|
+
};
|
|
5183
|
+
load();
|
|
5184
|
+
const onFocus = () => {
|
|
5185
|
+
load();
|
|
5186
|
+
};
|
|
5187
|
+
globalThis.addEventListener?.("focus", onFocus);
|
|
5188
|
+
return () => {
|
|
5189
|
+
cancelled = true;
|
|
5190
|
+
off();
|
|
5191
|
+
globalThis.removeEventListener?.("focus", onFocus);
|
|
5192
|
+
};
|
|
5193
|
+
}, [callRemote]);
|
|
5194
|
+
return mode;
|
|
5195
|
+
}
|
|
5196
|
+
function readColorScheme(getTheme) {
|
|
5197
|
+
try {
|
|
5198
|
+
const active = getTheme?.()?.getTheme?.().active;
|
|
5199
|
+
if (active?.colorScheme === "light" || active?.colorScheme === "dark") return active.colorScheme;
|
|
5200
|
+
} catch {
|
|
5201
|
+
}
|
|
5202
|
+
try {
|
|
5203
|
+
return globalThis.matchMedia?.("(prefers-color-scheme: dark)")?.matches === true ? "dark" : "light";
|
|
5204
|
+
} catch {
|
|
5205
|
+
return "light";
|
|
5206
|
+
}
|
|
5207
|
+
}
|
|
5208
|
+
function useHostColorScheme(getTheme, onThemeChange) {
|
|
5209
|
+
const [scheme, setScheme] = (0, import_react9.useState)(() => readColorScheme(getTheme));
|
|
5210
|
+
(0, import_react9.useEffect)(() => {
|
|
5211
|
+
if (typeof onThemeChange !== "function") return void 0;
|
|
5212
|
+
const off = onThemeChange(() => setScheme(readColorScheme(getTheme)));
|
|
5213
|
+
return typeof off === "function" ? off : void 0;
|
|
5214
|
+
}, [getTheme, onThemeChange]);
|
|
5215
|
+
return scheme;
|
|
5216
|
+
}
|
|
5217
|
+
function cinemaListClass(scheme) {
|
|
5218
|
+
return `dsh-leader-agent-board-list dsh-leader-agent-board-list-cinema dsh-leader-agent-board-list-cinema-${scheme}`;
|
|
5219
|
+
}
|
|
5220
|
+
function BoardLeaderRow({ running, total, t }) {
|
|
5221
|
+
return (0, import_react9.createElement)(
|
|
5222
|
+
"div",
|
|
5223
|
+
{ className: "dsh-leader-agent-board-rail-head" },
|
|
5224
|
+
(0, import_react9.createElement)("span", { className: "dsh-leader-agent-board-rail-orb", "data-rail-leader-dot": "" }),
|
|
5225
|
+
(0, import_react9.createElement)(
|
|
5226
|
+
"div",
|
|
5227
|
+
{ className: "dsh-leader-agent-board-rail-meta" },
|
|
5228
|
+
(0, import_react9.createElement)("b", null, t("board.rail.leader")),
|
|
5229
|
+
(0, import_react9.createElement)("span", null, t("board.rail.summary", { running, total }))
|
|
5230
|
+
)
|
|
5231
|
+
);
|
|
5232
|
+
}
|
|
4179
5233
|
var PROJECT_RECHECK_MS = 3e4;
|
|
4180
5234
|
var BOARD_CACHE = /* @__PURE__ */ new Map();
|
|
4181
5235
|
function cachedBoard(projectId) {
|
|
@@ -4185,23 +5239,36 @@ function rememberBoard(projectId, project, cards) {
|
|
|
4185
5239
|
BOARD_CACHE.set(projectId, { project, cards });
|
|
4186
5240
|
}
|
|
4187
5241
|
function BoardBody(props) {
|
|
4188
|
-
const {
|
|
5242
|
+
const {
|
|
5243
|
+
sessionId,
|
|
5244
|
+
getSessions,
|
|
5245
|
+
getUiWorkspace,
|
|
5246
|
+
useSessionStatus,
|
|
5247
|
+
useTabInfo,
|
|
5248
|
+
getSidebarRight,
|
|
5249
|
+
callRemote,
|
|
5250
|
+
getTheme,
|
|
5251
|
+
onThemeChange,
|
|
5252
|
+
t
|
|
5253
|
+
} = props;
|
|
4189
5254
|
const useInfo = typeof useTabInfo === "function" ? useTabInfo : useNoTabInfo;
|
|
4190
5255
|
const tabInfo = useInfo();
|
|
4191
5256
|
const visible = tabInfo?.tab?.visible !== false;
|
|
4192
5257
|
const mountedSessionId = getSidebarRight?.()?.mounted?.getSnapshot?.();
|
|
4193
|
-
(0,
|
|
5258
|
+
(0, import_react9.useEffect)(() => {
|
|
4194
5259
|
if (visible) noteBoardForeground(sessionId);
|
|
4195
5260
|
else if (mountedSessionId === sessionId) clearBoardForeground(sessionId);
|
|
4196
5261
|
}, [visible, mountedSessionId, sessionId]);
|
|
4197
5262
|
const params = tabInfo?.tab?.navigation?.params;
|
|
4198
5263
|
const projectHint = typeof params?.projectId === "string" ? params.projectId : void 0;
|
|
4199
|
-
return (0,
|
|
5264
|
+
return (0, import_react9.createElement)(BoardPanel, {
|
|
4200
5265
|
sessionId,
|
|
4201
5266
|
getSessions,
|
|
4202
5267
|
getUiWorkspace,
|
|
4203
5268
|
useSessionStatus,
|
|
4204
5269
|
callRemote,
|
|
5270
|
+
getTheme,
|
|
5271
|
+
onThemeChange,
|
|
4205
5272
|
t,
|
|
4206
5273
|
visible,
|
|
4207
5274
|
projectHint
|
|
@@ -4233,13 +5300,13 @@ function sameStatuses(left, right) {
|
|
|
4233
5300
|
return true;
|
|
4234
5301
|
}
|
|
4235
5302
|
function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
|
|
4236
|
-
const [snapshots, setSnapshots] = (0,
|
|
4237
|
-
const retention = (0,
|
|
4238
|
-
const latest = (0,
|
|
5303
|
+
const [snapshots, setSnapshots] = (0, import_react9.useState)(() => /* @__PURE__ */ new Map());
|
|
5304
|
+
const retention = (0, import_react9.useRef)(void 0);
|
|
5305
|
+
const latest = (0, import_react9.useRef)(getSessions);
|
|
4239
5306
|
latest.current = getSessions;
|
|
4240
|
-
const parent = (0,
|
|
5307
|
+
const parent = (0, import_react9.useRef)(parentSessionId);
|
|
4241
5308
|
parent.current = parentSessionId;
|
|
4242
|
-
const parentsNow = (0,
|
|
5309
|
+
const parentsNow = (0, import_react9.useMemo)(() => {
|
|
4243
5310
|
const table = /* @__PURE__ */ new Map();
|
|
4244
5311
|
for (const card of cards) {
|
|
4245
5312
|
const creator = typeof card.createdBy === "string" && card.createdBy !== "" ? card.createdBy : void 0;
|
|
@@ -4252,10 +5319,10 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
|
|
|
4252
5319
|
}
|
|
4253
5320
|
return table;
|
|
4254
5321
|
}, [cards]);
|
|
4255
|
-
const parents = (0,
|
|
5322
|
+
const parents = (0, import_react9.useRef)(parentsNow);
|
|
4256
5323
|
parents.current = parentsNow;
|
|
4257
|
-
const neededKey = (0,
|
|
4258
|
-
const needed = (0,
|
|
5324
|
+
const neededKey = (0, import_react9.useMemo)(() => [...parentsNow.keys()].sort().join("\n"), [parentsNow]);
|
|
5325
|
+
const needed = (0, import_react9.useMemo)(
|
|
4259
5326
|
() => new Set(neededKey === "" ? [] : neededKey.split("\n")),
|
|
4260
5327
|
[neededKey]
|
|
4261
5328
|
);
|
|
@@ -4291,8 +5358,8 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
|
|
|
4291
5358
|
},
|
|
4292
5359
|
onState: (sessionId, state) => {
|
|
4293
5360
|
setSnapshots((previous) => {
|
|
4294
|
-
const
|
|
4295
|
-
if (
|
|
5361
|
+
const current3 = previous.get(sessionId);
|
|
5362
|
+
if (current3 !== void 0 && current3.running === state.running && current3.failed === state.failed) {
|
|
4296
5363
|
return previous;
|
|
4297
5364
|
}
|
|
4298
5365
|
const next = new Map(previous);
|
|
@@ -4310,13 +5377,13 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
|
|
|
4310
5377
|
}
|
|
4311
5378
|
});
|
|
4312
5379
|
}
|
|
4313
|
-
(0,
|
|
5380
|
+
(0, import_react9.useEffect)(() => {
|
|
4314
5381
|
retention.current.sync(needed);
|
|
4315
5382
|
}, [needed]);
|
|
4316
|
-
(0,
|
|
5383
|
+
(0, import_react9.useEffect)(() => () => {
|
|
4317
5384
|
retention.current.dispose();
|
|
4318
5385
|
}, []);
|
|
4319
|
-
return (0,
|
|
5386
|
+
return (0, import_react9.useMemo)(() => {
|
|
4320
5387
|
const merged = /* @__PURE__ */ new Map();
|
|
4321
5388
|
for (const sessionId of needed) {
|
|
4322
5389
|
merged.set(sessionId, mergeSessionState(
|
|
@@ -4328,69 +5395,80 @@ function useSlotStates(cards, getSessions, useSessionStatus, parentSessionId) {
|
|
|
4328
5395
|
}, [needed, statuses, snapshots]);
|
|
4329
5396
|
}
|
|
4330
5397
|
function BoardEmpty({ allDone, projectName, t }) {
|
|
4331
|
-
return (0,
|
|
5398
|
+
return (0, import_react9.createElement)(
|
|
4332
5399
|
"div",
|
|
4333
5400
|
{ className: "dsh-leader-agent-board-empty" },
|
|
4334
|
-
(0,
|
|
5401
|
+
(0, import_react9.createElement)(
|
|
4335
5402
|
"div",
|
|
4336
5403
|
{
|
|
4337
5404
|
className: allDone ? "dsh-leader-agent-board-empty-icon dsh-leader-agent-board-empty-icon-success" : "dsh-leader-agent-board-empty-icon"
|
|
4338
5405
|
},
|
|
4339
5406
|
allDone ? productIcon("check-circle-outline", { size: 24 }) : productIcon("checklist-outline", { size: 24 })
|
|
4340
5407
|
),
|
|
4341
|
-
(0,
|
|
5408
|
+
(0, import_react9.createElement)(
|
|
4342
5409
|
"div",
|
|
4343
5410
|
{ className: "dsh-leader-agent-board-empty-title" },
|
|
4344
5411
|
allDone ? t("board.empty.doneTitle") : t("board.empty.title")
|
|
4345
5412
|
),
|
|
4346
|
-
(0,
|
|
5413
|
+
(0, import_react9.createElement)(
|
|
4347
5414
|
"div",
|
|
4348
5415
|
{ className: "dsh-leader-agent-board-empty-hint" },
|
|
4349
5416
|
allDone ? projectName === void 0 ? t("board.empty.doneHintOwn") : t("board.empty.doneHintNamed", { project: projectName }) : t("board.empty.hint")
|
|
4350
5417
|
)
|
|
4351
5418
|
);
|
|
4352
5419
|
}
|
|
4353
|
-
function BoardSkeleton() {
|
|
4354
|
-
return (0,
|
|
5420
|
+
function BoardSkeleton({ listClass }) {
|
|
5421
|
+
return (0, import_react9.createElement)(
|
|
4355
5422
|
"div",
|
|
4356
|
-
{ className:
|
|
4357
|
-
(0,
|
|
5423
|
+
{ className: listClass },
|
|
5424
|
+
(0, import_react9.createElement)(
|
|
4358
5425
|
"div",
|
|
4359
5426
|
{ className: "dsh-leader-agent-board-group" },
|
|
4360
|
-
(0,
|
|
4361
|
-
(0,
|
|
4362
|
-
(0,
|
|
5427
|
+
(0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
|
|
5428
|
+
(0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-skeleton" }),
|
|
5429
|
+
(0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-skeleton" })
|
|
4363
5430
|
)
|
|
4364
5431
|
);
|
|
4365
5432
|
}
|
|
4366
|
-
function BoardPanel({
|
|
5433
|
+
function BoardPanel({
|
|
5434
|
+
sessionId,
|
|
5435
|
+
getSessions,
|
|
5436
|
+
getUiWorkspace,
|
|
5437
|
+
useSessionStatus,
|
|
5438
|
+
callRemote,
|
|
5439
|
+
getTheme,
|
|
5440
|
+
onThemeChange,
|
|
5441
|
+
t,
|
|
5442
|
+
visible,
|
|
5443
|
+
projectHint
|
|
5444
|
+
}) {
|
|
4367
5445
|
const cached = projectHint === void 0 ? void 0 : cachedBoard(projectHint);
|
|
4368
|
-
const [project, setProject] = (0,
|
|
4369
|
-
const [resolved, setResolved] = (0,
|
|
4370
|
-
const [worker, setWorker] = (0,
|
|
4371
|
-
const [cards, setCards] = (0,
|
|
4372
|
-
const [projectError, setProjectError] = (0,
|
|
4373
|
-
const [cardsError, setCardsError] = (0,
|
|
4374
|
-
const [slotLabels, setSlotLabels] = (0,
|
|
4375
|
-
const [loaded, setLoaded] = (0,
|
|
4376
|
-
const prefilled = (0,
|
|
4377
|
-
const accessSession = (0,
|
|
4378
|
-
const [detail, setDetail] = (0,
|
|
4379
|
-
const [pendingDelete, setPendingDelete] = (0,
|
|
4380
|
-
const [deleteBusy, setDeleteBusy] = (0,
|
|
4381
|
-
const [deleteError, setDeleteError] = (0,
|
|
4382
|
-
const deletedCardIds = (0,
|
|
4383
|
-
const [doneOpen, setDoneOpen] = (0,
|
|
4384
|
-
const [doneWatermark, setDoneWatermark] = (0,
|
|
4385
|
-
const [now, setNow] = (0,
|
|
4386
|
-
(0,
|
|
5446
|
+
const [project, setProject] = (0, import_react9.useState)(cached?.project);
|
|
5447
|
+
const [resolved, setResolved] = (0, import_react9.useState)(cached !== void 0);
|
|
5448
|
+
const [worker, setWorker] = (0, import_react9.useState)(cached === void 0 ? void 0 : true);
|
|
5449
|
+
const [cards, setCards] = (0, import_react9.useState)(() => cached?.cards ?? []);
|
|
5450
|
+
const [projectError, setProjectError] = (0, import_react9.useState)(null);
|
|
5451
|
+
const [cardsError, setCardsError] = (0, import_react9.useState)(null);
|
|
5452
|
+
const [slotLabels, setSlotLabels] = (0, import_react9.useState)(() => ({}));
|
|
5453
|
+
const [loaded, setLoaded] = (0, import_react9.useState)(cached !== void 0);
|
|
5454
|
+
const prefilled = (0, import_react9.useRef)(cached !== void 0);
|
|
5455
|
+
const accessSession = (0, import_react9.useRef)(void 0);
|
|
5456
|
+
const [detail, setDetail] = (0, import_react9.useState)(null);
|
|
5457
|
+
const [pendingDelete, setPendingDelete] = (0, import_react9.useState)(null);
|
|
5458
|
+
const [deleteBusy, setDeleteBusy] = (0, import_react9.useState)(false);
|
|
5459
|
+
const [deleteError, setDeleteError] = (0, import_react9.useState)("");
|
|
5460
|
+
const deletedCardIds = (0, import_react9.useRef)(/* @__PURE__ */ new Set());
|
|
5461
|
+
const [doneOpen, setDoneOpen] = (0, import_react9.useState)(false);
|
|
5462
|
+
const [doneWatermark, setDoneWatermark] = (0, import_react9.useState)(0);
|
|
5463
|
+
const [now, setNow] = (0, import_react9.useState)(() => Date.now());
|
|
5464
|
+
(0, import_react9.useEffect)(() => {
|
|
4387
5465
|
ensureBoardStyles();
|
|
4388
5466
|
}, []);
|
|
4389
|
-
(0,
|
|
5467
|
+
(0, import_react9.useEffect)(() => {
|
|
4390
5468
|
setPendingDelete(null);
|
|
4391
5469
|
setDeleteError("");
|
|
4392
5470
|
}, [project?.id]);
|
|
4393
|
-
(0,
|
|
5471
|
+
(0, import_react9.useEffect)(() => {
|
|
4394
5472
|
if (!visible) return void 0;
|
|
4395
5473
|
setNow(Date.now());
|
|
4396
5474
|
const timer = setInterval(() => {
|
|
@@ -4398,13 +5476,13 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4398
5476
|
}, 6e4);
|
|
4399
5477
|
return () => clearInterval(timer);
|
|
4400
5478
|
}, [visible]);
|
|
4401
|
-
(0,
|
|
5479
|
+
(0, import_react9.useEffect)(() => {
|
|
4402
5480
|
if (visible) return;
|
|
4403
5481
|
setDetail(null);
|
|
4404
5482
|
setPendingDelete(null);
|
|
4405
5483
|
setDeleteError("");
|
|
4406
5484
|
}, [visible]);
|
|
4407
|
-
(0,
|
|
5485
|
+
(0, import_react9.useEffect)(() => {
|
|
4408
5486
|
if (!visible) return void 0;
|
|
4409
5487
|
let cancelled = false;
|
|
4410
5488
|
const sameSession = accessSession.current === sessionId;
|
|
@@ -4455,15 +5533,15 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4455
5533
|
window.removeEventListener("focus", onFocus);
|
|
4456
5534
|
};
|
|
4457
5535
|
}, [sessionId, callRemote, visible, t]);
|
|
4458
|
-
(0,
|
|
5536
|
+
(0, import_react9.useEffect)(() => {
|
|
4459
5537
|
if (!visible) return void 0;
|
|
4460
5538
|
if (!isBoardViewable(project, sessionId, worker)) return void 0;
|
|
4461
5539
|
let cancelled = false;
|
|
4462
5540
|
const refresh = () => {
|
|
4463
5541
|
fetchBoardCards(callRemote, project.id).then((next) => {
|
|
4464
5542
|
if (cancelled) return;
|
|
4465
|
-
setCards((
|
|
4466
|
-
const merged = mergeCardSnapshot(
|
|
5543
|
+
setCards((current3) => {
|
|
5544
|
+
const merged = mergeCardSnapshot(current3, next);
|
|
4467
5545
|
return deletedCardIds.current.size === 0 ? merged : merged.filter((card) => !deletedCardIds.current.has(card.id));
|
|
4468
5546
|
});
|
|
4469
5547
|
setLoaded(true);
|
|
@@ -4485,13 +5563,13 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4485
5563
|
window.removeEventListener("focus", onFocus);
|
|
4486
5564
|
};
|
|
4487
5565
|
}, [project, worker, callRemote, sessionId, visible, t]);
|
|
4488
|
-
(0,
|
|
5566
|
+
(0, import_react9.useEffect)(() => {
|
|
4489
5567
|
if (project === void 0 || !loaded) return;
|
|
4490
5568
|
rememberBoard(project.id, project, cards);
|
|
4491
5569
|
}, [project, cards, loaded]);
|
|
4492
5570
|
const cardList = cards;
|
|
4493
5571
|
const states = useSlotStates(cardList, getSessions, useSessionStatus, sessionId);
|
|
4494
|
-
const { active, done } = (0,
|
|
5572
|
+
const { active, done } = (0, import_react9.useMemo)(() => ({
|
|
4495
5573
|
active: sortActiveCards(
|
|
4496
5574
|
cardList.filter((card) => card.status === "active"),
|
|
4497
5575
|
states
|
|
@@ -4499,37 +5577,56 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4499
5577
|
done: sortDoneCards(cardList.filter((card) => card.status === "done"))
|
|
4500
5578
|
}), [cardList, states]);
|
|
4501
5579
|
const doneFold = foldDoneCards(done, doneWatermark, t);
|
|
4502
|
-
const
|
|
5580
|
+
const mode = useBoardMode(callRemote);
|
|
5581
|
+
const cinema = mode === "cinema";
|
|
5582
|
+
const scheme = useHostColorScheme(getTheme, onThemeChange);
|
|
5583
|
+
const listClass = cinema ? cinemaListClass(scheme) : "dsh-leader-agent-board-list";
|
|
5584
|
+
const signals = (0, import_react9.useMemo)(
|
|
5585
|
+
() => new Map(active.map((card) => [card.id, cardSignal(card, states)])),
|
|
5586
|
+
[active, states]
|
|
5587
|
+
);
|
|
5588
|
+
const runningCount = (0, import_react9.useMemo)(
|
|
5589
|
+
() => [...signals.values()].filter((signal) => signal === "running").length,
|
|
5590
|
+
[signals]
|
|
5591
|
+
);
|
|
5592
|
+
const railKey = (0, import_react9.useMemo)(
|
|
5593
|
+
() => `${mode}|${scheme}|${active.map((card) => {
|
|
5594
|
+
const slotStates = slotViewsForCard(card, states).filter((slot) => slot.sessionId !== "").map((slot) => slot.state).join(",");
|
|
5595
|
+
return `${card.id}:${signals.get(card.id)}:${slotStates}`;
|
|
5596
|
+
}).join("|")}`,
|
|
5597
|
+
[mode, scheme, active, states, signals]
|
|
5598
|
+
);
|
|
5599
|
+
const openSession = (0, import_react9.useCallback)((targetSessionId) => {
|
|
4503
5600
|
const uiWorkspace = getUiWorkspace?.();
|
|
4504
5601
|
if (uiWorkspace === void 0 || uiWorkspace === null) return;
|
|
4505
5602
|
uiWorkspace.openSession(targetSessionId);
|
|
4506
5603
|
}, [getUiWorkspace]);
|
|
4507
|
-
const openDetail = (0,
|
|
5604
|
+
const openDetail = (0, import_react9.useCallback)((card, anchor) => {
|
|
4508
5605
|
setDetail({ card, anchor });
|
|
4509
5606
|
}, []);
|
|
4510
|
-
const cardUpdated = (0,
|
|
5607
|
+
const cardUpdated = (0, import_react9.useCallback)((updated) => {
|
|
4511
5608
|
if (updated === null || typeof updated !== "object") return;
|
|
4512
|
-
setCards((
|
|
4513
|
-
setDetail((
|
|
5609
|
+
setCards((current3) => mergeCardUpdate(current3, updated));
|
|
5610
|
+
setDetail((current3) => mergeDetailCard(current3, updated));
|
|
4514
5611
|
}, []);
|
|
4515
|
-
const requestDelete = (0,
|
|
5612
|
+
const requestDelete = (0, import_react9.useCallback)(() => {
|
|
4516
5613
|
setDeleteError("");
|
|
4517
5614
|
setPendingDelete(detail?.card ?? null);
|
|
4518
5615
|
}, [detail]);
|
|
4519
|
-
const cancelDelete = (0,
|
|
5616
|
+
const cancelDelete = (0, import_react9.useCallback)(() => {
|
|
4520
5617
|
if (deleteBusy) return;
|
|
4521
5618
|
setDeleteError("");
|
|
4522
5619
|
setPendingDelete(null);
|
|
4523
5620
|
}, [deleteBusy]);
|
|
4524
|
-
const confirmDelete = (0,
|
|
5621
|
+
const confirmDelete = (0, import_react9.useCallback)(async () => {
|
|
4525
5622
|
if (deleteBusy || pendingDelete === null) return;
|
|
4526
5623
|
setDeleteBusy(true);
|
|
4527
5624
|
setDeleteError("");
|
|
4528
5625
|
try {
|
|
4529
5626
|
await callRemote("deleteCard", [pendingDelete.id]);
|
|
4530
5627
|
deletedCardIds.current.add(pendingDelete.id);
|
|
4531
|
-
setCards((
|
|
4532
|
-
setDetail((
|
|
5628
|
+
setCards((current3) => removeCardFromList(current3, pendingDelete.id));
|
|
5629
|
+
setDetail((current3) => current3?.card?.id === pendingDelete.id ? null : current3);
|
|
4533
5630
|
setPendingDelete(null);
|
|
4534
5631
|
} catch (error) {
|
|
4535
5632
|
setDeleteError(projectRemoteErrorText(error, t, "board.error.delete"));
|
|
@@ -4540,50 +5637,50 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4540
5637
|
const view = boardViewState(project, sessionId, worker);
|
|
4541
5638
|
const overlays = reconcileBoardOverlays(cards, detail, pendingDelete);
|
|
4542
5639
|
if (projectError !== null && project === void 0) {
|
|
4543
|
-
return (0,
|
|
5640
|
+
return (0, import_react9.createElement)(
|
|
4544
5641
|
"div",
|
|
4545
5642
|
{ className: "dsh-leader-agent-board-empty" },
|
|
4546
|
-
(0,
|
|
5643
|
+
(0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, projectError)
|
|
4547
5644
|
);
|
|
4548
5645
|
}
|
|
4549
5646
|
if (view === "no-project") {
|
|
4550
|
-
return (0,
|
|
5647
|
+
return (0, import_react9.createElement)(
|
|
4551
5648
|
"div",
|
|
4552
|
-
{ className:
|
|
4553
|
-
resolved ? (0,
|
|
5649
|
+
{ className: listClass },
|
|
5650
|
+
resolved ? (0, import_react9.createElement)(
|
|
4554
5651
|
"div",
|
|
4555
5652
|
{ className: "dsh-leader-agent-board-empty" },
|
|
4556
|
-
(0,
|
|
5653
|
+
(0, import_react9.createElement)(
|
|
4557
5654
|
"div",
|
|
4558
5655
|
{ className: "dsh-leader-agent-board-empty-title" },
|
|
4559
5656
|
t("board.noProject.title")
|
|
4560
5657
|
),
|
|
4561
|
-
(0,
|
|
5658
|
+
(0, import_react9.createElement)(
|
|
4562
5659
|
"div",
|
|
4563
5660
|
{ className: "dsh-leader-agent-board-empty-hint" },
|
|
4564
5661
|
t("board.noProject.hint")
|
|
4565
5662
|
)
|
|
4566
|
-
) : (0,
|
|
5663
|
+
) : (0, import_react9.createElement)(BoardSkeleton, { listClass })
|
|
4567
5664
|
);
|
|
4568
5665
|
}
|
|
4569
5666
|
if (view === "pending") {
|
|
4570
|
-
return (0,
|
|
5667
|
+
return (0, import_react9.createElement)(BoardSkeleton, { listClass });
|
|
4571
5668
|
}
|
|
4572
5669
|
if (view === "leader-dead" || view === "not-viewable") {
|
|
4573
5670
|
const leaderDead = view === "leader-dead";
|
|
4574
5671
|
const projectName = project?.name;
|
|
4575
|
-
return (0,
|
|
5672
|
+
return (0, import_react9.createElement)(
|
|
4576
5673
|
"div",
|
|
4577
|
-
{ className:
|
|
4578
|
-
(0,
|
|
5674
|
+
{ className: listClass },
|
|
5675
|
+
(0, import_react9.createElement)(
|
|
4579
5676
|
"div",
|
|
4580
5677
|
{ className: "dsh-leader-agent-board-empty" },
|
|
4581
|
-
(0,
|
|
5678
|
+
(0, import_react9.createElement)(
|
|
4582
5679
|
"div",
|
|
4583
5680
|
{ className: "dsh-leader-agent-board-empty-title" },
|
|
4584
5681
|
leaderDead ? t("board.leaderDead.title") : t("board.notProject.title")
|
|
4585
5682
|
),
|
|
4586
|
-
(0,
|
|
5683
|
+
(0, import_react9.createElement)(
|
|
4587
5684
|
"div",
|
|
4588
5685
|
{ className: "dsh-leader-agent-board-empty-hint" },
|
|
4589
5686
|
leaderDead ? t("board.leaderDead.hint") : projectName ? t("board.notProject.hint", { project: projectName }) : t("board.notProject.unknown")
|
|
@@ -4592,23 +5689,23 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4592
5689
|
);
|
|
4593
5690
|
}
|
|
4594
5691
|
if (cardsError !== null && cards.length === 0) {
|
|
4595
|
-
return (0,
|
|
5692
|
+
return (0, import_react9.createElement)(
|
|
4596
5693
|
"div",
|
|
4597
5694
|
{ className: "dsh-leader-agent-board-empty" },
|
|
4598
|
-
(0,
|
|
5695
|
+
(0, import_react9.createElement)("div", { className: "dsh-leader-agent-board-empty-title" }, cardsError)
|
|
4599
5696
|
);
|
|
4600
5697
|
}
|
|
4601
5698
|
if (!loaded) {
|
|
4602
|
-
return (0,
|
|
5699
|
+
return (0, import_react9.createElement)(BoardSkeleton, { listClass });
|
|
4603
5700
|
}
|
|
4604
5701
|
if (cards.length === 0) {
|
|
4605
|
-
return (0,
|
|
5702
|
+
return (0, import_react9.createElement)(
|
|
4606
5703
|
"div",
|
|
4607
|
-
{ className:
|
|
4608
|
-
(0,
|
|
5704
|
+
{ className: listClass },
|
|
5705
|
+
(0, import_react9.createElement)(BoardEmpty, { allDone: false, projectName: project.name, t })
|
|
4609
5706
|
);
|
|
4610
5707
|
}
|
|
4611
|
-
const deleteDialog = (0,
|
|
5708
|
+
const deleteDialog = (0, import_react9.createElement)(ConfirmDialog, {
|
|
4612
5709
|
open: overlays.pendingDelete !== null,
|
|
4613
5710
|
title: t("board.delete.title"),
|
|
4614
5711
|
description: overlays.pendingDelete === null ? "" : describeCardRemoval(overlays.pendingDelete, t),
|
|
@@ -4622,86 +5719,93 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4622
5719
|
},
|
|
4623
5720
|
onCancel: cancelDelete
|
|
4624
5721
|
});
|
|
4625
|
-
return (0,
|
|
5722
|
+
return (0, import_react9.createElement)(
|
|
4626
5723
|
"div",
|
|
4627
|
-
{ className: "dsh-leader-agent-board" },
|
|
4628
|
-
(0,
|
|
5724
|
+
{ className: "dsh-leader-agent-board", "data-mode": mode, "data-theme": scheme },
|
|
5725
|
+
(0, import_react9.createElement)(
|
|
4629
5726
|
"div",
|
|
4630
|
-
{ className:
|
|
4631
|
-
|
|
5727
|
+
{ className: listClass },
|
|
5728
|
+
(0, import_react9.createElement)(
|
|
4632
5729
|
"div",
|
|
4633
|
-
{ className: "dsh-leader-agent-board-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
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)(
|
|
4647
|
-
"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)(
|
|
5730
|
+
{ className: "dsh-leader-agent-board-stage" },
|
|
5731
|
+
cinema ? (0, import_react9.createElement)(BoardRail, { railKey, orthogonal: scheme === "light", theme: scheme }) : null,
|
|
5732
|
+
cinema ? (0, import_react9.createElement)(BoardLeaderRow, { running: runningCount, total: active.length, t }) : null,
|
|
5733
|
+
active.length > 0 ? (0, import_react9.createElement)(
|
|
4670
5734
|
"div",
|
|
4671
5735
|
{ className: "dsh-leader-agent-board-group" },
|
|
4672
|
-
|
|
5736
|
+
active.map((card) => (0, import_react9.createElement)(BoardCard, {
|
|
4673
5737
|
key: card.id,
|
|
4674
5738
|
card,
|
|
4675
5739
|
states,
|
|
4676
5740
|
now,
|
|
4677
5741
|
slotLabels,
|
|
4678
5742
|
t,
|
|
5743
|
+
cinema,
|
|
4679
5744
|
onOpenDetail: openDetail,
|
|
4680
5745
|
onOpenSession: openSession
|
|
4681
|
-
}))
|
|
4682
|
-
|
|
5746
|
+
}))
|
|
5747
|
+
) : null,
|
|
5748
|
+
active.length === 0 ? (0, import_react9.createElement)(BoardEmpty, { allDone: true, projectName: project.name, t }) : null,
|
|
5749
|
+
done.length > 0 ? (0, import_react9.createElement)(
|
|
5750
|
+
"div",
|
|
5751
|
+
{ className: "dsh-leader-agent-board-done-section" },
|
|
5752
|
+
(0, import_react9.createElement)(
|
|
4683
5753
|
"button",
|
|
4684
5754
|
{
|
|
4685
5755
|
type: "button",
|
|
4686
|
-
className: "dsh-leader-agent-board-done-
|
|
4687
|
-
"aria-expanded":
|
|
5756
|
+
className: "dsh-leader-agent-board-done-toggle",
|
|
5757
|
+
"aria-expanded": doneOpen,
|
|
4688
5758
|
onClick: () => {
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
5759
|
+
setDoneOpen(!doneOpen);
|
|
5760
|
+
}
|
|
5761
|
+
},
|
|
5762
|
+
(0, import_react9.createElement)(
|
|
5763
|
+
"span",
|
|
5764
|
+
{
|
|
5765
|
+
className: doneOpen ? "dsh-leader-agent-board-done-chevron dsh-leader-agent-board-done-chevron-open" : "dsh-leader-agent-board-done-chevron"
|
|
5766
|
+
},
|
|
5767
|
+
productIcon("chevron-right-outline", { size: 14 })
|
|
5768
|
+
),
|
|
5769
|
+
t("board.done"),
|
|
5770
|
+
(0, import_react9.createElement)("span", { className: "dsh-leader-agent-board-done-count" }, String(done.length))
|
|
5771
|
+
),
|
|
5772
|
+
doneOpen ? (0, import_react9.createElement)(
|
|
5773
|
+
"div",
|
|
5774
|
+
{ className: "dsh-leader-agent-board-group" },
|
|
5775
|
+
doneFold.rows.map((card) => (0, import_react9.createElement)(BoardCard, {
|
|
5776
|
+
key: card.id,
|
|
5777
|
+
card,
|
|
5778
|
+
states,
|
|
5779
|
+
now,
|
|
5780
|
+
slotLabels,
|
|
5781
|
+
t,
|
|
5782
|
+
onOpenDetail: openDetail,
|
|
5783
|
+
onOpenSession: openSession
|
|
5784
|
+
})),
|
|
5785
|
+
doneFold.hiddenCount === 0 && !doneFold.expanded ? null : (0, import_react9.createElement)(
|
|
5786
|
+
"button",
|
|
5787
|
+
{
|
|
5788
|
+
type: "button",
|
|
5789
|
+
className: "dsh-leader-agent-board-done-more",
|
|
5790
|
+
"aria-expanded": doneFold.expanded,
|
|
5791
|
+
onClick: () => {
|
|
5792
|
+
if (doneFold.expanded) {
|
|
5793
|
+
setDoneWatermark(0);
|
|
5794
|
+
return;
|
|
5795
|
+
}
|
|
5796
|
+
setDoneWatermark((value) => nextDoneWatermark(
|
|
5797
|
+
doneFold.hiddenCount,
|
|
5798
|
+
Math.max(value, done.length - doneFold.hiddenCount)
|
|
5799
|
+
));
|
|
4692
5800
|
}
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
}
|
|
4698
|
-
},
|
|
4699
|
-
doneFold.expanded ? t("common.collapse") : doneFold.expandLabel
|
|
4700
|
-
)
|
|
5801
|
+
},
|
|
5802
|
+
doneFold.expanded ? t("common.collapse") : doneFold.expandLabel
|
|
5803
|
+
)
|
|
5804
|
+
) : null
|
|
4701
5805
|
) : null
|
|
4702
|
-
)
|
|
5806
|
+
)
|
|
4703
5807
|
),
|
|
4704
|
-
overlays.detail === null || overlays.pendingDelete !== null ? null : (0,
|
|
5808
|
+
overlays.detail === null || overlays.pendingDelete !== null ? null : (0, import_react9.createElement)(CardDetail, {
|
|
4705
5809
|
card: overlays.detail.card,
|
|
4706
5810
|
onClose: () => {
|
|
4707
5811
|
setDetail(null);
|
|
@@ -4716,17 +5820,298 @@ function BoardPanel({ sessionId, getSessions, getUiWorkspace, useSessionStatus,
|
|
|
4716
5820
|
);
|
|
4717
5821
|
}
|
|
4718
5822
|
|
|
5823
|
+
// src/client/board-settings.js
|
|
5824
|
+
var import_react10 = require("react");
|
|
5825
|
+
var SECTION_ID = "dsh-leader-agent";
|
|
5826
|
+
var SECTION_ORDER = 90;
|
|
5827
|
+
var MODE_KEYS = Object.freeze({
|
|
5828
|
+
[BOARD_MODE_CINEMA]: { title: "board.mode.cinema.title", desc: "board.mode.cinema.desc" },
|
|
5829
|
+
[BOARD_MODE_WORK]: { title: "board.mode.work.title", desc: "board.mode.work.desc" }
|
|
5830
|
+
});
|
|
5831
|
+
function errorText(error) {
|
|
5832
|
+
return error instanceof Error ? error.message : String(error);
|
|
5833
|
+
}
|
|
5834
|
+
function ModeIcon({ cinema }) {
|
|
5835
|
+
if (cinema) {
|
|
5836
|
+
return (0, import_react10.createElement)(
|
|
5837
|
+
"svg",
|
|
5838
|
+
{ width: 16, height: 16, viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true" },
|
|
5839
|
+
(0, import_react10.createElement)("path", { d: "M4 3V15", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }),
|
|
5840
|
+
(0, import_react10.createElement)("path", { d: "M4 6H10M4 12H10", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }),
|
|
5841
|
+
(0, import_react10.createElement)("circle", { cx: 4, cy: 6, r: 1.5, fill: "currentColor" }),
|
|
5842
|
+
(0, import_react10.createElement)("circle", { cx: 4, cy: 12, r: 1.5, fill: "currentColor" }),
|
|
5843
|
+
(0, import_react10.createElement)("circle", { cx: 12, cy: 6, r: 1.5, fill: "currentColor" })
|
|
5844
|
+
);
|
|
5845
|
+
}
|
|
5846
|
+
return (0, import_react10.createElement)(
|
|
5847
|
+
"svg",
|
|
5848
|
+
{ width: 16, height: 16, viewBox: "0 0 18 18", fill: "none", "aria-hidden": "true" },
|
|
5849
|
+
(0, import_react10.createElement)("rect", { x: 3, y: 3.5, width: 12, height: 3, rx: 1.5, fill: "currentColor", fillOpacity: 0.25 }),
|
|
5850
|
+
(0, import_react10.createElement)("rect", { x: 3, y: 7.5, width: 12, height: 3, rx: 1.5, fill: "currentColor", fillOpacity: 0.25 }),
|
|
5851
|
+
(0, import_react10.createElement)("rect", { x: 3, y: 11.5, width: 12, height: 3, rx: 1.5, fill: "currentColor", fillOpacity: 0.25 })
|
|
5852
|
+
);
|
|
5853
|
+
}
|
|
5854
|
+
function ModeOption({ value, mode, onChoose, disabled, t }) {
|
|
5855
|
+
const selected = value === mode;
|
|
5856
|
+
return (0, import_react10.createElement)(
|
|
5857
|
+
"button",
|
|
5858
|
+
{
|
|
5859
|
+
type: "button",
|
|
5860
|
+
role: "radio",
|
|
5861
|
+
"aria-checked": selected,
|
|
5862
|
+
disabled,
|
|
5863
|
+
className: selected ? "dsh-leader-agent-settings-option dsh-leader-agent-settings-option-selected" : "dsh-leader-agent-settings-option",
|
|
5864
|
+
onClick: () => {
|
|
5865
|
+
onChoose(value);
|
|
5866
|
+
}
|
|
5867
|
+
},
|
|
5868
|
+
(0, import_react10.createElement)(
|
|
5869
|
+
"span",
|
|
5870
|
+
{ className: "dsh-leader-agent-settings-option-icon" },
|
|
5871
|
+
(0, import_react10.createElement)(ModeIcon, { cinema: value === BOARD_MODE_CINEMA })
|
|
5872
|
+
),
|
|
5873
|
+
(0, import_react10.createElement)("span", { className: "dsh-leader-agent-settings-option-label" }, t(MODE_KEYS[value].title)),
|
|
5874
|
+
(0, import_react10.createElement)("span", { className: "dsh-leader-agent-settings-option-desc" }, t(MODE_KEYS[value].desc))
|
|
5875
|
+
);
|
|
5876
|
+
}
|
|
5877
|
+
function BoardModeSection({ t, callRemote }) {
|
|
5878
|
+
const [phase, setPhase] = (0, import_react10.useState)("loading");
|
|
5879
|
+
const [mode, setMode] = (0, import_react10.useState)(getBoardMode);
|
|
5880
|
+
const [busy, setBusy] = (0, import_react10.useState)(false);
|
|
5881
|
+
const [message, setMessage] = (0, import_react10.useState)("");
|
|
5882
|
+
const [attempt, setAttempt] = (0, import_react10.useState)(0);
|
|
5883
|
+
(0, import_react10.useEffect)(() => {
|
|
5884
|
+
let cancelled = false;
|
|
5885
|
+
setPhase("loading");
|
|
5886
|
+
setMessage("");
|
|
5887
|
+
callRemote("readSettings", []).then((value) => {
|
|
5888
|
+
if (cancelled) return;
|
|
5889
|
+
const next = normalizeBoardMode(value?.boardMode);
|
|
5890
|
+
setBoardMode(next);
|
|
5891
|
+
setMode(next);
|
|
5892
|
+
setPhase("ready");
|
|
5893
|
+
}).catch((error) => {
|
|
5894
|
+
if (cancelled) return;
|
|
5895
|
+
setPhase("error");
|
|
5896
|
+
setMessage(t("board.settings.loadFailed", { message: errorText(error) }));
|
|
5897
|
+
});
|
|
5898
|
+
return () => {
|
|
5899
|
+
cancelled = true;
|
|
5900
|
+
};
|
|
5901
|
+
}, [attempt, callRemote]);
|
|
5902
|
+
(0, import_react10.useEffect)(() => subscribeBoardMode(setMode), []);
|
|
5903
|
+
function choose(next) {
|
|
5904
|
+
if (phase !== "ready" || busy || next === mode) return;
|
|
5905
|
+
setBusy(true);
|
|
5906
|
+
setMessage("");
|
|
5907
|
+
callRemote("setBoardMode", [next]).then((value) => {
|
|
5908
|
+
const applied = normalizeBoardMode(value?.boardMode);
|
|
5909
|
+
setBoardMode(applied);
|
|
5910
|
+
setMode(applied);
|
|
5911
|
+
setBusy(false);
|
|
5912
|
+
}).catch((error) => {
|
|
5913
|
+
setBusy(false);
|
|
5914
|
+
setMessage(t("board.settings.saveFailed", { message: errorText(error) }));
|
|
5915
|
+
});
|
|
5916
|
+
}
|
|
5917
|
+
const disabled = phase !== "ready" || busy;
|
|
5918
|
+
return (0, import_react10.createElement)(
|
|
5919
|
+
"section",
|
|
5920
|
+
{ className: "dsh-leader-agent-settings-section dsh-leader-agent-settings-group", "aria-labelledby": "dsh-leader-agent-settings-board" },
|
|
5921
|
+
(0, import_react10.createElement)("h3", {
|
|
5922
|
+
id: "dsh-leader-agent-settings-board",
|
|
5923
|
+
className: "dsh-leader-agent-settings-title"
|
|
5924
|
+
}, t("board.settings.title")),
|
|
5925
|
+
(0, import_react10.createElement)("p", { className: "dsh-leader-agent-settings-desc" }, t("board.settings.desc")),
|
|
5926
|
+
(0, import_react10.createElement)(
|
|
5927
|
+
"div",
|
|
5928
|
+
{
|
|
5929
|
+
className: "dsh-leader-agent-settings-options",
|
|
5930
|
+
role: "radiogroup",
|
|
5931
|
+
"aria-label": t("board.settings.title"),
|
|
5932
|
+
"aria-busy": busy
|
|
5933
|
+
},
|
|
5934
|
+
BOARD_MODES.map((value) => (0, import_react10.createElement)(ModeOption, {
|
|
5935
|
+
key: value,
|
|
5936
|
+
value,
|
|
5937
|
+
mode,
|
|
5938
|
+
disabled,
|
|
5939
|
+
onChoose: choose,
|
|
5940
|
+
t
|
|
5941
|
+
}))
|
|
5942
|
+
),
|
|
5943
|
+
phase === "error" ? (0, import_react10.createElement)(
|
|
5944
|
+
"div",
|
|
5945
|
+
{ className: "dsh-leader-agent-settings-retry-row" },
|
|
5946
|
+
(0, import_react10.createElement)("span", { className: "dsh-leader-agent-settings-error", role: "alert" }, message),
|
|
5947
|
+
(0, import_react10.createElement)("button", {
|
|
5948
|
+
type: "button",
|
|
5949
|
+
className: "dsh-leader-agent-settings-retry",
|
|
5950
|
+
onClick: () => setAttempt((value) => value + 1)
|
|
5951
|
+
}, t("board.settings.retry"))
|
|
5952
|
+
) : null,
|
|
5953
|
+
phase === "ready" && message !== "" ? (0, import_react10.createElement)("p", { className: "dsh-leader-agent-settings-error", role: "alert" }, message) : null
|
|
5954
|
+
);
|
|
5955
|
+
}
|
|
5956
|
+
function AutoResumeSection({ t, callRemote }) {
|
|
5957
|
+
const [phase, setPhase] = (0, import_react10.useState)("loading");
|
|
5958
|
+
const [saved, setSaved] = (0, import_react10.useState)(AUTO_RESUME_LIMIT_DEFAULT);
|
|
5959
|
+
const [draft, setDraft] = (0, import_react10.useState)(String(AUTO_RESUME_LIMIT_DEFAULT));
|
|
5960
|
+
const [status, setStatus] = (0, import_react10.useState)("idle");
|
|
5961
|
+
const [message, setMessage] = (0, import_react10.useState)("");
|
|
5962
|
+
const [attempt, setAttempt] = (0, import_react10.useState)(0);
|
|
5963
|
+
(0, import_react10.useEffect)(() => {
|
|
5964
|
+
let cancelled = false;
|
|
5965
|
+
setPhase("loading");
|
|
5966
|
+
setStatus("idle");
|
|
5967
|
+
setMessage("");
|
|
5968
|
+
callRemote("readSettings", []).then((value) => {
|
|
5969
|
+
if (cancelled) return;
|
|
5970
|
+
const limit2 = parseAutoResumeLimit(value?.autoResumeLimit);
|
|
5971
|
+
const effective = limit2 ?? AUTO_RESUME_LIMIT_DEFAULT;
|
|
5972
|
+
setSaved(effective);
|
|
5973
|
+
setDraft(String(effective));
|
|
5974
|
+
setPhase("ready");
|
|
5975
|
+
}).catch((error) => {
|
|
5976
|
+
if (cancelled) return;
|
|
5977
|
+
setPhase("error");
|
|
5978
|
+
setMessage(t("settings.autoResume.loadFailed", { message: errorText(error) }));
|
|
5979
|
+
});
|
|
5980
|
+
return () => {
|
|
5981
|
+
cancelled = true;
|
|
5982
|
+
};
|
|
5983
|
+
}, [attempt, callRemote]);
|
|
5984
|
+
const limit = parseAutoResumeLimit(draft);
|
|
5985
|
+
const invalid = limit === void 0;
|
|
5986
|
+
const dirty = limit !== void 0 && limit !== saved;
|
|
5987
|
+
function commit(value) {
|
|
5988
|
+
if (phase !== "ready" || status === "saving") return;
|
|
5989
|
+
const next = parseAutoResumeLimit(value);
|
|
5990
|
+
if (next === void 0 || next === saved) return;
|
|
5991
|
+
setStatus("saving");
|
|
5992
|
+
setMessage("");
|
|
5993
|
+
callRemote("updateAutoResumeLimit", [next]).then((result) => {
|
|
5994
|
+
const applied = parseAutoResumeLimit(result?.autoResumeLimit) ?? next;
|
|
5995
|
+
setSaved(applied);
|
|
5996
|
+
setDraft(String(applied));
|
|
5997
|
+
setStatus("saved");
|
|
5998
|
+
}).catch((error) => {
|
|
5999
|
+
setStatus("error");
|
|
6000
|
+
setMessage(t("settings.autoResume.saveFailed", { message: errorText(error) }));
|
|
6001
|
+
});
|
|
6002
|
+
}
|
|
6003
|
+
(0, import_react10.useEffect)(() => {
|
|
6004
|
+
if (phase !== "ready" || !dirty || status === "saving" || status === "error") return void 0;
|
|
6005
|
+
const timer = setTimeout(() => {
|
|
6006
|
+
commit(draft);
|
|
6007
|
+
}, 600);
|
|
6008
|
+
return () => clearTimeout(timer);
|
|
6009
|
+
}, [draft, phase, dirty, status, saved, callRemote]);
|
|
6010
|
+
const describedBy = invalid ? "dsh-leader-agent-auto-resume-error" : void 0;
|
|
6011
|
+
return (0, import_react10.createElement)(
|
|
6012
|
+
"section",
|
|
6013
|
+
{ className: "dsh-leader-agent-settings-section", "aria-labelledby": "dsh-leader-agent-settings-auto-resume" },
|
|
6014
|
+
(0, import_react10.createElement)(
|
|
6015
|
+
"div",
|
|
6016
|
+
{ className: "dsh-leader-agent-settings-row" },
|
|
6017
|
+
(0, import_react10.createElement)(
|
|
6018
|
+
"div",
|
|
6019
|
+
{ className: "dsh-leader-agent-settings-row-text" },
|
|
6020
|
+
(0, import_react10.createElement)("h3", {
|
|
6021
|
+
id: "dsh-leader-agent-settings-auto-resume",
|
|
6022
|
+
className: "dsh-leader-agent-settings-subtitle"
|
|
6023
|
+
}, t("settings.autoResume.title")),
|
|
6024
|
+
(0, import_react10.createElement)("p", { className: "dsh-leader-agent-settings-desc" }, t("settings.autoResume.desc"))
|
|
6025
|
+
),
|
|
6026
|
+
(0, import_react10.createElement)(
|
|
6027
|
+
"div",
|
|
6028
|
+
{ className: "dsh-leader-agent-settings-control" },
|
|
6029
|
+
(0, import_react10.createElement)("input", {
|
|
6030
|
+
id: "dsh-leader-agent-auto-resume",
|
|
6031
|
+
className: "dsh-leader-agent-settings-input",
|
|
6032
|
+
type: "text",
|
|
6033
|
+
inputMode: "numeric",
|
|
6034
|
+
pattern: "[0-9]*",
|
|
6035
|
+
maxLength: 5,
|
|
6036
|
+
value: draft,
|
|
6037
|
+
disabled: phase !== "ready",
|
|
6038
|
+
readOnly: status === "saving",
|
|
6039
|
+
"aria-label": t("settings.autoResume.title"),
|
|
6040
|
+
"aria-invalid": invalid,
|
|
6041
|
+
"aria-describedby": describedBy,
|
|
6042
|
+
onChange: (event) => {
|
|
6043
|
+
setDraft(event.target.value);
|
|
6044
|
+
setStatus("idle");
|
|
6045
|
+
setMessage("");
|
|
6046
|
+
},
|
|
6047
|
+
onBlur: () => {
|
|
6048
|
+
commit(draft);
|
|
6049
|
+
},
|
|
6050
|
+
onKeyDown: (event) => {
|
|
6051
|
+
if (event.key !== "Enter") return;
|
|
6052
|
+
event.preventDefault();
|
|
6053
|
+
commit(draft);
|
|
6054
|
+
}
|
|
6055
|
+
}),
|
|
6056
|
+
(0, import_react10.createElement)("span", { className: "dsh-leader-agent-settings-unit" }, t("settings.autoResume.unit"))
|
|
6057
|
+
)
|
|
6058
|
+
),
|
|
6059
|
+
invalid ? (0, import_react10.createElement)("p", {
|
|
6060
|
+
id: "dsh-leader-agent-auto-resume-error",
|
|
6061
|
+
className: "dsh-leader-agent-settings-error",
|
|
6062
|
+
role: "alert"
|
|
6063
|
+
}, t("settings.autoResume.invalid", {
|
|
6064
|
+
min: AUTO_RESUME_LIMIT_MIN,
|
|
6065
|
+
max: AUTO_RESUME_LIMIT_MAX
|
|
6066
|
+
})) : null,
|
|
6067
|
+
status === "saved" ? (0, import_react10.createElement)("p", {
|
|
6068
|
+
className: "dsh-leader-agent-settings-saved",
|
|
6069
|
+
role: "status"
|
|
6070
|
+
}, t("settings.autoResume.saved")) : null,
|
|
6071
|
+
status === "error" ? (0, import_react10.createElement)("p", { className: "dsh-leader-agent-settings-error", role: "alert" }, message) : null,
|
|
6072
|
+
phase === "error" ? (0, import_react10.createElement)(
|
|
6073
|
+
"div",
|
|
6074
|
+
{ className: "dsh-leader-agent-settings-retry-row" },
|
|
6075
|
+
(0, import_react10.createElement)("span", { className: "dsh-leader-agent-settings-error" }, message),
|
|
6076
|
+
(0, import_react10.createElement)("button", {
|
|
6077
|
+
type: "button",
|
|
6078
|
+
className: "dsh-leader-agent-settings-retry",
|
|
6079
|
+
onClick: () => setAttempt((value) => value + 1)
|
|
6080
|
+
}, t("settings.autoResume.retry"))
|
|
6081
|
+
) : null
|
|
6082
|
+
);
|
|
6083
|
+
}
|
|
6084
|
+
function BoardSettingsSection({ t, callRemote }) {
|
|
6085
|
+
return (0, import_react10.createElement)(
|
|
6086
|
+
"section",
|
|
6087
|
+
{ className: "dsh-leader-agent-settings" },
|
|
6088
|
+
(0, import_react10.createElement)(BoardModeSection, { t, callRemote }),
|
|
6089
|
+
(0, import_react10.createElement)(AutoResumeSection, { t, callRemote })
|
|
6090
|
+
);
|
|
6091
|
+
}
|
|
6092
|
+
function mountBoardSettings(ctx, t) {
|
|
6093
|
+
ensureBoardStyles();
|
|
6094
|
+
const callRemote = (method, args = []) => callProjectRemote(ctx, method, args);
|
|
6095
|
+
ctx.effect(() => ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
6096
|
+
name: "settings.section",
|
|
6097
|
+
id: SECTION_ID,
|
|
6098
|
+
order: SECTION_ORDER,
|
|
6099
|
+
label: () => t("board.settings.nav"),
|
|
6100
|
+
inject: () => ({ t, callRemote })
|
|
6101
|
+
}, BoardSettingsSection)), "dsh-leader-agent \u8BBE\u7F6E\u9875");
|
|
6102
|
+
}
|
|
6103
|
+
|
|
4719
6104
|
// src/client/board-guide-entry.js
|
|
4720
|
-
var
|
|
6105
|
+
var import_react11 = require("react");
|
|
4721
6106
|
|
|
4722
6107
|
// src/client/project-changes.js
|
|
4723
|
-
var
|
|
6108
|
+
var listeners2 = /* @__PURE__ */ new Set();
|
|
4724
6109
|
function onProjectsChanged(listener) {
|
|
4725
|
-
|
|
4726
|
-
return () =>
|
|
6110
|
+
listeners2.add(listener);
|
|
6111
|
+
return () => listeners2.delete(listener);
|
|
4727
6112
|
}
|
|
4728
6113
|
function notifyProjectsChanged() {
|
|
4729
|
-
for (const listener of Array.from(
|
|
6114
|
+
for (const listener of Array.from(listeners2)) {
|
|
4730
6115
|
try {
|
|
4731
6116
|
listener();
|
|
4732
6117
|
} catch (error) {
|
|
@@ -4853,11 +6238,11 @@ function mountProjectBoardMonitor({
|
|
|
4853
6238
|
// src/client/board-guide-entry.js
|
|
4854
6239
|
function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, callRemote }) {
|
|
4855
6240
|
const { tab } = useTabInfo();
|
|
4856
|
-
const [visible, setVisible] = (0,
|
|
4857
|
-
(0,
|
|
6241
|
+
const [visible, setVisible] = (0, import_react11.useState)(false);
|
|
6242
|
+
(0, import_react11.useEffect)(() => {
|
|
4858
6243
|
ensureBoardStyles();
|
|
4859
6244
|
}, []);
|
|
4860
|
-
(0,
|
|
6245
|
+
(0, import_react11.useEffect)(() => {
|
|
4861
6246
|
let cancelled = false;
|
|
4862
6247
|
const check = async () => {
|
|
4863
6248
|
try {
|
|
@@ -4887,7 +6272,7 @@ function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, call
|
|
|
4887
6272
|
};
|
|
4888
6273
|
}, [sessionId, callRemote]);
|
|
4889
6274
|
if (!visible) return null;
|
|
4890
|
-
return (0,
|
|
6275
|
+
return (0, import_react11.createElement)(
|
|
4891
6276
|
"button",
|
|
4892
6277
|
{
|
|
4893
6278
|
type: "button",
|
|
@@ -4899,26 +6284,26 @@ function BoardGuideEntry({ sessionId, kind, title, description, useTabInfo, call
|
|
|
4899
6284
|
tab.actions.openTab(BOARD_TAB_KIND, { replaceTab: true });
|
|
4900
6285
|
}
|
|
4901
6286
|
},
|
|
4902
|
-
(0,
|
|
6287
|
+
(0, import_react11.createElement)(
|
|
4903
6288
|
"span",
|
|
4904
6289
|
{ className: "dsh-leader-agent-guide-entry-icon" },
|
|
4905
6290
|
productIcon("checklist-outline", { size: description === void 0 ? 22 : 26 })
|
|
4906
6291
|
),
|
|
4907
|
-
(0,
|
|
6292
|
+
(0, import_react11.createElement)(
|
|
4908
6293
|
"span",
|
|
4909
6294
|
{ className: "dsh-leader-agent-guide-entry-text" },
|
|
4910
|
-
(0,
|
|
4911
|
-
description === void 0 ? null : (0,
|
|
6295
|
+
(0, import_react11.createElement)("span", { className: "dsh-leader-agent-guide-entry-title" }, title),
|
|
6296
|
+
description === void 0 ? null : (0, import_react11.createElement)("span", { className: "dsh-leader-agent-guide-entry-description" }, description)
|
|
4912
6297
|
)
|
|
4913
6298
|
);
|
|
4914
6299
|
}
|
|
4915
6300
|
|
|
4916
6301
|
// src/client/project-panel.js
|
|
4917
|
-
var
|
|
6302
|
+
var import_react13 = require("react");
|
|
4918
6303
|
var import_react_dom3 = require("react-dom");
|
|
4919
6304
|
|
|
4920
6305
|
// src/client/project-section.js
|
|
4921
|
-
var
|
|
6306
|
+
var import_react12 = require("react");
|
|
4922
6307
|
var import_react_dom2 = require("react-dom");
|
|
4923
6308
|
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
4924
6309
|
|
|
@@ -5570,12 +6955,7 @@ var STYLE_TEXT3 = `
|
|
|
5570
6955
|
}
|
|
5571
6956
|
`;
|
|
5572
6957
|
function ensureStyles2() {
|
|
5573
|
-
|
|
5574
|
-
if (document.getElementById(STYLE_ID3) !== null) return;
|
|
5575
|
-
const style = document.createElement("style");
|
|
5576
|
-
style.id = STYLE_ID3;
|
|
5577
|
-
style.textContent = STYLE_TEXT3;
|
|
5578
|
-
document.head.append(style);
|
|
6958
|
+
ensureStyleSheet(STYLE_ID3, STYLE_TEXT3);
|
|
5579
6959
|
}
|
|
5580
6960
|
function ProjectSection(props) {
|
|
5581
6961
|
const {
|
|
@@ -5604,13 +6984,13 @@ function ProjectSection(props) {
|
|
|
5604
6984
|
onReorder,
|
|
5605
6985
|
t
|
|
5606
6986
|
} = props;
|
|
5607
|
-
(0,
|
|
6987
|
+
(0, import_react12.useEffect)(() => {
|
|
5608
6988
|
ensureStyles2();
|
|
5609
6989
|
}, []);
|
|
5610
|
-
const [draggingId, setDraggingId] = (0,
|
|
5611
|
-
const dragIdRef = (0,
|
|
5612
|
-
const [dropTarget, setDropTarget] = (0,
|
|
5613
|
-
const projectIds = (0,
|
|
6990
|
+
const [draggingId, setDraggingId] = (0, import_react12.useState)(null);
|
|
6991
|
+
const dragIdRef = (0, import_react12.useRef)(null);
|
|
6992
|
+
const [dropTarget, setDropTarget] = (0, import_react12.useState)(null);
|
|
6993
|
+
const projectIds = (0, import_react12.useMemo)(() => projects.map((project) => project.id), [projects]);
|
|
5614
6994
|
const beginDrag = (projectId) => {
|
|
5615
6995
|
dragIdRef.current = projectId;
|
|
5616
6996
|
setDraggingId(projectId);
|
|
@@ -5634,13 +7014,13 @@ function ProjectSection(props) {
|
|
|
5634
7014
|
listExpanded,
|
|
5635
7015
|
projectCount: projects.length
|
|
5636
7016
|
});
|
|
5637
|
-
return (0,
|
|
7017
|
+
return (0, import_react12.createElement)(
|
|
5638
7018
|
"div",
|
|
5639
7019
|
{ className: "dsh-leader-agent-project-section" },
|
|
5640
|
-
(0,
|
|
7020
|
+
(0, import_react12.createElement)(
|
|
5641
7021
|
"div",
|
|
5642
7022
|
{ className: "dsh-leader-agent-project-header" },
|
|
5643
|
-
(0,
|
|
7023
|
+
(0, import_react12.createElement)(
|
|
5644
7024
|
"button",
|
|
5645
7025
|
{
|
|
5646
7026
|
type: "button",
|
|
@@ -5649,11 +7029,11 @@ function ProjectSection(props) {
|
|
|
5649
7029
|
title: listExpanded ? t("project.collapseList") : t("project.expandList"),
|
|
5650
7030
|
onClick: onToggleList
|
|
5651
7031
|
},
|
|
5652
|
-
(0,
|
|
5653
|
-
(0,
|
|
7032
|
+
(0, import_react12.createElement)("span", { className: "dsh-leader-agent-project-header-label" }, t("project.label")),
|
|
7033
|
+
(0, import_react12.createElement)(
|
|
5654
7034
|
"span",
|
|
5655
7035
|
{ className: "dsh-leader-agent-project-lead" },
|
|
5656
|
-
(0,
|
|
7036
|
+
(0, import_react12.createElement)(
|
|
5657
7037
|
"span",
|
|
5658
7038
|
{
|
|
5659
7039
|
className: "dsh-leader-agent-project-lead-arrow",
|
|
@@ -5663,10 +7043,10 @@ function ProjectSection(props) {
|
|
|
5663
7043
|
)
|
|
5664
7044
|
)
|
|
5665
7045
|
),
|
|
5666
|
-
(0,
|
|
7046
|
+
(0, import_react12.createElement)(
|
|
5667
7047
|
"div",
|
|
5668
7048
|
{ className: "dsh-leader-agent-project-header-actions" },
|
|
5669
|
-
(0,
|
|
7049
|
+
(0, import_react12.createElement)(
|
|
5670
7050
|
"button",
|
|
5671
7051
|
{
|
|
5672
7052
|
type: "button",
|
|
@@ -5679,20 +7059,20 @@ function ProjectSection(props) {
|
|
|
5679
7059
|
)
|
|
5680
7060
|
)
|
|
5681
7061
|
),
|
|
5682
|
-
layout.status === "" ? null : (0,
|
|
7062
|
+
layout.status === "" ? null : (0, import_react12.createElement)(
|
|
5683
7063
|
"div",
|
|
5684
7064
|
{ className: "dsh-leader-agent-project-notice" },
|
|
5685
7065
|
layout.status
|
|
5686
7066
|
),
|
|
5687
|
-
layout.showEmpty ? (0,
|
|
7067
|
+
layout.showEmpty ? (0, import_react12.createElement)(
|
|
5688
7068
|
"div",
|
|
5689
7069
|
{ className: "dsh-leader-agent-project-notice" },
|
|
5690
7070
|
t("project.empty")
|
|
5691
7071
|
) : null,
|
|
5692
|
-
layout.showList ? (0,
|
|
7072
|
+
layout.showList ? (0, import_react12.createElement)(
|
|
5693
7073
|
"div",
|
|
5694
7074
|
{ className: "dsh-leader-agent-project-list" },
|
|
5695
|
-
projects.map((project) => (0,
|
|
7075
|
+
projects.map((project) => (0, import_react12.createElement)(ProjectRow, {
|
|
5696
7076
|
key: project.id,
|
|
5697
7077
|
project,
|
|
5698
7078
|
busy,
|
|
@@ -5723,11 +7103,11 @@ function ProjectSection(props) {
|
|
|
5723
7103
|
) : null,
|
|
5724
7104
|
// 目录名当不了项目名时才出现:这时直接提交只会换回一条没有出口的报错——
|
|
5725
7105
|
// 项目没建成,列表里就没有那一行,行上的「重命名」也不存在。
|
|
5726
|
-
naming === null || naming === void 0 ? null : (0,
|
|
7106
|
+
naming === null || naming === void 0 ? null : (0, import_react12.createElement)(
|
|
5727
7107
|
"div",
|
|
5728
7108
|
{ className: "dsh-leader-agent-project-draft" },
|
|
5729
|
-
(0,
|
|
5730
|
-
(0,
|
|
7109
|
+
(0, import_react12.createElement)("div", { className: "dsh-leader-agent-project-draft-directory" }, naming.directory),
|
|
7110
|
+
(0, import_react12.createElement)("input", {
|
|
5731
7111
|
type: "text",
|
|
5732
7112
|
className: "dsh-leader-agent-project-rename",
|
|
5733
7113
|
value: naming.name,
|
|
@@ -5738,21 +7118,21 @@ function ProjectSection(props) {
|
|
|
5738
7118
|
if (event.key === "Escape") onCancelNaming();
|
|
5739
7119
|
}
|
|
5740
7120
|
}),
|
|
5741
|
-
(0,
|
|
7121
|
+
(0, import_react12.createElement)(
|
|
5742
7122
|
"div",
|
|
5743
7123
|
{ style: { display: "flex", gap: "4px" } },
|
|
5744
|
-
(0,
|
|
7124
|
+
(0, import_react12.createElement)(
|
|
5745
7125
|
"button",
|
|
5746
7126
|
{ type: "button", disabled: busy, className: "dsh-leader-agent-project-draft-action", onClick: onConfirmNaming },
|
|
5747
7127
|
t("project.create")
|
|
5748
7128
|
),
|
|
5749
|
-
(0,
|
|
7129
|
+
(0, import_react12.createElement)(
|
|
5750
7130
|
"button",
|
|
5751
7131
|
{ type: "button", className: "dsh-leader-agent-project-draft-action", onClick: onCancelNaming },
|
|
5752
7132
|
t("common.cancel")
|
|
5753
7133
|
)
|
|
5754
7134
|
),
|
|
5755
|
-
naming.error === "" || naming.error === void 0 ? null : (0,
|
|
7135
|
+
naming.error === "" || naming.error === void 0 ? null : (0, import_react12.createElement)("div", { className: "dsh-leader-agent-project-notice" }, naming.error)
|
|
5756
7136
|
)
|
|
5757
7137
|
);
|
|
5758
7138
|
}
|
|
@@ -5786,15 +7166,15 @@ function ProjectRow(props) {
|
|
|
5786
7166
|
onDragFinish,
|
|
5787
7167
|
t
|
|
5788
7168
|
} = props;
|
|
5789
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
5790
|
-
const [renaming, setRenaming] = (0,
|
|
5791
|
-
const [name, setName] = (0,
|
|
5792
|
-
const [renameError, setRenameError] = (0,
|
|
5793
|
-
const [menuAnchor, setMenuAnchor] = (0,
|
|
5794
|
-
const moreRef = (0,
|
|
5795
|
-
const leadRef = (0,
|
|
7169
|
+
const [menuOpen, setMenuOpen] = (0, import_react12.useState)(false);
|
|
7170
|
+
const [renaming, setRenaming] = (0, import_react12.useState)(false);
|
|
7171
|
+
const [name, setName] = (0, import_react12.useState)(project.name);
|
|
7172
|
+
const [renameError, setRenameError] = (0, import_react12.useState)("");
|
|
7173
|
+
const [menuAnchor, setMenuAnchor] = (0, import_react12.useState)(null);
|
|
7174
|
+
const moreRef = (0, import_react12.useRef)(null);
|
|
7175
|
+
const leadRef = (0, import_react12.useRef)(null);
|
|
5796
7176
|
const openable = isProjectOpenable(project);
|
|
5797
|
-
(0,
|
|
7177
|
+
(0, import_react12.useEffect)(() => {
|
|
5798
7178
|
if (!menuOpen) return void 0;
|
|
5799
7179
|
const onDismiss = () => setMenuOpen(false);
|
|
5800
7180
|
const onKeyDown = (event) => {
|
|
@@ -5830,20 +7210,23 @@ function ProjectRow(props) {
|
|
|
5830
7210
|
rows: childSessions,
|
|
5831
7211
|
leaderRunning: isLeaderRunning(project, sessionRows, archivedSessionIds)
|
|
5832
7212
|
});
|
|
5833
|
-
const [watermark, setWatermark] = (0,
|
|
7213
|
+
const [watermark, setWatermark] = (0, import_react12.useState)(0);
|
|
7214
|
+
(0, import_react12.useEffect)(() => {
|
|
7215
|
+
if (!expanded) setWatermark(0);
|
|
7216
|
+
}, [expanded]);
|
|
5834
7217
|
const folded = foldSessions(childSessions, watermark, currentSessionId, t);
|
|
5835
7218
|
const menuItems = buildProjectMenuItems(project, {
|
|
5836
7219
|
onRename: () => setRenaming(true),
|
|
5837
7220
|
onReplace,
|
|
5838
7221
|
onRemove
|
|
5839
7222
|
}, t);
|
|
5840
|
-
return (0,
|
|
7223
|
+
return (0, import_react12.createElement)(
|
|
5841
7224
|
"div",
|
|
5842
7225
|
{
|
|
5843
7226
|
className: "dsh-leader-agent-project-block",
|
|
5844
7227
|
"data-drop": dropHalf
|
|
5845
7228
|
},
|
|
5846
|
-
(0,
|
|
7229
|
+
(0, import_react12.createElement)(
|
|
5847
7230
|
"div",
|
|
5848
7231
|
{
|
|
5849
7232
|
className: "dsh-leader-agent-project-row",
|
|
@@ -5880,7 +7263,7 @@ function ProjectRow(props) {
|
|
|
5880
7263
|
onOpen(project);
|
|
5881
7264
|
}
|
|
5882
7265
|
},
|
|
5883
|
-
(0,
|
|
7266
|
+
(0, import_react12.createElement)(
|
|
5884
7267
|
"button",
|
|
5885
7268
|
{
|
|
5886
7269
|
type: "button",
|
|
@@ -5893,12 +7276,12 @@ function ProjectRow(props) {
|
|
|
5893
7276
|
onToggleExpand(project.id);
|
|
5894
7277
|
}
|
|
5895
7278
|
},
|
|
5896
|
-
(0,
|
|
7279
|
+
(0, import_react12.createElement)(
|
|
5897
7280
|
"span",
|
|
5898
7281
|
{ className: "dsh-leader-agent-project-lead-folder" },
|
|
5899
|
-
leadActivity ? (0,
|
|
7282
|
+
leadActivity ? (0, import_react12.createElement)(import_dsh_client_ui_primitives2.StateDot, { state: "ongoing" }) : productIcon("apps-add-outline", { size: 16 })
|
|
5900
7283
|
),
|
|
5901
|
-
(0,
|
|
7284
|
+
(0, import_react12.createElement)(
|
|
5902
7285
|
"span",
|
|
5903
7286
|
{
|
|
5904
7287
|
className: "dsh-leader-agent-project-lead-arrow",
|
|
@@ -5907,7 +7290,7 @@ function ProjectRow(props) {
|
|
|
5907
7290
|
productIcon("triangle-right-fill", { size: 14 })
|
|
5908
7291
|
)
|
|
5909
7292
|
),
|
|
5910
|
-
renaming ? (0,
|
|
7293
|
+
renaming ? (0, import_react12.createElement)("input", {
|
|
5911
7294
|
type: "text",
|
|
5912
7295
|
className: "dsh-leader-agent-project-rename",
|
|
5913
7296
|
value: name,
|
|
@@ -5926,15 +7309,15 @@ function ProjectRow(props) {
|
|
|
5926
7309
|
setRenaming(false);
|
|
5927
7310
|
}
|
|
5928
7311
|
}
|
|
5929
|
-
}) : (0,
|
|
7312
|
+
}) : (0, import_react12.createElement)(
|
|
5930
7313
|
"span",
|
|
5931
7314
|
{ className: "dsh-leader-agent-project-title" },
|
|
5932
7315
|
project.name
|
|
5933
7316
|
),
|
|
5934
|
-
(0,
|
|
7317
|
+
(0, import_react12.createElement)(
|
|
5935
7318
|
"div",
|
|
5936
7319
|
{ className: "dsh-leader-agent-project-actions" },
|
|
5937
|
-
openable ? null : (0,
|
|
7320
|
+
openable ? null : (0, import_react12.createElement)(
|
|
5938
7321
|
"button",
|
|
5939
7322
|
{
|
|
5940
7323
|
type: "button",
|
|
@@ -5948,7 +7331,7 @@ function ProjectRow(props) {
|
|
|
5948
7331
|
},
|
|
5949
7332
|
productIcon("refresh-outline")
|
|
5950
7333
|
),
|
|
5951
|
-
(0,
|
|
7334
|
+
(0, import_react12.createElement)(
|
|
5952
7335
|
"button",
|
|
5953
7336
|
{
|
|
5954
7337
|
type: "button",
|
|
@@ -5973,20 +7356,20 @@ function ProjectRow(props) {
|
|
|
5973
7356
|
)
|
|
5974
7357
|
),
|
|
5975
7358
|
// 校验失败的原因跟着输入框留在行下:提示条五秒后消失,用户要照着它改。
|
|
5976
|
-
renaming && renameError !== "" ? (0,
|
|
7359
|
+
renaming && renameError !== "" ? (0, import_react12.createElement)(
|
|
5977
7360
|
"div",
|
|
5978
7361
|
{ className: "dsh-leader-agent-project-notice" },
|
|
5979
7362
|
renameError
|
|
5980
7363
|
) : null,
|
|
5981
|
-
expanded ? (0,
|
|
7364
|
+
expanded ? (0, import_react12.createElement)(
|
|
5982
7365
|
"div",
|
|
5983
7366
|
{ className: "dsh-leader-agent-project-sessions" },
|
|
5984
|
-
childSessions.length === 0 ? (0,
|
|
7367
|
+
childSessions.length === 0 ? (0, import_react12.createElement)(
|
|
5985
7368
|
"div",
|
|
5986
7369
|
{ className: "dsh-leader-agent-project-notice" },
|
|
5987
7370
|
t("project.noSessions")
|
|
5988
7371
|
) : [
|
|
5989
|
-
...folded.rows.map((row) => (0,
|
|
7372
|
+
...folded.rows.map((row) => (0, import_react12.createElement)(SessionRow, {
|
|
5990
7373
|
key: row.id,
|
|
5991
7374
|
row,
|
|
5992
7375
|
selected: row.id === currentSessionId,
|
|
@@ -5995,7 +7378,7 @@ function ProjectRow(props) {
|
|
|
5995
7378
|
busy,
|
|
5996
7379
|
t
|
|
5997
7380
|
})),
|
|
5998
|
-
folded.hiddenCount === 0 && !folded.expanded ? null : (0,
|
|
7381
|
+
folded.hiddenCount === 0 && !folded.expanded ? null : (0, import_react12.createElement)(
|
|
5999
7382
|
"button",
|
|
6000
7383
|
{
|
|
6001
7384
|
key: "overflow",
|
|
@@ -6018,7 +7401,7 @@ function ProjectRow(props) {
|
|
|
6018
7401
|
]
|
|
6019
7402
|
) : null,
|
|
6020
7403
|
menuOpen && menuAnchor !== null ? (0, import_react_dom2.createPortal)(
|
|
6021
|
-
(0,
|
|
7404
|
+
(0, import_react12.createElement)(ProjectMenu, {
|
|
6022
7405
|
anchor: menuAnchor,
|
|
6023
7406
|
items: menuItems,
|
|
6024
7407
|
onClose: () => setMenuOpen(false)
|
|
@@ -6029,14 +7412,14 @@ function ProjectRow(props) {
|
|
|
6029
7412
|
}
|
|
6030
7413
|
function ProjectMenu(props) {
|
|
6031
7414
|
const { anchor, items, onClose } = props;
|
|
6032
|
-
const ref = (0,
|
|
6033
|
-
const [placement, setPlacement] = (0,
|
|
6034
|
-
(0,
|
|
7415
|
+
const ref = (0, import_react12.useRef)(null);
|
|
7416
|
+
const [placement, setPlacement] = (0, import_react12.useState)({ left: anchor.left, top: anchor.bottom + 4 });
|
|
7417
|
+
(0, import_react12.useLayoutEffect)(() => {
|
|
6035
7418
|
const height = ref.current?.offsetHeight ?? 0;
|
|
6036
7419
|
const fitsBelow = anchor.bottom + 4 + height <= window.innerHeight - 12;
|
|
6037
7420
|
setPlacement(fitsBelow ? { left: anchor.left, top: anchor.bottom + 4 } : { left: anchor.left, top: Math.max(12, anchor.top - height - 4) });
|
|
6038
7421
|
}, [anchor]);
|
|
6039
|
-
return (0,
|
|
7422
|
+
return (0, import_react12.createElement)(
|
|
6040
7423
|
"div",
|
|
6041
7424
|
{
|
|
6042
7425
|
ref,
|
|
@@ -6046,7 +7429,7 @@ function ProjectMenu(props) {
|
|
|
6046
7429
|
style: { left: `${placement.left}px`, top: `${placement.top}px` },
|
|
6047
7430
|
onClick: (event) => event.stopPropagation()
|
|
6048
7431
|
},
|
|
6049
|
-
items.map((item) => (0,
|
|
7432
|
+
items.map((item) => (0, import_react12.createElement)(
|
|
6050
7433
|
"button",
|
|
6051
7434
|
{
|
|
6052
7435
|
key: item.id,
|
|
@@ -6059,18 +7442,18 @@ function ProjectMenu(props) {
|
|
|
6059
7442
|
item.onSelect();
|
|
6060
7443
|
}
|
|
6061
7444
|
},
|
|
6062
|
-
item.icon === void 0 ? null : (0,
|
|
7445
|
+
item.icon === void 0 ? null : (0, import_react12.createElement)(
|
|
6063
7446
|
"span",
|
|
6064
7447
|
{ className: "dsh-leader-agent-project-menu-icon" },
|
|
6065
7448
|
productIcon(item.icon, { size: 14 })
|
|
6066
7449
|
),
|
|
6067
|
-
(0,
|
|
7450
|
+
(0, import_react12.createElement)("span", null, item.label)
|
|
6068
7451
|
))
|
|
6069
7452
|
);
|
|
6070
7453
|
}
|
|
6071
7454
|
function SessionRow(props) {
|
|
6072
7455
|
const { row, selected, onOpenSession, onArchiveSession, busy, t } = props;
|
|
6073
|
-
return (0,
|
|
7456
|
+
return (0, import_react12.createElement)(
|
|
6074
7457
|
"div",
|
|
6075
7458
|
{
|
|
6076
7459
|
className: "dsh-leader-agent-session-row",
|
|
@@ -6081,20 +7464,20 @@ function SessionRow(props) {
|
|
|
6081
7464
|
// 行没有官方那套悬停卡,完成状态拼进行标题里当唯一提示。
|
|
6082
7465
|
title: `${row.displayTitle ?? row.title ?? row.id}${row.completed === true ? ` \xB7 ${t("project.completedUnread")}` : ""}`
|
|
6083
7466
|
},
|
|
6084
|
-
(0,
|
|
7467
|
+
(0, import_react12.createElement)(
|
|
6085
7468
|
"span",
|
|
6086
7469
|
{ className: "dsh-leader-agent-session-status" },
|
|
6087
|
-
row.running ? (0,
|
|
7470
|
+
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
7471
|
),
|
|
6089
|
-
(0,
|
|
7472
|
+
(0, import_react12.createElement)(
|
|
6090
7473
|
"span",
|
|
6091
7474
|
{ className: "dsh-leader-agent-session-title" },
|
|
6092
7475
|
row.title ?? row.displayTitle ?? row.id
|
|
6093
7476
|
),
|
|
6094
|
-
(0,
|
|
7477
|
+
(0, import_react12.createElement)(
|
|
6095
7478
|
"div",
|
|
6096
7479
|
{ className: "dsh-leader-agent-session-actions" },
|
|
6097
|
-
(0,
|
|
7480
|
+
(0, import_react12.createElement)(
|
|
6098
7481
|
"button",
|
|
6099
7482
|
{
|
|
6100
7483
|
type: "button",
|
|
@@ -6161,29 +7544,29 @@ function createSessionCompletionTracker() {
|
|
|
6161
7544
|
// src/client/toast.js
|
|
6162
7545
|
var HOLD_MS = 4e3;
|
|
6163
7546
|
var FADE_MS = 1e3;
|
|
6164
|
-
var
|
|
7547
|
+
var current2 = null;
|
|
6165
7548
|
var sequence = 0;
|
|
6166
|
-
var
|
|
7549
|
+
var listeners3 = /* @__PURE__ */ new Set();
|
|
6167
7550
|
function emit() {
|
|
6168
|
-
for (const listener of
|
|
7551
|
+
for (const listener of listeners3) listener();
|
|
6169
7552
|
}
|
|
6170
7553
|
function showToast(text) {
|
|
6171
7554
|
if (typeof text !== "string" || text === "") return;
|
|
6172
|
-
|
|
7555
|
+
current2 = { id: sequence += 1, text, holdMs: HOLD_MS, fadeMs: FADE_MS };
|
|
6173
7556
|
emit();
|
|
6174
7557
|
}
|
|
6175
7558
|
function dismissToast(id) {
|
|
6176
|
-
if (
|
|
6177
|
-
|
|
7559
|
+
if (current2 === null || current2.id !== id) return;
|
|
7560
|
+
current2 = null;
|
|
6178
7561
|
emit();
|
|
6179
7562
|
}
|
|
6180
7563
|
function currentToast() {
|
|
6181
|
-
return
|
|
7564
|
+
return current2;
|
|
6182
7565
|
}
|
|
6183
7566
|
function subscribeToasts(listener) {
|
|
6184
|
-
|
|
7567
|
+
listeners3.add(listener);
|
|
6185
7568
|
return () => {
|
|
6186
|
-
|
|
7569
|
+
listeners3.delete(listener);
|
|
6187
7570
|
};
|
|
6188
7571
|
}
|
|
6189
7572
|
|
|
@@ -6206,12 +7589,7 @@ var STYLE_TEXT4 = `
|
|
|
6206
7589
|
}
|
|
6207
7590
|
`;
|
|
6208
7591
|
function ensureStyles3() {
|
|
6209
|
-
|
|
6210
|
-
if (document.getElementById(STYLE_ID4) !== null) return;
|
|
6211
|
-
const style = document.createElement("style");
|
|
6212
|
-
style.id = STYLE_ID4;
|
|
6213
|
-
style.textContent = STYLE_TEXT4;
|
|
6214
|
-
document.head.append(style);
|
|
7592
|
+
ensureStyleSheet(STYLE_ID4, STYLE_TEXT4);
|
|
6215
7593
|
}
|
|
6216
7594
|
function idOf(rowKey, prefix) {
|
|
6217
7595
|
if (typeof rowKey !== "string" || !rowKey.startsWith(prefix)) return void 0;
|
|
@@ -6387,9 +7765,9 @@ function createFrameScheduler({ schedule, cancel }) {
|
|
|
6387
7765
|
if (pending) return;
|
|
6388
7766
|
pending = true;
|
|
6389
7767
|
generation += 1;
|
|
6390
|
-
const
|
|
7768
|
+
const current3 = generation;
|
|
6391
7769
|
handle = schedule(() => {
|
|
6392
|
-
if (
|
|
7770
|
+
if (current3 !== generation) return;
|
|
6393
7771
|
pending = false;
|
|
6394
7772
|
handle = void 0;
|
|
6395
7773
|
task();
|
|
@@ -6473,25 +7851,35 @@ function createWorkspaceExclusion() {
|
|
|
6473
7851
|
// src/client/project-panel.js
|
|
6474
7852
|
var PROJECT_REFRESH_INTERVAL_MS = 5e3;
|
|
6475
7853
|
function ProjectPanel(props) {
|
|
6476
|
-
const {
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
const [
|
|
6487
|
-
const [
|
|
6488
|
-
const [
|
|
6489
|
-
const [
|
|
6490
|
-
const [
|
|
6491
|
-
const [
|
|
6492
|
-
const [
|
|
6493
|
-
const
|
|
6494
|
-
const
|
|
7854
|
+
const {
|
|
7855
|
+
wide,
|
|
7856
|
+
callRemote,
|
|
7857
|
+
getUiWorkspace,
|
|
7858
|
+
getSessions,
|
|
7859
|
+
getWorkspaces,
|
|
7860
|
+
getLayout,
|
|
7861
|
+
onWorkspacesReady,
|
|
7862
|
+
t
|
|
7863
|
+
} = props;
|
|
7864
|
+
const [projects, setProjects] = (0, import_react13.useState)([]);
|
|
7865
|
+
const [busy, setBusy] = (0, import_react13.useState)(false);
|
|
7866
|
+
const [floating, setFloating] = (0, import_react13.useState)(false);
|
|
7867
|
+
const [sessionsByProject, setSessionsByProject] = (0, import_react13.useState)(() => /* @__PURE__ */ new Map());
|
|
7868
|
+
const [sessionRows, setSessionRows] = (0, import_react13.useState)({});
|
|
7869
|
+
const [expandedProjects, setExpandedProjects] = (0, import_react13.useState)(() => /* @__PURE__ */ new Set());
|
|
7870
|
+
const [listExpanded, setListExpanded] = (0, import_react13.useState)(true);
|
|
7871
|
+
const [pendingDelete, setPendingDelete] = (0, import_react13.useState)(null);
|
|
7872
|
+
const [deleteError, setDeleteError] = (0, import_react13.useState)("");
|
|
7873
|
+
const [pendingArchive, setPendingArchive] = (0, import_react13.useState)(null);
|
|
7874
|
+
const [archiveError, setArchiveError] = (0, import_react13.useState)("");
|
|
7875
|
+
const [archivedSessionIds, setArchivedSessionIds] = (0, import_react13.useState)(() => /* @__PURE__ */ new Set());
|
|
7876
|
+
const [currentSessionId, setCurrentSessionId] = (0, import_react13.useState)(void 0);
|
|
7877
|
+
const [activePanelId, setActivePanelId] = (0, import_react13.useState)(null);
|
|
7878
|
+
const [workspaceItems, setWorkspaceItems] = (0, import_react13.useState)([]);
|
|
7879
|
+
const [naming, setNaming] = (0, import_react13.useState)(null);
|
|
7880
|
+
const [reorderQueue] = (0, import_react13.useState)(() => createWriteQueue());
|
|
7881
|
+
const projectsRef = (0, import_react13.useRef)([]);
|
|
7882
|
+
const refresh = (0, import_react13.useCallback)(async () => {
|
|
6495
7883
|
if (!isProjectRemoteReady()) return;
|
|
6496
7884
|
try {
|
|
6497
7885
|
const value = await callRemote("list", []);
|
|
@@ -6505,7 +7893,7 @@ function ProjectPanel(props) {
|
|
|
6505
7893
|
showToast(projectRemoteErrorText(error, t, "project.error.read"));
|
|
6506
7894
|
}
|
|
6507
7895
|
}, [callRemote, t]);
|
|
6508
|
-
const refreshSessionIndex = (0,
|
|
7896
|
+
const refreshSessionIndex = (0, import_react13.useCallback)(async () => {
|
|
6509
7897
|
if (!isProjectRemoteReady()) return;
|
|
6510
7898
|
try {
|
|
6511
7899
|
const value = await callRemote("sessionsByProject", []);
|
|
@@ -6519,7 +7907,7 @@ function ProjectPanel(props) {
|
|
|
6519
7907
|
showToast(projectRemoteErrorText(error, t, "project.error.sessions"));
|
|
6520
7908
|
}
|
|
6521
7909
|
}, [callRemote, t]);
|
|
6522
|
-
(0,
|
|
7910
|
+
(0, import_react13.useEffect)(() => {
|
|
6523
7911
|
void refresh();
|
|
6524
7912
|
void refreshSessionIndex();
|
|
6525
7913
|
const onFocus = () => {
|
|
@@ -6529,17 +7917,17 @@ function ProjectPanel(props) {
|
|
|
6529
7917
|
window.addEventListener("focus", onFocus);
|
|
6530
7918
|
return () => window.removeEventListener("focus", onFocus);
|
|
6531
7919
|
}, [refresh, refreshSessionIndex]);
|
|
6532
|
-
const [, setChannelTick] = (0,
|
|
6533
|
-
(0,
|
|
7920
|
+
const [, setChannelTick] = (0, import_react13.useState)(0);
|
|
7921
|
+
(0, import_react13.useEffect)(() => onProjectRemoteReady(() => {
|
|
6534
7922
|
setChannelTick((tick) => tick + 1);
|
|
6535
7923
|
void refresh();
|
|
6536
7924
|
void refreshSessionIndex();
|
|
6537
7925
|
}), [refresh, refreshSessionIndex]);
|
|
6538
|
-
const sessionsRef = (0,
|
|
7926
|
+
const sessionsRef = (0, import_react13.useRef)(getSessions);
|
|
6539
7927
|
sessionsRef.current = getSessions;
|
|
6540
|
-
const refreshIndexRef = (0,
|
|
7928
|
+
const refreshIndexRef = (0, import_react13.useRef)(refreshSessionIndex);
|
|
6541
7929
|
refreshIndexRef.current = refreshSessionIndex;
|
|
6542
|
-
(0,
|
|
7930
|
+
(0, import_react13.useEffect)(() => {
|
|
6543
7931
|
const tick = () => {
|
|
6544
7932
|
if (document.visibilityState === "visible") void refresh();
|
|
6545
7933
|
};
|
|
@@ -6550,7 +7938,7 @@ function ProjectPanel(props) {
|
|
|
6550
7938
|
document.removeEventListener("visibilitychange", tick);
|
|
6551
7939
|
};
|
|
6552
7940
|
}, [refresh]);
|
|
6553
|
-
(0,
|
|
7941
|
+
(0, import_react13.useEffect)(() => {
|
|
6554
7942
|
let pending = null;
|
|
6555
7943
|
let unsubscribe = null;
|
|
6556
7944
|
let lastCurrent;
|
|
@@ -6619,7 +8007,7 @@ function ProjectPanel(props) {
|
|
|
6619
8007
|
if (pending !== null) clearTimeout(pending);
|
|
6620
8008
|
};
|
|
6621
8009
|
}, []);
|
|
6622
|
-
(0,
|
|
8010
|
+
(0, import_react13.useEffect)(() => {
|
|
6623
8011
|
let unsubscribe = null;
|
|
6624
8012
|
const attach = () => {
|
|
6625
8013
|
if (unsubscribe !== null) return;
|
|
@@ -6640,11 +8028,25 @@ function ProjectPanel(props) {
|
|
|
6640
8028
|
unsubscribe?.();
|
|
6641
8029
|
};
|
|
6642
8030
|
}, [getWorkspaces, onWorkspacesReady]);
|
|
6643
|
-
|
|
8031
|
+
(0, import_react13.useEffect)(() => {
|
|
8032
|
+
const info = getLayout?.()?.panelInfo;
|
|
8033
|
+
if (info === void 0 || typeof info.subscribe !== "function" || typeof info.getSnapshot !== "function") {
|
|
8034
|
+
return void 0;
|
|
8035
|
+
}
|
|
8036
|
+
const sync = () => setActivePanelId(info.getSnapshot().activePanelId ?? null);
|
|
8037
|
+
sync();
|
|
8038
|
+
return info.subscribe(sync);
|
|
8039
|
+
}, [getLayout]);
|
|
8040
|
+
const panelActive = activePanelId !== null;
|
|
8041
|
+
const selectionSessionId = panelActive ? void 0 : currentSessionId;
|
|
8042
|
+
(0, import_react13.useEffect)(() => {
|
|
8043
|
+
if (activePanelId !== null) setFloating(false);
|
|
8044
|
+
}, [activePanelId]);
|
|
8045
|
+
const excludedSessionIds = (0, import_react13.useMemo)(
|
|
6644
8046
|
() => collectExcludedSessionIds(projects, sessionsByProject),
|
|
6645
8047
|
[projects, sessionsByProject]
|
|
6646
8048
|
);
|
|
6647
|
-
const excludedCountsByGroup = (0,
|
|
8049
|
+
const excludedCountsByGroup = (0, import_react13.useMemo)(() => {
|
|
6648
8050
|
const counts = excludedSessionCountsByWorkspace({
|
|
6649
8051
|
workspaceItems,
|
|
6650
8052
|
excluded: excludedSessionIds,
|
|
@@ -6655,18 +8057,18 @@ function ProjectPanel(props) {
|
|
|
6655
8057
|
workspaceItems,
|
|
6656
8058
|
excluded: excludedSessionIds,
|
|
6657
8059
|
archivedSessionIds,
|
|
6658
|
-
currentSessionId
|
|
8060
|
+
currentSessionId: selectionSessionId
|
|
6659
8061
|
});
|
|
6660
8062
|
if (ungrouped > 0) counts.set("", ungrouped);
|
|
6661
8063
|
return counts;
|
|
6662
|
-
}, [workspaceItems, excludedSessionIds, archivedSessionIds, sessionRows,
|
|
6663
|
-
const hideUngrouped = (0,
|
|
8064
|
+
}, [workspaceItems, excludedSessionIds, archivedSessionIds, sessionRows, selectionSessionId]);
|
|
8065
|
+
const hideUngrouped = (0, import_react13.useMemo)(() => shouldHideUngroupedHeader({
|
|
6664
8066
|
sessionRows,
|
|
6665
8067
|
workspaceItems,
|
|
6666
8068
|
excluded: excludedSessionIds,
|
|
6667
8069
|
archivedSessionIds
|
|
6668
8070
|
}), [sessionRows, workspaceItems, excludedSessionIds, archivedSessionIds]);
|
|
6669
|
-
(0,
|
|
8071
|
+
(0, import_react13.useEffect)(() => {
|
|
6670
8072
|
const exclusion = createWorkspaceExclusion();
|
|
6671
8073
|
exclusion.update({
|
|
6672
8074
|
sessionIds: excludedSessionIds,
|
|
@@ -6675,7 +8077,7 @@ function ProjectPanel(props) {
|
|
|
6675
8077
|
});
|
|
6676
8078
|
return () => exclusion.dispose();
|
|
6677
8079
|
}, [excludedSessionIds, excludedCountsByGroup, hideUngrouped]);
|
|
6678
|
-
const startAdd = (0,
|
|
8080
|
+
const startAdd = (0, import_react13.useCallback)(async () => {
|
|
6679
8081
|
if (busy) return;
|
|
6680
8082
|
setNaming(null);
|
|
6681
8083
|
const uiWorkspace = getUiWorkspace?.();
|
|
@@ -6701,7 +8103,7 @@ function ProjectPanel(props) {
|
|
|
6701
8103
|
setBusy(false);
|
|
6702
8104
|
}
|
|
6703
8105
|
}, [busy, callRemote, getUiWorkspace, refresh, t]);
|
|
6704
|
-
const confirmNaming = (0,
|
|
8106
|
+
const confirmNaming = (0, import_react13.useCallback)(async () => {
|
|
6705
8107
|
if (busy || naming === null) return;
|
|
6706
8108
|
const check = validateProjectName(naming.name, t);
|
|
6707
8109
|
if (!check.ok) {
|
|
@@ -6721,13 +8123,13 @@ function ProjectPanel(props) {
|
|
|
6721
8123
|
setBusy(false);
|
|
6722
8124
|
}
|
|
6723
8125
|
}, [busy, callRemote, naming, refresh, t]);
|
|
6724
|
-
const cancelNaming = (0,
|
|
8126
|
+
const cancelNaming = (0, import_react13.useCallback)(() => {
|
|
6725
8127
|
setNaming(null);
|
|
6726
8128
|
}, []);
|
|
6727
|
-
const onNamingChange = (0,
|
|
6728
|
-
setNaming((
|
|
8129
|
+
const onNamingChange = (0, import_react13.useCallback)((value) => {
|
|
8130
|
+
setNaming((current3) => current3 === null ? null : { ...current3, name: value, error: "" });
|
|
6729
8131
|
}, []);
|
|
6730
|
-
const openProject = (0,
|
|
8132
|
+
const openProject = (0, import_react13.useCallback)(async (project) => {
|
|
6731
8133
|
if (!isProjectOpenable(project)) {
|
|
6732
8134
|
showToast(t("project.leaderDeleted", { name: project.name }));
|
|
6733
8135
|
return;
|
|
@@ -6744,7 +8146,7 @@ function ProjectPanel(props) {
|
|
|
6744
8146
|
});
|
|
6745
8147
|
if (result.ok !== true) showToast(result.message);
|
|
6746
8148
|
}, [getUiWorkspace, t]);
|
|
6747
|
-
const renameProject = (0,
|
|
8149
|
+
const renameProject = (0, import_react13.useCallback)(async (project, name) => {
|
|
6748
8150
|
if (busy) return;
|
|
6749
8151
|
const check = validateProjectName(name, t);
|
|
6750
8152
|
if (!check.ok) {
|
|
@@ -6761,8 +8163,8 @@ function ProjectPanel(props) {
|
|
|
6761
8163
|
setBusy(false);
|
|
6762
8164
|
}
|
|
6763
8165
|
}, [busy, callRemote, refresh, t]);
|
|
6764
|
-
const reorderProject = (0,
|
|
6765
|
-
setProjects((
|
|
8166
|
+
const reorderProject = (0, import_react13.useCallback)((projectId, beforeId) => {
|
|
8167
|
+
setProjects((current3) => moveProjectBefore(current3, projectId, beforeId));
|
|
6766
8168
|
return reorderQueue.push(async (isLatest) => {
|
|
6767
8169
|
try {
|
|
6768
8170
|
await callRemote("reorder", [projectId, beforeId]);
|
|
@@ -6772,14 +8174,14 @@ function ProjectPanel(props) {
|
|
|
6772
8174
|
if (isLatest()) await refresh();
|
|
6773
8175
|
});
|
|
6774
8176
|
}, [callRemote, refresh, reorderQueue, t]);
|
|
6775
|
-
const replaceLeader = (0,
|
|
8177
|
+
const replaceLeader = (0, import_react13.useCallback)(async (project) => {
|
|
6776
8178
|
if (busy) return;
|
|
6777
8179
|
setBusy(true);
|
|
6778
8180
|
try {
|
|
6779
8181
|
const updated = await callRemote("replaceLeader", [project.id]);
|
|
6780
8182
|
const leaderSessionId = typeof updated?.leaderSessionId === "string" ? updated.leaderSessionId : "";
|
|
6781
8183
|
if (leaderSessionId !== "") {
|
|
6782
|
-
setProjects((
|
|
8184
|
+
setProjects((current3) => current3.map((item) => item.id === project.id ? { ...item, ...updated } : item));
|
|
6783
8185
|
const uiWorkspace = getUiWorkspace?.();
|
|
6784
8186
|
if (uiWorkspace !== void 0) uiWorkspace.openSession(leaderSessionId);
|
|
6785
8187
|
}
|
|
@@ -6790,15 +8192,15 @@ function ProjectPanel(props) {
|
|
|
6790
8192
|
setBusy(false);
|
|
6791
8193
|
}
|
|
6792
8194
|
}, [busy, callRemote, getUiWorkspace, refresh, t]);
|
|
6793
|
-
const requestDelete = (0,
|
|
8195
|
+
const requestDelete = (0, import_react13.useCallback)((project) => {
|
|
6794
8196
|
setDeleteError("");
|
|
6795
8197
|
setPendingDelete(project);
|
|
6796
8198
|
}, []);
|
|
6797
|
-
const cancelDelete = (0,
|
|
8199
|
+
const cancelDelete = (0, import_react13.useCallback)(() => {
|
|
6798
8200
|
setDeleteError("");
|
|
6799
8201
|
setPendingDelete(null);
|
|
6800
8202
|
}, []);
|
|
6801
|
-
const confirmDelete = (0,
|
|
8203
|
+
const confirmDelete = (0, import_react13.useCallback)(async () => {
|
|
6802
8204
|
if (busy || pendingDelete === null) return;
|
|
6803
8205
|
const project = pendingDelete;
|
|
6804
8206
|
setBusy(true);
|
|
@@ -6819,7 +8221,7 @@ function ProjectPanel(props) {
|
|
|
6819
8221
|
setBusy(false);
|
|
6820
8222
|
}
|
|
6821
8223
|
}, [busy, callRemote, pendingDelete, refresh, t]);
|
|
6822
|
-
const archiveSession = (0,
|
|
8224
|
+
const archiveSession = (0, import_react13.useCallback)(async (sessionId, { stopActivity = false } = {}) => {
|
|
6823
8225
|
const workspaces = getWorkspaces?.();
|
|
6824
8226
|
if (workspaces?.archiveSession === void 0) {
|
|
6825
8227
|
showToast(t("project.error.workspaces"));
|
|
@@ -6850,15 +8252,15 @@ function ProjectPanel(props) {
|
|
|
6850
8252
|
setBusy(false);
|
|
6851
8253
|
}
|
|
6852
8254
|
}, [callRemote, getWorkspaces, refreshSessionIndex, t]);
|
|
6853
|
-
const confirmArchive = (0,
|
|
8255
|
+
const confirmArchive = (0, import_react13.useCallback)(async () => {
|
|
6854
8256
|
if (busy || pendingArchive === null) return;
|
|
6855
8257
|
await archiveSession(pendingArchive.sessionId, { stopActivity: true });
|
|
6856
8258
|
}, [archiveSession, busy, pendingArchive]);
|
|
6857
|
-
const cancelArchive = (0,
|
|
8259
|
+
const cancelArchive = (0, import_react13.useCallback)(() => {
|
|
6858
8260
|
setArchiveError("");
|
|
6859
8261
|
setPendingArchive(null);
|
|
6860
8262
|
}, []);
|
|
6861
|
-
const body = (0,
|
|
8263
|
+
const body = (0, import_react13.createElement)(ProjectSection, {
|
|
6862
8264
|
t,
|
|
6863
8265
|
projects,
|
|
6864
8266
|
busy,
|
|
@@ -6890,8 +8292,8 @@ function ProjectPanel(props) {
|
|
|
6890
8292
|
expandedProjects,
|
|
6891
8293
|
listExpanded,
|
|
6892
8294
|
onToggleList: () => setListExpanded((value) => !value),
|
|
6893
|
-
onToggleExpand: (projectId) => setExpandedProjects((
|
|
6894
|
-
const next = new Set(
|
|
8295
|
+
onToggleExpand: (projectId) => setExpandedProjects((current3) => {
|
|
8296
|
+
const next = new Set(current3);
|
|
6895
8297
|
if (next.has(projectId)) next.delete(projectId);
|
|
6896
8298
|
else next.add(projectId);
|
|
6897
8299
|
return next;
|
|
@@ -6908,9 +8310,9 @@ function ProjectPanel(props) {
|
|
|
6908
8310
|
void archiveSession(sessionId);
|
|
6909
8311
|
},
|
|
6910
8312
|
archivedSessionIds,
|
|
6911
|
-
currentSessionId
|
|
8313
|
+
currentSessionId: selectionSessionId
|
|
6912
8314
|
});
|
|
6913
|
-
const dialog = (0,
|
|
8315
|
+
const dialog = (0, import_react13.createElement)(ConfirmDialog, {
|
|
6914
8316
|
open: pendingDelete !== null,
|
|
6915
8317
|
title: t("project.remove.title"),
|
|
6916
8318
|
description: pendingDelete === null ? "" : describeProjectRemoval(pendingDelete, t),
|
|
@@ -6924,7 +8326,7 @@ function ProjectPanel(props) {
|
|
|
6924
8326
|
},
|
|
6925
8327
|
onCancel: cancelDelete
|
|
6926
8328
|
});
|
|
6927
|
-
const archiveDialog = (0,
|
|
8329
|
+
const archiveDialog = (0, import_react13.createElement)(ConfirmDialog, {
|
|
6928
8330
|
open: pendingArchive !== null,
|
|
6929
8331
|
title: t("project.archive.title"),
|
|
6930
8332
|
description: t("project.archive.description"),
|
|
@@ -6939,15 +8341,16 @@ function ProjectPanel(props) {
|
|
|
6939
8341
|
onCancel: cancelArchive
|
|
6940
8342
|
});
|
|
6941
8343
|
if (!wide) {
|
|
6942
|
-
return (0,
|
|
8344
|
+
return (0, import_react13.createElement)(
|
|
6943
8345
|
"div",
|
|
6944
8346
|
{ style: { position: "relative" } },
|
|
6945
|
-
(0,
|
|
8347
|
+
(0, import_react13.createElement)(
|
|
6946
8348
|
"button",
|
|
6947
8349
|
{
|
|
6948
8350
|
type: "button",
|
|
6949
8351
|
title: t("project.label"),
|
|
6950
8352
|
"aria-label": t("project.label"),
|
|
8353
|
+
"aria-expanded": floating ? "true" : "false",
|
|
6951
8354
|
onClick: () => setFloating((value) => !value),
|
|
6952
8355
|
style: {
|
|
6953
8356
|
width: "100%",
|
|
@@ -6964,7 +8367,7 @@ function ProjectPanel(props) {
|
|
|
6964
8367
|
},
|
|
6965
8368
|
productIcon("workspace-tree-outline")
|
|
6966
8369
|
),
|
|
6967
|
-
floating ? (0,
|
|
8370
|
+
floating ? (0, import_react13.createElement)(
|
|
6968
8371
|
"div",
|
|
6969
8372
|
{
|
|
6970
8373
|
style: {
|
|
@@ -6988,10 +8391,10 @@ function ProjectPanel(props) {
|
|
|
6988
8391
|
archiveDialog
|
|
6989
8392
|
);
|
|
6990
8393
|
}
|
|
6991
|
-
return (0,
|
|
6992
|
-
|
|
8394
|
+
return (0, import_react13.createElement)(
|
|
8395
|
+
import_react13.Fragment,
|
|
6993
8396
|
null,
|
|
6994
|
-
(0,
|
|
8397
|
+
(0, import_react13.createElement)(SidebarPlacement, null, body),
|
|
6995
8398
|
dialog,
|
|
6996
8399
|
archiveDialog
|
|
6997
8400
|
);
|
|
@@ -7013,9 +8416,9 @@ function placementSpot(root, nav) {
|
|
|
7013
8416
|
return { parent: region, before: region.firstElementChild };
|
|
7014
8417
|
}
|
|
7015
8418
|
function SidebarPlacement(props) {
|
|
7016
|
-
const anchorRef = (0,
|
|
7017
|
-
const [container, setContainer] = (0,
|
|
7018
|
-
(0,
|
|
8419
|
+
const anchorRef = (0, import_react13.useRef)(null);
|
|
8420
|
+
const [container, setContainer] = (0, import_react13.useState)(null);
|
|
8421
|
+
(0, import_react13.useEffect)(() => {
|
|
7019
8422
|
const anchor = anchorRef.current;
|
|
7020
8423
|
if (anchor === null) return void 0;
|
|
7021
8424
|
const root = findSidebarRoot(anchor);
|
|
@@ -7034,7 +8437,7 @@ function SidebarPlacement(props) {
|
|
|
7034
8437
|
setContainer(null);
|
|
7035
8438
|
};
|
|
7036
8439
|
}, []);
|
|
7037
|
-
return (0,
|
|
8440
|
+
return (0, import_react13.createElement)(
|
|
7038
8441
|
"div",
|
|
7039
8442
|
// 锚点自身不参与布局:内容移到宿主容器后,锚点只剩一个定位点;宿主结构变了
|
|
7040
8443
|
// 导致没移成时,内容就落回这个锚点里,仍然可见。
|
|
@@ -7045,7 +8448,7 @@ function SidebarPlacement(props) {
|
|
|
7045
8448
|
|
|
7046
8449
|
// src/client/guide-card.js
|
|
7047
8450
|
var import_dsh_client_ui_primitives3 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
7048
|
-
var
|
|
8451
|
+
var import_react14 = require("react");
|
|
7049
8452
|
|
|
7050
8453
|
// src/client/guide-card-logic.js
|
|
7051
8454
|
var GUIDE_DISMISS_PREFIX = "dsh-leader-agent.guide.dismissed.";
|
|
@@ -7108,7 +8511,7 @@ function createLeaderViewDefinition() {
|
|
|
7108
8511
|
}
|
|
7109
8512
|
function createLeaderSessionIndex() {
|
|
7110
8513
|
let ids = /* @__PURE__ */ new Set();
|
|
7111
|
-
const
|
|
8514
|
+
const listeners4 = /* @__PURE__ */ new Set();
|
|
7112
8515
|
return {
|
|
7113
8516
|
/** @returns {Set<string>} 当前已知的 leader 会话 id */
|
|
7114
8517
|
getSnapshot: () => ids,
|
|
@@ -7118,10 +8521,10 @@ function createLeaderSessionIndex() {
|
|
|
7118
8521
|
* @returns {() => void} 退订函数
|
|
7119
8522
|
*/
|
|
7120
8523
|
subscribe: (listener) => {
|
|
7121
|
-
|
|
8524
|
+
listeners4.add(listener);
|
|
7122
8525
|
listener(ids);
|
|
7123
8526
|
return () => {
|
|
7124
|
-
|
|
8527
|
+
listeners4.delete(listener);
|
|
7125
8528
|
};
|
|
7126
8529
|
},
|
|
7127
8530
|
/**
|
|
@@ -7133,7 +8536,7 @@ function createLeaderSessionIndex() {
|
|
|
7133
8536
|
const nextIds = new Set(next);
|
|
7134
8537
|
if (nextIds.size === ids.size && [...nextIds].every((id) => ids.has(id))) return;
|
|
7135
8538
|
ids = nextIds;
|
|
7136
|
-
for (const listener of Array.from(
|
|
8539
|
+
for (const listener of Array.from(listeners4)) listener(ids);
|
|
7137
8540
|
}
|
|
7138
8541
|
};
|
|
7139
8542
|
}
|
|
@@ -7193,39 +8596,39 @@ function dismissal() {
|
|
|
7193
8596
|
}
|
|
7194
8597
|
function GuideCardEntry(props) {
|
|
7195
8598
|
const { sessionId, session, inputActions, t } = props;
|
|
7196
|
-
const [isLeader, setIsLeader] = (0,
|
|
7197
|
-
const [dismissed, setDismissed] = (0,
|
|
7198
|
-
(0,
|
|
8599
|
+
const [isLeader, setIsLeader] = (0, import_react14.useState)(() => leaderSessionIndex.getSnapshot().has(sessionId));
|
|
8600
|
+
const [dismissed, setDismissed] = (0, import_react14.useState)(() => dismissal().isDismissed(sessionId));
|
|
8601
|
+
(0, import_react14.useEffect)(() => leaderSessionIndex.subscribe((ids) => {
|
|
7199
8602
|
setIsLeader(ids.has(sessionId));
|
|
7200
8603
|
}), [sessionId]);
|
|
7201
|
-
(0,
|
|
8604
|
+
(0, import_react14.useEffect)(() => {
|
|
7202
8605
|
setDismissed(dismissal().isDismissed(sessionId));
|
|
7203
8606
|
}, [sessionId]);
|
|
7204
|
-
(0,
|
|
8607
|
+
(0, import_react14.useEffect)(() => ensureBoardStyles(), []);
|
|
7205
8608
|
if (!shouldShowGuide({ isLeader, blank: session?.blank === true, dismissed })) return null;
|
|
7206
|
-
return (0,
|
|
8609
|
+
return (0, import_react14.createElement)(
|
|
7207
8610
|
"div",
|
|
7208
8611
|
{ className: "dsh-leader-agent-guide-card" },
|
|
7209
|
-
(0,
|
|
7210
|
-
(0,
|
|
8612
|
+
(0, import_react14.createElement)("span", { className: "dsh-leader-agent-guide-icon" }, productIcon("checklist-outline", { size: 16 })),
|
|
8613
|
+
(0, import_react14.createElement)(
|
|
7211
8614
|
"div",
|
|
7212
8615
|
{ className: "dsh-leader-agent-guide-body" },
|
|
7213
|
-
(0,
|
|
7214
|
-
(0,
|
|
8616
|
+
(0, import_react14.createElement)("div", { className: "dsh-leader-agent-guide-title" }, t("guide.title")),
|
|
8617
|
+
(0, import_react14.createElement)("div", { className: "dsh-leader-agent-guide-steps" }, t("guide.steps"))
|
|
7215
8618
|
),
|
|
7216
|
-
(0,
|
|
8619
|
+
(0, import_react14.createElement)(
|
|
7217
8620
|
"div",
|
|
7218
8621
|
{ className: "dsh-leader-agent-guide-actions" },
|
|
7219
8622
|
// 与 sendIntroPrompt 共用同一个判定:只差一半能力时(比如有 submit 没有
|
|
7220
8623
|
// setDraft)宁可不画,也不留一个点了没反应的按钮。
|
|
7221
|
-
canSendIntro(inputActions) === false ? null : (0,
|
|
8624
|
+
canSendIntro(inputActions) === false ? null : (0, import_react14.createElement)(import_dsh_client_ui_primitives3.Button, {
|
|
7222
8625
|
size: "sm",
|
|
7223
8626
|
variant: "outline",
|
|
7224
8627
|
onClick: () => {
|
|
7225
8628
|
sendIntroPrompt(inputActions, t("guide.intro.prompt"));
|
|
7226
8629
|
}
|
|
7227
8630
|
}, t("guide.action.intro")),
|
|
7228
|
-
(0,
|
|
8631
|
+
(0, import_react14.createElement)(import_dsh_client_ui_primitives3.Button, {
|
|
7229
8632
|
size: "sm",
|
|
7230
8633
|
variant: "ghost",
|
|
7231
8634
|
onClick: () => {
|
|
@@ -7246,7 +8649,7 @@ function mountGuideCard(ctx) {
|
|
|
7246
8649
|
}
|
|
7247
8650
|
|
|
7248
8651
|
// src/client/leader-changes-anchor.js
|
|
7249
|
-
var
|
|
8652
|
+
var import_react15 = require("react");
|
|
7250
8653
|
|
|
7251
8654
|
// src/client/main-panel.js
|
|
7252
8655
|
function findMainPanel() {
|
|
@@ -7281,12 +8684,7 @@ var STYLE_TEXT5 = `
|
|
|
7281
8684
|
}
|
|
7282
8685
|
`;
|
|
7283
8686
|
function ensureLeaderChangesStyles() {
|
|
7284
|
-
|
|
7285
|
-
if (document.getElementById(STYLE_ID5) !== null) return;
|
|
7286
|
-
const style = document.createElement("style");
|
|
7287
|
-
style.id = STYLE_ID5;
|
|
7288
|
-
style.textContent = STYLE_TEXT5;
|
|
7289
|
-
document.head.append(style);
|
|
8687
|
+
ensureStyleSheet(STYLE_ID5, STYLE_TEXT5);
|
|
7290
8688
|
}
|
|
7291
8689
|
function isLeaderSession(leaderIds, sessionId) {
|
|
7292
8690
|
if (typeof sessionId !== "string" || sessionId === "") return false;
|
|
@@ -7349,22 +8747,22 @@ function watchLeaderChanges(hide, {
|
|
|
7349
8747
|
// src/client/leader-changes-anchor.js
|
|
7350
8748
|
function LeaderChangesAnchor({ getSessions }) {
|
|
7351
8749
|
const sessions = getSessions?.();
|
|
7352
|
-
const [snapshot, setSnapshot] = (0,
|
|
8750
|
+
const [snapshot, setSnapshot] = (0, import_react15.useState)(() => sessions?.list?.getSnapshot?.() ?? {
|
|
7353
8751
|
phase: "pending",
|
|
7354
8752
|
ids: [],
|
|
7355
8753
|
byId: {}
|
|
7356
8754
|
});
|
|
7357
|
-
const [leaderIds, setLeaderIds] = (0,
|
|
7358
|
-
(0,
|
|
8755
|
+
const [leaderIds, setLeaderIds] = (0, import_react15.useState)(() => leaderSessionIndex.getSnapshot());
|
|
8756
|
+
(0, import_react15.useEffect)(() => {
|
|
7359
8757
|
if (typeof sessions?.list?.subscribe !== "function") return void 0;
|
|
7360
8758
|
const sync = () => setSnapshot(sessions.list.getSnapshot());
|
|
7361
8759
|
sync();
|
|
7362
8760
|
return sessions.list.subscribe(sync);
|
|
7363
8761
|
}, [sessions]);
|
|
7364
|
-
(0,
|
|
8762
|
+
(0, import_react15.useEffect)(() => leaderSessionIndex.subscribe(setLeaderIds), []);
|
|
7365
8763
|
const currentSessionId = currentSessionIdOf(snapshot.byId);
|
|
7366
8764
|
const hide = isLeaderSession(leaderIds, currentSessionId);
|
|
7367
|
-
(0,
|
|
8765
|
+
(0, import_react15.useEffect)(() => {
|
|
7368
8766
|
ensureLeaderChangesStyles();
|
|
7369
8767
|
return watchLeaderChanges(hide);
|
|
7370
8768
|
}, [hide]);
|
|
@@ -7372,10 +8770,10 @@ function LeaderChangesAnchor({ getSessions }) {
|
|
|
7372
8770
|
}
|
|
7373
8771
|
|
|
7374
8772
|
// src/client/leader-view.js
|
|
7375
|
-
var
|
|
8773
|
+
var import_react16 = require("react");
|
|
7376
8774
|
function LeaderViewEntry(props) {
|
|
7377
8775
|
const { sessionId, getUiConversation } = props;
|
|
7378
|
-
(0,
|
|
8776
|
+
(0, import_react16.useLayoutEffect)(() => leaderSessionIndex.subscribe((ids) => {
|
|
7379
8777
|
if (!ids.has(sessionId)) return;
|
|
7380
8778
|
activateLeaderView(getUiConversation?.(), sessionId);
|
|
7381
8779
|
}), [getUiConversation, sessionId]);
|
|
@@ -7401,7 +8799,7 @@ function mountLeaderView(ctx) {
|
|
|
7401
8799
|
|
|
7402
8800
|
// src/client/ready-signal.js
|
|
7403
8801
|
function createReadySignal() {
|
|
7404
|
-
const
|
|
8802
|
+
const listeners4 = /* @__PURE__ */ new Set();
|
|
7405
8803
|
let ready2 = false;
|
|
7406
8804
|
const notify = (listener) => {
|
|
7407
8805
|
try {
|
|
@@ -7415,7 +8813,7 @@ function createReadySignal() {
|
|
|
7415
8813
|
mark() {
|
|
7416
8814
|
if (ready2) return;
|
|
7417
8815
|
ready2 = true;
|
|
7418
|
-
for (const listener of Array.from(
|
|
8816
|
+
for (const listener of Array.from(listeners4)) notify(listener);
|
|
7419
8817
|
},
|
|
7420
8818
|
/**
|
|
7421
8819
|
* 订阅就绪。已就绪时用微任务补一次通知——调用方通常在同步代码里先判空再订阅,
|
|
@@ -7432,18 +8830,18 @@ function createReadySignal() {
|
|
|
7432
8830
|
if (!active) return;
|
|
7433
8831
|
notify(listener);
|
|
7434
8832
|
};
|
|
7435
|
-
|
|
8833
|
+
listeners4.add(run);
|
|
7436
8834
|
if (ready2) queueMicrotask(run);
|
|
7437
8835
|
return () => {
|
|
7438
8836
|
active = false;
|
|
7439
|
-
|
|
8837
|
+
listeners4.delete(run);
|
|
7440
8838
|
};
|
|
7441
8839
|
}
|
|
7442
8840
|
};
|
|
7443
8841
|
}
|
|
7444
8842
|
|
|
7445
8843
|
// src/client/session-tabs.js
|
|
7446
|
-
var
|
|
8844
|
+
var import_react17 = require("react");
|
|
7447
8845
|
var import_react_dom4 = require("react-dom");
|
|
7448
8846
|
|
|
7449
8847
|
// src/client/session-tabs-logic.js
|
|
@@ -7499,19 +8897,19 @@ function hasOpenTab(store, projectId, sessionId) {
|
|
|
7499
8897
|
}
|
|
7500
8898
|
function addOpenTab(store, projectId, sessionId) {
|
|
7501
8899
|
if (!validKey(projectId) || !validKey(sessionId)) return store;
|
|
7502
|
-
const
|
|
7503
|
-
if (
|
|
7504
|
-
if (
|
|
8900
|
+
const current3 = openTabIds(store, projectId);
|
|
8901
|
+
if (current3.includes(sessionId)) return store;
|
|
8902
|
+
if (current3.length >= MAX_OPEN_TABS_PER_PROJECT) return store;
|
|
7505
8903
|
return {
|
|
7506
8904
|
version: 1,
|
|
7507
|
-
projects: { ...projectsOf(store), [projectId]: [...
|
|
8905
|
+
projects: { ...projectsOf(store), [projectId]: [...current3, sessionId] }
|
|
7508
8906
|
};
|
|
7509
8907
|
}
|
|
7510
8908
|
function removeOpenTab(store, projectId, sessionId) {
|
|
7511
8909
|
if (!validKey(projectId) || !validKey(sessionId)) return store;
|
|
7512
|
-
const
|
|
7513
|
-
if (!
|
|
7514
|
-
const next =
|
|
8910
|
+
const current3 = openTabIds(store, projectId);
|
|
8911
|
+
if (!current3.includes(sessionId)) return store;
|
|
8912
|
+
const next = current3.filter((id) => id !== sessionId);
|
|
7515
8913
|
const projects = { ...projectsOf(store) };
|
|
7516
8914
|
if (next.length === 0) delete projects[projectId];
|
|
7517
8915
|
else projects[projectId] = next;
|
|
@@ -7649,20 +9047,30 @@ var STYLE_TEXT6 = `
|
|
|
7649
9047
|
display: flex;
|
|
7650
9048
|
align-items: center;
|
|
7651
9049
|
gap: 4px;
|
|
7652
|
-
height:
|
|
9050
|
+
height: 48px;
|
|
7653
9051
|
min-width: 0;
|
|
7654
9052
|
box-sizing: border-box;
|
|
7655
|
-
|
|
9053
|
+
/* \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
|
|
9054
|
+
\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
|
|
9055
|
+
chip \u4E0B\u65B9\uFF0C\u800C\u4E0D\u662F\u7D27\u8D34 chip \u4E0B\u6CBF\u3002 */
|
|
9056
|
+
padding-block: 10px;
|
|
7656
9057
|
padding-inline-start: max(20px, var(--dsh-frame-leading-clearance, 0px));
|
|
7657
9058
|
/* \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
9059
|
\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
9060
|
flex \u5B50\u9879\uFF0C\u4E0D\u5360\u8FD9\u6BB5\u7559\u767D\u3002 */
|
|
7660
9061
|
padding-inline-end: 42px;
|
|
7661
9062
|
background: var(--dsw-alias-bg-base);
|
|
7662
|
-
border-
|
|
9063
|
+
/* \u5206\u9694\u7EBF\u753B\u6210 inset shadow\uFF1Aborder \u4F1A\u5360\u6389 border-box \u7684 0.5px\uFF0C\u5185\u5BB9\u5E26\u5C31
|
|
9064
|
+
\u51D1\u4E0D\u6EE1 28px\uFF0C\u4E0E\u53F3\u680F\u6761\u5E26\u5BF9\u4E0D\u9F50\u3002 */
|
|
9065
|
+
box-shadow: inset 0 -0.5px 0 var(--dsw-alias-border-l3);
|
|
7663
9066
|
-webkit-app-region: drag;
|
|
7664
9067
|
overflow: hidden;
|
|
7665
9068
|
}
|
|
9069
|
+
/* \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
|
|
9070
|
+
\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 */
|
|
9071
|
+
body:has([data-sidebar-right-session]:not([hidden]) [data-sidebar-right-open]) .dsh-leader-agent-tabs {
|
|
9072
|
+
padding-inline-end: 6px;
|
|
9073
|
+
}
|
|
7666
9074
|
/* \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
9075
|
\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
9076
|
\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
|
|
@@ -7809,23 +9217,18 @@ ${signalStyleText("dsh-leader-agent-tab-signal")}
|
|
|
7809
9217
|
}
|
|
7810
9218
|
`;
|
|
7811
9219
|
function ensureStyles4() {
|
|
7812
|
-
|
|
7813
|
-
if (document.getElementById(STYLE_ID6) !== null) return;
|
|
7814
|
-
const style = document.createElement("style");
|
|
7815
|
-
style.id = STYLE_ID6;
|
|
7816
|
-
style.textContent = STYLE_TEXT6;
|
|
7817
|
-
document.head.append(style);
|
|
9220
|
+
ensureStyleSheet(STYLE_ID6, STYLE_TEXT6);
|
|
7818
9221
|
}
|
|
7819
9222
|
function SessionTabsAnchor(props) {
|
|
7820
|
-
const [host, setHost] = (0,
|
|
7821
|
-
const visibleRef = (0,
|
|
7822
|
-
const applyRef = (0,
|
|
7823
|
-
const reportVisible = (0,
|
|
9223
|
+
const [host, setHost] = (0, import_react17.useState)(null);
|
|
9224
|
+
const visibleRef = (0, import_react17.useRef)(false);
|
|
9225
|
+
const applyRef = (0, import_react17.useRef)(null);
|
|
9226
|
+
const reportVisible = (0, import_react17.useCallback)((next) => {
|
|
7824
9227
|
if (visibleRef.current === next) return;
|
|
7825
9228
|
visibleRef.current = next;
|
|
7826
9229
|
applyRef.current?.();
|
|
7827
9230
|
}, []);
|
|
7828
|
-
(0,
|
|
9231
|
+
(0, import_react17.useEffect)(() => {
|
|
7829
9232
|
ensureStyles4();
|
|
7830
9233
|
const created = document.createElement("div");
|
|
7831
9234
|
created.setAttribute("data-dsh-leader-agent-session-tabs", "");
|
|
@@ -7890,30 +9293,29 @@ function SessionTabsAnchor(props) {
|
|
|
7890
9293
|
column?.removeAttribute(COLUMN_ATTR);
|
|
7891
9294
|
mainBody?.removeAttribute(MAIN_ATTR);
|
|
7892
9295
|
created.remove();
|
|
7893
|
-
document.getElementById(STYLE_ID6)?.remove();
|
|
7894
9296
|
};
|
|
7895
9297
|
}, []);
|
|
7896
|
-
return host === null ? null : (0, import_react_dom4.createPortal)((0,
|
|
9298
|
+
return host === null ? null : (0, import_react_dom4.createPortal)((0, import_react17.createElement)(SessionTabBar, { ...props, reportVisible }), host);
|
|
7897
9299
|
}
|
|
7898
9300
|
function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout, getSidebarRight, getContextMenus, reportVisible }) {
|
|
7899
9301
|
const sessions = getSessions?.();
|
|
7900
9302
|
const menus = getContextMenus?.() ?? null;
|
|
7901
9303
|
const hasMenu = hasSessionMenu(menus);
|
|
7902
|
-
const [snapshot, setSnapshot] = (0,
|
|
9304
|
+
const [snapshot, setSnapshot] = (0, import_react17.useState)(() => sessions?.list?.getSnapshot?.() ?? {
|
|
7903
9305
|
phase: "pending",
|
|
7904
9306
|
ids: [],
|
|
7905
9307
|
byId: {}
|
|
7906
9308
|
});
|
|
7907
|
-
const [completed, setCompleted] = (0,
|
|
7908
|
-
const [projects, setProjects] = (0,
|
|
7909
|
-
const [groups, setGroups] = (0,
|
|
7910
|
-
const [store, setStore] = (0,
|
|
7911
|
-
const [panelActive, setPanelActive] = (0,
|
|
7912
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
7913
|
-
const lastCurrent = (0,
|
|
7914
|
-
const tabRefs = (0,
|
|
7915
|
-
const pendingFocus = (0,
|
|
7916
|
-
const refresh = (0,
|
|
9309
|
+
const [completed, setCompleted] = (0, import_react17.useState)(() => /* @__PURE__ */ new Set());
|
|
9310
|
+
const [projects, setProjects] = (0, import_react17.useState)([]);
|
|
9311
|
+
const [groups, setGroups] = (0, import_react17.useState)([]);
|
|
9312
|
+
const [store, setStore] = (0, import_react17.useState)(readStore);
|
|
9313
|
+
const [panelActive, setPanelActive] = (0, import_react17.useState)(false);
|
|
9314
|
+
const [menuOpen, setMenuOpen] = (0, import_react17.useState)(false);
|
|
9315
|
+
const lastCurrent = (0, import_react17.useRef)(void 0);
|
|
9316
|
+
const tabRefs = (0, import_react17.useRef)(/* @__PURE__ */ new Map());
|
|
9317
|
+
const pendingFocus = (0, import_react17.useRef)(void 0);
|
|
9318
|
+
const refresh = (0, import_react17.useCallback)(async () => {
|
|
7917
9319
|
if (!isProjectRemoteReady()) return;
|
|
7918
9320
|
try {
|
|
7919
9321
|
const [nextProjects, nextGroups] = await Promise.all([
|
|
@@ -7926,7 +9328,7 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
7926
9328
|
console.error("dsh-leader-agent: \u8BFB\u53D6\u9879\u76EE\u6807\u7B7E\u6570\u636E\u5931\u8D25", error);
|
|
7927
9329
|
}
|
|
7928
9330
|
}, [callRemote]);
|
|
7929
|
-
(0,
|
|
9331
|
+
(0, import_react17.useEffect)(() => {
|
|
7930
9332
|
if (!sessions?.list?.subscribe) return void 0;
|
|
7931
9333
|
const tracker = createSessionCompletionTracker();
|
|
7932
9334
|
const sync = () => {
|
|
@@ -7937,10 +9339,10 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
7937
9339
|
sync();
|
|
7938
9340
|
return sessions.list.subscribe(sync);
|
|
7939
9341
|
}, [sessions]);
|
|
7940
|
-
(0,
|
|
9342
|
+
(0, import_react17.useEffect)(() => onProjectRemoteReady(() => {
|
|
7941
9343
|
void refresh();
|
|
7942
9344
|
}), [refresh]);
|
|
7943
|
-
(0,
|
|
9345
|
+
(0, import_react17.useEffect)(() => {
|
|
7944
9346
|
const stop = onProjectsChanged(() => {
|
|
7945
9347
|
void refresh();
|
|
7946
9348
|
});
|
|
@@ -7953,15 +9355,15 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
7953
9355
|
window.removeEventListener("focus", onFocus);
|
|
7954
9356
|
};
|
|
7955
9357
|
}, [refresh]);
|
|
7956
|
-
(0,
|
|
9358
|
+
(0, import_react17.useEffect)(() => {
|
|
7957
9359
|
const info = getLayout?.()?.panelInfo;
|
|
7958
9360
|
if (info === void 0 || typeof info.subscribe !== "function") return void 0;
|
|
7959
9361
|
const sync = () => setPanelActive(info.getSnapshot().activePanelId !== null);
|
|
7960
9362
|
sync();
|
|
7961
9363
|
return info.subscribe(sync);
|
|
7962
9364
|
}, [getLayout]);
|
|
7963
|
-
const currentSessionId = (0,
|
|
7964
|
-
(0,
|
|
9365
|
+
const currentSessionId = (0, import_react17.useMemo)(() => currentSessionIdOf(snapshot.byId), [snapshot]);
|
|
9366
|
+
(0, import_react17.useEffect)(() => {
|
|
7965
9367
|
const active = menus?.active;
|
|
7966
9368
|
if (active === void 0 || typeof active.subscribe !== "function") return void 0;
|
|
7967
9369
|
const sync = () => {
|
|
@@ -7971,7 +9373,7 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
7971
9373
|
sync();
|
|
7972
9374
|
return active.subscribe(sync);
|
|
7973
9375
|
}, [menus, currentSessionId]);
|
|
7974
|
-
(0,
|
|
9376
|
+
(0, import_react17.useEffect)(() => {
|
|
7975
9377
|
const active = menus?.active;
|
|
7976
9378
|
if (active === void 0 || typeof active.getSnapshot !== "function" || typeof menus.close !== "function") return;
|
|
7977
9379
|
const target = active.getSnapshot();
|
|
@@ -7979,20 +9381,20 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
7979
9381
|
menus.close();
|
|
7980
9382
|
}
|
|
7981
9383
|
}, [menus, currentSessionId]);
|
|
7982
|
-
(0,
|
|
9384
|
+
(0, import_react17.useEffect)(() => {
|
|
7983
9385
|
const previous = lastCurrent.current;
|
|
7984
9386
|
lastCurrent.current = currentSessionId;
|
|
7985
9387
|
if (previous !== void 0 && currentSessionId !== void 0 && previous !== currentSessionId) {
|
|
7986
9388
|
void refresh();
|
|
7987
9389
|
}
|
|
7988
9390
|
}, [currentSessionId, refresh]);
|
|
7989
|
-
(0,
|
|
9391
|
+
(0, import_react17.useEffect)(() => {
|
|
7990
9392
|
try {
|
|
7991
9393
|
window.localStorage.setItem(SESSION_TABS_STORAGE_KEY, serializeTabStore(store));
|
|
7992
9394
|
} catch {
|
|
7993
9395
|
}
|
|
7994
9396
|
}, [store]);
|
|
7995
|
-
const rows = (0,
|
|
9397
|
+
const rows = (0, import_react17.useMemo)(() => {
|
|
7996
9398
|
const next = {};
|
|
7997
9399
|
for (const [id, row] of Object.entries(snapshot.byId ?? {})) {
|
|
7998
9400
|
next[id] = {
|
|
@@ -8005,14 +9407,14 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
8005
9407
|
}
|
|
8006
9408
|
return next;
|
|
8007
9409
|
}, [snapshot, completed]);
|
|
8008
|
-
const view = (0,
|
|
9410
|
+
const view = (0, import_react17.useMemo)(() => resolveTabView({
|
|
8009
9411
|
projects,
|
|
8010
9412
|
groups,
|
|
8011
9413
|
rows,
|
|
8012
9414
|
currentSessionId,
|
|
8013
9415
|
store
|
|
8014
9416
|
}), [projects, groups, rows, currentSessionId, store]);
|
|
8015
|
-
(0,
|
|
9417
|
+
(0, import_react17.useEffect)(() => {
|
|
8016
9418
|
const id = pendingFocus.current;
|
|
8017
9419
|
if (id === void 0 || view.activeSessionId !== id) return void 0;
|
|
8018
9420
|
pendingFocus.current = void 0;
|
|
@@ -8021,13 +9423,13 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
8021
9423
|
});
|
|
8022
9424
|
return () => cancelAnimationFrame(frame);
|
|
8023
9425
|
}, [view.activeSessionId]);
|
|
8024
|
-
(0,
|
|
9426
|
+
(0, import_react17.useEffect)(() => {
|
|
8025
9427
|
if (!view.visible || !view.isWorkerCurrent || currentSessionId === void 0) return;
|
|
8026
9428
|
if (hasOpenTab(store, view.project.id, currentSessionId)) return;
|
|
8027
|
-
setStore((
|
|
9429
|
+
setStore((current3) => addOpenTab(current3, view.project.id, currentSessionId));
|
|
8028
9430
|
}, [view.visible, view.isWorkerCurrent, view.project?.id, currentSessionId]);
|
|
8029
|
-
const lastBoardCarry = (0,
|
|
8030
|
-
const carryBoard = (0,
|
|
9431
|
+
const lastBoardCarry = (0, import_react17.useRef)(void 0);
|
|
9432
|
+
const carryBoard = (0, import_react17.useCallback)(() => {
|
|
8031
9433
|
if (panelActive || currentSessionId === void 0) return;
|
|
8032
9434
|
if (!view.visible || !view.isWorkerCurrent) {
|
|
8033
9435
|
lastBoardCarry.current = void 0;
|
|
@@ -8055,14 +9457,14 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
8055
9457
|
}
|
|
8056
9458
|
lastBoardCarry.current = currentSessionId;
|
|
8057
9459
|
}, [currentSessionId, getSidebarRight, panelActive, view.visible, view.isWorkerCurrent, view.project?.id, view.project?.leaderSessionId]);
|
|
8058
|
-
(0,
|
|
9460
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
8059
9461
|
carryBoard();
|
|
8060
9462
|
}, [carryBoard]);
|
|
8061
|
-
(0,
|
|
9463
|
+
(0, import_react17.useEffect)(() => {
|
|
8062
9464
|
carryBoard();
|
|
8063
9465
|
}, [carryBoard]);
|
|
8064
9466
|
const barVisible = view.visible && !panelActive;
|
|
8065
|
-
(0,
|
|
9467
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
8066
9468
|
reportVisible?.(barVisible);
|
|
8067
9469
|
}, [barVisible, reportVisible]);
|
|
8068
9470
|
if (!barVisible) return null;
|
|
@@ -8096,19 +9498,19 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
8096
9498
|
if (workspace === void 0 || typeof workspace.openSession !== "function") return;
|
|
8097
9499
|
workspace.openSession(fallback);
|
|
8098
9500
|
}
|
|
8099
|
-
setStore((
|
|
9501
|
+
setStore((current3) => removeOpenTab(current3, view.project.id, sessionId));
|
|
8100
9502
|
};
|
|
8101
|
-
return (0,
|
|
9503
|
+
return (0, import_react17.createElement)(
|
|
8102
9504
|
"div",
|
|
8103
9505
|
{
|
|
8104
9506
|
className: "dsh-leader-agent-tabs",
|
|
8105
9507
|
"data-dsh-leader-agent-session-tabs-bar": "",
|
|
8106
9508
|
...hasMenu ? { "data-dsh-leader-agent-tabs-menu": "" } : {}
|
|
8107
9509
|
},
|
|
8108
|
-
(0,
|
|
9510
|
+
(0, import_react17.createElement)(
|
|
8109
9511
|
"div",
|
|
8110
9512
|
{ className: "dsh-leader-agent-tabs-scroll", role: "tablist", "aria-label": listLabel },
|
|
8111
|
-
...view.tabs.map((tab) => (0,
|
|
9513
|
+
...view.tabs.map((tab) => (0, import_react17.createElement)(
|
|
8112
9514
|
"div",
|
|
8113
9515
|
{
|
|
8114
9516
|
key: tab.id,
|
|
@@ -8142,14 +9544,14 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
8142
9544
|
openSession(nextId);
|
|
8143
9545
|
}
|
|
8144
9546
|
},
|
|
8145
|
-
tab.kind === "leader" ? (0,
|
|
9547
|
+
tab.kind === "leader" ? (0, import_react17.createElement)(
|
|
8146
9548
|
"span",
|
|
8147
9549
|
{ className: "dsh-leader-agent-tab-icon" },
|
|
8148
9550
|
productIcon("apps-add-outline", { size: 14 })
|
|
8149
|
-
) : (0,
|
|
9551
|
+
) : (0, import_react17.createElement)(
|
|
8150
9552
|
"span",
|
|
8151
9553
|
{ className: "dsh-leader-agent-tab-dot" },
|
|
8152
|
-
(0,
|
|
9554
|
+
(0, import_react17.createElement)("span", {
|
|
8153
9555
|
className: `dsh-leader-agent-tab-signal dsh-leader-agent-tab-signal-${tab.state}`,
|
|
8154
9556
|
"data-signal": tab.state,
|
|
8155
9557
|
role: "img",
|
|
@@ -8157,8 +9559,8 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
8157
9559
|
title: t(SIGNAL_LABEL_KEYS[tab.state])
|
|
8158
9560
|
})
|
|
8159
9561
|
),
|
|
8160
|
-
(0,
|
|
8161
|
-
tab.kind === "worker" ? (0,
|
|
9562
|
+
(0, import_react17.createElement)("span", { className: "dsh-leader-agent-tab-label" }, tab.label),
|
|
9563
|
+
tab.kind === "worker" ? (0, import_react17.createElement)(
|
|
8162
9564
|
"button",
|
|
8163
9565
|
{
|
|
8164
9566
|
type: "button",
|
|
@@ -8174,7 +9576,7 @@ function SessionTabBar({ t, callRemote, getSessions, getUiWorkspace, getLayout,
|
|
|
8174
9576
|
) : null
|
|
8175
9577
|
))
|
|
8176
9578
|
),
|
|
8177
|
-
!hasMenu ? null : (0,
|
|
9579
|
+
!hasMenu ? null : (0, import_react17.createElement)(
|
|
8178
9580
|
"button",
|
|
8179
9581
|
{
|
|
8180
9582
|
type: "button",
|
|
@@ -8201,7 +9603,7 @@ function readStore() {
|
|
|
8201
9603
|
}
|
|
8202
9604
|
|
|
8203
9605
|
// src/client/toast-view.js
|
|
8204
|
-
var
|
|
9606
|
+
var import_react18 = require("react");
|
|
8205
9607
|
var STYLE_ID7 = "dsh-leader-agent-toast-style";
|
|
8206
9608
|
var STYLE_TEXT7 = `
|
|
8207
9609
|
.dsh-leader-agent-toast {
|
|
@@ -8239,31 +9641,26 @@ var STYLE_TEXT7 = `
|
|
|
8239
9641
|
}
|
|
8240
9642
|
`;
|
|
8241
9643
|
function ensureStyles5() {
|
|
8242
|
-
|
|
8243
|
-
if (document.getElementById(STYLE_ID7) !== null) return;
|
|
8244
|
-
const style = document.createElement("style");
|
|
8245
|
-
style.id = STYLE_ID7;
|
|
8246
|
-
style.textContent = STYLE_TEXT7;
|
|
8247
|
-
document.head.append(style);
|
|
9644
|
+
ensureStyleSheet(STYLE_ID7, STYLE_TEXT7);
|
|
8248
9645
|
}
|
|
8249
9646
|
function ToastOverlay() {
|
|
8250
|
-
const [toast, setToast] = (0,
|
|
8251
|
-
(0,
|
|
9647
|
+
const [toast, setToast] = (0, import_react18.useState)(currentToast);
|
|
9648
|
+
(0, import_react18.useEffect)(() => {
|
|
8252
9649
|
ensureStyles5();
|
|
8253
9650
|
setToast(currentToast());
|
|
8254
9651
|
return subscribeToasts(() => setToast(currentToast()));
|
|
8255
9652
|
}, []);
|
|
8256
|
-
(0,
|
|
9653
|
+
(0, import_react18.useEffect)(() => {
|
|
8257
9654
|
if (toast === null) return void 0;
|
|
8258
9655
|
const timer = setTimeout(() => dismissToast(toast.id), toast.holdMs + toast.fadeMs);
|
|
8259
9656
|
return () => clearTimeout(timer);
|
|
8260
9657
|
}, [toast]);
|
|
8261
9658
|
if (toast === null) return null;
|
|
8262
|
-
return (0,
|
|
8263
|
-
|
|
9659
|
+
return (0, import_react18.createElement)(
|
|
9660
|
+
import_react18.Fragment,
|
|
8264
9661
|
// key 跟着每次弹出换:同一条文案连着出现两次时重挂载,动画与计时都重来。
|
|
8265
9662
|
{ key: toast.id },
|
|
8266
|
-
(0,
|
|
9663
|
+
(0, import_react18.createElement)(
|
|
8267
9664
|
"div",
|
|
8268
9665
|
{
|
|
8269
9666
|
className: "dsh-leader-agent-toast",
|
|
@@ -8382,10 +9779,10 @@ var workerReportDefinition = {
|
|
|
8382
9779
|
};
|
|
8383
9780
|
|
|
8384
9781
|
// src/client/worker-report-view.js
|
|
8385
|
-
var
|
|
9782
|
+
var import_react20 = require("react");
|
|
8386
9783
|
|
|
8387
9784
|
// src/client/agent-bubble-view.js
|
|
8388
|
-
var
|
|
9785
|
+
var import_react19 = require("react");
|
|
8389
9786
|
|
|
8390
9787
|
// node_modules/blobatar/dist/index.js
|
|
8391
9788
|
function I({ l: t, c: e, h: n }) {
|
|
@@ -8939,12 +10336,7 @@ var STYLE_TEXT8 = `
|
|
|
8939
10336
|
}
|
|
8940
10337
|
`;
|
|
8941
10338
|
function ensureAgentBubbleStyles() {
|
|
8942
|
-
|
|
8943
|
-
if (document.getElementById(STYLE_ID8) !== null) return;
|
|
8944
|
-
const style = document.createElement("style");
|
|
8945
|
-
style.id = STYLE_ID8;
|
|
8946
|
-
style.textContent = STYLE_TEXT8;
|
|
8947
|
-
document.head.append(style);
|
|
10339
|
+
ensureStyleSheet(STYLE_ID8, STYLE_TEXT8);
|
|
8948
10340
|
}
|
|
8949
10341
|
|
|
8950
10342
|
// src/client/bubble-clock.js
|
|
@@ -8963,22 +10355,22 @@ function formatBubbleClock(time, t) {
|
|
|
8963
10355
|
|
|
8964
10356
|
// src/client/agent-bubble-view.js
|
|
8965
10357
|
function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, time, t }) {
|
|
8966
|
-
const [copied, setCopied] = (0,
|
|
8967
|
-
const [expanded, setExpanded] = (0,
|
|
8968
|
-
const [overflowing, setOverflowing] = (0,
|
|
8969
|
-
const bubbleRef = (0,
|
|
8970
|
-
(0,
|
|
10358
|
+
const [copied, setCopied] = (0, import_react19.useState)(false);
|
|
10359
|
+
const [expanded, setExpanded] = (0, import_react19.useState)(false);
|
|
10360
|
+
const [overflowing, setOverflowing] = (0, import_react19.useState)(false);
|
|
10361
|
+
const bubbleRef = (0, import_react19.useRef)(null);
|
|
10362
|
+
(0, import_react19.useLayoutEffect)(() => {
|
|
8971
10363
|
ensureAgentBubbleStyles();
|
|
8972
10364
|
const element = bubbleRef.current;
|
|
8973
10365
|
if (element === null || expanded) return void 0;
|
|
8974
|
-
const
|
|
10366
|
+
const measure2 = () => {
|
|
8975
10367
|
setOverflowing(element.scrollHeight > element.clientHeight + 1);
|
|
8976
10368
|
};
|
|
8977
10369
|
if (typeof ResizeObserver === "undefined") {
|
|
8978
|
-
|
|
10370
|
+
measure2();
|
|
8979
10371
|
return void 0;
|
|
8980
10372
|
}
|
|
8981
|
-
const observer = new ResizeObserver(
|
|
10373
|
+
const observer = new ResizeObserver(measure2);
|
|
8982
10374
|
observer.observe(element);
|
|
8983
10375
|
return () => observer.disconnect();
|
|
8984
10376
|
}, [body, expanded]);
|
|
@@ -8992,31 +10384,31 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
|
|
|
8992
10384
|
setTimeout(() => setCopied(false), 1500);
|
|
8993
10385
|
};
|
|
8994
10386
|
const avatar = buildAvatar(avatarSeed);
|
|
8995
|
-
return (0,
|
|
10387
|
+
return (0, import_react19.createElement)(
|
|
8996
10388
|
"div",
|
|
8997
10389
|
{ className: "dsh-leader-agent-agent-bubble" },
|
|
8998
|
-
(0,
|
|
10390
|
+
(0, import_react19.createElement)(
|
|
8999
10391
|
"div",
|
|
9000
10392
|
{ className: "dsh-leader-agent-agent-bubble__identity" },
|
|
9001
|
-
(0,
|
|
10393
|
+
(0, import_react19.createElement)(
|
|
9002
10394
|
"span",
|
|
9003
10395
|
{ className: "dsh-leader-agent-agent-bubble__avatar", "aria-hidden": "true" },
|
|
9004
|
-
(0,
|
|
10396
|
+
(0, import_react19.createElement)(
|
|
9005
10397
|
"svg",
|
|
9006
10398
|
{ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", focusable: "false", "data-shape": avatar.shape },
|
|
9007
|
-
(0,
|
|
10399
|
+
(0, import_react19.createElement)(
|
|
9008
10400
|
"g",
|
|
9009
10401
|
{ fill: avatar.head, stroke: avatar.stroke, strokeWidth: avatar.strokeWidth, strokeLinejoin: "round" },
|
|
9010
|
-
avatar.body.map((d, index) => (0,
|
|
10402
|
+
avatar.body.map((d, index) => (0, import_react19.createElement)("path", { key: index, d }))
|
|
9011
10403
|
),
|
|
9012
|
-
(0,
|
|
10404
|
+
(0, import_react19.createElement)(
|
|
9013
10405
|
"g",
|
|
9014
10406
|
{ className: AVATAR_EYE_CLASS, fill: avatar.eye },
|
|
9015
|
-
avatar.eyes.map((d, index) => (0,
|
|
10407
|
+
avatar.eyes.map((d, index) => (0, import_react19.createElement)("path", { key: index, d }))
|
|
9016
10408
|
)
|
|
9017
10409
|
)
|
|
9018
10410
|
),
|
|
9019
|
-
(0,
|
|
10411
|
+
(0, import_react19.createElement)(
|
|
9020
10412
|
"button",
|
|
9021
10413
|
{
|
|
9022
10414
|
type: "button",
|
|
@@ -9027,20 +10419,20 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
|
|
|
9027
10419
|
name
|
|
9028
10420
|
)
|
|
9029
10421
|
),
|
|
9030
|
-
(0,
|
|
10422
|
+
(0, import_react19.createElement)(
|
|
9031
10423
|
"div",
|
|
9032
10424
|
{ className: "dsh-leader-agent-agent-bubble__bubble" },
|
|
9033
10425
|
// 裁剪只发生在正文层:按钮在气泡内、正文外,否则展开开关会跟着两行水位被裁掉
|
|
9034
|
-
(0,
|
|
10426
|
+
(0, import_react19.createElement)(
|
|
9035
10427
|
"div",
|
|
9036
10428
|
{
|
|
9037
10429
|
ref: bubbleRef,
|
|
9038
10430
|
className: "dsh-leader-agent-agent-bubble__content",
|
|
9039
10431
|
"data-collapsed": expanded ? void 0 : "true"
|
|
9040
10432
|
},
|
|
9041
|
-
format === "markdown" ? (0,
|
|
10433
|
+
format === "markdown" ? (0, import_react19.createElement)(Markdown, { source: body, t }) : (0, import_react19.createElement)("div", { className: "dsh-leader-agent-agent-bubble__plain" }, body)
|
|
9042
10434
|
),
|
|
9043
|
-
overflowing ? (0,
|
|
10435
|
+
overflowing ? (0, import_react19.createElement)(
|
|
9044
10436
|
"button",
|
|
9045
10437
|
{
|
|
9046
10438
|
type: "button",
|
|
@@ -9051,11 +10443,11 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
|
|
|
9051
10443
|
expanded ? t("common.collapse") : t("bubble.more")
|
|
9052
10444
|
) : null
|
|
9053
10445
|
),
|
|
9054
|
-
(0,
|
|
10446
|
+
(0, import_react19.createElement)(
|
|
9055
10447
|
"div",
|
|
9056
10448
|
{ className: "dsh-leader-agent-agent-bubble__meta" },
|
|
9057
|
-
(0,
|
|
9058
|
-
(0,
|
|
10449
|
+
(0, import_react19.createElement)("span", { className: "dsh-leader-agent-agent-bubble__time" }, formatBubbleClock(time, t)),
|
|
10450
|
+
(0, import_react19.createElement)(
|
|
9059
10451
|
"button",
|
|
9060
10452
|
{
|
|
9061
10453
|
type: "button",
|
|
@@ -9076,7 +10468,7 @@ function AgentBubble({ name, avatarSeed, openTitle, onOpenName, body, format, ti
|
|
|
9076
10468
|
function WorkerReportView({ node, openSession, t }) {
|
|
9077
10469
|
const data = node?.data;
|
|
9078
10470
|
if (data === void 0) return null;
|
|
9079
|
-
return (0,
|
|
10471
|
+
return (0, import_react20.createElement)(AgentBubble, {
|
|
9080
10472
|
name: data.name,
|
|
9081
10473
|
avatarSeed: data.name,
|
|
9082
10474
|
openTitle: t("bubble.openSession", { name: data.name }),
|
|
@@ -9144,7 +10536,7 @@ var workerTaskDefinition = {
|
|
|
9144
10536
|
};
|
|
9145
10537
|
|
|
9146
10538
|
// src/client/worker-task-view.js
|
|
9147
|
-
var
|
|
10539
|
+
var import_react21 = require("react");
|
|
9148
10540
|
|
|
9149
10541
|
// src/client/worker-task-styles.js
|
|
9150
10542
|
var STYLE_ID9 = "dsh-leader-agent-worker-task";
|
|
@@ -9214,19 +10606,14 @@ var STYLE_TEXT9 = `
|
|
|
9214
10606
|
}
|
|
9215
10607
|
`;
|
|
9216
10608
|
function ensureWorkerTaskStyles() {
|
|
9217
|
-
|
|
9218
|
-
if (document.getElementById(STYLE_ID9) !== null) return;
|
|
9219
|
-
const style = document.createElement("style");
|
|
9220
|
-
style.id = STYLE_ID9;
|
|
9221
|
-
style.textContent = STYLE_TEXT9;
|
|
9222
|
-
document.head.append(style);
|
|
10609
|
+
ensureStyleSheet(STYLE_ID9, STYLE_TEXT9);
|
|
9223
10610
|
}
|
|
9224
10611
|
|
|
9225
10612
|
// src/client/worker-task-view.js
|
|
9226
10613
|
function WorkerTaskView({ node, t }) {
|
|
9227
10614
|
const data = node?.data;
|
|
9228
|
-
const [copied, setCopied] = (0,
|
|
9229
|
-
(0,
|
|
10615
|
+
const [copied, setCopied] = (0, import_react21.useState)(false);
|
|
10616
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
9230
10617
|
ensureWorkerTaskStyles();
|
|
9231
10618
|
}, []);
|
|
9232
10619
|
if (data === void 0) return null;
|
|
@@ -9240,10 +10627,10 @@ function WorkerTaskView({ node, t }) {
|
|
|
9240
10627
|
setCopied(true);
|
|
9241
10628
|
setTimeout(() => setCopied(false), 1500);
|
|
9242
10629
|
};
|
|
9243
|
-
return (0,
|
|
10630
|
+
return (0, import_react21.createElement)(
|
|
9244
10631
|
"div",
|
|
9245
10632
|
{ className: "dsh-leader-agent-worker-task" },
|
|
9246
|
-
(0,
|
|
10633
|
+
(0, import_react21.createElement)(
|
|
9247
10634
|
"div",
|
|
9248
10635
|
{
|
|
9249
10636
|
className: "dsh-leader-agent-worker-task__bubble",
|
|
@@ -9255,13 +10642,13 @@ function WorkerTaskView({ node, t }) {
|
|
|
9255
10642
|
},
|
|
9256
10643
|
// 与 assistant 内容同套 Markdown:原文直接交给基线 MarkdownText,不补硬换行、
|
|
9257
10644
|
// 不做行级改写;单换行按 Markdown 合并。
|
|
9258
|
-
(0,
|
|
10645
|
+
(0, import_react21.createElement)(Markdown, { source: body, variant: "compact", t })
|
|
9259
10646
|
),
|
|
9260
|
-
(0,
|
|
10647
|
+
(0, import_react21.createElement)(
|
|
9261
10648
|
"div",
|
|
9262
10649
|
{ className: "dsh-leader-agent-worker-task__meta" },
|
|
9263
|
-
(0,
|
|
9264
|
-
(0,
|
|
10650
|
+
(0, import_react21.createElement)("span", { className: "dsh-leader-agent-worker-task__time" }, formatBubbleClock(data.time, t)),
|
|
10651
|
+
(0, import_react21.createElement)(
|
|
9265
10652
|
"button",
|
|
9266
10653
|
{
|
|
9267
10654
|
type: "button",
|
|
@@ -9324,9 +10711,13 @@ function apply(ctx) {
|
|
|
9324
10711
|
getSessions: () => ctx.sessions,
|
|
9325
10712
|
getUiWorkspace: () => ctx.get("uiWorkspace"),
|
|
9326
10713
|
getSidebarRight: () => ctx.get("sidebarRight"),
|
|
9327
|
-
callRemote: (method, args) => callProjectRemote(ctx, method, args)
|
|
10714
|
+
callRemote: (method, args) => callProjectRemote(ctx, method, args),
|
|
10715
|
+
// 线路图有两套皮:浅色宿主走电蓝正交,深色宿主走黑金曲线
|
|
10716
|
+
getTheme: () => ctx.get("theme"),
|
|
10717
|
+
onThemeChange: (listener) => ctx.on("theme/change", listener)
|
|
9328
10718
|
})
|
|
9329
10719
|
}, BoardBody)), "dsh-leader-agent \u770B\u677F\u9762\u677F");
|
|
10720
|
+
mountBoardSettings(ctx, t);
|
|
9330
10721
|
ctx.effect(() => ctx.slots.inject("sidebar.right.tab.guide.entry", () => ctx.slots.register({
|
|
9331
10722
|
name: "sidebar.right.tab.guide.entry",
|
|
9332
10723
|
key: PLUGIN_ID,
|
|
@@ -9350,6 +10741,8 @@ function apply(ctx) {
|
|
|
9350
10741
|
getSessions: () => ctx.sessions,
|
|
9351
10742
|
// 归档走宿主的工作区服务:它是既有能力,别处归档的会话这里也要跟着消失。
|
|
9352
10743
|
getWorkspaces: () => ctx.get("workspaces"),
|
|
10744
|
+
// 面板页是否接管主区域:宿主会话树据此不选中任何行,项目区块要同一个口径。
|
|
10745
|
+
getLayout: () => ctx.get("layout"),
|
|
9353
10746
|
onWorkspacesReady: (listener) => workspacesReady.subscribe(listener)
|
|
9354
10747
|
})
|
|
9355
10748
|
}, ProjectPanel)), "dsh-leader-agent \u5DE6\u680F\u9879\u76EE\u533A\u5757");
|
|
@@ -9388,7 +10781,7 @@ function apply(ctx) {
|
|
|
9388
10781
|
ctx.inject(["remote"], function mountProjectChannel(remoteCtx) {
|
|
9389
10782
|
void mountProjectRemote(remoteCtx).catch((error) => {
|
|
9390
10783
|
const message = error instanceof Error ? error.message : String(error);
|
|
9391
|
-
remoteCtx.logger?.warn?.(`dsh-leader-agent: \u9879\u76EE\u901A\u9053\
|
|
10784
|
+
remoteCtx.logger?.warn?.(`dsh-leader-agent: \u9879\u76EE\u901A\u9053\u521D\u59CB\u5316\u5931\u8D25\uFF1A${message}`);
|
|
9392
10785
|
});
|
|
9393
10786
|
watchLeaderSessions(remoteCtx);
|
|
9394
10787
|
mountBoardMonitor(ctx);
|