@kingsoftcloud/ksadk-web 0.3.12 → 0.3.13
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/CHANGELOG.md +23 -0
- package/README.md +7 -4
- package/RELEASE_PROVENANCE.json +2 -2
- package/dist-ksadk/assets/{ArtifactsPanel-C1YoaKhx.js → ArtifactsPanel-CILaW-fC.js} +1 -1
- package/dist-ksadk/assets/{CodeBlock-DHuAWfr5.js → CodeBlock-BVrNVtJC.js} +1 -1
- package/dist-ksadk/assets/{MathMessageMarkdown-cvdrBwYr.js → MathMessageMarkdown-Dp7c4wWD.js} +1 -1
- package/dist-ksadk/assets/{MermaidBlock-DeBkbJvI.js → MermaidBlock-Dxop8Rd7.js} +6 -6
- package/dist-ksadk/assets/{NativeTerminalPanel-oJj44_sV.js → NativeTerminalPanel-Cjjz8B30.js} +1 -1
- package/dist-ksadk/assets/{abnfDiagram-VCTEODGH-Dhfv25o2.js → abnfDiagram-VCTEODGH-ckWDmOzw.js} +1 -1
- package/dist-ksadk/assets/{arc-C35w-pn1.js → arc-DqxJede-.js} +1 -1
- package/dist-ksadk/assets/architecture-7GRP2DOG-pn_DuLy6.js +1 -0
- package/dist-ksadk/assets/{architectureDiagram-5GKGNRK7-FoMY_u6D.js → architectureDiagram-5GKGNRK7-SEQA4bVi.js} +1 -1
- package/dist-ksadk/assets/{blockDiagram-NRAW4CY4-zD4Rt7oE.js → blockDiagram-NRAW4CY4-pM0B-6NJ.js} +1 -1
- package/dist-ksadk/assets/{c4Diagram-UCG6FXSJ-BCtGGkhN.js → c4Diagram-UCG6FXSJ-m2tuCNVq.js} +1 -1
- package/dist-ksadk/assets/channel-fySsnkft.js +1 -0
- package/dist-ksadk/assets/chunk-2Q5K7J3B-BheGxKRQ.js +1 -0
- package/dist-ksadk/assets/{chunk-5VM5RSS4-C2Ms13_k.js → chunk-5VM5RSS4-GJHDr9Ww.js} +1 -1
- package/dist-ksadk/assets/{chunk-F27PBJKO-BoTj-qgx.js → chunk-F27PBJKO-CbAN45AV.js} +1 -1
- package/dist-ksadk/assets/{chunk-G27WJ6UU-DOMyyjHH.js → chunk-G27WJ6UU-D5ngbbzF.js} +1 -1
- package/dist-ksadk/assets/{chunk-JWPE2WC7-DbJJqDli.js → chunk-JWPE2WC7-Cc5IwuYC.js} +1 -1
- package/dist-ksadk/assets/{chunk-LCL6LL3I-CLuRCt_W.js → chunk-LCL6LL3I-CprgDDdJ.js} +1 -1
- package/dist-ksadk/assets/{chunk-POPQ4Y6H-D0Dz847e.js → chunk-POPQ4Y6H-CDZhSy82.js} +1 -1
- package/dist-ksadk/assets/{chunk-RHFEMEQ7-BWSRzEcd.js → chunk-RHFEMEQ7-CZchUNro.js} +1 -1
- package/dist-ksadk/assets/{chunk-SVP7TREG-CPoHqkCY.js → chunk-SVP7TREG-BVruqk6T.js} +1 -1
- package/dist-ksadk/assets/{chunk-XXDRQBXY-Bx1jS-X-.js → chunk-XXDRQBXY-4ld9SxPN.js} +1 -1
- package/dist-ksadk/assets/classDiagram-DTDB5LWJ-DSfLtNYm.js +1 -0
- package/dist-ksadk/assets/classDiagram-v2-JRS7N3AN-DSfLtNYm.js +1 -0
- package/dist-ksadk/assets/{cose-bilkent-JH36ORCC-LzyWm4m0.js → cose-bilkent-JH36ORCC-Dmyyk_Vp.js} +1 -1
- package/dist-ksadk/assets/cynefin-OW5HDTMX-PFWIGtvA.js +1 -0
- package/dist-ksadk/assets/{cynefinDiagram-5FMLGOSQ-BlW_bHED.js → cynefinDiagram-5FMLGOSQ-BIyq3EJb.js} +1 -1
- package/dist-ksadk/assets/{dagre-3AP2YEHR-Bu_S86_i.js → dagre-3AP2YEHR-eBw08Qdk.js} +1 -1
- package/dist-ksadk/assets/{dagre-B7nCawed.js → dagre-DfvnEf45.js} +1 -1
- package/dist-ksadk/assets/{diagram-S7CK7UJ4-W_Zow2Km.js → diagram-S7CK7UJ4-CUSrE3Mg.js} +1 -1
- package/dist-ksadk/assets/{diagram-UQ7AKVKN-CLIKAHON.js → diagram-UQ7AKVKN-Dq5Zw2gy.js} +1 -1
- package/dist-ksadk/assets/{diagram-VSXAHHWV-Dv6_QAlN.js → diagram-VSXAHHWV-DyUHfNwT.js} +1 -1
- package/dist-ksadk/assets/{diagram-VX7I27RA-BWAWRDtZ.js → diagram-VX7I27RA-CREmM89O.js} +1 -1
- package/dist-ksadk/assets/{diagram-Z3DM3KII-XA_rWMss.js → diagram-Z3DM3KII-Dw9zhHUK.js} +1 -1
- package/dist-ksadk/assets/{dist-CGt_UGeO.js → dist-0uJ4tdx6.js} +1 -1
- package/dist-ksadk/assets/{dist-C0J5_3qM.js → dist-AEv-vXf-.js} +1 -1
- package/dist-ksadk/assets/{dist-CIpWk_5f.js → dist-B49GzZDb.js} +1 -1
- package/dist-ksadk/assets/{dist-B3bA05-e.js → dist-B8Myiet9.js} +1 -1
- package/dist-ksadk/assets/{dist-DWfdmz9s.js → dist-BBsYarrI.js} +1 -1
- package/dist-ksadk/assets/{dist-BLpRy_Yx.js → dist-BQMrUwdI.js} +1 -1
- package/dist-ksadk/assets/{dist-CIRMvUM4.js → dist-BX_-FENW.js} +1 -1
- package/dist-ksadk/assets/{dist-BdNFAney.js → dist-CD4L6ymH.js} +1 -1
- package/dist-ksadk/assets/{dist-n3n6t_FO.js → dist-CHpW1BHj.js} +1 -1
- package/dist-ksadk/assets/{dist-DppE_r-D.js → dist-CVPau3tn.js} +1 -1
- package/dist-ksadk/assets/{dist-qe8xjesy.js → dist-C_qdxcSH.js} +1 -1
- package/dist-ksadk/assets/{dist-2vL2sAdF.js → dist-Co68Apq4.js} +1 -1
- package/dist-ksadk/assets/{dist-1nXCdsej.js → dist-Cp2PaOMY.js} +1 -1
- package/dist-ksadk/assets/{dist-DNKuMzWc.js → dist-CuR5Bgme.js} +1 -1
- package/dist-ksadk/assets/{dist-t6MzE0jU.js → dist-DDSyLEOX.js} +1 -1
- package/dist-ksadk/assets/{dist-CPyieXEf.js → dist-DUxO0R99.js} +1 -1
- package/dist-ksadk/assets/{dist-DyG6Ya-z.js → dist-QzbGrED_.js} +1 -1
- package/dist-ksadk/assets/{dist-0X_j2Rcc.js → dist-bupkyEBZ.js} +1 -1
- package/dist-ksadk/assets/{dist-mqD5TZup.js → dist-cxTGfdqx.js} +1 -1
- package/dist-ksadk/assets/{dist-M-SrdhhZ.js → dist-hL5p1til.js} +1 -1
- package/dist-ksadk/assets/{dist-D-92S-Fd.js → dist-lOy23y43.js} +1 -1
- package/dist-ksadk/assets/{dist-BO_UwatH.js → dist-pq-nD33R.js} +1 -1
- package/dist-ksadk/assets/{ebnfDiagram-PWID7BFC-BfCzF1Xi.js → ebnfDiagram-PWID7BFC-BS5LdNoR.js} +1 -1
- package/dist-ksadk/assets/{erDiagram-SSCWMZ5O-Dpz9_0zn.js → erDiagram-SSCWMZ5O-Bv1QtiY-.js} +1 -1
- package/dist-ksadk/assets/eventmodeling-NTZA5JFV-DsM4upQX.js +1 -0
- package/dist-ksadk/assets/flowDiagram-A5DVABFB-D5NA16k9.js +1 -0
- package/dist-ksadk/assets/{ganttDiagram-EL5Y4UJY-DDaG1f4_.js → ganttDiagram-EL5Y4UJY-musi-e0G.js} +1 -1
- package/dist-ksadk/assets/gitGraph-4MIJSDKK-DUCVz-ih.js +1 -0
- package/dist-ksadk/assets/{gitGraphDiagram-WWUBYQGX-DcxzRwYC.js → gitGraphDiagram-WWUBYQGX-DH37EGkG.js} +1 -1
- package/dist-ksadk/assets/index-CZdkAvsv.js +244 -0
- package/dist-ksadk/assets/index-CvXdHgF3.css +2 -0
- package/dist-ksadk/assets/info-A6RAGUB7-rw0ZNHZp.js +1 -0
- package/dist-ksadk/assets/{infoDiagram-RXCK75RN-CYMdn6lQ.js → infoDiagram-RXCK75RN-C1kEtv2y.js} +1 -1
- package/dist-ksadk/assets/{ishikawaDiagram-5VMMS53U-CLHFAD6c.js → ishikawaDiagram-5VMMS53U-BCNPyMka.js} +1 -1
- package/dist-ksadk/assets/{journeyDiagram-EYS64GPL-BHSKQGAl.js → journeyDiagram-EYS64GPL--cDbKnjP.js} +1 -1
- package/dist-ksadk/assets/{kanban-definition-3QL26DDD-D5W3tjTT.js → kanban-definition-3QL26DDD-R1rAVw2f.js} +1 -1
- package/dist-ksadk/assets/{katex-mtjOi4KM.js → katex-BT-X-V7U.js} +1 -1
- package/dist-ksadk/assets/{linear-BETqsxE_.js → linear-DTR631iG.js} +1 -1
- package/dist-ksadk/assets/{mermaid-parser.core-DPWrvs90.js → mermaid-parser.core-DfFzJhX8.js} +2 -2
- package/dist-ksadk/assets/{mindmap-definition-FBJOCRG2-CJG2mfBP.js → mindmap-definition-FBJOCRG2-D4by_rmk.js} +1 -1
- package/dist-ksadk/assets/packet-AYTQ26CC-Ca4Hvki9.js +1 -0
- package/dist-ksadk/assets/{pegDiagram-XKGWAZYB-GjAPNaqn.js → pegDiagram-XKGWAZYB-xWXPEh0c.js} +1 -1
- package/dist-ksadk/assets/pie-WAS4IAKB-hwiz6fbw.js +1 -0
- package/dist-ksadk/assets/{pieDiagram-E7YTZNPT-ToIewrqr.js → pieDiagram-E7YTZNPT-BudBDlCI.js} +1 -1
- package/dist-ksadk/assets/{quadrantDiagram-AXDQQJYC-4d78KiEY.js → quadrantDiagram-AXDQQJYC-DXZ0PCJF.js} +1 -1
- package/dist-ksadk/assets/radar-RG4KPBEZ-BR1oZXLM.js +1 -0
- package/dist-ksadk/assets/railroad-74A4TZTK-DfgEISfX.js +1 -0
- package/dist-ksadk/assets/railroad-abnf-HS5TGJTU-CWOC3rdk.js +1 -0
- package/dist-ksadk/assets/railroad-ebnf-LZEXJU2U-CiRvHCLY.js +1 -0
- package/dist-ksadk/assets/railroad-peg-WCYAUIDC-DSDDyJ2f.js +1 -0
- package/dist-ksadk/assets/{railroadDiagram-O6MQD6OU-DKzx4xfv.js → railroadDiagram-O6MQD6OU-BdAYRYB8.js} +1 -1
- package/dist-ksadk/assets/{requirementDiagram-EFPCY7ZU-CJYljxQS.js → requirementDiagram-EFPCY7ZU-CBBmaL70.js} +1 -1
- package/dist-ksadk/assets/{sankeyDiagram-P5KCCOFB-DLU2fV1w.js → sankeyDiagram-P5KCCOFB-Doc3rdwp.js} +1 -1
- package/dist-ksadk/assets/{sequenceDiagram-WJ2MYXX4-CVqysrA9.js → sequenceDiagram-WJ2MYXX4-0J8R8hWW.js} +1 -1
- package/dist-ksadk/assets/{sizeCapture-X5ZJPWSS-BUxfmTHc.js → sizeCapture-X5ZJPWSS-CfFLlWsK.js} +1 -1
- package/dist-ksadk/assets/{stateDiagram-HBIQ2CUA-CNFgYI9E.js → stateDiagram-HBIQ2CUA-jBwkjtTy.js} +1 -1
- package/dist-ksadk/assets/stateDiagram-v2-4QOOHH4V-Cw1fPb5w.js +1 -0
- package/dist-ksadk/assets/{swimlanes-XN3QIQJK-B6qCMe8N.js → swimlanes-XN3QIQJK-B0WxTQf8.js} +1 -1
- package/dist-ksadk/assets/swimlanesDiagram-VK2B7HYN-Cc3JMBAF.js +8 -0
- package/dist-ksadk/assets/{timeline-definition-24CTP7MA-CMD3x_U_.js → timeline-definition-24CTP7MA-BfCT_75A.js} +1 -1
- package/dist-ksadk/assets/treeView-Q6P3EWNA-C05SJHxo.js +1 -0
- package/dist-ksadk/assets/treemap-WGGIJYW6-BqNLAhc3.js +1 -0
- package/dist-ksadk/assets/{vennDiagram-4TSXK5OY-BqtUqvXM.js → vennDiagram-4TSXK5OY-9gX1VMDC.js} +1 -1
- package/dist-ksadk/assets/wardley-WFR3VGLG-DokNktqB.js +1 -0
- package/dist-ksadk/assets/{wardleyDiagram-VM6X3IG4-B5KfDjI-.js → wardleyDiagram-VM6X3IG4-sEs_BP6O.js} +1 -1
- package/dist-ksadk/assets/{xychartDiagram-S5SC5T6Z-BaUlSZrn.js → xychartDiagram-S5SC5T6Z-Ll4jvUN9.js} +1 -1
- package/dist-ksadk/index.html +2 -2
- package/dist-lib/App.d.ts.map +1 -1
- package/dist-lib/{AttachmentPreview-HLpbjOnQ.js → AttachmentPreview-lufx89xJ.js} +174 -174
- package/dist-lib/{ConnectedComposer-CeWPgOn2.js → ConnectedComposer-Dd8ZFhfL.js} +214 -213
- package/dist-lib/{ConnectedMessageList-D3HWHCh2.js → ConnectedMessageList-CzTOJbZU.js} +582 -510
- package/dist-lib/{InteractionSchemaForm-Du9NT4E8.js → InteractionSchemaForm-ChYkHPop.js} +88 -71
- package/dist-lib/{WorkspacePanelContainer-B2mk7udj.js → WorkspacePanelContainer-BDbgHg1_.js} +2 -2
- package/dist-lib/{a2ui-BEQoW34n.js → a2ui-DfAshhMK.js} +8 -3
- package/dist-lib/api/messages.d.ts +88 -0
- package/dist-lib/api/messages.d.ts.map +1 -0
- package/dist-lib/chat-composer.js +2 -2
- package/dist-lib/chat-timeline.js +3 -3
- package/dist-lib/{cloudMaterials-BlIAT-PA.js → cloudMaterials-D75jTrkQ.js} +823 -628
- package/dist-lib/components/chat/AgentBlockView.d.ts +9 -0
- package/dist-lib/components/chat/AgentBlockView.d.ts.map +1 -0
- package/dist-lib/components/chat/ChatComposer.d.ts.map +1 -1
- package/dist-lib/components/chat/ChatMessageList.d.ts +4 -2
- package/dist-lib/components/chat/ChatMessageList.d.ts.map +1 -1
- package/dist-lib/components/chat/ConnectedComposer.d.ts +1 -1
- package/dist-lib/components/chat/ConnectedComposer.d.ts.map +1 -1
- package/dist-lib/components/chat/ConnectedMessageList.d.ts +4 -1
- package/dist-lib/components/chat/ConnectedMessageList.d.ts.map +1 -1
- package/dist-lib/components/chat/InteractionSchemaForm.d.ts.map +1 -1
- package/dist-lib/components/chat/InteractionTray.d.ts.map +1 -1
- package/dist-lib/components/chat/ProcessingBlocksView.d.ts +2 -2
- package/dist-lib/components/chat/ProcessingBlocksView.d.ts.map +1 -1
- package/dist-lib/components/chat/StatusBanner.d.ts.map +1 -1
- package/dist-lib/components/chat/approval-status.d.ts +5 -0
- package/dist-lib/components/chat/approval-status.d.ts.map +1 -0
- package/dist-lib/components/chat/types.d.ts +13 -1
- package/dist-lib/components/chat/types.d.ts.map +1 -1
- package/dist-lib/components/teams/CloudTeamWorkspace.d.ts.map +1 -1
- package/dist-lib/components/teams/TeamWorkspace.d.ts.map +1 -1
- package/dist-lib/components.js +6 -6
- package/dist-lib/conversation.js +8 -34
- package/dist-lib/core/api/facade.d.ts +18 -10
- package/dist-lib/core/api/facade.d.ts.map +1 -1
- package/dist-lib/core/api/types.d.ts +28 -3
- package/dist-lib/core/api/types.d.ts.map +1 -1
- package/dist-lib/core/conversation/agent.d.ts +49 -0
- package/dist-lib/core/conversation/agent.d.ts.map +1 -0
- package/dist-lib/core/conversation/client.d.ts +2 -0
- package/dist-lib/core/conversation/client.d.ts.map +1 -1
- package/dist-lib/core/conversation/contracts.d.ts.map +1 -1
- package/dist-lib/core/conversation/hosted.d.ts.map +1 -1
- package/dist-lib/core/conversation/index.d.ts +4 -1
- package/dist-lib/core/conversation/index.d.ts.map +1 -1
- package/dist-lib/core/conversation/presentation.d.ts.map +1 -1
- package/dist-lib/core/conversation/reducer.d.ts.map +1 -1
- package/dist-lib/core/conversation/renderer-registry.d.ts +1 -0
- package/dist-lib/core/conversation/renderer-registry.d.ts.map +1 -1
- package/dist-lib/core/conversation/runtime-ingress.d.ts +22 -0
- package/dist-lib/core/conversation/runtime-ingress.d.ts.map +1 -0
- package/dist-lib/core/conversation/safe-tool-value.d.ts +8 -0
- package/dist-lib/core/conversation/safe-tool-value.d.ts.map +1 -0
- package/dist-lib/core/conversation/scoped-cancel.d.ts +16 -0
- package/dist-lib/core/conversation/scoped-cancel.d.ts.map +1 -0
- package/dist-lib/core/conversation/types.d.ts +6 -1
- package/dist-lib/core/conversation/types.d.ts.map +1 -1
- package/dist-lib/core/interaction/adapters/legacy-runtime-events.d.ts +8 -0
- package/dist-lib/core/interaction/adapters/legacy-runtime-events.d.ts.map +1 -0
- package/dist-lib/core/interaction/adapters/responses.d.ts +1 -0
- package/dist-lib/core/interaction/adapters/responses.d.ts.map +1 -1
- package/dist-lib/core/interaction/adapters/session-events.d.ts.map +1 -1
- package/dist-lib/core/interaction/client.d.ts +3 -2
- package/dist-lib/core/interaction/client.d.ts.map +1 -1
- package/dist-lib/core/interaction/index.d.ts +4 -0
- package/dist-lib/core/interaction/index.d.ts.map +1 -1
- package/dist-lib/core/interaction/legacy-history.d.ts +5 -0
- package/dist-lib/core/interaction/legacy-history.d.ts.map +1 -0
- package/dist-lib/core/interaction/store.d.ts +4 -0
- package/dist-lib/core/interaction/store.d.ts.map +1 -1
- package/dist-lib/core/interaction/types.d.ts +2 -0
- package/dist-lib/core/interaction/types.d.ts.map +1 -1
- package/dist-lib/core/run/blocks.d.ts +2 -1
- package/dist-lib/core/run/blocks.d.ts.map +1 -1
- package/dist-lib/core/run/dispatcher.d.ts.map +1 -1
- package/dist-lib/core/run/engine.d.ts +2 -0
- package/dist-lib/core/run/engine.d.ts.map +1 -1
- package/dist-lib/core/run/types.d.ts +7 -1
- package/dist-lib/core/run/types.d.ts.map +1 -1
- package/dist-lib/core/stream/kernel-events.d.ts +2 -0
- package/dist-lib/core/stream/kernel-events.d.ts.map +1 -1
- package/dist-lib/core/stream/responses-protocol.d.ts.map +1 -1
- package/dist-lib/core/stream/runtime-items.d.ts +2 -2
- package/dist-lib/core/stream/runtime-items.d.ts.map +1 -1
- package/dist-lib/core/stream/types.d.ts +4 -0
- package/dist-lib/core/stream/types.d.ts.map +1 -1
- package/dist-lib/core/teams/cloudExtendedContracts.d.ts +48 -48
- package/dist-lib/core/teams/cloudExtendedContracts.d.ts.map +1 -1
- package/dist-lib/core/teams/cloudMaterials.d.ts +2 -2
- package/dist-lib/core/teams/cloudMaterials.d.ts.map +1 -1
- package/dist-lib/hooks/useAgentChat.d.ts +2 -7
- package/dist-lib/hooks/useAgentChat.d.ts.map +1 -1
- package/dist-lib/hooks/useFeedback.d.ts +2 -2
- package/dist-lib/hooks/useFeedback.d.ts.map +1 -1
- package/dist-lib/hooks/useImeComposition.d.ts +21 -0
- package/dist-lib/hooks/useImeComposition.d.ts.map +1 -0
- package/dist-lib/hooks/useInteractions.d.ts +1 -1
- package/dist-lib/hooks/useInteractions.d.ts.map +1 -1
- package/dist-lib/hooks/useRunAgent.d.ts +3 -1
- package/dist-lib/hooks/useRunAgent.d.ts.map +1 -1
- package/dist-lib/hooks/useSessionLifecycle.d.ts +1 -1
- package/dist-lib/hooks/useSessionLifecycle.d.ts.map +1 -1
- package/dist-lib/hooks.js +9 -9
- package/dist-lib/{permission-CcMWqN8Y.js → permission-B2MuVypC.js} +1 -1
- package/dist-lib/persisted-session-history-CBk_ypXo.js +2888 -0
- package/dist-lib/public/chat-timeline.d.ts +2 -0
- package/dist-lib/public/chat-timeline.d.ts.map +1 -1
- package/dist-lib/public/conversation.d.ts +3 -1
- package/dist-lib/public/conversation.d.ts.map +1 -1
- package/dist-lib/{reducer-BP8YVv-Q.js → reducer-mbYiX0wz.js} +81 -13
- package/dist-lib/{runtime-items-q6tMjfGU.js → runtime-items-VPq7711E.js} +0 -0
- package/dist-lib/runtime.js +287 -226
- package/dist-lib/stores/session.d.ts +20 -11
- package/dist-lib/stores/session.d.ts.map +1 -1
- package/dist-lib/styles.css +1 -1
- package/dist-lib/team-components.js +922 -922
- package/dist-lib/teams.js +363 -555
- package/dist-lib/types/agent-control.d.ts +2 -0
- package/dist-lib/types/agent-control.d.ts.map +1 -1
- package/dist-lib/types/capabilities.d.ts +6 -0
- package/dist-lib/types/capabilities.d.ts.map +1 -1
- package/dist-lib/types/session-events.d.ts +1 -0
- package/dist-lib/types/session-events.d.ts.map +1 -1
- package/dist-lib/{useSessionLifecycle-DQXKeBm9.js → useSessionLifecycle-DS3PPoWK.js} +1316 -1041
- package/dist-lib/utils/history-preparation.d.ts +8 -0
- package/dist-lib/utils/history-preparation.d.ts.map +1 -0
- package/dist-lib/utils/messages.d.ts +8 -4
- package/dist-lib/utils/messages.d.ts.map +1 -1
- package/dist-lib/utils/persisted-session-history.d.ts +1 -1
- package/dist-lib/utils/persisted-session-history.d.ts.map +1 -1
- package/dist-lib/utils/session-events.d.ts.map +1 -1
- package/dist-lib/utils/transcript-order.d.ts +10 -0
- package/dist-lib/utils/transcript-order.d.ts.map +1 -0
- package/package.json +3 -2
- package/dist-ksadk/assets/architecture-7GRP2DOG-BCsa26zi.js +0 -1
- package/dist-ksadk/assets/channel-_KDifNys.js +0 -1
- package/dist-ksadk/assets/chunk-2Q5K7J3B-HdVkJ9F0.js +0 -1
- package/dist-ksadk/assets/classDiagram-DTDB5LWJ-BVCW3ZqZ.js +0 -1
- package/dist-ksadk/assets/classDiagram-v2-JRS7N3AN-BVCW3ZqZ.js +0 -1
- package/dist-ksadk/assets/cynefin-OW5HDTMX-CNXjFctL.js +0 -1
- package/dist-ksadk/assets/eventmodeling-NTZA5JFV-B5-8RH9c.js +0 -1
- package/dist-ksadk/assets/flowDiagram-A5DVABFB-BppFxEKw.js +0 -1
- package/dist-ksadk/assets/gitGraph-4MIJSDKK-B-AhYj4C.js +0 -1
- package/dist-ksadk/assets/index-BMd2mucF.css +0 -2
- package/dist-ksadk/assets/index-D5qyyhTH.js +0 -244
- package/dist-ksadk/assets/info-A6RAGUB7-0uiKrC35.js +0 -1
- package/dist-ksadk/assets/packet-AYTQ26CC-BVTmZ_cw.js +0 -1
- package/dist-ksadk/assets/pie-WAS4IAKB-DyfxBU7V.js +0 -1
- package/dist-ksadk/assets/radar-RG4KPBEZ-FFontjL2.js +0 -1
- package/dist-ksadk/assets/railroad-74A4TZTK-D0Uidzen.js +0 -1
- package/dist-ksadk/assets/railroad-abnf-HS5TGJTU-BOo_9T2h.js +0 -1
- package/dist-ksadk/assets/railroad-ebnf-LZEXJU2U-D6-BjW7Z.js +0 -1
- package/dist-ksadk/assets/railroad-peg-WCYAUIDC-CXx__yMm.js +0 -1
- package/dist-ksadk/assets/stateDiagram-v2-4QOOHH4V-BXAFScz8.js +0 -1
- package/dist-ksadk/assets/swimlanesDiagram-VK2B7HYN-uIQ2lJKH.js +0 -8
- package/dist-ksadk/assets/treeView-Q6P3EWNA-CK5GgucZ.js +0 -1
- package/dist-ksadk/assets/treemap-WGGIJYW6-Bq1u1SpG.js +0 -1
- package/dist-ksadk/assets/wardley-WFR3VGLG-QAt06uEz.js +0 -1
- package/dist-lib/persisted-session-history-ClsfDfGs.js +0 -1991
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { n as e, t } from "./InteractionSchemaForm-
|
|
2
|
-
import { t as
|
|
3
|
-
import { Et as
|
|
4
|
-
import { i as
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { Fragment as
|
|
1
|
+
import { n as e, r as t, t as n } from "./InteractionSchemaForm-ChYkHPop.js";
|
|
2
|
+
import { t as r } from "./MessageMarkdown-CwMTvgFj.js";
|
|
3
|
+
import { Et as i, Ot as a, S as o, i as s, o as c, qt as l, s as u, t as d, v as f } from "./cloudMaterials-D75jTrkQ.js";
|
|
4
|
+
import { i as p, n as m, o as h, r as g, s as _, t as v } from "./presentation-yYw7xK60.js";
|
|
5
|
+
import { Suspense as y, lazy as b, useCallback as x, useEffect as S, useId as C, useLayoutEffect as w, useMemo as T, useRef as E, useState as D, useSyncExternalStore as O } from "react";
|
|
6
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/teams/InteractionMessage.tsx
|
|
8
|
-
function
|
|
8
|
+
function M({ message: e }) {
|
|
9
9
|
let t = null;
|
|
10
10
|
try {
|
|
11
11
|
let n = JSON.parse(e);
|
|
12
12
|
n && typeof n == "object" && "arguments" in n && n.arguments && typeof n.arguments == "object" && !Array.isArray(n.arguments) && (t = n);
|
|
13
13
|
} catch {}
|
|
14
|
-
if (!t) return /* @__PURE__ */
|
|
14
|
+
if (!t) return /* @__PURE__ */ A("p", { children: e });
|
|
15
15
|
let n = {
|
|
16
16
|
path: "文件位置",
|
|
17
17
|
command: "命令",
|
|
@@ -21,15 +21,15 @@ function j({ message: e }) {
|
|
|
21
21
|
medium: "中",
|
|
22
22
|
high: "高"
|
|
23
23
|
}, i = (e) => typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ j("div", {
|
|
25
25
|
className: "team-approval-details",
|
|
26
26
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
"content" in t.arguments && /* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ A("dl", { children: Object.entries(t.arguments).filter(([e]) => e !== "content").map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: n[e] || e }), /* @__PURE__ */ A("dd", { children: /* @__PURE__ */ A("code", { children: i(t) }) })] }, e)) }),
|
|
28
|
+
"content" in t.arguments && /* @__PURE__ */ j("details", {
|
|
29
29
|
className: "team-approval-preview",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
30
|
+
children: [/* @__PURE__ */ A("summary", { children: "查看待写入的文件内容" }), /* @__PURE__ */ A("pre", { children: i(t.arguments.content) })]
|
|
31
31
|
}),
|
|
32
|
-
typeof t.risk == "string" && /* @__PURE__ */
|
|
32
|
+
typeof t.risk == "string" && /* @__PURE__ */ j("p", {
|
|
33
33
|
className: "team-approval-risk",
|
|
34
34
|
children: ["风险级别:", r[t.risk] || t.risk]
|
|
35
35
|
})
|
|
@@ -38,8 +38,8 @@ function j({ message: e }) {
|
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/components/teams/TeamReconciliation.tsx
|
|
41
|
-
function
|
|
42
|
-
let [r, i] =
|
|
41
|
+
function N({ run: e, onLoadReconciliation: t, onReconcile: n }) {
|
|
42
|
+
let [r, i] = D(null), [a, o] = D({}), [s, c] = D(!1), [l, u] = D("");
|
|
43
43
|
if (!t || !n || e.leaderStandby?.reason !== "execution_uncertain_fenced") return null;
|
|
44
44
|
async function d() {
|
|
45
45
|
c(!0), u("");
|
|
@@ -64,13 +64,13 @@ function M({ run: e, onLoadReconciliation: t, onReconcile: n }) {
|
|
|
64
64
|
c(!1);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ j("section", {
|
|
68
68
|
className: "team-run-budget",
|
|
69
69
|
"aria-label": "原执行核查",
|
|
70
70
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ A("h4", { children: "旧执行结果需要核查" }),
|
|
72
|
+
/* @__PURE__ */ A("p", { children: "云端已接管,相关分支会等待原单确认。请先核对外部操作和交付物,再决定是否采用结果。" }),
|
|
73
|
+
/* @__PURE__ */ A("button", {
|
|
74
74
|
type: "button",
|
|
75
75
|
className: "team-button",
|
|
76
76
|
disabled: s,
|
|
@@ -84,23 +84,23 @@ function M({ run: e, onLoadReconciliation: t, onReconcile: n }) {
|
|
|
84
84
|
"cancelled",
|
|
85
85
|
"interrupted"
|
|
86
86
|
].includes(t?.run_status || "");
|
|
87
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ j("article", {
|
|
88
88
|
className: "team-observer-item",
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ j("p", { children: [
|
|
91
91
|
e.taskId ? "成员执行" : "原 Leader 执行",
|
|
92
92
|
" · ",
|
|
93
93
|
r ? "已返回结束回执" : "原节点尚未返回结束回执"
|
|
94
94
|
] }),
|
|
95
|
-
t?.output && /* @__PURE__ */
|
|
95
|
+
t?.output && /* @__PURE__ */ A("pre", {
|
|
96
96
|
className: "team-observer-details",
|
|
97
97
|
children: t.output.slice(0, 1e4)
|
|
98
98
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
r && /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ j("details", { children: [/* @__PURE__ */ A("summary", { children: "执行引用" }), /* @__PURE__ */ A("code", { children: t?.run_id || e.nativeRunId || e.commandId })] }),
|
|
100
|
+
r && /* @__PURE__ */ j(k, { children: [
|
|
101
|
+
/* @__PURE__ */ j("label", {
|
|
102
102
|
className: "team-field",
|
|
103
|
-
children: ["核查说明", /* @__PURE__ */
|
|
103
|
+
children: ["核查说明", /* @__PURE__ */ A("textarea", {
|
|
104
104
|
value: n,
|
|
105
105
|
onChange: (t) => o((n) => ({
|
|
106
106
|
...n,
|
|
@@ -110,21 +110,21 @@ function M({ run: e, onLoadReconciliation: t, onReconcile: n }) {
|
|
|
110
110
|
placeholder: "说明已检查哪些原单或外部结果"
|
|
111
111
|
})]
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ A("button", {
|
|
114
114
|
type: "button",
|
|
115
115
|
className: "team-button",
|
|
116
116
|
disabled: s || !n.trim(),
|
|
117
117
|
onClick: () => void f(e, "confirm_ended"),
|
|
118
118
|
children: "确认已结束"
|
|
119
119
|
}),
|
|
120
|
-
e.taskId && t?.run_status === "succeeded" && /* @__PURE__ */
|
|
120
|
+
e.taskId && t?.run_status === "succeeded" && /* @__PURE__ */ A("button", {
|
|
121
121
|
type: "button",
|
|
122
122
|
className: "team-button",
|
|
123
123
|
disabled: s || !n.trim(),
|
|
124
124
|
onClick: () => void f(e, "use_result"),
|
|
125
125
|
children: "采用已验证成果"
|
|
126
126
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ A("p", {
|
|
128
128
|
className: "team-muted",
|
|
129
129
|
children: "确认结束不会自动重新执行;必要时再对相应子任务提出重试。"
|
|
130
130
|
})
|
|
@@ -132,7 +132,7 @@ function M({ run: e, onLoadReconciliation: t, onReconcile: n }) {
|
|
|
132
132
|
]
|
|
133
133
|
}, e.commandId);
|
|
134
134
|
}),
|
|
135
|
-
l && /* @__PURE__ */
|
|
135
|
+
l && /* @__PURE__ */ A("p", {
|
|
136
136
|
role: "alert",
|
|
137
137
|
className: "team-inline-error",
|
|
138
138
|
children: l
|
|
@@ -142,56 +142,56 @@ function M({ run: e, onLoadReconciliation: t, onReconcile: n }) {
|
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/components/teams/TeamWorkspace.tsx
|
|
145
|
-
var
|
|
145
|
+
var P = b(() => import("./ExecutionTree-v3HexvPo.js").then((e) => e.n).then((e) => ({ default: e.ExecutionTree }))), F = () => `team-${globalThis.crypto.randomUUID()}`, I = {
|
|
146
146
|
owner: "群主",
|
|
147
147
|
leader: "Leader",
|
|
148
148
|
member: "成员",
|
|
149
149
|
system: "系统"
|
|
150
|
-
},
|
|
150
|
+
}, L = {
|
|
151
151
|
idle: "空闲",
|
|
152
152
|
queued: "待执行",
|
|
153
153
|
running: "进行中",
|
|
154
154
|
waiting: "等待中",
|
|
155
155
|
needs_attention: "需要处理",
|
|
156
156
|
unavailable: "不可用"
|
|
157
|
-
},
|
|
157
|
+
}, R = {
|
|
158
158
|
connecting: "正在连接",
|
|
159
159
|
connected: "已连接",
|
|
160
160
|
reconnecting: "正在重连 · 任务继续执行",
|
|
161
161
|
offline: "连接中断 · 显示最后状态",
|
|
162
162
|
closed: "未连接"
|
|
163
163
|
};
|
|
164
|
-
function
|
|
165
|
-
return /* @__PURE__ */
|
|
164
|
+
function z({ name: e }) {
|
|
165
|
+
return /* @__PURE__ */ A("span", {
|
|
166
166
|
className: "team-avatar",
|
|
167
167
|
"aria-hidden": "true",
|
|
168
168
|
children: Array.from(e.trim())[0] || "A"
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return /* @__PURE__ */
|
|
171
|
+
function B({ status: e }) {
|
|
172
|
+
return /* @__PURE__ */ A("span", {
|
|
173
173
|
className: "team-status",
|
|
174
174
|
"data-status": e,
|
|
175
|
-
children:
|
|
175
|
+
children: v[e] ?? e
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return e.length <= 100 ? /* @__PURE__ */
|
|
178
|
+
function V({ goal: e }) {
|
|
179
|
+
return e.length <= 100 ? /* @__PURE__ */ A("h3", { children: e }) : /* @__PURE__ */ j("details", {
|
|
180
180
|
className: "team-run-goal",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ j("summary", { children: [/* @__PURE__ */ A("h3", { children: e }), /* @__PURE__ */ A("span", { children: "完整目标" })] }), /* @__PURE__ */ A("p", { children: e })]
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function H({ snapshot: e, connection: t, onMembers: n, onManage: r }) {
|
|
185
185
|
let i = e.members.filter((e) => e.status !== "removed");
|
|
186
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ j("header", {
|
|
187
187
|
className: "team-header",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ j("div", {
|
|
189
189
|
className: "team-header-identity",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ A("div", {
|
|
191
191
|
className: "team-avatar-stack",
|
|
192
192
|
"aria-hidden": "true",
|
|
193
|
-
children: i.slice(0, 3).map((e) => /* @__PURE__ */
|
|
194
|
-
}), /* @__PURE__ */
|
|
193
|
+
children: i.slice(0, 3).map((e) => /* @__PURE__ */ A(z, { name: e.name }, e.memberId))
|
|
194
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h1", { children: e.group.name }), /* @__PURE__ */ j("button", {
|
|
195
195
|
type: "button",
|
|
196
196
|
className: "team-text-button team-muted",
|
|
197
197
|
onClick: n,
|
|
@@ -201,13 +201,13 @@ function V({ snapshot: e, connection: t, onMembers: n, onManage: r }) {
|
|
|
201
201
|
i.find((t) => t.memberId === e.group.leaderMemberId)?.name || "Leader"
|
|
202
202
|
]
|
|
203
203
|
})] })]
|
|
204
|
-
}), /* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ j("div", {
|
|
205
205
|
className: "team-header-actions",
|
|
206
|
-
children: [t !== "connected" && /* @__PURE__ */
|
|
206
|
+
children: [t !== "connected" && /* @__PURE__ */ A("span", {
|
|
207
207
|
className: "team-connection",
|
|
208
208
|
role: "status",
|
|
209
|
-
children:
|
|
210
|
-
}), r && /* @__PURE__ */
|
|
209
|
+
children: R[t]
|
|
210
|
+
}), r && /* @__PURE__ */ A("button", {
|
|
211
211
|
type: "button",
|
|
212
212
|
className: "team-button",
|
|
213
213
|
onClick: r,
|
|
@@ -216,9 +216,9 @@ function V({ snapshot: e, connection: t, onMembers: n, onManage: r }) {
|
|
|
216
216
|
})]
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
let a =
|
|
221
|
-
|
|
219
|
+
function U({ messages: e, children: t, emptyState: n, focusFinalDelivery: i }) {
|
|
220
|
+
let a = E(null), o = E(!0), [s, c] = D(100), l = e.filter((e) => e.visibility === "public");
|
|
221
|
+
w(() => {
|
|
222
222
|
let e = a.current;
|
|
223
223
|
if (!o.current || !e) return;
|
|
224
224
|
let t = i ? e.querySelector(".team-final-delivery") : null;
|
|
@@ -232,7 +232,7 @@ function H({ messages: e, children: t, emptyState: r, focusFinalDelivery: i }) {
|
|
|
232
232
|
e.scrollTop += e.scrollHeight - t;
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ A("div", {
|
|
236
236
|
className: "team-timeline",
|
|
237
237
|
ref: a,
|
|
238
238
|
onScroll: () => {
|
|
@@ -241,55 +241,55 @@ function H({ messages: e, children: t, emptyState: r, focusFinalDelivery: i }) {
|
|
|
241
241
|
},
|
|
242
242
|
"aria-label": "群聊消息",
|
|
243
243
|
tabIndex: 0,
|
|
244
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ j("div", {
|
|
245
245
|
className: "team-timeline-inner",
|
|
246
246
|
children: [
|
|
247
|
-
l.length > s && /* @__PURE__ */
|
|
247
|
+
l.length > s && /* @__PURE__ */ A("button", {
|
|
248
248
|
className: "team-button team-history-more",
|
|
249
249
|
type: "button",
|
|
250
250
|
onClick: u,
|
|
251
251
|
children: "查看更早的消息"
|
|
252
252
|
}),
|
|
253
|
-
!l.length && (
|
|
253
|
+
!l.length && (n ?? /* @__PURE__ */ j("div", {
|
|
254
254
|
className: "team-empty",
|
|
255
255
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ A("span", {
|
|
257
257
|
className: "team-eyebrow",
|
|
258
258
|
children: "一起完成一个目标"
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ A("h2", { children: "团队已就绪" }),
|
|
261
|
+
/* @__PURE__ */ j("p", { children: [
|
|
262
262
|
"描述你想得到的成果,Leader 会组织成员分工。",
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ A("br", {}),
|
|
264
264
|
"也可以 @成员,指定由谁参与。"
|
|
265
265
|
] })
|
|
266
266
|
]
|
|
267
267
|
})),
|
|
268
|
-
l.slice(-s).map((e) => /* @__PURE__ */
|
|
268
|
+
l.slice(-s).map((e) => /* @__PURE__ */ j("article", {
|
|
269
269
|
className: "team-message",
|
|
270
270
|
"data-role": e.groupRole,
|
|
271
271
|
"data-message-id": e.messageId,
|
|
272
|
-
children: [e.groupRole !== "owner" && /* @__PURE__ */
|
|
272
|
+
children: [e.groupRole !== "owner" && /* @__PURE__ */ A(z, { name: e.senderName }), /* @__PURE__ */ j("div", {
|
|
273
273
|
className: "team-message-main",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ j("header", { children: [
|
|
275
|
+
/* @__PURE__ */ A("strong", { children: e.senderName }),
|
|
276
|
+
/* @__PURE__ */ A("span", { children: I[e.groupRole] }),
|
|
277
|
+
/* @__PURE__ */ A("time", {
|
|
278
278
|
dateTime: e.createdAt,
|
|
279
279
|
children: new Date(e.createdAt).toLocaleTimeString([], {
|
|
280
280
|
hour: "2-digit",
|
|
281
281
|
minute: "2-digit"
|
|
282
282
|
})
|
|
283
283
|
}),
|
|
284
|
-
e.intent === "note" && /* @__PURE__ */
|
|
285
|
-
] }), /* @__PURE__ */
|
|
284
|
+
e.intent === "note" && /* @__PURE__ */ A("span", { children: "仅留言" })
|
|
285
|
+
] }), /* @__PURE__ */ A("div", {
|
|
286
286
|
className: "team-message-body",
|
|
287
|
-
children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */
|
|
287
|
+
children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */ A(r, { content: e.text }, t) : /* @__PURE__ */ j("span", {
|
|
288
288
|
className: "team-attachment",
|
|
289
289
|
children: [
|
|
290
290
|
e.name || "附件",
|
|
291
291
|
" ",
|
|
292
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ A("span", { children: e.mediaType })
|
|
293
293
|
]
|
|
294
294
|
}, e.attachmentRef))
|
|
295
295
|
})]
|
|
@@ -300,383 +300,383 @@ function H({ messages: e, children: t, emptyState: r, focusFinalDelivery: i }) {
|
|
|
300
300
|
})
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
function
|
|
304
|
-
let a = t.filter((e) => e.status === "succeeded").length, o =
|
|
305
|
-
return /* @__PURE__ */
|
|
303
|
+
function ee({ run: e, tasks: t, pendingCount: n, onOpen: r, compact: i = !1 }) {
|
|
304
|
+
let a = t.filter((e) => e.status === "succeeded").length, o = g(e.status);
|
|
305
|
+
return /* @__PURE__ */ j("button", {
|
|
306
306
|
type: "button",
|
|
307
307
|
className: "team-progress-card",
|
|
308
308
|
"data-active": o || void 0,
|
|
309
309
|
onClick: r,
|
|
310
310
|
"aria-label": `查看协作:${e.goal}`,
|
|
311
311
|
children: [
|
|
312
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ j("span", {
|
|
313
313
|
className: "team-progress-heading",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ A("span", {
|
|
315
315
|
className: "team-eyebrow",
|
|
316
316
|
children: "本轮协作"
|
|
317
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ j("span", {
|
|
318
318
|
className: "team-progress-status",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ A(B, { status: e.status }), o && /* @__PURE__ */ j("span", {
|
|
320
320
|
className: "team-progress-live",
|
|
321
321
|
role: "status",
|
|
322
|
-
children: ["实时处理中", /* @__PURE__ */
|
|
322
|
+
children: ["实时处理中", /* @__PURE__ */ j("span", {
|
|
323
323
|
"aria-hidden": "true",
|
|
324
324
|
children: [
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ A("i", {}),
|
|
326
|
+
/* @__PURE__ */ A("i", {}),
|
|
327
|
+
/* @__PURE__ */ A("i", {})
|
|
328
328
|
]
|
|
329
329
|
})]
|
|
330
330
|
})]
|
|
331
331
|
})]
|
|
332
332
|
}),
|
|
333
|
-
!i && /* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */
|
|
333
|
+
!i && /* @__PURE__ */ A("strong", { children: e.goal }),
|
|
334
|
+
/* @__PURE__ */ j("span", {
|
|
335
335
|
className: "team-progress-caption",
|
|
336
336
|
children: [
|
|
337
337
|
t.length ? `${a} / ${t.length} 项任务已验收` : "正在整理目标与分工",
|
|
338
338
|
n > 0 ? ` · ${n} 项需要处理` : "",
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ j("span", { children: ["查看协作 ", /* @__PURE__ */ A("span", {
|
|
340
340
|
"aria-hidden": "true",
|
|
341
341
|
children: "→"
|
|
342
342
|
})] })
|
|
343
343
|
]
|
|
344
344
|
}),
|
|
345
|
-
e.reason && /* @__PURE__ */
|
|
345
|
+
e.reason && /* @__PURE__ */ A("span", {
|
|
346
346
|
className: "team-progress-reason",
|
|
347
347
|
children: e.reason
|
|
348
348
|
})
|
|
349
349
|
]
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
let
|
|
352
|
+
function te({ members: e, activeRun: n, value: r, onChange: i, onSend: a, disabled: o = !1, recipientMemberId: s, onRecipientChange: c, focusRequest: l = 0, artifacts: u = [], referenceArtifacts: d = [], serverAuthority: f = !1 }) {
|
|
353
|
+
let p = C(), m = C(), h = C(), _ = n?.teamRunId || "", v = {
|
|
354
354
|
attachmentIds: [],
|
|
355
355
|
note: !1,
|
|
356
356
|
sourcePath: "",
|
|
357
357
|
baseRef: "",
|
|
358
358
|
inputs: "",
|
|
359
359
|
mode: "auto"
|
|
360
|
-
}, [
|
|
360
|
+
}, [y, b] = D({}), x = y[_] || v, T = (e) => b((t) => ({
|
|
361
361
|
...t,
|
|
362
|
-
[
|
|
363
|
-
...t[
|
|
362
|
+
[_]: {
|
|
363
|
+
...t[_] || v,
|
|
364
364
|
...e
|
|
365
365
|
}
|
|
366
|
-
})), { attachmentIds:
|
|
367
|
-
let n = t[
|
|
366
|
+
})), { attachmentIds: O, note: M } = x, N = (e) => b((t) => {
|
|
367
|
+
let n = t[_] || v;
|
|
368
368
|
return {
|
|
369
369
|
...t,
|
|
370
|
-
[
|
|
370
|
+
[_]: {
|
|
371
371
|
...n,
|
|
372
372
|
attachmentIds: typeof e == "function" ? e(n.attachmentIds) : e
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
|
-
}),
|
|
376
|
-
|
|
377
|
-
},
|
|
378
|
-
|
|
379
|
-
let e =
|
|
375
|
+
}), P = (e) => T({ note: e }), I = [...new Map([...u, ...d].map((e) => [e.artifactId, e])).values()], L = I.filter((e) => O.includes(e.artifactId)), [R, B] = D(""), V = s ?? R, H = (e) => {
|
|
376
|
+
B(e), c?.(e);
|
|
377
|
+
}, U = E(null);
|
|
378
|
+
w(() => {
|
|
379
|
+
let e = U.current;
|
|
380
380
|
e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 176)}px`);
|
|
381
|
-
}, [
|
|
382
|
-
|
|
383
|
-
}, [
|
|
384
|
-
let [
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}, [
|
|
388
|
-
let [
|
|
389
|
-
|
|
390
|
-
|
|
381
|
+
}, [r]), S(() => {
|
|
382
|
+
l && U.current?.focus();
|
|
383
|
+
}, [l]);
|
|
384
|
+
let [ee, te] = D(0), ne = E(_);
|
|
385
|
+
ne.current = _, S(() => {
|
|
386
|
+
G("");
|
|
387
|
+
}, [_]);
|
|
388
|
+
let [W, re] = D(!1), ie = !!(n && g(n.status)), ae = (!!(n && !ie) || n?.status === "cancel_requested") && !M, [oe, G] = D(""), se = t(), K = E(/* @__PURE__ */ new Map()), ce = E(!0);
|
|
389
|
+
S(() => (ce.current = !0, () => {
|
|
390
|
+
ce.current = !1;
|
|
391
391
|
}), []);
|
|
392
|
-
let
|
|
392
|
+
let le = /@([^\s@]*)$/u.exec(r)?.[1], q = le === void 0 ? [] : e.filter((e) => e.status === "active" && e.name.toLowerCase().includes(le.toLowerCase()));
|
|
393
393
|
async function J() {
|
|
394
|
-
if (
|
|
395
|
-
if (
|
|
396
|
-
|
|
394
|
+
if (o || W || !r.trim() && !L.length) return;
|
|
395
|
+
if (ae) {
|
|
396
|
+
G("这个任务已结束,请新建任务继续协作。");
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
|
-
let e =
|
|
400
|
-
if (
|
|
401
|
-
|
|
399
|
+
let e = r.trim(), t = M ? "note" : n ? V === "" ? "followup" : "directed" : "start_goal";
|
|
400
|
+
if (t === "start_goal" && !e) {
|
|
401
|
+
G("请补充这轮希望团队完成的目标,或选择仅留言。");
|
|
402
402
|
return;
|
|
403
403
|
}
|
|
404
|
-
let s =
|
|
404
|
+
let s = V === "" ? [] : [V], c = [...e ? [{
|
|
405
405
|
kind: "text",
|
|
406
406
|
text: e
|
|
407
|
-
}] : [], ...
|
|
407
|
+
}] : [], ...L.map((e) => ({
|
|
408
408
|
kind: "attachment",
|
|
409
409
|
attachmentRef: e.artifactId,
|
|
410
410
|
mediaType: e.mediaType,
|
|
411
411
|
name: e.name
|
|
412
|
-
}))], l =
|
|
413
|
-
if (
|
|
414
|
-
|
|
412
|
+
}))], l = n?.teamRunId, u = _;
|
|
413
|
+
if (t === "start_goal" && !x.sourcePath.trim() && (x.baseRef.trim() || x.inputs.trim())) {
|
|
414
|
+
G("请先填写执行节点上的工作目录。");
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
|
-
let
|
|
418
|
-
sourcePath:
|
|
419
|
-
mode:
|
|
420
|
-
...
|
|
421
|
-
inputs:
|
|
417
|
+
let d = t === "start_goal" && x.sourcePath.trim() ? {
|
|
418
|
+
sourcePath: x.sourcePath.trim(),
|
|
419
|
+
mode: x.mode,
|
|
420
|
+
...x.mode === "auto" && x.baseRef.trim() ? { baseRef: x.baseRef.trim() } : {},
|
|
421
|
+
inputs: x.inputs.split(/\r?\n/).map((e) => e.trim()).filter(Boolean)
|
|
422
422
|
} : void 0;
|
|
423
|
-
if (
|
|
424
|
-
|
|
423
|
+
if (d && f && d.mode === "auto" && !/^(?:[a-fA-F0-9]{40}|[a-fA-F0-9]{64})$/.test(x.baseRef.trim())) {
|
|
424
|
+
G("云端协作的 Git 基线需要完整的 40 或 64 位 commit,请在工作目录设置中填写。");
|
|
425
425
|
return;
|
|
426
426
|
}
|
|
427
|
-
if (
|
|
428
|
-
|
|
427
|
+
if (d && d.inputs.length > 32) {
|
|
428
|
+
G("每次任务最多引用 32 个输入文件。");
|
|
429
429
|
return;
|
|
430
430
|
}
|
|
431
431
|
let p = JSON.stringify([
|
|
432
432
|
c,
|
|
433
|
-
|
|
433
|
+
t,
|
|
434
434
|
s,
|
|
435
435
|
l,
|
|
436
|
-
|
|
436
|
+
d
|
|
437
437
|
]);
|
|
438
|
-
|
|
438
|
+
K.current.get(_)?.digest !== p && K.current.set(_, {
|
|
439
439
|
digest: p,
|
|
440
|
-
idempotencyKey:
|
|
440
|
+
idempotencyKey: F()
|
|
441
441
|
});
|
|
442
|
-
let m =
|
|
443
|
-
|
|
442
|
+
let m = K.current.get(_);
|
|
443
|
+
re(!0), G("");
|
|
444
444
|
try {
|
|
445
|
-
let e = await
|
|
445
|
+
let e = await a({
|
|
446
446
|
parts: c,
|
|
447
447
|
mentions: s,
|
|
448
|
-
intent:
|
|
448
|
+
intent: t,
|
|
449
449
|
...l ? { teamRunId: l } : {},
|
|
450
|
-
...
|
|
450
|
+
...d ? { workspace: d } : {},
|
|
451
451
|
idempotencyKey: m.idempotencyKey
|
|
452
452
|
});
|
|
453
|
-
if (!
|
|
453
|
+
if (!ce.current) return;
|
|
454
454
|
if (e?.status === "rejected" || e?.status === "uncertain") throw Error(e.reason || (e.status === "uncertain" ? "消息接收结果尚未确认。再次提交将使用相同标识核对。" : "消息未被接收。"));
|
|
455
|
-
|
|
455
|
+
ne.current === u && (i(""), N([])), K.current.delete(u), t === "start_goal" && b((e) => {
|
|
456
456
|
let t = { ...e };
|
|
457
457
|
return delete t[u], t;
|
|
458
458
|
});
|
|
459
459
|
} catch (e) {
|
|
460
|
-
|
|
460
|
+
G(e instanceof Error ? e.message : "消息发送失败,请重试。");
|
|
461
461
|
} finally {
|
|
462
|
-
|
|
462
|
+
re(!1);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
function Y(e) {
|
|
466
|
-
|
|
466
|
+
H(e.memberId), i(r.replace(/@([^\s@]*)$/u, `@${e.name} `)), te(0), U.current?.focus();
|
|
467
467
|
}
|
|
468
|
-
return /* @__PURE__ */
|
|
468
|
+
return /* @__PURE__ */ j("form", {
|
|
469
469
|
className: "team-composer-wrap",
|
|
470
470
|
onSubmit: (e) => {
|
|
471
471
|
e.preventDefault(), J();
|
|
472
472
|
},
|
|
473
473
|
children: [
|
|
474
|
-
|
|
474
|
+
oe && /* @__PURE__ */ A("p", {
|
|
475
475
|
className: "team-inline-error",
|
|
476
476
|
role: "alert",
|
|
477
|
-
children:
|
|
477
|
+
children: oe
|
|
478
478
|
}),
|
|
479
|
-
!!q.length && /* @__PURE__ */
|
|
479
|
+
!!q.length && /* @__PURE__ */ A("div", {
|
|
480
480
|
className: "team-mention-options",
|
|
481
481
|
role: "listbox",
|
|
482
482
|
"aria-label": "选择要提及的成员",
|
|
483
|
-
children: q.map((e, t) => /* @__PURE__ */
|
|
483
|
+
children: q.map((e, t) => /* @__PURE__ */ j("button", {
|
|
484
484
|
type: "button",
|
|
485
485
|
role: "option",
|
|
486
|
-
"aria-selected": t ===
|
|
486
|
+
"aria-selected": t === ee,
|
|
487
487
|
onClick: () => Y(e),
|
|
488
488
|
children: [
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ A(z, { name: e.name }),
|
|
490
|
+
/* @__PURE__ */ A("span", { children: e.name }),
|
|
491
|
+
/* @__PURE__ */ A("small", { children: e.role === "leader" ? "Leader" : "成员" })
|
|
492
492
|
]
|
|
493
493
|
}, e.memberId))
|
|
494
494
|
}),
|
|
495
|
-
!!
|
|
495
|
+
!!L.length && /* @__PURE__ */ A("div", {
|
|
496
496
|
className: "team-selected-artifacts",
|
|
497
497
|
"aria-label": "已选择的交付物",
|
|
498
|
-
children:
|
|
498
|
+
children: L.map((e) => /* @__PURE__ */ j("span", {
|
|
499
499
|
className: "team-attachment",
|
|
500
|
-
children: [e.name, /* @__PURE__ */
|
|
500
|
+
children: [e.name, /* @__PURE__ */ A("button", {
|
|
501
501
|
type: "button",
|
|
502
502
|
className: "team-text-button",
|
|
503
503
|
"aria-label": `移除引用 ${e.name}`,
|
|
504
|
-
disabled:
|
|
505
|
-
onClick: () =>
|
|
504
|
+
disabled: W,
|
|
505
|
+
onClick: () => N((t) => t.filter((t) => t !== e.artifactId)),
|
|
506
506
|
children: "×"
|
|
507
507
|
})]
|
|
508
508
|
}, e.artifactId))
|
|
509
509
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ j("div", {
|
|
511
511
|
className: "team-composer",
|
|
512
512
|
children: [
|
|
513
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ A("label", {
|
|
514
514
|
className: "team-sr-only",
|
|
515
|
-
htmlFor:
|
|
515
|
+
htmlFor: p,
|
|
516
516
|
children: "给团队的消息"
|
|
517
517
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
ref:
|
|
520
|
-
id:
|
|
521
|
-
value:
|
|
518
|
+
/* @__PURE__ */ A("textarea", {
|
|
519
|
+
ref: U,
|
|
520
|
+
id: p,
|
|
521
|
+
value: r,
|
|
522
522
|
rows: 2,
|
|
523
523
|
onChange: (e) => {
|
|
524
|
-
|
|
524
|
+
i(e.target.value), te(0);
|
|
525
525
|
},
|
|
526
|
-
placeholder:
|
|
527
|
-
disabled:
|
|
526
|
+
placeholder: M ? "留下一条消息,不启动任务…" : V === "" ? "描述目标、交付物或需要团队解决的问题…" : "向选中的成员提问或分派工作…",
|
|
527
|
+
disabled: o || W,
|
|
528
528
|
onKeyDown: (e) => {
|
|
529
|
-
if (q.length && !e
|
|
529
|
+
if (q.length && !se(e) && [
|
|
530
530
|
"ArrowDown",
|
|
531
531
|
"ArrowUp",
|
|
532
532
|
"Enter"
|
|
533
533
|
].includes(e.key)) {
|
|
534
|
-
e.preventDefault(), e.key === "Enter" ? Y(q[
|
|
534
|
+
e.preventDefault(), e.key === "Enter" ? Y(q[ee % q.length]) : te((t) => (t + (e.key === "ArrowDown" ? 1 : -1) + q.length) % q.length);
|
|
535
535
|
return;
|
|
536
536
|
}
|
|
537
|
-
e.key === "Enter" && !e.shiftKey && !e
|
|
537
|
+
e.key === "Enter" && !e.shiftKey && !se(e) && (e.preventDefault(), J());
|
|
538
538
|
}
|
|
539
539
|
}),
|
|
540
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ j("div", {
|
|
541
541
|
className: "team-composer-toolbar",
|
|
542
|
-
children: [/* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
542
|
+
children: [/* @__PURE__ */ j("div", { children: [
|
|
543
|
+
/* @__PURE__ */ A("label", {
|
|
544
544
|
className: "team-sr-only",
|
|
545
|
-
htmlFor:
|
|
545
|
+
htmlFor: m,
|
|
546
546
|
children: "接收成员"
|
|
547
547
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
id:
|
|
550
|
-
value:
|
|
551
|
-
onChange: (e) =>
|
|
552
|
-
disabled:
|
|
553
|
-
children: [/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ j("select", {
|
|
549
|
+
id: m,
|
|
550
|
+
value: V,
|
|
551
|
+
onChange: (e) => H(e.target.value),
|
|
552
|
+
disabled: o || W,
|
|
553
|
+
children: [/* @__PURE__ */ A("option", {
|
|
554
554
|
value: "",
|
|
555
555
|
children: "发给 Leader"
|
|
556
|
-
}), e.filter((e) => e.status === "active").map((e) => /* @__PURE__ */
|
|
556
|
+
}), e.filter((e) => e.status === "active").map((e) => /* @__PURE__ */ j("option", {
|
|
557
557
|
value: e.memberId,
|
|
558
558
|
children: ["@", e.name]
|
|
559
559
|
}, e.memberId))]
|
|
560
560
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ j("details", {
|
|
562
562
|
className: "team-composer-more",
|
|
563
|
-
children: [/* @__PURE__ */
|
|
563
|
+
children: [/* @__PURE__ */ A("summary", {
|
|
564
564
|
"aria-label": "更多消息选项",
|
|
565
565
|
children: "···"
|
|
566
|
-
}), /* @__PURE__ */
|
|
566
|
+
}), /* @__PURE__ */ j("div", {
|
|
567
567
|
className: "team-composer-menu",
|
|
568
|
-
children: [/* @__PURE__ */
|
|
568
|
+
children: [/* @__PURE__ */ j("label", {
|
|
569
569
|
className: "team-note-toggle",
|
|
570
|
-
children: [/* @__PURE__ */
|
|
570
|
+
children: [/* @__PURE__ */ A("input", {
|
|
571
571
|
type: "checkbox",
|
|
572
|
-
checked:
|
|
573
|
-
onChange: (e) =>
|
|
574
|
-
disabled:
|
|
572
|
+
checked: M,
|
|
573
|
+
onChange: (e) => P(e.target.checked),
|
|
574
|
+
disabled: o || W
|
|
575
575
|
}), "仅留言,不启动执行"]
|
|
576
|
-
}), !
|
|
576
|
+
}), !n && /* @__PURE__ */ j("details", {
|
|
577
577
|
className: "team-workspace-options",
|
|
578
578
|
children: [
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ j("summary", { children: ["工作目录", x.sourcePath ? " · 已选择" : " · 可选"] }),
|
|
580
|
+
/* @__PURE__ */ j("label", {
|
|
581
581
|
className: "team-field",
|
|
582
|
-
children: ["工作目录", /* @__PURE__ */
|
|
583
|
-
value:
|
|
582
|
+
children: ["工作目录", /* @__PURE__ */ A("input", {
|
|
583
|
+
value: x.sourcePath,
|
|
584
584
|
maxLength: 4096,
|
|
585
|
-
onChange: (e) =>
|
|
585
|
+
onChange: (e) => T({ sourcePath: e.target.value }),
|
|
586
586
|
placeholder: "执行节点上的目录路径",
|
|
587
|
-
disabled:
|
|
587
|
+
disabled: W
|
|
588
588
|
})]
|
|
589
589
|
}),
|
|
590
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ j("label", {
|
|
591
591
|
className: "team-field",
|
|
592
|
-
children: ["目录类型", /* @__PURE__ */
|
|
593
|
-
value:
|
|
594
|
-
onChange: (e) =>
|
|
595
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: ["目录类型", /* @__PURE__ */ j("select", {
|
|
593
|
+
value: x.mode,
|
|
594
|
+
onChange: (e) => T({ mode: e.target.value }),
|
|
595
|
+
children: [/* @__PURE__ */ A("option", {
|
|
596
596
|
value: "auto",
|
|
597
|
-
children:
|
|
598
|
-
}), /* @__PURE__ */
|
|
597
|
+
children: f ? "Git 仓库" : "自动识别 Git"
|
|
598
|
+
}), /* @__PURE__ */ A("option", {
|
|
599
599
|
value: "directory",
|
|
600
600
|
children: "普通目录,仅复制输入文件"
|
|
601
601
|
})]
|
|
602
602
|
})]
|
|
603
603
|
}),
|
|
604
|
-
|
|
604
|
+
x.mode === "auto" && /* @__PURE__ */ j("label", {
|
|
605
605
|
className: "team-field",
|
|
606
|
-
children: ["Git 基线", /* @__PURE__ */
|
|
607
|
-
value:
|
|
606
|
+
children: ["Git 基线", /* @__PURE__ */ A("input", {
|
|
607
|
+
value: x.baseRef,
|
|
608
608
|
maxLength: 256,
|
|
609
|
-
onChange: (e) =>
|
|
610
|
-
placeholder:
|
|
611
|
-
disabled:
|
|
609
|
+
onChange: (e) => T({ baseRef: e.target.value }),
|
|
610
|
+
placeholder: f ? "完整 commit(40 或 64 位)" : "HEAD",
|
|
611
|
+
disabled: W
|
|
612
612
|
})]
|
|
613
613
|
}),
|
|
614
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ j("label", {
|
|
615
615
|
className: "team-field",
|
|
616
|
-
children: ["输入文件", /* @__PURE__ */
|
|
616
|
+
children: ["输入文件", /* @__PURE__ */ A("textarea", {
|
|
617
617
|
rows: 2,
|
|
618
|
-
value:
|
|
619
|
-
onChange: (e) =>
|
|
618
|
+
value: x.inputs,
|
|
619
|
+
onChange: (e) => T({ inputs: e.target.value }),
|
|
620
620
|
placeholder: "每行一个相对路径(非 Git 目录)",
|
|
621
|
-
disabled:
|
|
621
|
+
disabled: W
|
|
622
622
|
})]
|
|
623
623
|
}),
|
|
624
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ j("p", { children: ["路径须在执行节点可访问。Git 使用提交版本,不带入未提交修改;普通目录只复制列出的输入文件。", f && "云端协作需填写固定 commit,并确保节点可访问相同版本。"] })
|
|
625
625
|
]
|
|
626
626
|
})]
|
|
627
627
|
})]
|
|
628
628
|
}),
|
|
629
|
-
!!
|
|
629
|
+
!!I.length && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("label", {
|
|
630
630
|
className: "team-sr-only",
|
|
631
|
-
htmlFor:
|
|
631
|
+
htmlFor: h,
|
|
632
632
|
children: "引用本群交付物"
|
|
633
|
-
}), /* @__PURE__ */
|
|
634
|
-
id:
|
|
633
|
+
}), /* @__PURE__ */ j("select", {
|
|
634
|
+
id: h,
|
|
635
635
|
value: "",
|
|
636
|
-
disabled:
|
|
636
|
+
disabled: o || W || L.length >= 8,
|
|
637
637
|
onChange: (e) => {
|
|
638
638
|
let t = e.target.value;
|
|
639
|
-
t &&
|
|
639
|
+
t && N((e) => e.includes(t) ? e : [...e, t]);
|
|
640
640
|
},
|
|
641
641
|
children: [
|
|
642
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ A("option", {
|
|
643
643
|
value: "",
|
|
644
644
|
children: "引用交付物"
|
|
645
645
|
}),
|
|
646
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ A("optgroup", {
|
|
647
647
|
label: "当前任务",
|
|
648
|
-
children:
|
|
648
|
+
children: u.filter((e) => !O.includes(e.artifactId)).map((e) => /* @__PURE__ */ A("option", {
|
|
649
649
|
value: e.artifactId,
|
|
650
650
|
children: e.name
|
|
651
651
|
}, e.artifactId))
|
|
652
652
|
}),
|
|
653
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ A("optgroup", {
|
|
654
654
|
label: "其他任务(显式引用)",
|
|
655
|
-
children:
|
|
655
|
+
children: d.filter((e) => !u.some((t) => t.artifactId === e.artifactId) && !O.includes(e.artifactId)).map((e) => /* @__PURE__ */ A("option", {
|
|
656
656
|
value: e.artifactId,
|
|
657
657
|
children: e.name
|
|
658
658
|
}, e.artifactId))
|
|
659
659
|
})
|
|
660
660
|
]
|
|
661
661
|
})] })
|
|
662
|
-
] }), /* @__PURE__ */
|
|
662
|
+
] }), /* @__PURE__ */ A("button", {
|
|
663
663
|
className: "team-button team-primary",
|
|
664
664
|
type: "submit",
|
|
665
|
-
disabled:
|
|
666
|
-
children:
|
|
665
|
+
disabled: o || W || ae || !r.trim() && !L.length,
|
|
666
|
+
children: W ? "正在发送" : "发送"
|
|
667
667
|
})]
|
|
668
668
|
})
|
|
669
669
|
]
|
|
670
670
|
}),
|
|
671
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ A("p", {
|
|
672
672
|
className: "team-composer-help",
|
|
673
|
-
children:
|
|
673
|
+
children: ae ? n?.status === "cancel_requested" ? "正在停止任务 · 等待执行端确认" : "任务已结束 · 新建任务以继续协作" : /* @__PURE__ */ j(k, { children: ["Enter 发送 · Shift + Enter 换行", M ? " · 留言不会唤醒成员" : ""] })
|
|
674
674
|
})
|
|
675
675
|
]
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
return e.length ? /* @__PURE__ */
|
|
678
|
+
function ne({ tasks: e, members: t, selectedTaskId: n, onSelect: r }) {
|
|
679
|
+
return e.length ? /* @__PURE__ */ A("div", {
|
|
680
680
|
className: "team-task-board",
|
|
681
681
|
children: [
|
|
682
682
|
["attention", "需处理"],
|
|
@@ -684,54 +684,54 @@ function ee({ tasks: e, members: t, selectedTaskId: n, onSelect: r }) {
|
|
|
684
684
|
["waiting", "等待"],
|
|
685
685
|
["done", "已完成"]
|
|
686
686
|
].map(([i, a]) => {
|
|
687
|
-
let o = e.filter((e) =>
|
|
688
|
-
return o.length ? /* @__PURE__ */
|
|
687
|
+
let o = e.filter((e) => _(e) === i);
|
|
688
|
+
return o.length ? /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ j("h3", { children: [a, /* @__PURE__ */ A("span", { children: o.length })] }), o.map((e) => /* @__PURE__ */ j("button", {
|
|
689
689
|
className: "team-task-row",
|
|
690
690
|
type: "button",
|
|
691
691
|
onClick: () => r(e),
|
|
692
692
|
"aria-pressed": n === e.taskId,
|
|
693
|
-
children: [/* @__PURE__ */
|
|
693
|
+
children: [/* @__PURE__ */ j("span", {
|
|
694
694
|
className: "team-task-row-main",
|
|
695
|
-
children: [/* @__PURE__ */
|
|
696
|
-
}), /* @__PURE__ */
|
|
695
|
+
children: [/* @__PURE__ */ A("strong", { children: e.title }), /* @__PURE__ */ A(B, { status: e.status })]
|
|
696
|
+
}), /* @__PURE__ */ j("span", {
|
|
697
697
|
className: "team-muted",
|
|
698
|
-
children: [t.find((t) => t.memberId === e.ownerMemberId)?.name || "待分派",
|
|
698
|
+
children: [t.find((t) => t.memberId === e.ownerMemberId)?.name || "待分派", h(e) ? ` · ${h(e)}` : e.dependencies.length && e.status === "blocked" ? " · 等待前置任务验收" : ""]
|
|
699
699
|
})]
|
|
700
700
|
}, e.taskId))] }, i) : null;
|
|
701
701
|
})
|
|
702
|
-
}) : /* @__PURE__ */
|
|
702
|
+
}) : /* @__PURE__ */ j("div", {
|
|
703
703
|
className: "team-panel-empty",
|
|
704
|
-
children: [/* @__PURE__ */
|
|
704
|
+
children: [/* @__PURE__ */ A("h3", { children: "尚未分派任务" }), /* @__PURE__ */ A("p", { children: "Leader 建立任务后,负责人、依赖与验收进度会出现在这里。" })]
|
|
705
705
|
});
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
let n =
|
|
709
|
-
return /* @__PURE__ */
|
|
707
|
+
function W({ artifact: e, onOpen: t }) {
|
|
708
|
+
let n = p(e.uri);
|
|
709
|
+
return /* @__PURE__ */ j("div", {
|
|
710
710
|
className: "team-artifact",
|
|
711
|
-
children: [t ? /* @__PURE__ */
|
|
711
|
+
children: [t ? /* @__PURE__ */ A("button", {
|
|
712
712
|
className: "team-text-button",
|
|
713
713
|
type: "button",
|
|
714
714
|
onClick: () => t(e),
|
|
715
715
|
children: e.name
|
|
716
|
-
}) : n ? /* @__PURE__ */
|
|
716
|
+
}) : n ? /* @__PURE__ */ A("a", {
|
|
717
717
|
href: n,
|
|
718
718
|
target: "_blank",
|
|
719
719
|
rel: "noopener noreferrer",
|
|
720
720
|
children: e.name
|
|
721
|
-
}) : /* @__PURE__ */
|
|
721
|
+
}) : /* @__PURE__ */ A("span", { children: e.name }), /* @__PURE__ */ j("small", { children: [e.mediaType, e.digest ? ` · ${e.digest.slice(0, 12)}` : ""] })]
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
let [o, s] =
|
|
724
|
+
function re({ task: e, members: t, onAction: n, onOpenArtifact: i, onMemberSelect: a }) {
|
|
725
|
+
let [o, s] = D(""), [c, l] = D(!1), [u, d] = D(""), [f, p] = D(!1), [m, g] = D(""), _ = e.attempts.find((e) => e.attemptId === o) ?? e.attempts.at(-1), y = t.find((t) => t.memberId === e.ownerMemberId);
|
|
726
726
|
async function b(t) {
|
|
727
|
-
if (!(!
|
|
728
|
-
if (t === "reject" && !
|
|
727
|
+
if (!(!n || c)) {
|
|
728
|
+
if (t === "reject" && !m.trim()) {
|
|
729
729
|
d("请填写需要修改的内容。");
|
|
730
730
|
return;
|
|
731
731
|
}
|
|
732
732
|
l(!0), d("");
|
|
733
733
|
try {
|
|
734
|
-
await
|
|
734
|
+
await n(e, t, t === "reject" ? m.trim() : void 0), p(!1);
|
|
735
735
|
} catch (e) {
|
|
736
736
|
d(e instanceof Error ? e.message : "操作失败。");
|
|
737
737
|
} finally {
|
|
@@ -739,84 +739,84 @@ function te({ task: e, members: t, onAction: r, onOpenArtifact: i, onMemberSelec
|
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
|
-
return /* @__PURE__ */
|
|
742
|
+
return /* @__PURE__ */ j("section", {
|
|
743
743
|
className: "team-task-detail",
|
|
744
744
|
children: [
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
y && /* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ A(B, { status: e.status }),
|
|
746
|
+
/* @__PURE__ */ A("h3", { children: e.title }),
|
|
747
|
+
y && /* @__PURE__ */ j("button", {
|
|
748
748
|
className: "team-member-link",
|
|
749
749
|
type: "button",
|
|
750
750
|
onClick: () => a?.(y),
|
|
751
751
|
disabled: !a,
|
|
752
752
|
children: [
|
|
753
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ A(z, { name: y.name }),
|
|
754
754
|
y.name,
|
|
755
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ A("span", { children: "查看执行" })
|
|
756
756
|
]
|
|
757
757
|
}),
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
|
|
758
|
+
/* @__PURE__ */ A("p", { children: e.description }),
|
|
759
|
+
h(e) && /* @__PURE__ */ A("p", {
|
|
760
760
|
className: "team-detail-reason",
|
|
761
|
-
children:
|
|
761
|
+
children: h(e)
|
|
762
762
|
}),
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
e.attempts.length > 1 && /* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ A("h4", { children: "验收要求" }),
|
|
764
|
+
/* @__PURE__ */ A("p", { children: e.acceptanceCriteria || "等待确定验收要求" }),
|
|
765
|
+
e.attempts.length > 1 && /* @__PURE__ */ j("label", {
|
|
766
766
|
className: "team-field",
|
|
767
|
-
children: ["执行记录", /* @__PURE__ */
|
|
768
|
-
value:
|
|
767
|
+
children: ["执行记录", /* @__PURE__ */ A("select", {
|
|
768
|
+
value: _?.attemptId,
|
|
769
769
|
onChange: (e) => s(e.target.value),
|
|
770
|
-
children: e.attempts.map((e) => /* @__PURE__ */
|
|
770
|
+
children: e.attempts.map((e) => /* @__PURE__ */ j("option", {
|
|
771
771
|
value: e.attemptId,
|
|
772
772
|
children: [
|
|
773
773
|
"第 ",
|
|
774
774
|
e.attemptNumber,
|
|
775
775
|
" 次执行 · ",
|
|
776
|
-
|
|
776
|
+
v[e.status]
|
|
777
777
|
]
|
|
778
778
|
}, e.attemptId))
|
|
779
779
|
})]
|
|
780
780
|
}),
|
|
781
|
-
|
|
782
|
-
|
|
781
|
+
_?.result && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("h4", { children: "交付结果" }), /* @__PURE__ */ A(r, { content: _.result })] }),
|
|
782
|
+
_?.artifacts.map((e) => /* @__PURE__ */ A(W, {
|
|
783
783
|
artifact: e,
|
|
784
784
|
onOpen: i
|
|
785
785
|
}, e.artifactId)),
|
|
786
|
-
f && /* @__PURE__ */
|
|
786
|
+
f && /* @__PURE__ */ j("label", {
|
|
787
787
|
className: "team-field",
|
|
788
788
|
children: [
|
|
789
789
|
"修改意见",
|
|
790
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ A("textarea", {
|
|
791
791
|
rows: 3,
|
|
792
792
|
maxLength: 2e3,
|
|
793
|
-
value:
|
|
793
|
+
value: m,
|
|
794
794
|
onChange: (e) => g(e.target.value)
|
|
795
795
|
}),
|
|
796
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ A("button", {
|
|
797
797
|
className: "team-button",
|
|
798
798
|
type: "button",
|
|
799
|
-
disabled: c || !
|
|
799
|
+
disabled: c || !m.trim(),
|
|
800
800
|
onClick: () => void b("reject"),
|
|
801
801
|
children: "提交修改意见"
|
|
802
802
|
})
|
|
803
803
|
]
|
|
804
804
|
}),
|
|
805
|
-
|
|
805
|
+
n && /* @__PURE__ */ j("div", {
|
|
806
806
|
className: "team-task-actions",
|
|
807
|
-
children: [e.status === "awaiting_acceptance" && /* @__PURE__ */
|
|
807
|
+
children: [e.status === "awaiting_acceptance" && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
|
|
808
808
|
className: "team-button team-primary",
|
|
809
809
|
type: "button",
|
|
810
810
|
disabled: c,
|
|
811
811
|
onClick: () => void b("accept"),
|
|
812
812
|
children: "验收通过"
|
|
813
|
-
}), /* @__PURE__ */
|
|
813
|
+
}), /* @__PURE__ */ A("button", {
|
|
814
814
|
className: "team-button",
|
|
815
815
|
type: "button",
|
|
816
816
|
disabled: c,
|
|
817
817
|
onClick: () => p(!0),
|
|
818
818
|
children: "提出修改"
|
|
819
|
-
})] }), ["failed", "cancelled"].includes(e.status) && /* @__PURE__ */
|
|
819
|
+
})] }), ["failed", "cancelled"].includes(e.status) && /* @__PURE__ */ A("button", {
|
|
820
820
|
className: "team-button",
|
|
821
821
|
type: "button",
|
|
822
822
|
disabled: c,
|
|
@@ -824,7 +824,7 @@ function te({ task: e, members: t, onAction: r, onOpenArtifact: i, onMemberSelec
|
|
|
824
824
|
children: "重新执行"
|
|
825
825
|
})]
|
|
826
826
|
}),
|
|
827
|
-
u && /* @__PURE__ */
|
|
827
|
+
u && /* @__PURE__ */ A("p", {
|
|
828
828
|
role: "alert",
|
|
829
829
|
className: "team-inline-error",
|
|
830
830
|
children: u
|
|
@@ -832,8 +832,8 @@ function te({ task: e, members: t, onAction: r, onOpenArtifact: i, onMemberSelec
|
|
|
832
832
|
]
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
let [i, a] =
|
|
835
|
+
function ie({ interaction: e, member: t, onRespond: r }) {
|
|
836
|
+
let [i, a] = D({}), [o, s] = D(!1), [c, l] = D(!1), [u, d] = D(""), f = E(null);
|
|
837
837
|
async function p(t, n) {
|
|
838
838
|
if (o || c) return;
|
|
839
839
|
let i = JSON.stringify([
|
|
@@ -843,7 +843,7 @@ function ne({ interaction: e, member: n, onRespond: r }) {
|
|
|
843
843
|
]);
|
|
844
844
|
f.current?.digest !== i && (f.current = {
|
|
845
845
|
digest: i,
|
|
846
|
-
idempotencyKey:
|
|
846
|
+
idempotencyKey: F()
|
|
847
847
|
}), s(!0), d("");
|
|
848
848
|
try {
|
|
849
849
|
let i = await r({
|
|
@@ -861,34 +861,34 @@ function ne({ interaction: e, member: n, onRespond: r }) {
|
|
|
861
861
|
s(!1);
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ j("article", {
|
|
865
865
|
className: "team-interaction-card",
|
|
866
866
|
children: [
|
|
867
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ j("span", {
|
|
868
868
|
className: "team-eyebrow",
|
|
869
|
-
children: [
|
|
869
|
+
children: [t?.name || "成员", " · 需要你的确认"]
|
|
870
870
|
}),
|
|
871
|
-
/* @__PURE__ */
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
c || e.status === "resolving" ? /* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ A("h3", { children: e.title }),
|
|
872
|
+
/* @__PURE__ */ A(M, { message: e.message }),
|
|
873
|
+
c || e.status === "resolving" ? /* @__PURE__ */ A("p", {
|
|
874
874
|
role: "status",
|
|
875
875
|
children: "已提交,等待执行端确认"
|
|
876
|
-
}) : e.kind === "input" && e.requestSchema ? /* @__PURE__ */
|
|
876
|
+
}) : e.kind === "input" && e.requestSchema ? /* @__PURE__ */ A(n, {
|
|
877
877
|
schema: e.requestSchema,
|
|
878
878
|
values: i,
|
|
879
879
|
onChange: a,
|
|
880
880
|
disabled: o,
|
|
881
881
|
onSubmit: () => void p("submit", i),
|
|
882
882
|
onCancel: () => void p("cancel", {})
|
|
883
|
-
}) : /* @__PURE__ */
|
|
883
|
+
}) : /* @__PURE__ */ j("div", {
|
|
884
884
|
className: "team-task-actions",
|
|
885
|
-
children: [/* @__PURE__ */
|
|
885
|
+
children: [/* @__PURE__ */ A("button", {
|
|
886
886
|
type: "button",
|
|
887
887
|
className: "team-button",
|
|
888
888
|
disabled: o,
|
|
889
889
|
onClick: () => void p("reject", { approved: !1 }),
|
|
890
890
|
children: "拒绝"
|
|
891
|
-
}), /* @__PURE__ */
|
|
891
|
+
}), /* @__PURE__ */ A("button", {
|
|
892
892
|
type: "button",
|
|
893
893
|
className: "team-button team-primary",
|
|
894
894
|
disabled: o,
|
|
@@ -896,7 +896,7 @@ function ne({ interaction: e, member: n, onRespond: r }) {
|
|
|
896
896
|
children: "同意"
|
|
897
897
|
})]
|
|
898
898
|
}),
|
|
899
|
-
u && /* @__PURE__ */
|
|
899
|
+
u && /* @__PURE__ */ A("p", {
|
|
900
900
|
role: "alert",
|
|
901
901
|
className: "team-inline-error",
|
|
902
902
|
children: u
|
|
@@ -904,29 +904,29 @@ function ne({ interaction: e, member: n, onRespond: r }) {
|
|
|
904
904
|
]
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
return /* @__PURE__ */
|
|
907
|
+
function ae({ interactions: e, members: t, onRespond: n }) {
|
|
908
|
+
return /* @__PURE__ */ A("section", {
|
|
909
909
|
className: "team-interactions",
|
|
910
910
|
"aria-label": "团队审批与待处理输入",
|
|
911
|
-
children: e.filter((e) => ["pending", "resolving"].includes(e.status)).map((e) => /* @__PURE__ */
|
|
911
|
+
children: e.filter((e) => ["pending", "resolving"].includes(e.status)).map((e) => /* @__PURE__ */ A(ie, {
|
|
912
912
|
interaction: e,
|
|
913
913
|
member: t.find((t) => t.memberId === e.ref.memberId),
|
|
914
914
|
onRespond: n
|
|
915
|
-
},
|
|
915
|
+
}, i(e.ref)))
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return /* @__PURE__ */
|
|
918
|
+
function oe({ members: e, selectedMemberId: t, onSelect: n }) {
|
|
919
|
+
return /* @__PURE__ */ A("div", {
|
|
920
920
|
className: "team-member-list",
|
|
921
|
-
children: e.filter((e) => e.status !== "removed").map((e) => /* @__PURE__ */
|
|
921
|
+
children: e.filter((e) => e.status !== "removed").map((e) => /* @__PURE__ */ j("button", {
|
|
922
922
|
type: "button",
|
|
923
923
|
className: "team-member-row",
|
|
924
924
|
onClick: () => n(e),
|
|
925
925
|
"aria-pressed": t === e.memberId,
|
|
926
926
|
children: [
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ A(z, { name: e.name }),
|
|
928
|
+
/* @__PURE__ */ j("span", { children: [/* @__PURE__ */ j("strong", { children: [e.name, /* @__PURE__ */ A("small", { children: e.role === "leader" ? "Leader" : "成员" })] }), /* @__PURE__ */ j("span", { children: [L[e.executionStatus], e.binding.kind === "local_build" ? " · 本地" : " · 云端"] })] }),
|
|
929
|
+
/* @__PURE__ */ A("span", {
|
|
930
930
|
"aria-hidden": "true",
|
|
931
931
|
children: "→"
|
|
932
932
|
})
|
|
@@ -934,33 +934,33 @@ function ie({ members: e, selectedMemberId: t, onSelect: n }) {
|
|
|
934
934
|
}, e.memberId))
|
|
935
935
|
});
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
return /* @__PURE__ */
|
|
937
|
+
function G({ member: e, observation: t, onDirectedMessage: n, onRetry: i, onCancel: a, cancelPending: o = !1, cancelBusy: s = !1 }) {
|
|
938
|
+
return /* @__PURE__ */ j("section", {
|
|
939
939
|
className: "team-member-inspector",
|
|
940
940
|
children: [
|
|
941
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ j("div", {
|
|
942
942
|
className: "team-member-heading",
|
|
943
|
-
children: [/* @__PURE__ */
|
|
943
|
+
children: [/* @__PURE__ */ A(z, { name: e.name }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h3", { children: e.name }), /* @__PURE__ */ j("span", {
|
|
944
944
|
className: "team-muted",
|
|
945
945
|
children: [
|
|
946
946
|
e.role === "leader" ? "Leader" : "成员",
|
|
947
947
|
" · ",
|
|
948
|
-
|
|
948
|
+
L[e.executionStatus]
|
|
949
949
|
]
|
|
950
950
|
})] })]
|
|
951
951
|
}),
|
|
952
|
-
e.responsibility && /* @__PURE__ */
|
|
952
|
+
e.responsibility && /* @__PURE__ */ A("p", {
|
|
953
953
|
className: "team-member-responsibility",
|
|
954
954
|
children: e.responsibility
|
|
955
955
|
}),
|
|
956
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ j("div", {
|
|
957
957
|
className: "team-member-actions",
|
|
958
|
-
children: [
|
|
958
|
+
children: [n && /* @__PURE__ */ A("button", {
|
|
959
959
|
className: "team-button",
|
|
960
960
|
type: "button",
|
|
961
|
-
onClick:
|
|
961
|
+
onClick: n,
|
|
962
962
|
children: "在群内 @成员"
|
|
963
|
-
}), a && e.binding.capabilities.cancel && e.activeRunId && /* @__PURE__ */
|
|
963
|
+
}), a && e.binding.capabilities.cancel && e.activeRunId && /* @__PURE__ */ A("button", {
|
|
964
964
|
className: "team-button",
|
|
965
965
|
type: "button",
|
|
966
966
|
disabled: o || s,
|
|
@@ -968,75 +968,75 @@ function K({ member: e, observation: t, onDirectedMessage: r, onRetry: i, onCanc
|
|
|
968
968
|
children: s ? "正在提交…" : o ? "已请求停止" : "请求停止此执行"
|
|
969
969
|
})]
|
|
970
970
|
}),
|
|
971
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ A("p", {
|
|
972
972
|
className: "team-observer-note",
|
|
973
973
|
children: "执行详情只读。关闭面板不会停止成员。"
|
|
974
974
|
}),
|
|
975
|
-
t ? /* @__PURE__ */
|
|
976
|
-
/* @__PURE__ */
|
|
975
|
+
t ? /* @__PURE__ */ j(k, { children: [
|
|
976
|
+
/* @__PURE__ */ A("span", {
|
|
977
977
|
className: "team-connection",
|
|
978
978
|
role: "status",
|
|
979
|
-
children:
|
|
979
|
+
children: R[t.connection]
|
|
980
980
|
}),
|
|
981
|
-
t.error && /* @__PURE__ */
|
|
981
|
+
t.error && /* @__PURE__ */ A("p", {
|
|
982
982
|
role: "alert",
|
|
983
983
|
className: "team-inline-error",
|
|
984
984
|
children: t.error
|
|
985
985
|
}),
|
|
986
|
-
t.connection === "offline" && i && /* @__PURE__ */
|
|
986
|
+
t.connection === "offline" && i && /* @__PURE__ */ A("button", {
|
|
987
987
|
className: "team-button",
|
|
988
988
|
type: "button",
|
|
989
989
|
onClick: i,
|
|
990
990
|
children: "重新连接"
|
|
991
991
|
}),
|
|
992
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ A("div", {
|
|
993
993
|
className: "team-member-transcript",
|
|
994
|
-
children: t.items.filter((e) => e.visibility === "public" && !(e.kind === "progress" && Object.keys(e.payload).length === 0)).map((e) => /* @__PURE__ */
|
|
994
|
+
children: t.items.filter((e) => e.visibility === "public" && !(e.kind === "progress" && Object.keys(e.payload).length === 0)).map((e) => /* @__PURE__ */ j("article", {
|
|
995
995
|
className: "team-observer-item",
|
|
996
|
-
children: [/* @__PURE__ */
|
|
996
|
+
children: [/* @__PURE__ */ A("span", {
|
|
997
997
|
className: "team-eyebrow",
|
|
998
998
|
children: e.kind === "assistant_text" ? "回复" : e.kind === "user_message" ? "输入" : e.kind === "tool_call" ? "工具调用" : e.kind === "reasoning" ? "执行思考" : e.kind
|
|
999
|
-
}), typeof e.payload.text == "string" ? /* @__PURE__ */
|
|
999
|
+
}), typeof e.payload.text == "string" ? /* @__PURE__ */ A(r, { content: e.payload.text }) : typeof e.payload.error == "string" ? /* @__PURE__ */ A("p", {
|
|
1000
1000
|
className: "team-inline-error",
|
|
1001
1001
|
children: e.payload.error
|
|
1002
|
-
}) : /* @__PURE__ */
|
|
1002
|
+
}) : /* @__PURE__ */ j("details", {
|
|
1003
1003
|
className: "team-observer-details",
|
|
1004
|
-
children: [/* @__PURE__ */
|
|
1004
|
+
children: [/* @__PURE__ */ A("summary", { children: String(e.payload.tool || e.payload.summary || e.payload.title || (e.kind === "tool_call" ? "查看工具结果" : "查看事件详情")) }), /* @__PURE__ */ A("pre", { children: JSON.stringify(e.payload, null, 2) })]
|
|
1005
1005
|
})]
|
|
1006
1006
|
}, e.itemId))
|
|
1007
1007
|
}),
|
|
1008
|
-
!t.items.length && /* @__PURE__ */
|
|
1008
|
+
!t.items.length && /* @__PURE__ */ A("p", {
|
|
1009
1009
|
className: "team-muted",
|
|
1010
1010
|
children: "尚无可展示的运行事件。"
|
|
1011
1011
|
})
|
|
1012
|
-
] }) : /* @__PURE__ */
|
|
1012
|
+
] }) : /* @__PURE__ */ A("p", {
|
|
1013
1013
|
className: "team-muted",
|
|
1014
1014
|
children: e.activeRunId ? "正在读取执行详情…" : "当前没有进行中的执行。"
|
|
1015
1015
|
})
|
|
1016
1016
|
]
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1020
|
-
return e.snapshot ? /* @__PURE__ */
|
|
1019
|
+
function se(e) {
|
|
1020
|
+
return e.snapshot ? /* @__PURE__ */ A(K, {
|
|
1021
1021
|
...e,
|
|
1022
1022
|
snapshot: e.snapshot
|
|
1023
|
-
}, `${e.snapshot.group.authorityRef}:${e.snapshot.group.groupId}`) : /* @__PURE__ */
|
|
1023
|
+
}, `${e.snapshot.group.authorityRef}:${e.snapshot.group.groupId}`) : /* @__PURE__ */ A("section", {
|
|
1024
1024
|
className: "ksadk-teams team-workspace",
|
|
1025
|
-
children: e.loading ? /* @__PURE__ */
|
|
1025
|
+
children: e.loading ? /* @__PURE__ */ j("div", {
|
|
1026
1026
|
className: "team-loading",
|
|
1027
1027
|
role: "status",
|
|
1028
1028
|
"aria-label": "正在加载群组",
|
|
1029
1029
|
children: [
|
|
1030
|
-
/* @__PURE__ */
|
|
1031
|
-
/* @__PURE__ */
|
|
1032
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ A("span", {}),
|
|
1031
|
+
/* @__PURE__ */ A("span", {}),
|
|
1032
|
+
/* @__PURE__ */ A("span", {})
|
|
1033
1033
|
]
|
|
1034
|
-
}) : /* @__PURE__ */
|
|
1034
|
+
}) : /* @__PURE__ */ j("div", {
|
|
1035
1035
|
className: "team-empty",
|
|
1036
1036
|
children: [
|
|
1037
|
-
/* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
e.onRetry && /* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ A("h2", { children: e.error ? "群组暂不可用" : "选择一个团队,开始协作" }),
|
|
1038
|
+
/* @__PURE__ */ A("p", { children: e.error || "创建群组并选择 Leader,让各有所长的 Agent 共同完成目标。" }),
|
|
1039
|
+
e.onRetry && /* @__PURE__ */ A("button", {
|
|
1040
1040
|
type: "button",
|
|
1041
1041
|
className: "team-button",
|
|
1042
1042
|
onClick: e.onRetry,
|
|
@@ -1046,210 +1046,210 @@ function ae(e) {
|
|
|
1046
1046
|
})
|
|
1047
1047
|
});
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1050
|
-
let [I, L] =
|
|
1049
|
+
function K({ snapshot: e, connection: t = "connected", draft: n, onDraftChange: i, initialDrafts: a, initialSelection: o, onSelectionChange: s, onSend: c, onRetry: l, error: u, onManage: d, serverAuthority: f, standbyCandidates: p, onConfigureStandby: h, onLoadReconciliation: v, onReconcile: b, onControl: x, onAcceptRun: C, onTaskAction: w, onRespondInteraction: T, onOpenArtifact: O, onMemberSelect: M, renderMember: P, onLoadExecution: F }) {
|
|
1050
|
+
let [I, L] = D(a?.[o?.teamRunId || m(e)?.teamRunId || ""] || ""), [R, z] = D(""), [ie, se] = D(0), [K, q] = D(null), [J, Y] = D(!1), [ue, de] = D(o?.taskId ?? ""), [X, fe] = D(o?.teamRunId || m(e)?.teamRunId || ""), [pe, me] = D(!1), [he, ge] = D(""), [_e, ve] = D(), [Z, ye] = D(!1), [be, xe] = D(""), [Se, Ce] = D(!1), [we, Te] = D(""), Ee = E(null), De = E(null), Q = E(new Map(Object.entries(a || {}).map(([e, t]) => [e, {
|
|
1051
1051
|
text: t,
|
|
1052
1052
|
recipient: ""
|
|
1053
|
-
}]))), $ = e.teamRuns.find((e) => e.teamRunId ===
|
|
1054
|
-
|
|
1055
|
-
$ &&
|
|
1053
|
+
}]))), $ = e.teamRuns.find((e) => e.teamRunId === X) ?? null, Oe = !!(X && !$), ke = e.tasks.filter((e) => e.teamRunId === $?.teamRunId);
|
|
1054
|
+
S(() => {
|
|
1055
|
+
$ && me(!1);
|
|
1056
1056
|
}, [$]);
|
|
1057
|
-
let Ae = $ ? e.runMembers?.filter((e) => e.teamRunId === $.teamRunId) : void 0, je = $ && e.runMembers ? Ae || [] : e.members.filter((e) => e.status !== "removed"), Me = ke.find((e) => e.taskId ===
|
|
1057
|
+
let Ae = $ ? e.runMembers?.filter((e) => e.teamRunId === $.teamRunId) : void 0, je = $ && e.runMembers ? Ae || [] : e.members.filter((e) => e.status !== "removed"), Me = ke.find((e) => e.taskId === ue), Ne = je.find((e) => e.memberId === he), Pe = [...e.deliveries.filter((e) => e.teamRunId === $?.teamRunId).map((e) => e.runId), ...ke.flatMap((e) => e.attempts.map((e) => e.source?.runId))].filter(Boolean), Fe = !e.runMembers && e.teamRuns.length === 1, Ie = (e) => !!($ && (Pe.includes(e.runId) || Ae?.some((t) => t.sessionId === e.sessionId) || Fe && je.some((t) => t.sessionId === e.sessionId))), Le = e.interactions.filter((e) => Ie(e.ref)), Re = [...new Map([...(e.artifacts || []).filter((e) => Ie(e.source)), ...ke.flatMap((e) => e.attempts.flatMap((e) => e.artifacts))].filter((t) => t.source.groupId === e.group.groupId && t.source.authorityRef === e.group.authorityRef).map((e) => [e.artifactId, e])).values()], ze = Le.filter((e) => e.status === "pending").length + (($?.policy || e.group.policy)?.taskAcceptance === "leader" ? 0 : ke.filter((e) => _(e) === "attention").length), Be = n ?? I;
|
|
1058
1058
|
function Ve(e) {
|
|
1059
|
-
L(e), i?.(e,
|
|
1059
|
+
L(e), i?.(e, X), Q.current.set(X, {
|
|
1060
1060
|
text: e,
|
|
1061
1061
|
recipient: R
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
1064
|
function He(e) {
|
|
1065
|
-
|
|
1065
|
+
Q.current.set(X, {
|
|
1066
1066
|
text: Be,
|
|
1067
1067
|
recipient: R
|
|
1068
1068
|
});
|
|
1069
|
-
let t =
|
|
1070
|
-
|
|
1069
|
+
let t = Q.current.get(e);
|
|
1070
|
+
fe(e), me(!1), de(""), ge(""), ve(void 0), z(t?.recipient || ""), L(t?.text || ""), i?.(t?.text || "", e), xe(""), Ce(!1), Te(""), Y(!1), s?.({
|
|
1071
1071
|
teamRunId: e,
|
|
1072
1072
|
taskId: ""
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
1075
|
function Ue(e) {
|
|
1076
|
-
|
|
1076
|
+
de(e), s?.({
|
|
1077
1077
|
teamRunId: $?.teamRunId ?? "",
|
|
1078
1078
|
taskId: e
|
|
1079
1079
|
});
|
|
1080
1080
|
}
|
|
1081
1081
|
function We(e) {
|
|
1082
|
-
|
|
1082
|
+
De.current = document.activeElement, q(e), ge("");
|
|
1083
1083
|
}
|
|
1084
1084
|
function Ge() {
|
|
1085
|
-
|
|
1085
|
+
q(null), Y(!1), De.current?.focus();
|
|
1086
1086
|
}
|
|
1087
1087
|
function Ke(e) {
|
|
1088
|
-
|
|
1088
|
+
z(e.memberId), q(null), Y(!1), se((e) => e + 1);
|
|
1089
1089
|
}
|
|
1090
1090
|
function qe(e) {
|
|
1091
|
-
|
|
1091
|
+
ve(void 0), ge(e.memberId), q("members"), M?.(e);
|
|
1092
1092
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}, [
|
|
1093
|
+
S(() => {
|
|
1094
|
+
K && Ee.current?.focus();
|
|
1095
|
+
}, [K]);
|
|
1096
1096
|
async function Je(e) {
|
|
1097
|
-
if (!(!$ || !
|
|
1098
|
-
|
|
1097
|
+
if (!(!$ || !x || Z)) {
|
|
1098
|
+
ye(!0), xe("");
|
|
1099
1099
|
try {
|
|
1100
|
-
await
|
|
1100
|
+
await x($, e);
|
|
1101
1101
|
} catch (e) {
|
|
1102
|
-
|
|
1102
|
+
xe(e instanceof Error ? e.message : "操作失败。");
|
|
1103
1103
|
} finally {
|
|
1104
|
-
|
|
1104
|
+
ye(!1);
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
1108
|
async function Ye(e) {
|
|
1109
|
-
if (!(!$ || !C ||
|
|
1110
|
-
if (!e && !
|
|
1111
|
-
|
|
1109
|
+
if (!(!$ || !C || Z)) {
|
|
1110
|
+
if (!e && !we.trim()) {
|
|
1111
|
+
xe("请说明需要修改的内容。");
|
|
1112
1112
|
return;
|
|
1113
1113
|
}
|
|
1114
|
-
|
|
1114
|
+
ye(!0), xe("");
|
|
1115
1115
|
try {
|
|
1116
|
-
await C($, e, e ? void 0 :
|
|
1116
|
+
await C($, e, e ? void 0 : we.trim()), Ce(!1), Te("");
|
|
1117
1117
|
} catch (e) {
|
|
1118
|
-
|
|
1118
|
+
xe(e instanceof Error ? e.message : "验收提交失败。");
|
|
1119
1119
|
} finally {
|
|
1120
|
-
|
|
1120
|
+
ye(!1);
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
async function Xe(e) {
|
|
1125
1125
|
let t = await c(e);
|
|
1126
|
-
return t?.teamRunId && !e.teamRunId && ["accepted", "duplicate"].includes(t.status) && (
|
|
1126
|
+
return t?.teamRunId && !e.teamRunId && ["accepted", "duplicate"].includes(t.status) && (Q.current.set("", {
|
|
1127
1127
|
text: "",
|
|
1128
1128
|
recipient: ""
|
|
1129
|
-
}),
|
|
1129
|
+
}), fe(t.teamRunId), me(!0), L(""), i?.("", ""), z(""), s?.({
|
|
1130
1130
|
teamRunId: t.teamRunId,
|
|
1131
1131
|
taskId: ""
|
|
1132
1132
|
})), t;
|
|
1133
1133
|
}
|
|
1134
|
-
let Ze = $?.status === "awaiting_acceptance" && C && /* @__PURE__ */
|
|
1134
|
+
let Ze = $?.status === "awaiting_acceptance" && C && /* @__PURE__ */ j("section", {
|
|
1135
1135
|
className: "team-final-delivery",
|
|
1136
1136
|
"aria-label": "最终验收",
|
|
1137
1137
|
children: [
|
|
1138
|
-
/* @__PURE__ */
|
|
1138
|
+
/* @__PURE__ */ A("span", {
|
|
1139
1139
|
className: "team-eyebrow",
|
|
1140
1140
|
children: "团队已提交成果"
|
|
1141
1141
|
}),
|
|
1142
|
-
/* @__PURE__ */
|
|
1143
|
-
$.result && /* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ A("h3", { children: "请确认这次交付" }),
|
|
1143
|
+
$.result && /* @__PURE__ */ A("div", {
|
|
1144
1144
|
className: "team-final-summary",
|
|
1145
|
-
children: /* @__PURE__ */
|
|
1145
|
+
children: /* @__PURE__ */ A(r, { content: $.result })
|
|
1146
1146
|
}),
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
|
|
1147
|
+
/* @__PURE__ */ A("p", { children: "验收通过后完成任务;提出修改会交给 Leader 继续推进。" }),
|
|
1148
|
+
Se && /* @__PURE__ */ j("label", {
|
|
1149
1149
|
className: "team-field",
|
|
1150
|
-
children: ["修改意见", /* @__PURE__ */
|
|
1151
|
-
value:
|
|
1152
|
-
onChange: (e) =>
|
|
1150
|
+
children: ["修改意见", /* @__PURE__ */ A("textarea", {
|
|
1151
|
+
value: we,
|
|
1152
|
+
onChange: (e) => Te(e.target.value),
|
|
1153
1153
|
placeholder: "哪些内容需要调整?期望是什么?",
|
|
1154
1154
|
rows: 3,
|
|
1155
1155
|
maxLength: 2e3,
|
|
1156
|
-
disabled:
|
|
1156
|
+
disabled: Z
|
|
1157
1157
|
})]
|
|
1158
1158
|
}),
|
|
1159
|
-
/* @__PURE__ */
|
|
1159
|
+
/* @__PURE__ */ A("div", {
|
|
1160
1160
|
className: "team-task-actions",
|
|
1161
|
-
children:
|
|
1161
|
+
children: Se ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
|
|
1162
1162
|
className: "team-button",
|
|
1163
1163
|
type: "button",
|
|
1164
|
-
disabled:
|
|
1165
|
-
onClick: () =>
|
|
1164
|
+
disabled: Z,
|
|
1165
|
+
onClick: () => Ce(!1),
|
|
1166
1166
|
children: "取消修改"
|
|
1167
|
-
}), /* @__PURE__ */
|
|
1167
|
+
}), /* @__PURE__ */ A("button", {
|
|
1168
1168
|
className: "team-button team-primary",
|
|
1169
1169
|
type: "button",
|
|
1170
|
-
disabled:
|
|
1170
|
+
disabled: Z || !we.trim(),
|
|
1171
1171
|
onClick: () => void Ye(!1),
|
|
1172
1172
|
children: "提交修改意见"
|
|
1173
|
-
})] }) : /* @__PURE__ */
|
|
1173
|
+
})] }) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
|
|
1174
1174
|
className: "team-button",
|
|
1175
1175
|
type: "button",
|
|
1176
|
-
disabled:
|
|
1177
|
-
onClick: () =>
|
|
1176
|
+
disabled: Z,
|
|
1177
|
+
onClick: () => Ce(!0),
|
|
1178
1178
|
children: "提出修改"
|
|
1179
|
-
}), /* @__PURE__ */
|
|
1179
|
+
}), /* @__PURE__ */ A("button", {
|
|
1180
1180
|
className: "team-button team-primary",
|
|
1181
1181
|
type: "button",
|
|
1182
|
-
disabled:
|
|
1182
|
+
disabled: Z,
|
|
1183
1183
|
onClick: () => void Ye(!0),
|
|
1184
1184
|
children: "通过验收"
|
|
1185
1185
|
})] })
|
|
1186
1186
|
}),
|
|
1187
|
-
|
|
1187
|
+
be && /* @__PURE__ */ A("p", {
|
|
1188
1188
|
role: "alert",
|
|
1189
1189
|
className: "team-inline-error",
|
|
1190
|
-
children:
|
|
1190
|
+
children: be
|
|
1191
1191
|
})
|
|
1192
1192
|
]
|
|
1193
1193
|
});
|
|
1194
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ j("section", {
|
|
1195
1195
|
className: "ksadk-teams team-workspace",
|
|
1196
|
-
"data-panel":
|
|
1197
|
-
"data-execution":
|
|
1196
|
+
"data-panel": K || "closed",
|
|
1197
|
+
"data-execution": J ? "open" : "closed",
|
|
1198
1198
|
children: [
|
|
1199
|
-
/* @__PURE__ */
|
|
1199
|
+
/* @__PURE__ */ A(H, {
|
|
1200
1200
|
snapshot: e,
|
|
1201
1201
|
connection: t,
|
|
1202
1202
|
onProgress: () => We("tasks"),
|
|
1203
1203
|
onMembers: () => We("members"),
|
|
1204
1204
|
onManage: d
|
|
1205
1205
|
}),
|
|
1206
|
-
u && /* @__PURE__ */
|
|
1206
|
+
u && /* @__PURE__ */ j("div", {
|
|
1207
1207
|
className: "team-top-error",
|
|
1208
1208
|
role: "alert",
|
|
1209
|
-
children: [u, l && /* @__PURE__ */
|
|
1209
|
+
children: [u, l && /* @__PURE__ */ A("button", {
|
|
1210
1210
|
className: "team-text-button",
|
|
1211
1211
|
type: "button",
|
|
1212
1212
|
onClick: l,
|
|
1213
1213
|
children: "重新连接"
|
|
1214
1214
|
})]
|
|
1215
1215
|
}),
|
|
1216
|
-
/* @__PURE__ */
|
|
1216
|
+
/* @__PURE__ */ j("div", {
|
|
1217
1217
|
className: "team-body",
|
|
1218
1218
|
children: [
|
|
1219
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ j("nav", {
|
|
1220
1220
|
className: "team-run-directory",
|
|
1221
1221
|
"aria-label": "团队任务",
|
|
1222
|
-
children: [/* @__PURE__ */
|
|
1222
|
+
children: [/* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("h2", { children: "任务" }), /* @__PURE__ */ A("button", {
|
|
1223
1223
|
type: "button",
|
|
1224
1224
|
className: "team-text-button",
|
|
1225
1225
|
onClick: () => {
|
|
1226
|
-
He(""),
|
|
1226
|
+
He(""), se((e) => e + 1);
|
|
1227
1227
|
},
|
|
1228
1228
|
children: "+ 新任务"
|
|
1229
|
-
})] }), /* @__PURE__ */
|
|
1229
|
+
})] }), /* @__PURE__ */ j("div", {
|
|
1230
1230
|
className: "team-run-list",
|
|
1231
|
-
children: [[...e.teamRuns].reverse().map((e) => /* @__PURE__ */
|
|
1231
|
+
children: [[...e.teamRuns].reverse().map((e) => /* @__PURE__ */ j("button", {
|
|
1232
1232
|
type: "button",
|
|
1233
1233
|
className: "team-run-item",
|
|
1234
|
-
"aria-current": e.teamRunId ===
|
|
1234
|
+
"aria-current": e.teamRunId === X ? "page" : void 0,
|
|
1235
1235
|
onClick: () => He(e.teamRunId),
|
|
1236
|
-
children: [/* @__PURE__ */
|
|
1237
|
-
}, e.teamRunId)), !e.teamRuns.length && /* @__PURE__ */
|
|
1236
|
+
children: [/* @__PURE__ */ A("strong", { children: e.goal }), /* @__PURE__ */ A(B, { status: e.status })]
|
|
1237
|
+
}, e.teamRunId)), !e.teamRuns.length && /* @__PURE__ */ A("p", {
|
|
1238
1238
|
className: "team-muted",
|
|
1239
1239
|
children: "每个目标是一个独立任务。"
|
|
1240
1240
|
})]
|
|
1241
1241
|
})]
|
|
1242
1242
|
}),
|
|
1243
|
-
/* @__PURE__ */
|
|
1243
|
+
/* @__PURE__ */ j("div", {
|
|
1244
1244
|
className: "team-chat-pane",
|
|
1245
|
-
"aria-hidden":
|
|
1245
|
+
"aria-hidden": J || void 0,
|
|
1246
1246
|
children: [
|
|
1247
|
-
/* @__PURE__ */
|
|
1247
|
+
/* @__PURE__ */ j("header", {
|
|
1248
1248
|
className: "team-task-heading",
|
|
1249
|
-
children: [/* @__PURE__ */
|
|
1249
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("span", {
|
|
1250
1250
|
className: "team-eyebrow",
|
|
1251
1251
|
children: $ ? "当前任务" : "新的目标"
|
|
1252
|
-
}), /* @__PURE__ */
|
|
1252
|
+
}), /* @__PURE__ */ A("h2", { children: $?.goal || (Oe ? pe ? "正在同步任务…" : "未找到所选任务" : "希望团队完成什么?") })] }), /* @__PURE__ */ A("button", {
|
|
1253
1253
|
type: "button",
|
|
1254
1254
|
className: "team-button",
|
|
1255
1255
|
"aria-label": "查看任务详情",
|
|
@@ -1257,25 +1257,25 @@ function oe({ snapshot: e, connection: t = "connected", draft: r, onDraftChange:
|
|
|
1257
1257
|
children: "详情"
|
|
1258
1258
|
})]
|
|
1259
1259
|
}),
|
|
1260
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ j("label", {
|
|
1261
1261
|
className: "team-mobile-task-picker team-field",
|
|
1262
|
-
children: ["切换任务", /* @__PURE__ */
|
|
1263
|
-
value:
|
|
1262
|
+
children: ["切换任务", /* @__PURE__ */ j("select", {
|
|
1263
|
+
value: X,
|
|
1264
1264
|
onChange: (e) => He(e.target.value),
|
|
1265
|
-
children: [/* @__PURE__ */
|
|
1265
|
+
children: [/* @__PURE__ */ A("option", {
|
|
1266
1266
|
value: "",
|
|
1267
1267
|
children: "+ 新任务"
|
|
1268
|
-
}), e.teamRuns.map((e) => /* @__PURE__ */
|
|
1268
|
+
}), e.teamRuns.map((e) => /* @__PURE__ */ A("option", {
|
|
1269
1269
|
value: e.teamRunId,
|
|
1270
1270
|
children: e.goal
|
|
1271
1271
|
}, e.teamRunId))]
|
|
1272
1272
|
})]
|
|
1273
1273
|
}),
|
|
1274
|
-
/* @__PURE__ */
|
|
1275
|
-
emptyState: Oe ? /* @__PURE__ */
|
|
1274
|
+
/* @__PURE__ */ j(U, {
|
|
1275
|
+
emptyState: Oe ? /* @__PURE__ */ j("div", {
|
|
1276
1276
|
className: "team-empty",
|
|
1277
1277
|
role: "status",
|
|
1278
|
-
children: [/* @__PURE__ */
|
|
1278
|
+
children: [/* @__PURE__ */ A("p", { children: pe ? "正在读取刚创建的任务,消息已提交。" : "请从任务列表重新选择;当前输入不会发送到其他任务。" }), l && /* @__PURE__ */ A("button", {
|
|
1279
1279
|
className: "team-button",
|
|
1280
1280
|
type: "button",
|
|
1281
1281
|
onClick: l,
|
|
@@ -1284,34 +1284,34 @@ function oe({ snapshot: e, connection: t = "connected", draft: r, onDraftChange:
|
|
|
1284
1284
|
}) : void 0,
|
|
1285
1285
|
focusFinalDelivery: Ze ? $?.teamRunId : void 0,
|
|
1286
1286
|
messages: e.messages.filter((e) => $ ? e.teamRunId === $.teamRunId || Fe && !e.teamRunId : !1),
|
|
1287
|
-
children: [$ && /* @__PURE__ */
|
|
1287
|
+
children: [$ && /* @__PURE__ */ A(ee, {
|
|
1288
1288
|
compact: !0,
|
|
1289
1289
|
run: $,
|
|
1290
1290
|
tasks: ke,
|
|
1291
1291
|
pendingCount: ze,
|
|
1292
1292
|
onOpen: () => We("tasks")
|
|
1293
1293
|
}), Ze]
|
|
1294
|
-
},
|
|
1295
|
-
ze > 0 && /* @__PURE__ */
|
|
1294
|
+
}, X),
|
|
1295
|
+
ze > 0 && /* @__PURE__ */ j("button", {
|
|
1296
1296
|
type: "button",
|
|
1297
1297
|
className: "team-attention-banner",
|
|
1298
1298
|
onClick: () => We("tasks"),
|
|
1299
1299
|
children: [
|
|
1300
1300
|
ze,
|
|
1301
1301
|
" 项需要处理 ",
|
|
1302
|
-
/* @__PURE__ */
|
|
1302
|
+
/* @__PURE__ */ j("span", { children: ["查看 ", /* @__PURE__ */ A("span", {
|
|
1303
1303
|
"aria-hidden": "true",
|
|
1304
1304
|
children: "→"
|
|
1305
1305
|
})] })
|
|
1306
1306
|
]
|
|
1307
1307
|
}),
|
|
1308
|
-
/* @__PURE__ */
|
|
1308
|
+
/* @__PURE__ */ A(te, {
|
|
1309
1309
|
serverAuthority: f,
|
|
1310
1310
|
referenceArtifacts: [...new Map([...e.artifacts || [], ...e.tasks.flatMap((e) => e.attempts.flatMap((e) => e.artifacts))].filter((t) => t.source.groupId === e.group.groupId && t.source.authorityRef === e.group.authorityRef).map((e) => [e.artifactId, e])).values()],
|
|
1311
1311
|
artifacts: Re,
|
|
1312
1312
|
recipientMemberId: R,
|
|
1313
|
-
onRecipientChange:
|
|
1314
|
-
focusRequest:
|
|
1313
|
+
onRecipientChange: z,
|
|
1314
|
+
focusRequest: ie,
|
|
1315
1315
|
members: je,
|
|
1316
1316
|
activeRun: $,
|
|
1317
1317
|
value: Be,
|
|
@@ -1321,31 +1321,31 @@ function oe({ snapshot: e, connection: t = "connected", draft: r, onDraftChange:
|
|
|
1321
1321
|
})
|
|
1322
1322
|
]
|
|
1323
1323
|
}),
|
|
1324
|
-
|
|
1324
|
+
K && /* @__PURE__ */ j("aside", {
|
|
1325
1325
|
className: "team-sidepanel",
|
|
1326
|
-
ref:
|
|
1326
|
+
ref: Ee,
|
|
1327
1327
|
tabIndex: -1,
|
|
1328
1328
|
"aria-label": "任务详情",
|
|
1329
1329
|
onKeyDown: (e) => {
|
|
1330
1330
|
e.key === "Escape" && (e.stopPropagation(), Ge());
|
|
1331
1331
|
},
|
|
1332
1332
|
children: [
|
|
1333
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ j("header", {
|
|
1334
1334
|
className: "team-panel-header",
|
|
1335
|
-
children: [/* @__PURE__ */
|
|
1335
|
+
children: [/* @__PURE__ */ A("nav", {
|
|
1336
1336
|
className: "team-detail-tabs",
|
|
1337
1337
|
"aria-label": "任务详情分类",
|
|
1338
1338
|
children: [
|
|
1339
1339
|
["tasks", "进度"],
|
|
1340
1340
|
["members", "成员"],
|
|
1341
1341
|
["artifacts", "交付物"]
|
|
1342
|
-
].map(([e, t]) => /* @__PURE__ */
|
|
1342
|
+
].map(([e, t]) => /* @__PURE__ */ A("button", {
|
|
1343
1343
|
type: "button",
|
|
1344
|
-
"aria-pressed":
|
|
1344
|
+
"aria-pressed": K === e,
|
|
1345
1345
|
onClick: () => We(e),
|
|
1346
1346
|
children: t
|
|
1347
1347
|
}, e))
|
|
1348
|
-
}), /* @__PURE__ */
|
|
1348
|
+
}), /* @__PURE__ */ A("button", {
|
|
1349
1349
|
type: "button",
|
|
1350
1350
|
className: "team-button team-icon-button",
|
|
1351
1351
|
"aria-label": "关闭详情",
|
|
@@ -1353,125 +1353,125 @@ function oe({ snapshot: e, connection: t = "connected", draft: r, onDraftChange:
|
|
|
1353
1353
|
children: "×"
|
|
1354
1354
|
})]
|
|
1355
1355
|
}),
|
|
1356
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ A("div", {
|
|
1357
1357
|
className: "team-panel-scroll",
|
|
1358
|
-
children:
|
|
1359
|
-
$ && /* @__PURE__ */
|
|
1358
|
+
children: K === "tasks" ? /* @__PURE__ */ j(k, { children: [
|
|
1359
|
+
$ && /* @__PURE__ */ j("div", {
|
|
1360
1360
|
className: "team-run-overview",
|
|
1361
1361
|
children: [
|
|
1362
|
-
/* @__PURE__ */
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
-
$.reason && /* @__PURE__ */
|
|
1365
|
-
|
|
1362
|
+
/* @__PURE__ */ A(B, { status: $.status }),
|
|
1363
|
+
/* @__PURE__ */ A(V, { goal: $.goal }),
|
|
1364
|
+
$.reason && /* @__PURE__ */ A("p", { children: $.reason }),
|
|
1365
|
+
x && g($.status) && /* @__PURE__ */ j("div", {
|
|
1366
1366
|
className: "team-run-actions",
|
|
1367
|
-
children: [/* @__PURE__ */
|
|
1367
|
+
children: [/* @__PURE__ */ A("button", {
|
|
1368
1368
|
className: "team-text-button",
|
|
1369
1369
|
type: "button",
|
|
1370
|
-
disabled:
|
|
1370
|
+
disabled: Z || $.status === "cancel_requested",
|
|
1371
1371
|
onClick: () => void Je($.dispatchSuspended ? "resume_dispatch" : "suspend_dispatch"),
|
|
1372
1372
|
children: $.dispatchSuspended ? "继续协作" : "暂停派发"
|
|
1373
|
-
}), /* @__PURE__ */
|
|
1373
|
+
}), /* @__PURE__ */ A("button", {
|
|
1374
1374
|
className: "team-text-button team-danger",
|
|
1375
1375
|
type: "button",
|
|
1376
|
-
disabled:
|
|
1376
|
+
disabled: Z || $.status === "cancel_requested",
|
|
1377
1377
|
onClick: () => void Je("stop"),
|
|
1378
1378
|
children: "停止任务"
|
|
1379
1379
|
})]
|
|
1380
1380
|
}),
|
|
1381
|
-
|
|
1381
|
+
be && !Ze && /* @__PURE__ */ A("p", {
|
|
1382
1382
|
role: "alert",
|
|
1383
1383
|
className: "team-inline-error",
|
|
1384
|
-
children:
|
|
1384
|
+
children: be
|
|
1385
1385
|
}),
|
|
1386
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ A(ce, {
|
|
1387
1387
|
run: $,
|
|
1388
1388
|
enabled: f,
|
|
1389
|
-
candidates:
|
|
1390
|
-
configure:
|
|
1389
|
+
candidates: p || [],
|
|
1390
|
+
configure: h
|
|
1391
1391
|
}),
|
|
1392
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ A(N, {
|
|
1393
1393
|
run: $,
|
|
1394
|
-
onLoadReconciliation:
|
|
1394
|
+
onLoadReconciliation: v,
|
|
1395
1395
|
onReconcile: b
|
|
1396
1396
|
}, $.teamRunId),
|
|
1397
|
-
/* @__PURE__ */
|
|
1397
|
+
/* @__PURE__ */ j("details", {
|
|
1398
1398
|
className: "team-run-budget",
|
|
1399
|
-
children: [/* @__PURE__ */
|
|
1400
|
-
/* @__PURE__ */
|
|
1399
|
+
children: [/* @__PURE__ */ A("summary", { children: "执行限额" }), /* @__PURE__ */ j("dl", { children: [
|
|
1400
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "累计启动" }), /* @__PURE__ */ j("dd", { children: [
|
|
1401
1401
|
$.budget.startsUsed,
|
|
1402
1402
|
" / ",
|
|
1403
1403
|
$.budget.maxStarts
|
|
1404
1404
|
] })] }),
|
|
1405
|
-
/* @__PURE__ */
|
|
1405
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "同时执行" }), /* @__PURE__ */ j("dd", { children: [
|
|
1406
1406
|
"最多 ",
|
|
1407
1407
|
$.budget.maxConcurrent,
|
|
1408
1408
|
" 个"
|
|
1409
1409
|
] })] }),
|
|
1410
|
-
$.budget.maxTokens && /* @__PURE__ */
|
|
1410
|
+
$.budget.maxTokens && /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "Token" }), /* @__PURE__ */ j("dd", { children: [
|
|
1411
1411
|
$.budget.tokensUsed ?? 0,
|
|
1412
1412
|
" / ",
|
|
1413
1413
|
$.budget.maxTokens
|
|
1414
1414
|
] })] }),
|
|
1415
|
-
$.budget.maxDurationSeconds && /* @__PURE__ */
|
|
1415
|
+
$.budget.maxDurationSeconds && /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "主动执行时限" }), /* @__PURE__ */ j("dd", { children: [Math.round($.budget.maxDurationSeconds / 60), " 分钟"] })] })
|
|
1416
1416
|
] })]
|
|
1417
1417
|
})
|
|
1418
1418
|
]
|
|
1419
1419
|
}),
|
|
1420
|
-
|
|
1420
|
+
T && /* @__PURE__ */ A(ae, {
|
|
1421
1421
|
interactions: Le,
|
|
1422
1422
|
members: je,
|
|
1423
|
-
onRespond:
|
|
1423
|
+
onRespond: T
|
|
1424
1424
|
}),
|
|
1425
|
-
Me ? /* @__PURE__ */
|
|
1425
|
+
Me ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
|
|
1426
1426
|
className: "team-text-button team-back",
|
|
1427
1427
|
type: "button",
|
|
1428
1428
|
onClick: () => Ue(""),
|
|
1429
1429
|
children: "← 所有分工"
|
|
1430
|
-
}), /* @__PURE__ */
|
|
1430
|
+
}), /* @__PURE__ */ A(re, {
|
|
1431
1431
|
task: Me,
|
|
1432
1432
|
members: je,
|
|
1433
1433
|
onAction: ($?.policy || e.group.policy)?.taskAcceptance === "leader" ? void 0 : w,
|
|
1434
|
-
onOpenArtifact:
|
|
1434
|
+
onOpenArtifact: O,
|
|
1435
1435
|
onMemberSelect: qe
|
|
1436
|
-
}, Me.taskId)] }) : /* @__PURE__ */
|
|
1436
|
+
}, Me.taskId)] }) : /* @__PURE__ */ A(ne, {
|
|
1437
1437
|
tasks: ke,
|
|
1438
1438
|
members: je,
|
|
1439
|
-
selectedTaskId:
|
|
1439
|
+
selectedTaskId: ue,
|
|
1440
1440
|
onSelect: (e) => Ue(e.taskId)
|
|
1441
1441
|
})
|
|
1442
|
-
] }) :
|
|
1442
|
+
] }) : K === "artifacts" ? /* @__PURE__ */ j("section", {
|
|
1443
1443
|
className: "team-artifact-list",
|
|
1444
|
-
children: [/* @__PURE__ */
|
|
1444
|
+
children: [/* @__PURE__ */ A("h3", { children: "任务交付物" }), Re.length ? Re.map((e) => /* @__PURE__ */ A(W, {
|
|
1445
1445
|
artifact: e,
|
|
1446
|
-
onOpen:
|
|
1447
|
-
}, e.artifactId)) : /* @__PURE__ */
|
|
1446
|
+
onOpen: O
|
|
1447
|
+
}, e.artifactId)) : /* @__PURE__ */ A("p", {
|
|
1448
1448
|
className: "team-muted",
|
|
1449
1449
|
children: "成员发布的成果会保存在这里。"
|
|
1450
1450
|
})]
|
|
1451
|
-
}) : Ne ? /* @__PURE__ */
|
|
1451
|
+
}) : Ne ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
|
|
1452
1452
|
className: "team-text-button team-back",
|
|
1453
1453
|
type: "button",
|
|
1454
|
-
onClick: () =>
|
|
1454
|
+
onClick: () => ge(""),
|
|
1455
1455
|
children: "← 所有成员"
|
|
1456
1456
|
}), P?.(Ne, {
|
|
1457
1457
|
directedMessage: () => Ke(Ne),
|
|
1458
1458
|
teamRunId: $?.teamRunId
|
|
1459
|
-
},
|
|
1459
|
+
}, _e) ?? /* @__PURE__ */ A(G, {
|
|
1460
1460
|
member: Ne,
|
|
1461
1461
|
onDirectedMessage: () => Ke(Ne)
|
|
1462
|
-
})] }) : /* @__PURE__ */
|
|
1462
|
+
})] }) : /* @__PURE__ */ A(oe, {
|
|
1463
1463
|
members: je,
|
|
1464
|
-
selectedMemberId:
|
|
1464
|
+
selectedMemberId: he,
|
|
1465
1465
|
onSelect: qe
|
|
1466
1466
|
})
|
|
1467
1467
|
}),
|
|
1468
|
-
|
|
1468
|
+
K === "tasks" && (ke.length > 0 || !!(F && $)) && /* @__PURE__ */ A("footer", {
|
|
1469
1469
|
className: "team-panel-footer",
|
|
1470
|
-
children: /* @__PURE__ */
|
|
1470
|
+
children: /* @__PURE__ */ j("button", {
|
|
1471
1471
|
className: "team-button team-expand",
|
|
1472
1472
|
type: "button",
|
|
1473
|
-
onClick: () =>
|
|
1474
|
-
children: ["查看执行详情 ", /* @__PURE__ */
|
|
1473
|
+
onClick: () => Y(!0),
|
|
1474
|
+
children: ["查看执行详情 ", /* @__PURE__ */ A("span", {
|
|
1475
1475
|
"aria-hidden": "true",
|
|
1476
1476
|
children: "↗"
|
|
1477
1477
|
})]
|
|
@@ -1479,28 +1479,28 @@ function oe({ snapshot: e, connection: t = "connected", draft: r, onDraftChange:
|
|
|
1479
1479
|
})
|
|
1480
1480
|
]
|
|
1481
1481
|
}),
|
|
1482
|
-
|
|
1482
|
+
J && /* @__PURE__ */ j("section", {
|
|
1483
1483
|
className: "team-execution-workspace",
|
|
1484
1484
|
"aria-label": "执行工作台",
|
|
1485
|
-
children: [/* @__PURE__ */
|
|
1485
|
+
children: [/* @__PURE__ */ j("header", {
|
|
1486
1486
|
className: "team-panel-header",
|
|
1487
|
-
children: [/* @__PURE__ */
|
|
1487
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("span", {
|
|
1488
1488
|
className: "team-eyebrow",
|
|
1489
1489
|
children: "执行详情"
|
|
1490
|
-
}), /* @__PURE__ */
|
|
1490
|
+
}), /* @__PURE__ */ A("h2", { children: $?.goal })] }), /* @__PURE__ */ A("button", {
|
|
1491
1491
|
className: "team-button",
|
|
1492
1492
|
type: "button",
|
|
1493
|
-
onClick: () =>
|
|
1493
|
+
onClick: () => Y(!1),
|
|
1494
1494
|
children: "返回聊天"
|
|
1495
1495
|
})]
|
|
1496
|
-
}), /* @__PURE__ */
|
|
1497
|
-
fallback: /* @__PURE__ */
|
|
1496
|
+
}), /* @__PURE__ */ A(y, {
|
|
1497
|
+
fallback: /* @__PURE__ */ j("div", {
|
|
1498
1498
|
className: "team-loading",
|
|
1499
1499
|
role: "status",
|
|
1500
1500
|
"aria-label": "正在加载执行视图",
|
|
1501
|
-
children: [/* @__PURE__ */
|
|
1501
|
+
children: [/* @__PURE__ */ A("span", {}), /* @__PURE__ */ A("span", {})]
|
|
1502
1502
|
}),
|
|
1503
|
-
children: /* @__PURE__ */
|
|
1503
|
+
children: /* @__PURE__ */ A(le, {
|
|
1504
1504
|
authorityRef: e.group.authorityRef,
|
|
1505
1505
|
groupId: e.group.groupId,
|
|
1506
1506
|
teamRunId: $?.teamRunId || "",
|
|
@@ -1508,12 +1508,12 @@ function oe({ snapshot: e, connection: t = "connected", draft: r, onDraftChange:
|
|
|
1508
1508
|
load: F,
|
|
1509
1509
|
tasks: ke,
|
|
1510
1510
|
members: je,
|
|
1511
|
-
selectedTaskId:
|
|
1511
|
+
selectedTaskId: ue,
|
|
1512
1512
|
onSelect: (e) => {
|
|
1513
|
-
Ue(e.taskId),
|
|
1513
|
+
Ue(e.taskId), Y(!1), q("tasks");
|
|
1514
1514
|
},
|
|
1515
1515
|
onSelectNode: (e) => {
|
|
1516
|
-
e.kind === "task" && e.taskId ? (Ue(e.taskId),
|
|
1516
|
+
e.kind === "task" && e.taskId ? (Ue(e.taskId), q("tasks"), Y(!1)) : e.source && (ge(e.source.memberId), ve(e.source), q("members"), Y(!1));
|
|
1517
1517
|
}
|
|
1518
1518
|
}, `${e.group.groupId}:${$?.teamRunId || ""}`)
|
|
1519
1519
|
})]
|
|
@@ -1523,9 +1523,9 @@ function oe({ snapshot: e, connection: t = "connected", draft: r, onDraftChange:
|
|
|
1523
1523
|
]
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1527
|
-
let [i, a] =
|
|
1528
|
-
if (
|
|
1526
|
+
function ce({ run: e, enabled: t, candidates: n, configure: r }) {
|
|
1527
|
+
let [i, a] = D(e.leaderStandby?.standbyBindingRef || ""), [o, s] = D(!1), [c, l] = D(""), [u, d] = D(e.leaderStandby), f = n.filter((e) => e.kind !== "local_build" && ["ready", "unchecked"].includes(e.availability?.state || "") && e.capabilities.leader && e.capabilities.enqueue);
|
|
1528
|
+
if (S(() => {
|
|
1529
1529
|
a(e.leaderStandby?.standbyBindingRef || ""), l(""), d(e.leaderStandby);
|
|
1530
1530
|
}, [e.teamRunId, e.leaderStandby]), !t || !r || !f.length && !u) return null;
|
|
1531
1531
|
async function p() {
|
|
@@ -1540,11 +1540,11 @@ function se({ run: e, enabled: t, candidates: n, configure: r }) {
|
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
|
-
return /* @__PURE__ */
|
|
1543
|
+
return /* @__PURE__ */ j("details", {
|
|
1544
1544
|
className: "team-run-budget team-standby",
|
|
1545
1545
|
children: [
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
u && /* @__PURE__ */
|
|
1546
|
+
/* @__PURE__ */ j("summary", { children: ["云端接管设置", u?.state === "active" ? " · 已接管" : u?.state === "blocked" ? " · 等待恢复" : ""] }),
|
|
1547
|
+
u && /* @__PURE__ */ A("p", {
|
|
1548
1548
|
role: "status",
|
|
1549
1549
|
children: u.state === "active" ? "云端 Leader 已接管当前任务。" : u.state === "armed" ? "兼容的备用节点已配置;接管前会保存进度并核对原执行。" : {
|
|
1550
1550
|
standby_offline: "云端备用节点离线,正在等待恢复。",
|
|
@@ -1552,24 +1552,24 @@ function se({ run: e, enabled: t, candidates: n, configure: r }) {
|
|
|
1552
1552
|
execution_uncertain: "正在核对原执行结果,避免重复执行。"
|
|
1553
1553
|
}[u.reason || ""] || "暂时无法接管,请检查执行状态。"
|
|
1554
1554
|
}),
|
|
1555
|
-
|
|
1556
|
-
/* @__PURE__ */
|
|
1555
|
+
g(e.status) && !!f.length && /* @__PURE__ */ j(k, { children: [
|
|
1556
|
+
/* @__PURE__ */ j("label", {
|
|
1557
1557
|
className: "team-field",
|
|
1558
|
-
children: ["Leader 备用节点", /* @__PURE__ */
|
|
1558
|
+
children: ["Leader 备用节点", /* @__PURE__ */ j("select", {
|
|
1559
1559
|
value: i,
|
|
1560
1560
|
onChange: (e) => a(e.target.value),
|
|
1561
1561
|
disabled: o,
|
|
1562
|
-
children: [/* @__PURE__ */
|
|
1562
|
+
children: [/* @__PURE__ */ A("option", {
|
|
1563
1563
|
value: "",
|
|
1564
1564
|
children: "选择云端节点,保存时检查"
|
|
1565
|
-
}), f.map((e) => /* @__PURE__ */
|
|
1565
|
+
}), f.map((e) => /* @__PURE__ */ A("option", {
|
|
1566
1566
|
value: e.bindingRef,
|
|
1567
1567
|
children: e.name || e.agentId
|
|
1568
1568
|
}, e.bindingRef))]
|
|
1569
1569
|
})]
|
|
1570
1570
|
}),
|
|
1571
|
-
/* @__PURE__ */
|
|
1572
|
-
/* @__PURE__ */
|
|
1571
|
+
/* @__PURE__ */ A("p", { children: "本地 Leader 失联后由备用节点继续。新任务沿用此配置;本地恢复时不抢回当前任务。" }),
|
|
1572
|
+
/* @__PURE__ */ A("button", {
|
|
1573
1573
|
type: "button",
|
|
1574
1574
|
className: "team-button",
|
|
1575
1575
|
disabled: o || !i,
|
|
@@ -1577,7 +1577,7 @@ function se({ run: e, enabled: t, candidates: n, configure: r }) {
|
|
|
1577
1577
|
children: o ? "正在校验…" : "配置备用节点"
|
|
1578
1578
|
})
|
|
1579
1579
|
] }),
|
|
1580
|
-
c && /* @__PURE__ */
|
|
1580
|
+
c && /* @__PURE__ */ A("p", {
|
|
1581
1581
|
role: "alert",
|
|
1582
1582
|
className: "team-inline-error",
|
|
1583
1583
|
children: c
|
|
@@ -1585,13 +1585,13 @@ function se({ run: e, enabled: t, candidates: n, configure: r }) {
|
|
|
1585
1585
|
]
|
|
1586
1586
|
});
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1589
|
-
let o =
|
|
1590
|
-
|
|
1588
|
+
function le({ authorityRef: e, groupId: t, teamRunId: n, watermark: r, load: i, ...a }) {
|
|
1589
|
+
let o = E(i), s = !!i;
|
|
1590
|
+
S(() => {
|
|
1591
1591
|
o.current = i;
|
|
1592
1592
|
}, [i]);
|
|
1593
|
-
let [c, l] =
|
|
1594
|
-
return
|
|
1593
|
+
let [c, l] = D(null), [u, d] = D(""), [f, p] = D(!!i), [m, h] = D(0);
|
|
1594
|
+
return S(() => {
|
|
1595
1595
|
if (!o.current || !n) return;
|
|
1596
1596
|
let r = new AbortController();
|
|
1597
1597
|
return o.current(n, r.signal).then((i) => {
|
|
@@ -1611,7 +1611,7 @@ function q({ authorityRef: e, groupId: t, teamRunId: n, watermark: r, load: i, .
|
|
|
1611
1611
|
r,
|
|
1612
1612
|
m,
|
|
1613
1613
|
s
|
|
1614
|
-
]), /* @__PURE__ */
|
|
1614
|
+
]), /* @__PURE__ */ A(P, {
|
|
1615
1615
|
...a,
|
|
1616
1616
|
execution: c,
|
|
1617
1617
|
executionLoading: f,
|
|
@@ -1623,24 +1623,24 @@ function q({ authorityRef: e, groupId: t, teamRunId: n, watermark: r, load: i, .
|
|
|
1623
1623
|
}
|
|
1624
1624
|
//#endregion
|
|
1625
1625
|
//#region src/core/teams/grouping.ts
|
|
1626
|
-
var
|
|
1627
|
-
function
|
|
1626
|
+
var q = (e) => `${e.binding.kind}:${e.binding.agentId}`, J = (e) => e.binding.capabilities.enqueue && e.binding.availability?.state !== "unavailable";
|
|
1627
|
+
function Y(e) {
|
|
1628
1628
|
let t = /* @__PURE__ */ new Map();
|
|
1629
|
-
for (let n of e) t.set(
|
|
1630
|
-
return [...t.values()].map((e) => e.sort((e, t) => Number(
|
|
1629
|
+
for (let n of e) t.set(q(n), [...t.get(q(n)) || [], n]);
|
|
1630
|
+
return [...t.values()].map((e) => e.sort((e, t) => Number(J(t)) - Number(J(e)) || (t.binding.createdAt || "").localeCompare(e.binding.createdAt || "")));
|
|
1631
1631
|
}
|
|
1632
1632
|
//#endregion
|
|
1633
1633
|
//#region src/components/teams/CreateGroupDialog.tsx
|
|
1634
|
-
function
|
|
1635
|
-
let d =
|
|
1634
|
+
function ue({ open: e, candidates: t, serverAuthority: n, loading: r, error: i, onRefresh: a, hasMore: o, onLoadMore: s, onClose: c, onCreate: u }) {
|
|
1635
|
+
let d = E(null), f = C(), [p, m] = D(""), [h, g] = D(""), [_, v] = D([]), [y, b] = D(""), [x, w] = D(""), [T, O] = D(!1), [k, M] = D(""), N = E(null), P = (e) => !!(n && e.binding.availability?.state === "unchecked"), F = (e) => J(e) || P(e), I = (e) => F(e) && (e.binding.capabilities.leader || P(e)), L = _.map((e) => {
|
|
1636
1636
|
let n = t.find((t) => t.binding.bindingRef === e.binding.bindingRef);
|
|
1637
1637
|
return n ? {
|
|
1638
1638
|
...n,
|
|
1639
1639
|
memberId: e.memberId,
|
|
1640
1640
|
responsibility: e.responsibility
|
|
1641
1641
|
} : e;
|
|
1642
|
-
}), R = L.filter(I), z = R.some((e) => e.memberId === y) ? y : R[0]?.memberId ?? "", B = L.find((e) => e.memberId === z)?.binding.kind === "local_build", V = t.filter((e) => e.binding.kind === "cloud" && I(e)), H = V.some((e) => e.binding.bindingRef ===
|
|
1643
|
-
|
|
1642
|
+
}), R = L.filter(I), z = R.some((e) => e.memberId === y) ? y : R[0]?.memberId ?? "", B = L.find((e) => e.memberId === z)?.binding.kind === "local_build", V = t.filter((e) => e.binding.kind === "cloud" && I(e)), H = V.some((e) => e.binding.bindingRef === x) ? x : "", U = Y(t).map((e) => e.sort((e, t) => Number(F(t)) - Number(F(e)))).filter((e) => e.some((e) => `${e.name} ${e.description || ""} ${e.binding.agentId}`.toLowerCase().includes(h.toLowerCase())));
|
|
1643
|
+
S(() => {
|
|
1644
1644
|
let t = d.current;
|
|
1645
1645
|
if (!t) return;
|
|
1646
1646
|
let n = document.activeElement;
|
|
@@ -1648,11 +1648,11 @@ function X({ open: e, candidates: t, serverAuthority: n, loading: r, error: a, o
|
|
|
1648
1648
|
t.open && t.close(), n?.focus();
|
|
1649
1649
|
};
|
|
1650
1650
|
}, [e]);
|
|
1651
|
-
function
|
|
1652
|
-
v((n) => t ? [...n, e] : n.filter((t) =>
|
|
1651
|
+
function ee(e, t) {
|
|
1652
|
+
v((n) => t ? [...n, e] : n.filter((t) => q(t) !== q(e)));
|
|
1653
1653
|
}
|
|
1654
|
-
async function
|
|
1655
|
-
if (
|
|
1654
|
+
async function te() {
|
|
1655
|
+
if (T || r) return;
|
|
1656
1656
|
M("");
|
|
1657
1657
|
let e = {
|
|
1658
1658
|
name: p.trim(),
|
|
@@ -1666,142 +1666,142 @@ function X({ open: e, candidates: t, serverAuthority: n, loading: r, error: a, o
|
|
|
1666
1666
|
...n && B && H ? { leaderStandbyBindingRef: H } : {}
|
|
1667
1667
|
};
|
|
1668
1668
|
try {
|
|
1669
|
-
if (
|
|
1669
|
+
if (l(e), L.length < 2) throw Error("请选择至少 2 位成员,一起组成团队。");
|
|
1670
1670
|
if (L.some((e) => !t.some((t) => t.binding.bindingRef === e.binding.bindingRef && F(t)))) throw Error("已选成员中有 Agent 暂不可用,请更换版本或移除后重试。");
|
|
1671
1671
|
if (!z) throw Error("所选成员中至少需要一位支持 Leader 的 Agent。");
|
|
1672
1672
|
} catch (e) {
|
|
1673
1673
|
M(e instanceof Error ? e.message : "团队配置无效。");
|
|
1674
1674
|
return;
|
|
1675
1675
|
}
|
|
1676
|
-
let
|
|
1677
|
-
N.current?.digest !==
|
|
1678
|
-
digest:
|
|
1676
|
+
let i = JSON.stringify(e);
|
|
1677
|
+
N.current?.digest !== i && (N.current = {
|
|
1678
|
+
digest: i,
|
|
1679
1679
|
idempotencyKey: `group-${globalThis.crypto.randomUUID()}`
|
|
1680
1680
|
}), O(!0);
|
|
1681
1681
|
try {
|
|
1682
1682
|
await u({
|
|
1683
1683
|
...e,
|
|
1684
1684
|
idempotencyKey: N.current.idempotencyKey
|
|
1685
|
-
}), m(""), g(""), v([]), b(""), w(""), N.current = null,
|
|
1685
|
+
}), m(""), g(""), v([]), b(""), w(""), N.current = null, c();
|
|
1686
1686
|
} catch (e) {
|
|
1687
1687
|
M(e instanceof Error ? e.message : "创建团队失败,已保留你的选择。");
|
|
1688
1688
|
} finally {
|
|
1689
1689
|
O(!1);
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
return /* @__PURE__ */
|
|
1692
|
+
return /* @__PURE__ */ A("dialog", {
|
|
1693
1693
|
ref: d,
|
|
1694
1694
|
className: "ksadk-teams team-create-dialog",
|
|
1695
1695
|
"aria-labelledby": f,
|
|
1696
1696
|
onCancel: (e) => {
|
|
1697
|
-
e.preventDefault(),
|
|
1697
|
+
e.preventDefault(), T || c();
|
|
1698
1698
|
},
|
|
1699
|
-
children: /* @__PURE__ */
|
|
1699
|
+
children: /* @__PURE__ */ j("form", {
|
|
1700
1700
|
onSubmit: (e) => {
|
|
1701
|
-
e.preventDefault(),
|
|
1701
|
+
e.preventDefault(), te();
|
|
1702
1702
|
},
|
|
1703
1703
|
children: [
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1704
|
+
/* @__PURE__ */ j("header", { children: [/* @__PURE__ */ j("div", { children: [
|
|
1705
|
+
/* @__PURE__ */ A("span", {
|
|
1706
1706
|
className: "team-eyebrow",
|
|
1707
1707
|
children: "新的协作空间"
|
|
1708
1708
|
}),
|
|
1709
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ A("h2", {
|
|
1710
1710
|
id: f,
|
|
1711
1711
|
children: "组建团队"
|
|
1712
1712
|
}),
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
] }), /* @__PURE__ */
|
|
1713
|
+
/* @__PURE__ */ A("p", { children: "选择搭档,让 Leader 组织分工与复核。" })
|
|
1714
|
+
] }), /* @__PURE__ */ A("button", {
|
|
1715
1715
|
type: "button",
|
|
1716
1716
|
className: "team-button team-icon-button",
|
|
1717
1717
|
"aria-label": "关闭创建团队",
|
|
1718
|
-
onClick:
|
|
1719
|
-
disabled:
|
|
1718
|
+
onClick: c,
|
|
1719
|
+
disabled: T,
|
|
1720
1720
|
children: "×"
|
|
1721
1721
|
})] }),
|
|
1722
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ j("div", {
|
|
1723
1723
|
className: "team-create-body",
|
|
1724
1724
|
children: [
|
|
1725
|
-
/* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ j("label", {
|
|
1726
1726
|
className: "team-field",
|
|
1727
|
-
children: ["团队名称", /* @__PURE__ */
|
|
1727
|
+
children: ["团队名称", /* @__PURE__ */ A("input", {
|
|
1728
1728
|
value: p,
|
|
1729
1729
|
onChange: (e) => m(e.target.value),
|
|
1730
1730
|
placeholder: "例如:产品交付团队",
|
|
1731
1731
|
maxLength: 100,
|
|
1732
|
-
disabled:
|
|
1732
|
+
disabled: T,
|
|
1733
1733
|
required: !0
|
|
1734
1734
|
})]
|
|
1735
1735
|
}),
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
disabled:
|
|
1736
|
+
/* @__PURE__ */ j("fieldset", {
|
|
1737
|
+
disabled: T,
|
|
1738
1738
|
children: [
|
|
1739
|
-
/* @__PURE__ */
|
|
1740
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ j("legend", { children: ["选择成员 ", /* @__PURE__ */ j("span", { children: [_.length, " / 8"] })] }),
|
|
1740
|
+
/* @__PURE__ */ j("div", {
|
|
1741
1741
|
className: "team-directory-search",
|
|
1742
|
-
children: [/* @__PURE__ */
|
|
1742
|
+
children: [/* @__PURE__ */ A("input", {
|
|
1743
1743
|
"aria-label": "搜索 Agent",
|
|
1744
1744
|
value: h,
|
|
1745
1745
|
onChange: (e) => g(e.target.value),
|
|
1746
1746
|
placeholder: "搜索名称或职责"
|
|
1747
|
-
}),
|
|
1747
|
+
}), a && /* @__PURE__ */ A("button", {
|
|
1748
1748
|
type: "button",
|
|
1749
1749
|
className: "team-text-button",
|
|
1750
1750
|
disabled: r,
|
|
1751
|
-
onClick:
|
|
1751
|
+
onClick: a,
|
|
1752
1752
|
children: "刷新"
|
|
1753
1753
|
})]
|
|
1754
1754
|
}),
|
|
1755
|
-
r && /* @__PURE__ */
|
|
1755
|
+
r && /* @__PURE__ */ A("p", {
|
|
1756
1756
|
role: "status",
|
|
1757
1757
|
className: "team-muted",
|
|
1758
1758
|
children: "正在读取 Agent…"
|
|
1759
1759
|
}),
|
|
1760
|
-
|
|
1760
|
+
i && /* @__PURE__ */ A("p", {
|
|
1761
1761
|
role: "alert",
|
|
1762
1762
|
className: "team-inline-error",
|
|
1763
|
-
children:
|
|
1763
|
+
children: i
|
|
1764
1764
|
}),
|
|
1765
|
-
!r && !t.length ? /* @__PURE__ */
|
|
1765
|
+
!r && !t.length ? /* @__PURE__ */ A("p", {
|
|
1766
1766
|
className: "team-muted",
|
|
1767
1767
|
children: "还没有 Agent。先创建 Agent 并完成构建,再回来组队。"
|
|
1768
|
-
}) : /* @__PURE__ */
|
|
1768
|
+
}) : /* @__PURE__ */ j("div", {
|
|
1769
1769
|
className: "team-candidate-list",
|
|
1770
1770
|
children: [U.map((e) => {
|
|
1771
|
-
let t = L.find((t) =>
|
|
1772
|
-
return /* @__PURE__ */
|
|
1771
|
+
let t = L.find((t) => q(t) === q(e[0])), n = t || e[0], i = n.binding.kind === "local_build" ? "本地" : "云端", a = P(n) ? "创建时验证执行能力" : n.description || n.binding.description || (n.binding.capabilities.leader ? "可担任 Leader" : "任务成员");
|
|
1772
|
+
return /* @__PURE__ */ j("div", {
|
|
1773
1773
|
className: "team-candidate-group",
|
|
1774
|
-
children: [/* @__PURE__ */
|
|
1774
|
+
children: [/* @__PURE__ */ j("label", {
|
|
1775
1775
|
className: "team-candidate",
|
|
1776
1776
|
"data-selected": !!t,
|
|
1777
1777
|
children: [
|
|
1778
|
-
/* @__PURE__ */
|
|
1778
|
+
/* @__PURE__ */ A("input", {
|
|
1779
1779
|
type: "checkbox",
|
|
1780
1780
|
checked: !!t,
|
|
1781
1781
|
disabled: r || !t && (!F(n) || _.length >= 8),
|
|
1782
|
-
onChange: (e) =>
|
|
1782
|
+
onChange: (e) => ee(n, e.target.checked)
|
|
1783
1783
|
}),
|
|
1784
|
-
/* @__PURE__ */
|
|
1784
|
+
/* @__PURE__ */ A("span", {
|
|
1785
1785
|
className: "team-avatar",
|
|
1786
1786
|
"aria-hidden": "true",
|
|
1787
1787
|
children: Array.from(n.name)[0]
|
|
1788
1788
|
}),
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
/* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ j("span", { children: [
|
|
1790
|
+
/* @__PURE__ */ A("strong", {
|
|
1791
1791
|
title: n.name,
|
|
1792
1792
|
children: n.name
|
|
1793
1793
|
}),
|
|
1794
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ A("small", {
|
|
1795
1795
|
className: "team-candidate-description",
|
|
1796
1796
|
title: a,
|
|
1797
1797
|
children: a
|
|
1798
1798
|
}),
|
|
1799
|
-
!F(n) && /* @__PURE__ */
|
|
1799
|
+
!F(n) && /* @__PURE__ */ A("small", {
|
|
1800
1800
|
className: "team-candidate-reason",
|
|
1801
1801
|
children: n.binding.availability?.reason || "当前不支持团队执行"
|
|
1802
1802
|
})
|
|
1803
1803
|
] }),
|
|
1804
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ A("span", {
|
|
1805
1805
|
className: "team-source",
|
|
1806
1806
|
"data-available": F(n),
|
|
1807
1807
|
"data-state": n.binding.availability?.state,
|
|
@@ -1809,20 +1809,20 @@ function X({ open: e, candidates: t, serverAuthority: n, loading: r, error: a, o
|
|
|
1809
1809
|
children: i
|
|
1810
1810
|
})
|
|
1811
1811
|
]
|
|
1812
|
-
}), t && /* @__PURE__ */
|
|
1812
|
+
}), t && /* @__PURE__ */ j("details", {
|
|
1813
1813
|
className: "team-version-choice",
|
|
1814
1814
|
children: [
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */
|
|
1815
|
+
/* @__PURE__ */ A("summary", { children: "职责与版本" }),
|
|
1816
|
+
/* @__PURE__ */ j("label", {
|
|
1817
1817
|
className: "team-field",
|
|
1818
|
-
children: ["工作职责", /* @__PURE__ */
|
|
1818
|
+
children: ["工作职责", /* @__PURE__ */ A("textarea", {
|
|
1819
1819
|
"aria-label": `${n.name} 的工作职责`,
|
|
1820
1820
|
rows: 2,
|
|
1821
1821
|
maxLength: 2e3,
|
|
1822
1822
|
value: n.responsibility || "",
|
|
1823
1823
|
onChange: (e) => {
|
|
1824
1824
|
let t = e.target.value;
|
|
1825
|
-
v((e) => e.map((e) =>
|
|
1825
|
+
v((e) => e.map((e) => q(e) === q(n) ? {
|
|
1826
1826
|
...e,
|
|
1827
1827
|
responsibility: t
|
|
1828
1828
|
} : e));
|
|
@@ -1830,21 +1830,21 @@ function X({ open: e, candidates: t, serverAuthority: n, loading: r, error: a, o
|
|
|
1830
1830
|
placeholder: "例如:核对实现边界,补充测试证据"
|
|
1831
1831
|
})]
|
|
1832
1832
|
}),
|
|
1833
|
-
/* @__PURE__ */
|
|
1834
|
-
/* @__PURE__ */
|
|
1833
|
+
/* @__PURE__ */ j("p", { children: ["模型:", n.binding.modelName || "沿用固定版本配置"] }),
|
|
1834
|
+
/* @__PURE__ */ j("label", {
|
|
1835
1835
|
className: "team-field",
|
|
1836
|
-
children: ["执行版本", /* @__PURE__ */
|
|
1836
|
+
children: ["执行版本", /* @__PURE__ */ A("select", {
|
|
1837
1837
|
"aria-label": `${n.name} 的执行版本`,
|
|
1838
1838
|
value: n.binding.bindingRef,
|
|
1839
1839
|
onChange: (t) => {
|
|
1840
1840
|
let r = e.find((e) => e.binding.bindingRef === t.target.value);
|
|
1841
|
-
v((e) => e.map((e) =>
|
|
1841
|
+
v((e) => e.map((e) => q(e) === q(n) ? {
|
|
1842
1842
|
...r,
|
|
1843
1843
|
memberId: e.memberId,
|
|
1844
1844
|
responsibility: e.responsibility
|
|
1845
1845
|
} : e));
|
|
1846
1846
|
},
|
|
1847
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1847
|
+
children: e.map((e) => /* @__PURE__ */ j("option", {
|
|
1848
1848
|
value: e.binding.bindingRef,
|
|
1849
1849
|
disabled: !F(e),
|
|
1850
1850
|
children: [e.binding.version || e.binding.buildId || e.binding.bindingRef, F(e) ? "" : " · 不可用"]
|
|
@@ -1853,68 +1853,68 @@ function X({ open: e, candidates: t, serverAuthority: n, loading: r, error: a, o
|
|
|
1853
1853
|
})
|
|
1854
1854
|
]
|
|
1855
1855
|
})]
|
|
1856
|
-
},
|
|
1857
|
-
}), !U.length && !!t.length && /* @__PURE__ */
|
|
1856
|
+
}, q(n));
|
|
1857
|
+
}), !U.length && !!t.length && /* @__PURE__ */ A("p", {
|
|
1858
1858
|
className: "team-muted",
|
|
1859
1859
|
children: "没有匹配的 Agent。"
|
|
1860
1860
|
})]
|
|
1861
1861
|
}),
|
|
1862
|
-
|
|
1862
|
+
o && s && /* @__PURE__ */ A("button", {
|
|
1863
1863
|
type: "button",
|
|
1864
1864
|
className: "team-button",
|
|
1865
|
-
disabled: r ||
|
|
1866
|
-
onClick:
|
|
1865
|
+
disabled: r || T,
|
|
1866
|
+
onClick: s,
|
|
1867
1867
|
children: "加载更多成员"
|
|
1868
1868
|
}),
|
|
1869
|
-
_.filter((e) => !t.some((t) => t.binding.bindingRef === e.binding.bindingRef)).map((e) => /* @__PURE__ */
|
|
1869
|
+
_.filter((e) => !t.some((t) => t.binding.bindingRef === e.binding.bindingRef)).map((e) => /* @__PURE__ */ j("p", {
|
|
1870
1870
|
className: "team-inline-error",
|
|
1871
1871
|
children: [
|
|
1872
1872
|
e.name,
|
|
1873
1873
|
" · 当前目录中不可用 ",
|
|
1874
|
-
/* @__PURE__ */
|
|
1874
|
+
/* @__PURE__ */ A("button", {
|
|
1875
1875
|
type: "button",
|
|
1876
1876
|
className: "team-text-button",
|
|
1877
|
-
onClick: () =>
|
|
1877
|
+
onClick: () => ee(e, !1),
|
|
1878
1878
|
children: "移除"
|
|
1879
1879
|
})
|
|
1880
1880
|
]
|
|
1881
1881
|
}, e.memberId))
|
|
1882
1882
|
]
|
|
1883
1883
|
}),
|
|
1884
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ j("label", {
|
|
1885
1885
|
className: "team-field",
|
|
1886
1886
|
children: [
|
|
1887
1887
|
"指定 Leader",
|
|
1888
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ j("select", {
|
|
1889
1889
|
value: z,
|
|
1890
1890
|
onChange: (e) => b(e.target.value),
|
|
1891
|
-
disabled:
|
|
1892
|
-
children: [/* @__PURE__ */
|
|
1891
|
+
disabled: T || !R.length,
|
|
1892
|
+
children: [/* @__PURE__ */ A("option", {
|
|
1893
1893
|
value: "",
|
|
1894
1894
|
disabled: !0,
|
|
1895
1895
|
children: "从已选成员中指定"
|
|
1896
|
-
}), R.map((e) => /* @__PURE__ */
|
|
1896
|
+
}), R.map((e) => /* @__PURE__ */ j("option", {
|
|
1897
1897
|
value: e.memberId,
|
|
1898
1898
|
children: [e.name, P(e) ? " · 创建时验证" : ""]
|
|
1899
1899
|
}, e.memberId))]
|
|
1900
1900
|
}),
|
|
1901
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ j("small", { children: ["Leader 审核成员成果,你处理工具审批和最终验收。", R.some(P) && " 待检查候选需通过服务端能力验证后才能担任 Leader。"] })
|
|
1902
1902
|
]
|
|
1903
1903
|
}),
|
|
1904
|
-
n && B && /* @__PURE__ */
|
|
1904
|
+
n && B && /* @__PURE__ */ j("details", {
|
|
1905
1905
|
className: "team-version-choice",
|
|
1906
1906
|
children: [
|
|
1907
|
-
/* @__PURE__ */
|
|
1908
|
-
/* @__PURE__ */
|
|
1907
|
+
/* @__PURE__ */ A("summary", { children: "本地离线时继续协作" }),
|
|
1908
|
+
/* @__PURE__ */ j("label", {
|
|
1909
1909
|
className: "team-field",
|
|
1910
|
-
children: ["Leader 云端备用", /* @__PURE__ */
|
|
1910
|
+
children: ["Leader 云端备用", /* @__PURE__ */ j("select", {
|
|
1911
1911
|
value: H,
|
|
1912
1912
|
onChange: (e) => w(e.target.value),
|
|
1913
|
-
disabled:
|
|
1914
|
-
children: [/* @__PURE__ */
|
|
1913
|
+
disabled: T || r,
|
|
1914
|
+
children: [/* @__PURE__ */ A("option", {
|
|
1915
1915
|
value: "",
|
|
1916
1916
|
children: "暂不配置"
|
|
1917
|
-
}), V.map((e) => /* @__PURE__ */
|
|
1917
|
+
}), V.map((e) => /* @__PURE__ */ j("option", {
|
|
1918
1918
|
value: e.binding.bindingRef,
|
|
1919
1919
|
children: [
|
|
1920
1920
|
e.name,
|
|
@@ -1924,38 +1924,38 @@ function X({ open: e, candidates: t, serverAuthority: n, loading: r, error: a, o
|
|
|
1924
1924
|
}, e.binding.bindingRef))]
|
|
1925
1925
|
})]
|
|
1926
1926
|
}),
|
|
1927
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ A("p", {
|
|
1928
1928
|
className: "team-muted",
|
|
1929
1929
|
children: "服务端验证同一发布及实际执行能力后,备用才可启用。云端模型、工具和任务资料需预先准备;本地凭据不会复制到云端。"
|
|
1930
1930
|
}),
|
|
1931
|
-
!V.length && /* @__PURE__ */
|
|
1931
|
+
!V.length && /* @__PURE__ */ A("p", {
|
|
1932
1932
|
className: "team-muted",
|
|
1933
1933
|
children: "还没有可用的云端 Leader 候选。可以先创建团队,接入节点后再配置。"
|
|
1934
1934
|
})
|
|
1935
1935
|
]
|
|
1936
1936
|
}),
|
|
1937
|
-
/* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ A("p", {
|
|
1938
1938
|
className: "team-create-footnote",
|
|
1939
1939
|
children: "创建时检查选中成员的执行环境;配置失败会保留草稿。"
|
|
1940
1940
|
}),
|
|
1941
|
-
|
|
1941
|
+
k && /* @__PURE__ */ A("p", {
|
|
1942
1942
|
role: "alert",
|
|
1943
1943
|
className: "team-inline-error",
|
|
1944
|
-
children:
|
|
1944
|
+
children: k
|
|
1945
1945
|
})
|
|
1946
1946
|
]
|
|
1947
1947
|
}),
|
|
1948
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ j("footer", { children: [/* @__PURE__ */ A("button", {
|
|
1949
1949
|
type: "button",
|
|
1950
1950
|
className: "team-button",
|
|
1951
|
-
onClick:
|
|
1952
|
-
disabled:
|
|
1951
|
+
onClick: c,
|
|
1952
|
+
disabled: T,
|
|
1953
1953
|
children: "稍后继续"
|
|
1954
|
-
}), /* @__PURE__ */
|
|
1954
|
+
}), /* @__PURE__ */ A("button", {
|
|
1955
1955
|
type: "submit",
|
|
1956
1956
|
className: "team-button team-primary",
|
|
1957
|
-
disabled:
|
|
1958
|
-
children:
|
|
1957
|
+
disabled: T || r || L.length < 2,
|
|
1958
|
+
children: T ? "正在检查并创建…" : "创建团队"
|
|
1959
1959
|
})] })
|
|
1960
1960
|
]
|
|
1961
1961
|
})
|
|
@@ -1963,7 +1963,7 @@ function X({ open: e, candidates: t, serverAuthority: n, loading: r, error: a, o
|
|
|
1963
1963
|
}
|
|
1964
1964
|
//#endregion
|
|
1965
1965
|
//#region src/hooks/useTeamChat.ts
|
|
1966
|
-
var
|
|
1966
|
+
var de = class {
|
|
1967
1967
|
value = {
|
|
1968
1968
|
snapshot: null,
|
|
1969
1969
|
connection: "closed",
|
|
@@ -2000,7 +2000,7 @@ var le = class {
|
|
|
2000
2000
|
signal: t.signal,
|
|
2001
2001
|
onSnapshot: (e) => {
|
|
2002
2002
|
if (n()) {
|
|
2003
|
-
if (e.group.authorityRef !== this.authorityRef) throw new
|
|
2003
|
+
if (e.group.authorityRef !== this.authorityRef) throw new a("scope_mismatch", "群授权域发生变化,请重新打开。");
|
|
2004
2004
|
this.update({ snapshot: e });
|
|
2005
2005
|
}
|
|
2006
2006
|
},
|
|
@@ -2022,13 +2022,13 @@ var le = class {
|
|
|
2022
2022
|
};
|
|
2023
2023
|
send = (e) => this.client.send(this.groupId, e);
|
|
2024
2024
|
};
|
|
2025
|
-
function
|
|
2026
|
-
let t =
|
|
2025
|
+
function X(e) {
|
|
2026
|
+
let t = T(() => new de(e.client, e.groupId, e.authorityRef), [
|
|
2027
2027
|
e.client,
|
|
2028
2028
|
e.groupId,
|
|
2029
2029
|
e.authorityRef
|
|
2030
|
-
]), n =
|
|
2031
|
-
return
|
|
2030
|
+
]), n = O(t.subscribe, t.getSnapshot, t.getSnapshot);
|
|
2031
|
+
return S(() => (t.start(), t.disconnect), [t]), {
|
|
2032
2032
|
...n,
|
|
2033
2033
|
loading: !n.snapshot && n.connection === "connecting",
|
|
2034
2034
|
setDraft: t.setDraft,
|
|
@@ -2038,8 +2038,8 @@ function ue(e) {
|
|
|
2038
2038
|
}
|
|
2039
2039
|
//#endregion
|
|
2040
2040
|
//#region src/components/teams/CloudEffectsPanel.tsx
|
|
2041
|
-
function
|
|
2042
|
-
let [s, c] =
|
|
2041
|
+
function fe({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pendingEffectKeys: a, command: o }) {
|
|
2042
|
+
let [s, c] = D([]), [l, u] = D(null), [d, p] = D(!1), [m, h] = D(!1), [g, _] = D(""), [v, y] = D(null), [b, w] = D(""), [T, O] = D(!1), [k, M] = D(!1), [N, P] = D(""), F = E(null), I = E(0), L = E(null), R = f(e), z = C(), B = x(async (r = 0) => {
|
|
2043
2043
|
F.current?.abort();
|
|
2044
2044
|
let i = new AbortController();
|
|
2045
2045
|
F.current = i;
|
|
@@ -2048,7 +2048,7 @@ function Z({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pen
|
|
|
2048
2048
|
try {
|
|
2049
2049
|
let o = await n.effects(e, t, i.signal, r);
|
|
2050
2050
|
if (i.signal.aborted || a !== I.current) return;
|
|
2051
|
-
c((e) => r ? [...e.filter((e) => !o.items.some((t) => t.effectKey === e.effectKey)), ...o.items] : o.items),
|
|
2051
|
+
c((e) => r ? [...e.filter((e) => !o.items.some((t) => t.effectKey === e.effectKey)), ...o.items] : o.items), u(o.nextCursor), h(!0);
|
|
2052
2052
|
} catch {
|
|
2053
2053
|
!i.signal.aborted && a === I.current && _("执行记录读取失败,请重试。当前不能据此判断外部操作是否完成。");
|
|
2054
2054
|
} finally {
|
|
@@ -2059,12 +2059,12 @@ function Z({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pen
|
|
|
2059
2059
|
t,
|
|
2060
2060
|
n
|
|
2061
2061
|
]);
|
|
2062
|
-
|
|
2062
|
+
S(() => (B(), () => F.current?.abort()), [B, i]), S(() => {
|
|
2063
2063
|
v && L.current?.scrollIntoView?.({ block: "nearest" });
|
|
2064
2064
|
}, [v?.effect.effectKey]);
|
|
2065
2065
|
let V = v ? s.find((e) => e.effectKey === v.effect.effectKey) : void 0, H = !!(v && m && (!V || V.revision !== v.effect.revision || V.evidenceDigest !== v.effect.evidenceDigest)), U = !!(v && a.includes(v.effect.effectKey));
|
|
2066
|
-
async function
|
|
2067
|
-
if (!(!v || !r || g ||
|
|
2066
|
+
async function ee() {
|
|
2067
|
+
if (!(!v || !r || g || d || k || H || U || !T || !b.trim())) {
|
|
2068
2068
|
M(!0), P("");
|
|
2069
2069
|
try {
|
|
2070
2070
|
await o(`effects/${v.effect.effectKey}/reconcile`, {
|
|
@@ -2072,7 +2072,7 @@ function Z({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pen
|
|
|
2072
2072
|
expectedEvidenceDigest: v.effect.evidenceDigest,
|
|
2073
2073
|
decision: "accept_risk",
|
|
2074
2074
|
evidenceRef: v.evidenceRef,
|
|
2075
|
-
reason:
|
|
2075
|
+
reason: b.trim()
|
|
2076
2076
|
}), y(null), w(""), O(!1), B();
|
|
2077
2077
|
} catch (e) {
|
|
2078
2078
|
P(e instanceof Error ? e.message : "核查决定尚未确认,请核对原单。"), B();
|
|
@@ -2081,56 +2081,56 @@ function Z({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pen
|
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
|
-
return /* @__PURE__ */
|
|
2084
|
+
return /* @__PURE__ */ j("section", {
|
|
2085
2085
|
className: "team-effect-review",
|
|
2086
2086
|
"aria-label": "外部操作核查",
|
|
2087
2087
|
children: [
|
|
2088
|
-
/* @__PURE__ */
|
|
2088
|
+
/* @__PURE__ */ j("header", {
|
|
2089
2089
|
className: "team-effect-review-header",
|
|
2090
|
-
children: [/* @__PURE__ */
|
|
2090
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h3", { children: "外部操作核查" }), /* @__PURE__ */ A("p", {
|
|
2091
2091
|
className: "team-muted",
|
|
2092
2092
|
children: "结果未确认的操作需要核查后再继续。核查决定会保留记录。"
|
|
2093
|
-
})] }), /* @__PURE__ */
|
|
2093
|
+
})] }), /* @__PURE__ */ A("button", {
|
|
2094
2094
|
type: "button",
|
|
2095
2095
|
className: "team-button",
|
|
2096
|
-
disabled:
|
|
2096
|
+
disabled: d,
|
|
2097
2097
|
onClick: () => void B(),
|
|
2098
2098
|
children: "刷新记录"
|
|
2099
2099
|
})]
|
|
2100
2100
|
}),
|
|
2101
|
-
g && /* @__PURE__ */
|
|
2101
|
+
g && /* @__PURE__ */ A("p", {
|
|
2102
2102
|
role: "alert",
|
|
2103
2103
|
className: "team-inline-error",
|
|
2104
2104
|
children: g
|
|
2105
2105
|
}),
|
|
2106
|
-
|
|
2106
|
+
d && /* @__PURE__ */ A("p", {
|
|
2107
2107
|
role: "status",
|
|
2108
2108
|
className: "team-muted",
|
|
2109
2109
|
children: "正在读取原执行记录…"
|
|
2110
2110
|
}),
|
|
2111
|
-
m && !
|
|
2111
|
+
m && !d && !g && !s.length && /* @__PURE__ */ A("p", {
|
|
2112
2112
|
className: "team-muted",
|
|
2113
2113
|
children: l ? "这一页没有待核查操作,请继续读取后续记录。" : "当前任务没有待核查的外部操作。"
|
|
2114
2114
|
}),
|
|
2115
|
-
s.map((e) => /* @__PURE__ */
|
|
2115
|
+
s.map((e) => /* @__PURE__ */ j("article", {
|
|
2116
2116
|
className: "team-effect-card",
|
|
2117
2117
|
children: [
|
|
2118
|
-
/* @__PURE__ */
|
|
2118
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("strong", { children: e.toolName }), /* @__PURE__ */ A("span", {
|
|
2119
2119
|
className: "team-effect-state",
|
|
2120
2120
|
children: e.resolutionConflict ? "核查后收到不同证据" : e.phase === "prepared" ? "执行结果待核对" : "外部结果未确认"
|
|
2121
2121
|
})] }),
|
|
2122
|
-
/* @__PURE__ */
|
|
2122
|
+
/* @__PURE__ */ A("p", {
|
|
2123
2123
|
className: "team-muted",
|
|
2124
2124
|
children: e.resolutionConflict ? "新证据与已有核查决定不一致,后续处理保持暂停。请重新核对原记录,并记录新的决定。" : "系统保留了原操作,不会因断线或重启自动重复发送。请先查看外部系统。"
|
|
2125
2125
|
}),
|
|
2126
|
-
e.outcome?.evidence_ref && /* @__PURE__ */
|
|
2126
|
+
e.outcome?.evidence_ref && /* @__PURE__ */ j("p", {
|
|
2127
2127
|
className: "team-muted",
|
|
2128
2128
|
children: ["原执行证据:", e.outcome.evidence_ref]
|
|
2129
2129
|
}),
|
|
2130
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ A("button", {
|
|
2131
2131
|
type: "button",
|
|
2132
2132
|
className: "team-button",
|
|
2133
|
-
disabled: !r || !!g ||
|
|
2133
|
+
disabled: !r || !!g || k || a.includes(e.effectKey),
|
|
2134
2134
|
onClick: () => {
|
|
2135
2135
|
y({
|
|
2136
2136
|
effect: e,
|
|
@@ -2141,50 +2141,50 @@ function Z({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pen
|
|
|
2141
2141
|
})
|
|
2142
2142
|
]
|
|
2143
2143
|
}, e.effectKey)),
|
|
2144
|
-
l !== null && /* @__PURE__ */
|
|
2144
|
+
l !== null && /* @__PURE__ */ A("button", {
|
|
2145
2145
|
className: "team-button team-history-more",
|
|
2146
2146
|
type: "button",
|
|
2147
|
-
disabled:
|
|
2147
|
+
disabled: d,
|
|
2148
2148
|
onClick: () => void B(l),
|
|
2149
2149
|
children: "更多执行记录"
|
|
2150
2150
|
}),
|
|
2151
|
-
v && /* @__PURE__ */
|
|
2151
|
+
v && /* @__PURE__ */ j("form", {
|
|
2152
2152
|
ref: L,
|
|
2153
2153
|
className: "team-effect-form",
|
|
2154
2154
|
onSubmit: (e) => {
|
|
2155
|
-
e.preventDefault(),
|
|
2155
|
+
e.preventDefault(), ee();
|
|
2156
2156
|
},
|
|
2157
2157
|
children: [
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
/* @__PURE__ */
|
|
2158
|
+
/* @__PURE__ */ j("h3", { children: ["核查 ", v.effect.toolName] }),
|
|
2159
|
+
/* @__PURE__ */ A("p", {
|
|
2160
2160
|
className: "team-muted",
|
|
2161
2161
|
children: "此操作记录你接受剩余不确定性的决定,不会重新调用外部工具,也不会将原执行标记为成功。"
|
|
2162
2162
|
}),
|
|
2163
|
-
/* @__PURE__ */
|
|
2163
|
+
/* @__PURE__ */ j("label", {
|
|
2164
2164
|
className: "team-field",
|
|
2165
2165
|
htmlFor: z,
|
|
2166
|
-
children: ["核查说明", /* @__PURE__ */
|
|
2166
|
+
children: ["核查说明", /* @__PURE__ */ A("textarea", {
|
|
2167
2167
|
id: z,
|
|
2168
|
-
value:
|
|
2168
|
+
value: b,
|
|
2169
2169
|
maxLength: 1e3,
|
|
2170
2170
|
rows: 3,
|
|
2171
|
-
disabled:
|
|
2171
|
+
disabled: k || U,
|
|
2172
2172
|
onChange: (e) => w(e.target.value),
|
|
2173
2173
|
placeholder: "说明查验了什么、得到什么结果,以及继续处理的依据。"
|
|
2174
2174
|
})]
|
|
2175
2175
|
}),
|
|
2176
|
-
/* @__PURE__ */
|
|
2176
|
+
/* @__PURE__ */ j("label", {
|
|
2177
2177
|
className: "team-effect-consent",
|
|
2178
|
-
children: [/* @__PURE__ */
|
|
2178
|
+
children: [/* @__PURE__ */ A("input", {
|
|
2179
2179
|
type: "checkbox",
|
|
2180
|
-
checked:
|
|
2181
|
-
disabled:
|
|
2180
|
+
checked: T,
|
|
2181
|
+
disabled: k || U,
|
|
2182
2182
|
onChange: (e) => O(e.target.checked)
|
|
2183
|
-
}), /* @__PURE__ */
|
|
2183
|
+
}), /* @__PURE__ */ A("span", { children: "我已核对外部记录,接受剩余不确定性并允许后续处理。" })]
|
|
2184
2184
|
}),
|
|
2185
|
-
H && /* @__PURE__ */
|
|
2185
|
+
H && /* @__PURE__ */ j("p", {
|
|
2186
2186
|
role: "alert",
|
|
2187
|
-
children: ["记录已更新,核查说明已保留。", V && /* @__PURE__ */
|
|
2187
|
+
children: ["记录已更新,核查说明已保留。", V && /* @__PURE__ */ A("button", {
|
|
2188
2188
|
type: "button",
|
|
2189
2189
|
className: "team-text-button",
|
|
2190
2190
|
onClick: () => {
|
|
@@ -2196,28 +2196,28 @@ function Z({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pen
|
|
|
2196
2196
|
children: "读取最新证据后重新核对"
|
|
2197
2197
|
})]
|
|
2198
2198
|
}),
|
|
2199
|
-
U && /* @__PURE__ */
|
|
2199
|
+
U && /* @__PURE__ */ A("p", {
|
|
2200
2200
|
role: "status",
|
|
2201
2201
|
children: "决定已保存在本地,服务端接收结果仍待确认。请在操作记录中核对原单。"
|
|
2202
2202
|
}),
|
|
2203
|
-
N && /* @__PURE__ */
|
|
2203
|
+
N && /* @__PURE__ */ A("p", {
|
|
2204
2204
|
role: "alert",
|
|
2205
2205
|
className: "team-inline-error",
|
|
2206
2206
|
children: N
|
|
2207
2207
|
}),
|
|
2208
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ j("div", {
|
|
2209
2209
|
className: "team-task-actions",
|
|
2210
|
-
children: [/* @__PURE__ */
|
|
2210
|
+
children: [/* @__PURE__ */ A("button", {
|
|
2211
2211
|
type: "button",
|
|
2212
2212
|
className: "team-button",
|
|
2213
|
-
disabled:
|
|
2213
|
+
disabled: k,
|
|
2214
2214
|
onClick: () => y(null),
|
|
2215
2215
|
children: "收起"
|
|
2216
|
-
}), /* @__PURE__ */
|
|
2216
|
+
}), /* @__PURE__ */ A("button", {
|
|
2217
2217
|
type: "submit",
|
|
2218
2218
|
className: "team-button team-primary",
|
|
2219
|
-
disabled: !r || !!g ||
|
|
2220
|
-
children:
|
|
2219
|
+
disabled: !r || !!g || d || k || H || U || !T || !b.trim(),
|
|
2220
|
+
children: k ? "正在记录…" : "记录核查决定"
|
|
2221
2221
|
})]
|
|
2222
2222
|
})
|
|
2223
2223
|
]
|
|
@@ -2227,30 +2227,30 @@ function Z({ scope: e, teamRunId: t, product: n, canWrite: r, refreshKey: i, pen
|
|
|
2227
2227
|
}
|
|
2228
2228
|
//#endregion
|
|
2229
2229
|
//#region src/components/teams/CloudTeamWorkspace.tsx
|
|
2230
|
-
var
|
|
2230
|
+
var pe = {
|
|
2231
2231
|
operations: [],
|
|
2232
2232
|
recovering: !1,
|
|
2233
2233
|
errorCode: null
|
|
2234
|
-
},
|
|
2234
|
+
}, me = () => () => {}, he = () => pe, ge = (e) => e.endsWith("/messages") ? "团队消息" : e.endsWith("/control") ? "任务控制" : e.endsWith("/interactions") ? "审批回复" : e.endsWith("/acceptance") ? "任务验收" : e.endsWith("/actions") ? "子任务操作" : e.endsWith("/reconcile") ? "执行核查决定" : "创建团队", _e = {
|
|
2235
2235
|
queued: "等待提交",
|
|
2236
2236
|
sending: "正在核对原单",
|
|
2237
2237
|
confirmed: "服务端已接收",
|
|
2238
2238
|
rejected: "请求被拒绝",
|
|
2239
2239
|
uncertain: "接收结果未确认"
|
|
2240
|
-
},
|
|
2240
|
+
}, ve = {
|
|
2241
2241
|
connecting: "正在读取工作区",
|
|
2242
2242
|
connected: "实时连接",
|
|
2243
2243
|
reconnecting: "正在恢复连接 · 执行状态待同步",
|
|
2244
2244
|
offline: "连接中断 · 显示最后同步状态",
|
|
2245
2245
|
closed: "尚未连接"
|
|
2246
|
-
},
|
|
2246
|
+
}, Z = {
|
|
2247
2247
|
idle: "空闲",
|
|
2248
2248
|
queued: "排队中",
|
|
2249
2249
|
running: "执行中",
|
|
2250
2250
|
waiting: "等待中",
|
|
2251
2251
|
needs_attention: "需要处理",
|
|
2252
2252
|
unavailable: "不可用"
|
|
2253
|
-
},
|
|
2253
|
+
}, ye = (e) => e === "execution_preparation_expired" ? "准备时间过长,执行授权已过期。尚未开始执行,可重新提交请求或重试任务。" : e, be = {
|
|
2254
2254
|
armed: {
|
|
2255
2255
|
label: "已配置备用 Leader",
|
|
2256
2256
|
description: "已配置备用执行端,当前仍由原 Leader 负责。"
|
|
@@ -2275,7 +2275,7 @@ var de = {
|
|
|
2275
2275
|
label: "Leader 接管暂时受阻",
|
|
2276
2276
|
description: "接管条件尚未满足,需要先处理以下原因。"
|
|
2277
2277
|
}
|
|
2278
|
-
},
|
|
2278
|
+
}, xe = {
|
|
2279
2279
|
effect_reconciliation_required: "存在结果未确认的外部操作,核对后才能继续接管。",
|
|
2280
2280
|
release_verification_required: "尚未确认备用执行端与原 Leader 使用相同的发布内容。",
|
|
2281
2281
|
standby_probe_unavailable: "暂时无法确认备用执行端的可用状态。",
|
|
@@ -2287,30 +2287,30 @@ var de = {
|
|
|
2287
2287
|
material_not_ready: "任务材料尚未准备就绪。",
|
|
2288
2288
|
leader_takeover_conflict: "本轮任务状态已变化,暂时不能接管。"
|
|
2289
2289
|
};
|
|
2290
|
-
function
|
|
2291
|
-
let t =
|
|
2292
|
-
return /* @__PURE__ */
|
|
2290
|
+
function Se({ value: e }) {
|
|
2291
|
+
let t = be[e.state];
|
|
2292
|
+
return /* @__PURE__ */ j("section", {
|
|
2293
2293
|
className: "team-cloud-standby",
|
|
2294
2294
|
"aria-label": "Leader 接管状态",
|
|
2295
2295
|
"data-state": e.state,
|
|
2296
2296
|
role: "status",
|
|
2297
2297
|
children: [
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
/* @__PURE__ */
|
|
2300
|
-
e.reason && /* @__PURE__ */
|
|
2298
|
+
/* @__PURE__ */ A("strong", { children: t.label }),
|
|
2299
|
+
/* @__PURE__ */ A("p", { children: t.description }),
|
|
2300
|
+
e.reason && /* @__PURE__ */ A("p", {
|
|
2301
2301
|
className: "team-cloud-standby-reason",
|
|
2302
|
-
children:
|
|
2302
|
+
children: xe[e.reason] || `服务端原因:${e.reason}`
|
|
2303
2303
|
})
|
|
2304
2304
|
]
|
|
2305
2305
|
});
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2308
|
-
let [t, n] =
|
|
2309
|
-
return
|
|
2310
|
-
let t, r = !0, a = new
|
|
2307
|
+
function Ce(e) {
|
|
2308
|
+
let [t, n] = D(null), [r, i] = D(""), a = f(e.scope);
|
|
2309
|
+
return S(() => {
|
|
2310
|
+
let t, r = !0, a = new u(e.scope, e.transport);
|
|
2311
2311
|
return (async () => {
|
|
2312
2312
|
try {
|
|
2313
|
-
t = new
|
|
2313
|
+
t = new c({ scope: e.scope }, e.product), t.setWritable(!1), await t.refresh(), r && (n({
|
|
2314
2314
|
observer: a,
|
|
2315
2315
|
operations: t
|
|
2316
2316
|
}), i(""));
|
|
@@ -2327,31 +2327,31 @@ function xe(e) {
|
|
|
2327
2327
|
a,
|
|
2328
2328
|
e.transport,
|
|
2329
2329
|
e.product
|
|
2330
|
-
]), !t ||
|
|
2330
|
+
]), !t || f(t.observer.scope) !== a ? /* @__PURE__ */ A("section", {
|
|
2331
2331
|
className: "ksadk-teams team-workspace",
|
|
2332
|
-
children: /* @__PURE__ */
|
|
2332
|
+
children: /* @__PURE__ */ A("p", {
|
|
2333
2333
|
role: r ? "alert" : "status",
|
|
2334
2334
|
className: "team-cloud-notice",
|
|
2335
2335
|
children: r || "正在准备团队工作区…"
|
|
2336
2336
|
})
|
|
2337
|
-
}) : /* @__PURE__ */
|
|
2337
|
+
}) : /* @__PURE__ */ A(we, {
|
|
2338
2338
|
...e,
|
|
2339
2339
|
readOnlyReason: r || e.readOnlyReason,
|
|
2340
2340
|
resources: t
|
|
2341
2341
|
});
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2344
|
-
let { observer: n, operations: r } = e, { onSelectionChange: i, onChanged:
|
|
2345
|
-
|
|
2343
|
+
function we({ resources: e, ...t }) {
|
|
2344
|
+
let { observer: n, operations: r } = e, { onSelectionChange: i, onChanged: a } = t, s = O(n.subscribe, n.getSnapshot, n.getSnapshot), c = O(r?.subscribe ?? me, r?.getSnapshot ?? he, r?.getSnapshot ?? he), [l, u] = D(""), [d, p] = D(!1), [m, h] = D(""), [g, _] = D(null), v = E(0), [y, b] = D(() => typeof navigator > "u" || navigator.onLine);
|
|
2345
|
+
S(() => {
|
|
2346
2346
|
let e = () => b(navigator.onLine);
|
|
2347
2347
|
return window.addEventListener("online", e), window.addEventListener("offline", e), () => {
|
|
2348
2348
|
window.removeEventListener("online", e), window.removeEventListener("offline", e);
|
|
2349
2349
|
};
|
|
2350
2350
|
}, []);
|
|
2351
|
-
let
|
|
2352
|
-
|
|
2351
|
+
let x = s.projection?.snapshot.group.status === "archived", C = !!r && y && !x && t.canWrite && s.connection === "connected";
|
|
2352
|
+
S(() => {
|
|
2353
2353
|
r && (r.setWritable(C), C ? r.recover() : r.refresh());
|
|
2354
|
-
}, [r, C]),
|
|
2354
|
+
}, [r, C]), S(() => {
|
|
2355
2355
|
if (!r) return;
|
|
2356
2356
|
let e = () => {
|
|
2357
2357
|
r.refresh(), document.visibilityState === "visible" && navigator.onLine && C && r.recover();
|
|
@@ -2364,7 +2364,7 @@ function Se({ resources: e, ...t }) {
|
|
|
2364
2364
|
}, [r, C]);
|
|
2365
2365
|
async function w(e, i) {
|
|
2366
2366
|
if (!C || !r) throw Error("当前为只读状态,请恢复连接后重试。");
|
|
2367
|
-
|
|
2367
|
+
u("");
|
|
2368
2368
|
let a = await r.submit({
|
|
2369
2369
|
operation: `groups/${t.scope.groupId}/${e}`,
|
|
2370
2370
|
payload: i
|
|
@@ -2372,73 +2372,73 @@ function Se({ resources: e, ...t }) {
|
|
|
2372
2372
|
if (e === "messages" && !["confirmed", "rejected"].includes(a.status) && _(a.operationId), a.status !== "confirmed") throw Error(a.status === "rejected" ? `请求未被接受(${a.errorCode || "operation_rejected"})。` : "已保存操作,接收结果尚未确认。请在操作记录中核对原单,不要重复创建目标。");
|
|
2373
2373
|
return t.onChanged?.(), n.refresh(), a;
|
|
2374
2374
|
}
|
|
2375
|
-
|
|
2375
|
+
S(() => {
|
|
2376
2376
|
if (!(!r || !g)) return r.subscribe(() => {
|
|
2377
2377
|
let e = r.getSnapshot().operations.find((e) => e.operationId === g);
|
|
2378
2378
|
if (!e || !["confirmed", "rejected"].includes(e.status) || (_(null), e.status === "rejected")) return;
|
|
2379
|
-
|
|
2380
|
-
let t = n.getSnapshot(),
|
|
2379
|
+
u("");
|
|
2380
|
+
let t = n.getSnapshot(), o = e.payload.parts, s = Array.isArray(o) ? o.filter((e) => e && typeof e == "object" && !Array.isArray(e) && e.kind === "text").map((e) => e.text).join("") : "", c = e.payload.intent === "start_goal", l = c ? m.trim() === s : t.selectedRunId === e.payload.teamRunId && t.draft.trim() === s;
|
|
2381
2381
|
c && l && (h(""), p(!1)), !c && typeof e.payload.teamRunId == "string" && n.acknowledgeDraft(e.payload.teamRunId, s);
|
|
2382
|
-
let
|
|
2383
|
-
typeof
|
|
2382
|
+
let f = e.receipt?.teamRunId;
|
|
2383
|
+
typeof f == "string" && l && (!c || d) ? (n.observe(f), i?.(f)) : n.refresh(), a?.();
|
|
2384
2384
|
});
|
|
2385
2385
|
}, [
|
|
2386
2386
|
r,
|
|
2387
2387
|
n,
|
|
2388
2388
|
g,
|
|
2389
2389
|
m,
|
|
2390
|
-
|
|
2390
|
+
d,
|
|
2391
2391
|
i,
|
|
2392
|
-
|
|
2392
|
+
a
|
|
2393
2393
|
]);
|
|
2394
|
-
let
|
|
2395
|
-
v.current++, p(!1),
|
|
2394
|
+
let T = c.operations.some((e) => e.operation.endsWith("/messages") && !["confirmed", "rejected"].includes(e.status) && (d ? e.payload.intent === "start_goal" : e.payload.teamRunId === s.selectedRunId || !s.selectedRunId && e.payload.intent === "start_goal")), k = (e) => {
|
|
2395
|
+
v.current++, p(!1), u(""), n.observe(e), t.onSelectionChange?.(e);
|
|
2396
2396
|
};
|
|
2397
|
-
return /* @__PURE__ */
|
|
2397
|
+
return /* @__PURE__ */ A(Te, {
|
|
2398
2398
|
observation: s,
|
|
2399
2399
|
canWrite: C,
|
|
2400
|
-
readOnlyReason: y ?
|
|
2400
|
+
readOnlyReason: y ? x ? "团队已归档,历史记录仍可查看。" : t.readOnlyReason : "浏览器已离线,草稿与待确认操作会保留。",
|
|
2401
2401
|
onRetry: () => n.refresh(),
|
|
2402
2402
|
onLoadMore: (e) => {
|
|
2403
|
-
n.loadMore(e).catch(() =>
|
|
2403
|
+
n.loadMore(e).catch(() => u("分页读取失败。可重试;快照过期时会自动重新同步。"));
|
|
2404
2404
|
},
|
|
2405
|
-
onChooseRun:
|
|
2405
|
+
onChooseRun: k,
|
|
2406
2406
|
onNewGoal: () => {
|
|
2407
2407
|
v.current++, p(!0);
|
|
2408
2408
|
},
|
|
2409
|
-
newGoal:
|
|
2410
|
-
composer: /* @__PURE__ */
|
|
2409
|
+
newGoal: d,
|
|
2410
|
+
composer: /* @__PURE__ */ A(Ee, {
|
|
2411
2411
|
scope: t.scope,
|
|
2412
2412
|
product: t.product,
|
|
2413
2413
|
observation: s,
|
|
2414
|
-
newGoal:
|
|
2415
|
-
pendingMessage:
|
|
2414
|
+
newGoal: d,
|
|
2415
|
+
pendingMessage: T,
|
|
2416
2416
|
canWrite: C,
|
|
2417
|
-
value:
|
|
2418
|
-
onChange: (e) =>
|
|
2417
|
+
value: d ? m : s.draft,
|
|
2418
|
+
onChange: (e) => d ? h(e) : n.setDraft(e),
|
|
2419
2419
|
onCancelNew: () => {
|
|
2420
2420
|
v.current++, p(!1);
|
|
2421
2421
|
},
|
|
2422
2422
|
onSubmit: async (e) => {
|
|
2423
2423
|
let t = v.current, r = Array.isArray(e.parts) ? e.parts.map((e) => e && typeof e == "object" && !Array.isArray(e) && e.kind === "text" ? e.text : "").join("") : "", i = await w("messages", e);
|
|
2424
2424
|
if (typeof e.teamRunId == "string" && n.acknowledgeDraft(e.teamRunId, r), v.current !== t) return;
|
|
2425
|
-
|
|
2425
|
+
d && h((e) => e.trim() === r ? "" : e);
|
|
2426
2426
|
let a = i.receipt?.teamRunId;
|
|
2427
|
-
typeof a == "string" &&
|
|
2427
|
+
typeof a == "string" && k(a);
|
|
2428
2428
|
}
|
|
2429
|
-
},
|
|
2430
|
-
operations: /* @__PURE__ */
|
|
2429
|
+
}, d ? "new" : s.selectedRunId ?? "empty"),
|
|
2430
|
+
operations: /* @__PURE__ */ j("section", {
|
|
2431
2431
|
className: "team-cloud-operations",
|
|
2432
2432
|
"aria-label": "操作记录",
|
|
2433
2433
|
children: [
|
|
2434
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("strong", { children: "操作记录" }), /* @__PURE__ */ A("button", {
|
|
2435
2435
|
className: "team-text-button",
|
|
2436
2436
|
type: "button",
|
|
2437
2437
|
disabled: !C || c.recovering,
|
|
2438
2438
|
onClick: () => void r?.recover(),
|
|
2439
2439
|
children: c.recovering ? "正在核对…" : "核对待确认操作"
|
|
2440
2440
|
})] }),
|
|
2441
|
-
c.errorCode && /* @__PURE__ */
|
|
2441
|
+
c.errorCode && /* @__PURE__ */ j("p", {
|
|
2442
2442
|
role: "alert",
|
|
2443
2443
|
children: [
|
|
2444
2444
|
"持久操作存储暂不可用(",
|
|
@@ -2446,25 +2446,25 @@ function Se({ resources: e, ...t }) {
|
|
|
2446
2446
|
")。"
|
|
2447
2447
|
]
|
|
2448
2448
|
}),
|
|
2449
|
-
c.operations.slice(-8).reverse().map((e) => /* @__PURE__ */
|
|
2449
|
+
c.operations.slice(-8).reverse().map((e) => /* @__PURE__ */ j("p", {
|
|
2450
2450
|
"data-status": e.status,
|
|
2451
|
-
children: [/* @__PURE__ */
|
|
2451
|
+
children: [/* @__PURE__ */ A("span", { children: ge(e.operation) }), /* @__PURE__ */ A("span", { children: _e[e.status] })]
|
|
2452
2452
|
}, e.operationId)),
|
|
2453
|
-
!c.operations.length && /* @__PURE__ */
|
|
2453
|
+
!c.operations.length && /* @__PURE__ */ A("p", {
|
|
2454
2454
|
className: "team-muted",
|
|
2455
2455
|
children: "操作在发送前保存;刷新后继续核对。"
|
|
2456
2456
|
})
|
|
2457
2457
|
]
|
|
2458
2458
|
}),
|
|
2459
2459
|
error: l,
|
|
2460
|
-
renderTasks: (e) => /* @__PURE__ */
|
|
2460
|
+
renderTasks: (e) => /* @__PURE__ */ A(De, {
|
|
2461
2461
|
task: e,
|
|
2462
2462
|
scope: t.scope,
|
|
2463
2463
|
product: t.product,
|
|
2464
2464
|
canWrite: C,
|
|
2465
2465
|
command: w
|
|
2466
2466
|
}, `${e.taskId}:${e.revision}`),
|
|
2467
|
-
effects: t.effectsEnabled && s.selectedRunId ? /* @__PURE__ */
|
|
2467
|
+
effects: t.effectsEnabled && s.selectedRunId ? /* @__PURE__ */ A(fe, {
|
|
2468
2468
|
scope: t.scope,
|
|
2469
2469
|
teamRunId: s.selectedRunId,
|
|
2470
2470
|
product: t.product,
|
|
@@ -2472,21 +2472,21 @@ function Se({ resources: e, ...t }) {
|
|
|
2472
2472
|
command: w,
|
|
2473
2473
|
refreshKey: `${s.projection?.snapshot.watermark ?? 0}:${c.operations.map((e) => `${e.operationId}:${e.status}`).join("|")}`,
|
|
2474
2474
|
pendingEffectKeys: c.operations.filter((e) => !["confirmed", "rejected"].includes(e.status)).map((e) => /^groups\/[^/]+\/effects\/([^/]+)\/reconcile$/.exec(e.operation)?.[1]).filter((e) => !!e)
|
|
2475
|
-
}, `${
|
|
2476
|
-
renderInteraction: (e) => /* @__PURE__ */
|
|
2475
|
+
}, `${f(t.scope)}:${s.selectedRunId}`) : void 0,
|
|
2476
|
+
renderInteraction: (e) => /* @__PURE__ */ A($, {
|
|
2477
2477
|
summary: e,
|
|
2478
2478
|
scope: t.scope,
|
|
2479
2479
|
product: t.product,
|
|
2480
2480
|
canWrite: C,
|
|
2481
2481
|
command: w
|
|
2482
|
-
}, `${
|
|
2482
|
+
}, `${o(e)}:${e.revision}`),
|
|
2483
2483
|
artifactUrl: (e, n) => t.product.artifactUrl(t.scope, e, n),
|
|
2484
2484
|
onControl: (e) => {
|
|
2485
2485
|
let t = s.projection?.snapshot.selectedRun;
|
|
2486
2486
|
t && w(`team-runs/${t.teamRunId}/control`, {
|
|
2487
2487
|
action: e,
|
|
2488
2488
|
expectedRevision: t.revision
|
|
2489
|
-
}).catch((e) =>
|
|
2489
|
+
}).catch((e) => u(e instanceof Error ? e.message : "操作失败。"));
|
|
2490
2490
|
},
|
|
2491
2491
|
onAcceptance: (e, t) => {
|
|
2492
2492
|
let n = s.projection?.snapshot.selectedRun;
|
|
@@ -2494,12 +2494,12 @@ function Se({ resources: e, ...t }) {
|
|
|
2494
2494
|
action: e,
|
|
2495
2495
|
expectedRevision: n.revision,
|
|
2496
2496
|
...t ? { reason: t } : {}
|
|
2497
|
-
}).catch((e) =>
|
|
2497
|
+
}).catch((e) => u(e instanceof Error ? e.message : "操作失败。"));
|
|
2498
2498
|
}
|
|
2499
2499
|
});
|
|
2500
2500
|
}
|
|
2501
|
-
function
|
|
2502
|
-
let { observation: t, canWrite:
|
|
2501
|
+
function Te(e) {
|
|
2502
|
+
let { observation: t, canWrite: n, onLoadMore: i } = e, a = t.projection?.snapshot, [s, c] = D("messages"), [l, u] = D(""), d = C(), f = E(null), p = E(null), m = `${a?.selectedRun?.teamRunId ?? ""}:${s}:${!!e.newGoal}`, h = () => {
|
|
2503
2503
|
let e = f.current;
|
|
2504
2504
|
if (!e || s !== "messages") return;
|
|
2505
2505
|
let t = e.getBoundingClientRect().top, n = Array.from(e.querySelectorAll("[data-message-id]")).find((e) => e.getBoundingClientRect().bottom > t);
|
|
@@ -2510,7 +2510,7 @@ function Ce(e) {
|
|
|
2510
2510
|
anchorOffset: n ? n.getBoundingClientRect().top - t : void 0
|
|
2511
2511
|
};
|
|
2512
2512
|
};
|
|
2513
|
-
|
|
2513
|
+
w(() => {
|
|
2514
2514
|
let e = f.current;
|
|
2515
2515
|
if (!e || s !== "messages") {
|
|
2516
2516
|
p.current = null;
|
|
@@ -2522,30 +2522,30 @@ function Ce(e) {
|
|
|
2522
2522
|
let n = Array.from(e.querySelectorAll("[data-message-id]")).find((e) => e.dataset.messageId === t.anchorId);
|
|
2523
2523
|
n && (e.scrollTop += n.getBoundingClientRect().top - e.getBoundingClientRect().top - t.anchorOffset);
|
|
2524
2524
|
}
|
|
2525
|
-
|
|
2526
|
-
}, [m,
|
|
2527
|
-
let _ = (e, n = "加载更多") =>
|
|
2525
|
+
h();
|
|
2526
|
+
}, [m, a?.recentMessages]);
|
|
2527
|
+
let _ = (e, n = "加载更多") => a?.cursors[e] && /* @__PURE__ */ A("button", {
|
|
2528
2528
|
className: "team-button team-history-more",
|
|
2529
2529
|
type: "button",
|
|
2530
2530
|
disabled: t.loadingPages.includes(e) || t.connection !== "connected",
|
|
2531
2531
|
onClick: () => i(e),
|
|
2532
2532
|
children: t.loadingPages.includes(e) ? "正在读取…" : n
|
|
2533
2533
|
});
|
|
2534
|
-
if (!
|
|
2534
|
+
if (!a) return /* @__PURE__ */ A("section", {
|
|
2535
2535
|
className: "ksadk-teams team-workspace",
|
|
2536
|
-
children: /* @__PURE__ */
|
|
2536
|
+
children: /* @__PURE__ */ j("div", {
|
|
2537
2537
|
className: "team-empty",
|
|
2538
2538
|
children: [
|
|
2539
|
-
/* @__PURE__ */
|
|
2540
|
-
/* @__PURE__ */
|
|
2539
|
+
/* @__PURE__ */ A("h2", { children: t.connection === "offline" ? "暂时无法读取团队" : "正在打开工作区" }),
|
|
2540
|
+
/* @__PURE__ */ A("p", {
|
|
2541
2541
|
role: "status",
|
|
2542
|
-
children:
|
|
2542
|
+
children: ve[t.connection]
|
|
2543
2543
|
}),
|
|
2544
|
-
t.errorCode && /* @__PURE__ */
|
|
2544
|
+
t.errorCode && /* @__PURE__ */ A("p", {
|
|
2545
2545
|
role: "alert",
|
|
2546
2546
|
children: t.errorCode
|
|
2547
2547
|
}),
|
|
2548
|
-
/* @__PURE__ */
|
|
2548
|
+
/* @__PURE__ */ A("button", {
|
|
2549
2549
|
type: "button",
|
|
2550
2550
|
className: "team-button",
|
|
2551
2551
|
onClick: e.onRetry,
|
|
@@ -2554,23 +2554,23 @@ function Ce(e) {
|
|
|
2554
2554
|
]
|
|
2555
2555
|
})
|
|
2556
2556
|
});
|
|
2557
|
-
let v =
|
|
2558
|
-
return /* @__PURE__ */
|
|
2557
|
+
let v = a.selectedRun, y = v ? a.selectedRunMembers : a.members;
|
|
2558
|
+
return /* @__PURE__ */ j("section", {
|
|
2559
2559
|
className: "ksadk-teams team-workspace team-cloud-workspace",
|
|
2560
2560
|
"aria-label": "云端团队工作区",
|
|
2561
2561
|
children: [
|
|
2562
|
-
/* @__PURE__ */
|
|
2562
|
+
/* @__PURE__ */ j("header", {
|
|
2563
2563
|
className: "team-header",
|
|
2564
|
-
children: [/* @__PURE__ */
|
|
2564
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("span", {
|
|
2565
2565
|
className: "team-eyebrow",
|
|
2566
2566
|
children: "云端协作空间"
|
|
2567
|
-
}), /* @__PURE__ */
|
|
2567
|
+
}), /* @__PURE__ */ A("h1", { children: a.group.name })] }), /* @__PURE__ */ j("div", {
|
|
2568
2568
|
className: "team-header-actions",
|
|
2569
|
-
children: [/* @__PURE__ */
|
|
2569
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2570
2570
|
className: "team-connection",
|
|
2571
2571
|
role: "status",
|
|
2572
|
-
children:
|
|
2573
|
-
}), /* @__PURE__ */
|
|
2572
|
+
children: ve[t.connection]
|
|
2573
|
+
}), /* @__PURE__ */ A("button", {
|
|
2574
2574
|
type: "button",
|
|
2575
2575
|
className: "team-button",
|
|
2576
2576
|
onClick: e.onRetry,
|
|
@@ -2578,125 +2578,125 @@ function Ce(e) {
|
|
|
2578
2578
|
})]
|
|
2579
2579
|
})]
|
|
2580
2580
|
}),
|
|
2581
|
-
!
|
|
2581
|
+
!n && /* @__PURE__ */ j("p", {
|
|
2582
2582
|
className: "team-cloud-notice",
|
|
2583
2583
|
role: "status",
|
|
2584
2584
|
children: ["只读 · ", e.readOnlyReason || (t.connection === "connected" ? "服务暂未开放写入,已有历史仍可查看。" : "等待连接恢复后再提交操作。")]
|
|
2585
2585
|
}),
|
|
2586
|
-
e.error && /* @__PURE__ */
|
|
2586
|
+
e.error && /* @__PURE__ */ A("p", {
|
|
2587
2587
|
role: "alert",
|
|
2588
2588
|
className: "team-inline-error team-cloud-notice",
|
|
2589
2589
|
children: e.error
|
|
2590
2590
|
}),
|
|
2591
|
-
/* @__PURE__ */
|
|
2591
|
+
/* @__PURE__ */ j("div", {
|
|
2592
2592
|
className: "team-cloud-layout",
|
|
2593
|
-
children: [/* @__PURE__ */
|
|
2593
|
+
children: [/* @__PURE__ */ j("aside", {
|
|
2594
2594
|
className: "team-cloud-runs",
|
|
2595
2595
|
"aria-label": "团队任务",
|
|
2596
2596
|
children: [
|
|
2597
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("h2", { children: "团队任务" }), /* @__PURE__ */ A("button", {
|
|
2598
2598
|
className: "team-text-button",
|
|
2599
2599
|
type: "button",
|
|
2600
|
-
disabled: !
|
|
2600
|
+
disabled: !n,
|
|
2601
2601
|
onClick: e.onNewGoal,
|
|
2602
2602
|
children: "新任务"
|
|
2603
2603
|
})] }),
|
|
2604
|
-
|
|
2604
|
+
a.runSummaries.map((t) => /* @__PURE__ */ j("button", {
|
|
2605
2605
|
type: "button",
|
|
2606
2606
|
className: "team-cloud-run",
|
|
2607
2607
|
"aria-current": !e.newGoal && v?.teamRunId === t.teamRunId ? "page" : void 0,
|
|
2608
2608
|
onClick: () => e.onChooseRun(t.teamRunId),
|
|
2609
2609
|
children: [
|
|
2610
|
-
/* @__PURE__ */
|
|
2611
|
-
/* @__PURE__ */
|
|
2612
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ A("strong", { children: t.goal }),
|
|
2611
|
+
/* @__PURE__ */ j("span", { children: [
|
|
2612
|
+
/* @__PURE__ */ A(B, { status: t.status }),
|
|
2613
2613
|
" · ",
|
|
2614
2614
|
t.taskCount,
|
|
2615
2615
|
" 项任务"
|
|
2616
2616
|
] }),
|
|
2617
|
-
t.pendingCount > 0 && /* @__PURE__ */
|
|
2617
|
+
t.pendingCount > 0 && /* @__PURE__ */ j("small", { children: [t.pendingCount, " 项待处理"] })
|
|
2618
2618
|
]
|
|
2619
2619
|
}, t.teamRunId)),
|
|
2620
|
-
!
|
|
2620
|
+
!a.runSummaries.length && /* @__PURE__ */ A("p", {
|
|
2621
2621
|
className: "team-muted",
|
|
2622
2622
|
children: "还没有协作任务。从一个目标开始。"
|
|
2623
2623
|
}),
|
|
2624
2624
|
_("runSummaries", "更多团队任务"),
|
|
2625
2625
|
e.operations
|
|
2626
2626
|
]
|
|
2627
|
-
}), /* @__PURE__ */
|
|
2627
|
+
}), /* @__PURE__ */ j("div", {
|
|
2628
2628
|
className: "team-cloud-main",
|
|
2629
|
-
children: [e.newGoal ? /* @__PURE__ */
|
|
2629
|
+
children: [e.newGoal ? /* @__PURE__ */ j("div", {
|
|
2630
2630
|
className: "team-cloud-goal",
|
|
2631
2631
|
children: [
|
|
2632
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ A("span", {
|
|
2633
2633
|
className: "team-eyebrow",
|
|
2634
2634
|
children: "新的协作任务"
|
|
2635
2635
|
}),
|
|
2636
|
-
/* @__PURE__ */
|
|
2637
|
-
/* @__PURE__ */
|
|
2636
|
+
/* @__PURE__ */ A("h2", { children: "这次需要团队完成什么?" }),
|
|
2637
|
+
/* @__PURE__ */ A("p", { children: "描述目标和交付要求。任务记录与其他协作独立保存。" })
|
|
2638
2638
|
]
|
|
2639
|
-
}) : /* @__PURE__ */
|
|
2640
|
-
v && /* @__PURE__ */
|
|
2639
|
+
}) : /* @__PURE__ */ j(k, { children: [
|
|
2640
|
+
v && /* @__PURE__ */ j("header", {
|
|
2641
2641
|
className: "team-cloud-run-header",
|
|
2642
2642
|
children: [
|
|
2643
|
-
/* @__PURE__ */
|
|
2644
|
-
/* @__PURE__ */
|
|
2643
|
+
/* @__PURE__ */ A("h2", { children: v.goal }),
|
|
2644
|
+
/* @__PURE__ */ j("div", {
|
|
2645
2645
|
className: "team-task-actions",
|
|
2646
2646
|
children: [
|
|
2647
|
-
/* @__PURE__ */
|
|
2648
|
-
v.dispatchSuspended && /* @__PURE__ */
|
|
2649
|
-
|
|
2647
|
+
/* @__PURE__ */ A(B, { status: v.status }),
|
|
2648
|
+
v.dispatchSuspended && /* @__PURE__ */ A("span", { children: "已暂停派发" }),
|
|
2649
|
+
g(v.status) && v.status !== "cancel_requested" && e.onControl && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("button", {
|
|
2650
2650
|
className: "team-button",
|
|
2651
2651
|
type: "button",
|
|
2652
|
-
disabled: !
|
|
2652
|
+
disabled: !n,
|
|
2653
2653
|
onClick: () => e.onControl?.(v.dispatchSuspended ? "resume_dispatch" : "suspend_dispatch"),
|
|
2654
2654
|
children: v.dispatchSuspended ? "恢复派发" : "暂停派发"
|
|
2655
|
-
}), /* @__PURE__ */
|
|
2655
|
+
}), /* @__PURE__ */ A("button", {
|
|
2656
2656
|
className: "team-button team-danger",
|
|
2657
2657
|
type: "button",
|
|
2658
|
-
disabled: !
|
|
2658
|
+
disabled: !n,
|
|
2659
2659
|
onClick: () => e.onControl?.("stop"),
|
|
2660
2660
|
children: "停止任务"
|
|
2661
2661
|
})] })
|
|
2662
2662
|
]
|
|
2663
2663
|
}),
|
|
2664
|
-
v.reason && /* @__PURE__ */
|
|
2664
|
+
v.reason && /* @__PURE__ */ A("p", {
|
|
2665
2665
|
className: "team-muted",
|
|
2666
|
-
children:
|
|
2666
|
+
children: ye(v.reason)
|
|
2667
2667
|
}),
|
|
2668
|
-
v.status === "awaiting_acceptance" && e.onAcceptance && /* @__PURE__ */
|
|
2668
|
+
v.status === "awaiting_acceptance" && e.onAcceptance && /* @__PURE__ */ j("div", {
|
|
2669
2669
|
className: "team-cloud-acceptance",
|
|
2670
2670
|
children: [
|
|
2671
|
-
/* @__PURE__ */
|
|
2672
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ A("p", { children: "请查看成果后验收。" }),
|
|
2672
|
+
/* @__PURE__ */ j("label", {
|
|
2673
2673
|
className: "team-field",
|
|
2674
|
-
children: ["修改意见", /* @__PURE__ */
|
|
2674
|
+
children: ["修改意见", /* @__PURE__ */ A("textarea", {
|
|
2675
2675
|
rows: 2,
|
|
2676
2676
|
value: l,
|
|
2677
2677
|
maxLength: 2e3,
|
|
2678
2678
|
onChange: (e) => u(e.target.value),
|
|
2679
|
-
disabled: !
|
|
2679
|
+
disabled: !n
|
|
2680
2680
|
})]
|
|
2681
2681
|
}),
|
|
2682
|
-
/* @__PURE__ */
|
|
2682
|
+
/* @__PURE__ */ A("button", {
|
|
2683
2683
|
className: "team-button",
|
|
2684
|
-
disabled: !
|
|
2684
|
+
disabled: !n || !l.trim(),
|
|
2685
2685
|
onClick: () => e.onAcceptance?.("request_changes", l.trim()),
|
|
2686
2686
|
children: "提出修改"
|
|
2687
2687
|
}),
|
|
2688
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ A("button", {
|
|
2689
2689
|
className: "team-button team-primary",
|
|
2690
|
-
disabled: !
|
|
2690
|
+
disabled: !n,
|
|
2691
2691
|
onClick: () => e.onAcceptance?.("accept"),
|
|
2692
2692
|
children: "验收通过"
|
|
2693
2693
|
})
|
|
2694
2694
|
]
|
|
2695
2695
|
}),
|
|
2696
|
-
v.leaderStandby && /* @__PURE__ */
|
|
2696
|
+
v.leaderStandby && /* @__PURE__ */ A(Se, { value: v.leaderStandby })
|
|
2697
2697
|
]
|
|
2698
2698
|
}),
|
|
2699
|
-
/* @__PURE__ */
|
|
2699
|
+
/* @__PURE__ */ A("div", {
|
|
2700
2700
|
className: "team-cloud-tabs",
|
|
2701
2701
|
role: "tablist",
|
|
2702
2702
|
"aria-label": "任务工作区",
|
|
@@ -2707,7 +2707,7 @@ function Ce(e) {
|
|
|
2707
2707
|
"approvals",
|
|
2708
2708
|
"members",
|
|
2709
2709
|
"effects"
|
|
2710
|
-
].filter((t) => t !== "effects" || e.effects).map((e) => /* @__PURE__ */
|
|
2710
|
+
].filter((t) => t !== "effects" || e.effects).map((e) => /* @__PURE__ */ j("button", {
|
|
2711
2711
|
type: "button",
|
|
2712
2712
|
role: "tab",
|
|
2713
2713
|
id: `${d}-${e}`,
|
|
@@ -2724,9 +2724,9 @@ function Ce(e) {
|
|
|
2724
2724
|
}[e], e === "approvals" && v?.pendingCount ? ` (${v.pendingCount})` : ""]
|
|
2725
2725
|
}, e))
|
|
2726
2726
|
}),
|
|
2727
|
-
/* @__PURE__ */
|
|
2727
|
+
/* @__PURE__ */ j("div", {
|
|
2728
2728
|
ref: f,
|
|
2729
|
-
onScroll:
|
|
2729
|
+
onScroll: h,
|
|
2730
2730
|
className: "team-cloud-panel",
|
|
2731
2731
|
role: "tabpanel",
|
|
2732
2732
|
id: `${d}-panel`,
|
|
@@ -2734,54 +2734,54 @@ function Ce(e) {
|
|
|
2734
2734
|
tabIndex: 0,
|
|
2735
2735
|
children: [
|
|
2736
2736
|
s === "effects" && e.effects,
|
|
2737
|
-
s === "messages" && /* @__PURE__ */
|
|
2737
|
+
s === "messages" && /* @__PURE__ */ j(k, { children: [
|
|
2738
2738
|
_("recentMessages", "查看更早的消息"),
|
|
2739
|
-
|
|
2739
|
+
a.recentMessages.filter((e) => e.visibility === "public").map((e) => /* @__PURE__ */ A("article", {
|
|
2740
2740
|
className: "team-message",
|
|
2741
2741
|
"data-message-id": e.messageId,
|
|
2742
2742
|
"data-role": e.groupRole,
|
|
2743
|
-
children: /* @__PURE__ */
|
|
2743
|
+
children: /* @__PURE__ */ j("div", {
|
|
2744
2744
|
className: "team-message-main",
|
|
2745
|
-
children: [/* @__PURE__ */
|
|
2745
|
+
children: [/* @__PURE__ */ j("header", { children: [/* @__PURE__ */ A("strong", { children: e.senderName }), /* @__PURE__ */ A("time", {
|
|
2746
2746
|
dateTime: e.createdAt,
|
|
2747
2747
|
children: new Date(e.createdAt).toLocaleTimeString([], {
|
|
2748
2748
|
hour: "2-digit",
|
|
2749
2749
|
minute: "2-digit"
|
|
2750
2750
|
})
|
|
2751
|
-
})] }), /* @__PURE__ */
|
|
2751
|
+
})] }), /* @__PURE__ */ A("div", {
|
|
2752
2752
|
className: "team-message-body",
|
|
2753
|
-
children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */
|
|
2753
|
+
children: e.parts.map((e, t) => e.kind === "text" ? /* @__PURE__ */ A(r, { content: e.text }, t) : /* @__PURE__ */ A("span", {
|
|
2754
2754
|
className: "team-attachment",
|
|
2755
2755
|
children: e.name || "附件"
|
|
2756
2756
|
}, t))
|
|
2757
2757
|
})]
|
|
2758
2758
|
})
|
|
2759
2759
|
}, e.messageId)),
|
|
2760
|
-
!
|
|
2760
|
+
!a.recentMessages.length && /* @__PURE__ */ A("p", {
|
|
2761
2761
|
className: "team-muted",
|
|
2762
2762
|
children: v ? "这项协作还没有公开消息。" : "选择任务查看消息,或新建协作目标。"
|
|
2763
2763
|
})
|
|
2764
2764
|
] }),
|
|
2765
|
-
s === "tasks" && /* @__PURE__ */
|
|
2766
|
-
|
|
2767
|
-
!
|
|
2765
|
+
s === "tasks" && /* @__PURE__ */ j(k, { children: [
|
|
2766
|
+
a.taskSummaries.map((t) => e.renderTasks?.(t) ?? /* @__PURE__ */ j("article", { children: [/* @__PURE__ */ A("h3", { children: t.title }), /* @__PURE__ */ A(B, { status: t.status })] }, t.taskId)),
|
|
2767
|
+
!a.taskSummaries.length && /* @__PURE__ */ A("p", {
|
|
2768
2768
|
className: "team-muted",
|
|
2769
2769
|
children: "尚无分工任务。"
|
|
2770
2770
|
}),
|
|
2771
2771
|
_("taskSummaries")
|
|
2772
2772
|
] }),
|
|
2773
|
-
s === "approvals" && /* @__PURE__ */
|
|
2774
|
-
|
|
2775
|
-
!
|
|
2773
|
+
s === "approvals" && /* @__PURE__ */ j(k, { children: [
|
|
2774
|
+
a.pendingInteractions.map((t) => e.renderInteraction?.(t) ?? /* @__PURE__ */ A("p", { children: t.title }, o(t))),
|
|
2775
|
+
!a.pendingInteractions.length && /* @__PURE__ */ A("p", {
|
|
2776
2776
|
className: "team-muted",
|
|
2777
2777
|
children: "当前任务没有待处理事项。"
|
|
2778
2778
|
}),
|
|
2779
2779
|
_("pendingInteractions")
|
|
2780
2780
|
] }),
|
|
2781
|
-
s === "artifacts" && /* @__PURE__ */
|
|
2782
|
-
|
|
2781
|
+
s === "artifacts" && /* @__PURE__ */ j(k, { children: [
|
|
2782
|
+
a.artifactSummaries.map((t) => /* @__PURE__ */ j("article", {
|
|
2783
2783
|
className: "team-cloud-artifact",
|
|
2784
|
-
children: [/* @__PURE__ */
|
|
2784
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("strong", { children: t.name }), /* @__PURE__ */ j("p", {
|
|
2785
2785
|
className: "team-muted",
|
|
2786
2786
|
children: [
|
|
2787
2787
|
t.mediaType,
|
|
@@ -2790,23 +2790,23 @@ function Ce(e) {
|
|
|
2790
2790
|
" 字节 · ",
|
|
2791
2791
|
t.state === "ready" ? "已就绪" : t.state === "failed" ? "准备失败" : "准备中"
|
|
2792
2792
|
]
|
|
2793
|
-
})] }), t.state === "ready" && e.artifactUrl && /* @__PURE__ */
|
|
2793
|
+
})] }), t.state === "ready" && e.artifactUrl && /* @__PURE__ */ A("a", {
|
|
2794
2794
|
href: e.artifactUrl(t.artifactId, t.teamRunId),
|
|
2795
2795
|
download: t.name,
|
|
2796
2796
|
children: "下载"
|
|
2797
2797
|
})]
|
|
2798
2798
|
}, t.artifactId)),
|
|
2799
|
-
!
|
|
2799
|
+
!a.artifactSummaries.length && /* @__PURE__ */ A("p", {
|
|
2800
2800
|
className: "team-muted",
|
|
2801
2801
|
children: "交付物准备好后会显示在这里。"
|
|
2802
2802
|
}),
|
|
2803
2803
|
_("artifactSummaries")
|
|
2804
2804
|
] }),
|
|
2805
|
-
s === "members" && /* @__PURE__ */
|
|
2805
|
+
s === "members" && /* @__PURE__ */ j(k, { children: [y.map((e) => /* @__PURE__ */ A("article", {
|
|
2806
2806
|
className: "team-cloud-member",
|
|
2807
|
-
children: /* @__PURE__ */
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2807
|
+
children: /* @__PURE__ */ j("div", { children: [
|
|
2808
|
+
/* @__PURE__ */ A("strong", { children: e.name }),
|
|
2809
|
+
/* @__PURE__ */ j("span", {
|
|
2810
2810
|
className: "team-muted",
|
|
2811
2811
|
children: [
|
|
2812
2812
|
" ",
|
|
@@ -2815,21 +2815,21 @@ function Ce(e) {
|
|
|
2815
2815
|
e.binding.kind === "local_build" ? "本地节点" : "云端节点"
|
|
2816
2816
|
]
|
|
2817
2817
|
}),
|
|
2818
|
-
/* @__PURE__ */
|
|
2819
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ A("p", { children: e.responsibility }),
|
|
2819
|
+
/* @__PURE__ */ j("p", {
|
|
2820
2820
|
className: "team-muted",
|
|
2821
2821
|
children: [
|
|
2822
2822
|
e.binding.availability.state === "ready" ? "执行环境就绪" : e.binding.availability.state === "unchecked" ? "执行环境待检查" : "执行环境不可用",
|
|
2823
2823
|
" · ",
|
|
2824
|
-
|
|
2824
|
+
Z[e.executionStatus]
|
|
2825
2825
|
]
|
|
2826
2826
|
}),
|
|
2827
|
-
(e.reason || e.binding.availability.reason) && /* @__PURE__ */
|
|
2827
|
+
(e.reason || e.binding.availability.reason) && /* @__PURE__ */ A("p", {
|
|
2828
2828
|
role: "status",
|
|
2829
2829
|
children: e.reason || e.binding.availability.reason
|
|
2830
2830
|
})
|
|
2831
2831
|
] })
|
|
2832
|
-
}, e.memberId)), /* @__PURE__ */
|
|
2832
|
+
}, e.memberId)), /* @__PURE__ */ A("p", {
|
|
2833
2833
|
className: "team-muted",
|
|
2834
2834
|
children: "节点环境与执行状态来自最近同步;离开页面只停止观察。"
|
|
2835
2835
|
})] })
|
|
@@ -2841,75 +2841,75 @@ function Ce(e) {
|
|
|
2841
2841
|
]
|
|
2842
2842
|
});
|
|
2843
2843
|
}
|
|
2844
|
-
function
|
|
2845
|
-
let
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
}, [
|
|
2849
|
-
let [
|
|
2850
|
-
async function
|
|
2851
|
-
if (!(!
|
|
2852
|
-
|
|
2844
|
+
function Ee({ scope: e, product: n, observation: r, newGoal: i, pendingMessage: a, value: o, onChange: c, canWrite: l, onSubmit: u, onCancelNew: f }) {
|
|
2845
|
+
let p = C(), m = E(null), h = t(), [_] = D(() => new d(n, e)), v = O(_.subscribe, _.getSnapshot, _.getSnapshot);
|
|
2846
|
+
S(() => () => _.dispose(), [_]), S(() => {
|
|
2847
|
+
l || _.cancel();
|
|
2848
|
+
}, [l, _]);
|
|
2849
|
+
let [y, b] = D(""), [x, w] = D(!1), [T, M] = D(""), N = r.projection?.snapshot, P = i ? null : N?.selectedRun, F = i || !P, I = l && !a && (F || g(P.status) && P.status !== "cancel_requested"), L = !F || v.files.length === 0 || v.state === "ready", R = s(v.state);
|
|
2850
|
+
async function z() {
|
|
2851
|
+
if (!(!I || x || !o.trim() || !L)) {
|
|
2852
|
+
w(!0), M("");
|
|
2853
2853
|
try {
|
|
2854
2854
|
await u({
|
|
2855
2855
|
parts: [{
|
|
2856
2856
|
kind: "text",
|
|
2857
|
-
text:
|
|
2857
|
+
text: o.trim()
|
|
2858
2858
|
}],
|
|
2859
|
-
mentions:
|
|
2860
|
-
intent:
|
|
2861
|
-
...
|
|
2862
|
-
...
|
|
2859
|
+
mentions: F || !y ? [] : [y],
|
|
2860
|
+
intent: F ? "start_goal" : y ? "directed" : "followup",
|
|
2861
|
+
...F ? {} : { teamRunId: P.teamRunId },
|
|
2862
|
+
...F && v.material?.state === "ready" ? { materialManifestRef: v.material.materialId } : {}
|
|
2863
2863
|
});
|
|
2864
2864
|
} catch (e) {
|
|
2865
|
-
|
|
2865
|
+
M(e instanceof Error ? e.message : "提交未完成,草稿已保留。");
|
|
2866
2866
|
} finally {
|
|
2867
|
-
|
|
2867
|
+
w(!1);
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
2870
|
}
|
|
2871
|
-
return /* @__PURE__ */
|
|
2871
|
+
return /* @__PURE__ */ j("form", {
|
|
2872
2872
|
className: "team-composer-wrap",
|
|
2873
2873
|
onSubmit: (e) => {
|
|
2874
|
-
e.preventDefault(),
|
|
2874
|
+
e.preventDefault(), z();
|
|
2875
2875
|
},
|
|
2876
2876
|
children: [
|
|
2877
|
-
|
|
2877
|
+
a && /* @__PURE__ */ A("p", {
|
|
2878
2878
|
className: "team-cloud-notice",
|
|
2879
2879
|
role: "status",
|
|
2880
2880
|
children: "上一条消息的接收结果未确认,请先在操作记录中核对原单。"
|
|
2881
2881
|
}),
|
|
2882
|
-
|
|
2882
|
+
T && /* @__PURE__ */ A("p", {
|
|
2883
2883
|
className: "team-inline-error",
|
|
2884
2884
|
role: "alert",
|
|
2885
|
-
children:
|
|
2885
|
+
children: T
|
|
2886
2886
|
}),
|
|
2887
|
-
/* @__PURE__ */
|
|
2887
|
+
/* @__PURE__ */ j("div", {
|
|
2888
2888
|
className: "team-composer",
|
|
2889
2889
|
children: [
|
|
2890
|
-
/* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ A("label", {
|
|
2891
2891
|
className: "team-sr-only",
|
|
2892
|
-
htmlFor:
|
|
2893
|
-
children:
|
|
2892
|
+
htmlFor: p,
|
|
2893
|
+
children: F ? "团队协作目标" : "给团队的消息"
|
|
2894
2894
|
}),
|
|
2895
|
-
/* @__PURE__ */
|
|
2896
|
-
id:
|
|
2895
|
+
/* @__PURE__ */ A("textarea", {
|
|
2896
|
+
id: p,
|
|
2897
2897
|
rows: 3,
|
|
2898
|
-
value:
|
|
2899
|
-
onChange: (e) =>
|
|
2900
|
-
disabled:
|
|
2901
|
-
placeholder:
|
|
2898
|
+
value: o,
|
|
2899
|
+
onChange: (e) => c(e.target.value),
|
|
2900
|
+
disabled: x,
|
|
2901
|
+
placeholder: F ? "描述目标、预期成果和约束…" : P && !g(P.status) ? "此任务已结束,可新建任务继续协作" : l ? "补充要求,或向成员提问…" : "可先整理草稿,恢复连接后再发送…",
|
|
2902
2902
|
onKeyDown: (e) => {
|
|
2903
|
-
e.key === "Enter" && !e.shiftKey && !e
|
|
2903
|
+
e.key === "Enter" && !e.shiftKey && !h(e) && (e.preventDefault(), z());
|
|
2904
2904
|
}
|
|
2905
2905
|
}),
|
|
2906
|
-
|
|
2906
|
+
F && v.files.length > 0 && /* @__PURE__ */ j("section", {
|
|
2907
2907
|
className: "team-cloud-materials",
|
|
2908
2908
|
"aria-label": "任务材料",
|
|
2909
2909
|
children: [
|
|
2910
|
-
/* @__PURE__ */
|
|
2910
|
+
/* @__PURE__ */ j("div", {
|
|
2911
2911
|
className: "team-cloud-material-status",
|
|
2912
|
-
children: [/* @__PURE__ */
|
|
2912
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2913
2913
|
role: "status",
|
|
2914
2914
|
children: [{
|
|
2915
2915
|
idle: "",
|
|
@@ -2920,101 +2920,101 @@ function we({ scope: e, product: t, observation: n, newGoal: r, pendingMessage:
|
|
|
2920
2920
|
ready: "材料已就绪",
|
|
2921
2921
|
failed: "上传未完成",
|
|
2922
2922
|
cancelled: "上传已取消"
|
|
2923
|
-
}[
|
|
2924
|
-
}), /* @__PURE__ */
|
|
2923
|
+
}[v.state], R ? ` · ${v.completed}/${v.files.length}` : ""]
|
|
2924
|
+
}), /* @__PURE__ */ j("span", { children: [v.files.length, " 个文件"] })]
|
|
2925
2925
|
}),
|
|
2926
|
-
/* @__PURE__ */
|
|
2927
|
-
|
|
2926
|
+
/* @__PURE__ */ A("ul", { children: v.files.map((e, t) => /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("span", { children: e.name }), /* @__PURE__ */ j("span", { children: [e.size.toLocaleString(), " 字节"] })] }, `${t}:${e.name}`)) }),
|
|
2927
|
+
v.error && /* @__PURE__ */ A("p", {
|
|
2928
2928
|
className: "team-inline-error",
|
|
2929
2929
|
role: "alert",
|
|
2930
|
-
children:
|
|
2930
|
+
children: v.error
|
|
2931
2931
|
}),
|
|
2932
|
-
/* @__PURE__ */
|
|
2932
|
+
/* @__PURE__ */ j("div", {
|
|
2933
2933
|
className: "team-task-actions",
|
|
2934
2934
|
children: [
|
|
2935
|
-
|
|
2935
|
+
R && /* @__PURE__ */ A("button", {
|
|
2936
2936
|
type: "button",
|
|
2937
2937
|
className: "team-text-button",
|
|
2938
|
-
onClick: () =>
|
|
2938
|
+
onClick: () => _.cancel(),
|
|
2939
2939
|
children: "取消上传"
|
|
2940
2940
|
}),
|
|
2941
|
-
["failed", "cancelled"].includes(
|
|
2941
|
+
["failed", "cancelled"].includes(v.state) && /* @__PURE__ */ A("button", {
|
|
2942
2942
|
type: "button",
|
|
2943
2943
|
className: "team-text-button",
|
|
2944
|
-
disabled: !
|
|
2945
|
-
onClick: () => void
|
|
2944
|
+
disabled: !I || x,
|
|
2945
|
+
onClick: () => void _.retry(),
|
|
2946
2946
|
children: "重试上传"
|
|
2947
2947
|
}),
|
|
2948
|
-
/* @__PURE__ */
|
|
2948
|
+
/* @__PURE__ */ A("button", {
|
|
2949
2949
|
type: "button",
|
|
2950
2950
|
className: "team-text-button",
|
|
2951
|
-
disabled:
|
|
2952
|
-
onClick: () =>
|
|
2951
|
+
disabled: x || a,
|
|
2952
|
+
onClick: () => _.clear(),
|
|
2953
2953
|
children: "移除材料"
|
|
2954
2954
|
})
|
|
2955
2955
|
]
|
|
2956
2956
|
})
|
|
2957
2957
|
]
|
|
2958
2958
|
}),
|
|
2959
|
-
/* @__PURE__ */
|
|
2959
|
+
/* @__PURE__ */ j("div", {
|
|
2960
2960
|
className: "team-composer-toolbar",
|
|
2961
|
-
children: [/* @__PURE__ */
|
|
2962
|
-
!
|
|
2961
|
+
children: [/* @__PURE__ */ j("div", { children: [
|
|
2962
|
+
!F && /* @__PURE__ */ j("select", {
|
|
2963
2963
|
"aria-label": "接收成员",
|
|
2964
|
-
value:
|
|
2965
|
-
onChange: (e) =>
|
|
2966
|
-
disabled:
|
|
2967
|
-
children: [/* @__PURE__ */
|
|
2964
|
+
value: y,
|
|
2965
|
+
onChange: (e) => b(e.target.value),
|
|
2966
|
+
disabled: x || !I,
|
|
2967
|
+
children: [/* @__PURE__ */ A("option", {
|
|
2968
2968
|
value: "",
|
|
2969
2969
|
children: "发给 Leader"
|
|
2970
|
-
}),
|
|
2970
|
+
}), N?.selectedRunMembers.filter((e) => e.status === "active").map((e) => /* @__PURE__ */ j("option", {
|
|
2971
2971
|
value: e.memberId,
|
|
2972
2972
|
children: ["@", e.name]
|
|
2973
2973
|
}, e.memberId))]
|
|
2974
2974
|
}),
|
|
2975
|
-
|
|
2976
|
-
ref:
|
|
2975
|
+
F && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("input", {
|
|
2976
|
+
ref: m,
|
|
2977
2977
|
type: "file",
|
|
2978
2978
|
multiple: !0,
|
|
2979
2979
|
hidden: !0,
|
|
2980
2980
|
"aria-label": "选择任务材料",
|
|
2981
2981
|
onChange: (e) => {
|
|
2982
2982
|
let t = Array.from(e.target.files ?? []);
|
|
2983
|
-
e.target.value = "",
|
|
2983
|
+
e.target.value = "", I && !x && t.length && _.select(t);
|
|
2984
2984
|
}
|
|
2985
|
-
}), /* @__PURE__ */
|
|
2985
|
+
}), /* @__PURE__ */ A("button", {
|
|
2986
2986
|
className: "team-text-button",
|
|
2987
2987
|
type: "button",
|
|
2988
|
-
disabled: !
|
|
2989
|
-
onClick: () =>
|
|
2990
|
-
children:
|
|
2988
|
+
disabled: !I || x || R,
|
|
2989
|
+
onClick: () => m.current?.click(),
|
|
2990
|
+
children: v.files.length ? "重新选择材料" : "添加材料"
|
|
2991
2991
|
})] }),
|
|
2992
|
-
|
|
2992
|
+
i && /* @__PURE__ */ A("button", {
|
|
2993
2993
|
className: "team-text-button",
|
|
2994
2994
|
type: "button",
|
|
2995
|
-
disabled:
|
|
2996
|
-
onClick:
|
|
2995
|
+
disabled: x || a,
|
|
2996
|
+
onClick: f,
|
|
2997
2997
|
children: "返回任务"
|
|
2998
2998
|
})
|
|
2999
|
-
] }), /* @__PURE__ */
|
|
2999
|
+
] }), /* @__PURE__ */ A("button", {
|
|
3000
3000
|
className: "team-button team-primary",
|
|
3001
3001
|
type: "submit",
|
|
3002
|
-
disabled: !
|
|
3003
|
-
children:
|
|
3002
|
+
disabled: !I || x || !o.trim() || !L,
|
|
3003
|
+
children: x ? "正在核对" : F ? "开始协作" : "发送"
|
|
3004
3004
|
})]
|
|
3005
3005
|
})
|
|
3006
3006
|
]
|
|
3007
3007
|
}),
|
|
3008
|
-
/* @__PURE__ */
|
|
3008
|
+
/* @__PURE__ */ j("p", {
|
|
3009
3009
|
className: "team-composer-help",
|
|
3010
|
-
children: ["Enter 发送 · Shift + Enter 换行",
|
|
3010
|
+
children: ["Enter 发送 · Shift + Enter 换行", F ? " · 单个材料 ≤20 MiB,总计 ≤64 MiB" : " · 接收回执不代表执行完成"]
|
|
3011
3011
|
})
|
|
3012
3012
|
]
|
|
3013
3013
|
});
|
|
3014
3014
|
}
|
|
3015
|
-
function
|
|
3016
|
-
let [a, o] =
|
|
3017
|
-
return
|
|
3015
|
+
function De({ task: e, scope: t, product: n, canWrite: r, command: i }) {
|
|
3016
|
+
let [a, o] = D(!1), [s, c] = D(null), [l, u] = D("");
|
|
3017
|
+
return S(() => {
|
|
3018
3018
|
if (!a) return;
|
|
3019
3019
|
let r = new AbortController();
|
|
3020
3020
|
return n.task(t, e.taskId, e.teamRunId, r.signal).then((t) => {
|
|
@@ -3030,23 +3030,23 @@ function Te({ task: e, scope: t, product: n, canWrite: r, command: i }) {
|
|
|
3030
3030
|
n,
|
|
3031
3031
|
t,
|
|
3032
3032
|
e
|
|
3033
|
-
]), /* @__PURE__ */
|
|
3033
|
+
]), /* @__PURE__ */ j("article", {
|
|
3034
3034
|
className: "team-cloud-task",
|
|
3035
3035
|
children: [
|
|
3036
|
-
/* @__PURE__ */
|
|
3036
|
+
/* @__PURE__ */ j("button", {
|
|
3037
3037
|
className: "team-cloud-task-title",
|
|
3038
3038
|
type: "button",
|
|
3039
3039
|
"aria-expanded": a,
|
|
3040
3040
|
onClick: () => {
|
|
3041
3041
|
o(!a), u("");
|
|
3042
3042
|
},
|
|
3043
|
-
children: [/* @__PURE__ */
|
|
3043
|
+
children: [/* @__PURE__ */ A("strong", { children: e.title }), /* @__PURE__ */ A(B, { status: e.status })]
|
|
3044
3044
|
}),
|
|
3045
|
-
e.reason && /* @__PURE__ */
|
|
3045
|
+
e.reason && /* @__PURE__ */ A("p", {
|
|
3046
3046
|
className: "team-muted",
|
|
3047
|
-
children:
|
|
3047
|
+
children: ye(e.reason)
|
|
3048
3048
|
}),
|
|
3049
|
-
a && (s ? /* @__PURE__ */
|
|
3049
|
+
a && (s ? /* @__PURE__ */ A(re, {
|
|
3050
3050
|
task: s,
|
|
3051
3051
|
members: [],
|
|
3052
3052
|
onAction: r ? (t, n, r) => i(`tasks/${e.taskId}/actions`, {
|
|
@@ -3054,25 +3054,25 @@ function Te({ task: e, scope: t, product: n, canWrite: r, command: i }) {
|
|
|
3054
3054
|
expectedRevision: e.revision,
|
|
3055
3055
|
...r ? { reason: r } : {}
|
|
3056
3056
|
}) : void 0
|
|
3057
|
-
}) : /* @__PURE__ */
|
|
3057
|
+
}) : /* @__PURE__ */ A("p", {
|
|
3058
3058
|
role: l ? "alert" : "status",
|
|
3059
3059
|
children: l || "正在读取任务详情…"
|
|
3060
3060
|
}))
|
|
3061
3061
|
]
|
|
3062
3062
|
});
|
|
3063
3063
|
}
|
|
3064
|
-
function
|
|
3064
|
+
function Q(e) {
|
|
3065
3065
|
if (!e || typeof e != "object") return !1;
|
|
3066
|
-
if (Array.isArray(e)) return e.some(
|
|
3066
|
+
if (Array.isArray(e)) return e.some(Q);
|
|
3067
3067
|
let t = e;
|
|
3068
|
-
return t.secret === !0 || t.writeOnly === !0 || t.format === "password" || Object.values(t).some(
|
|
3068
|
+
return t.secret === !0 || t.writeOnly === !0 || t.format === "password" || Object.values(t).some(Q);
|
|
3069
3069
|
}
|
|
3070
|
-
function
|
|
3071
|
-
let [s, c] =
|
|
3072
|
-
|
|
3070
|
+
function $({ summary: t, scope: r, product: i, canWrite: a, command: o }) {
|
|
3071
|
+
let [s, c] = D(null), [l, u] = D(!1), [d, f] = D({}), [p, m] = D(""), [h, g] = D(!1), [_, v] = D(!1);
|
|
3072
|
+
S(() => {
|
|
3073
3073
|
if (!l) return;
|
|
3074
3074
|
let e = new AbortController();
|
|
3075
|
-
return i.interaction(r,
|
|
3075
|
+
return i.interaction(r, t, e.signal).then((t) => {
|
|
3076
3076
|
e.signal.aborted || c(t);
|
|
3077
3077
|
}).catch(() => {
|
|
3078
3078
|
e.signal.aborted || m("审批详情读取失败,请关闭后重试或刷新。");
|
|
@@ -3081,10 +3081,10 @@ function De({ summary: n, scope: r, product: i, canWrite: a, command: o }) {
|
|
|
3081
3081
|
l,
|
|
3082
3082
|
r,
|
|
3083
3083
|
i,
|
|
3084
|
-
|
|
3084
|
+
t
|
|
3085
3085
|
]);
|
|
3086
3086
|
async function y(e, t) {
|
|
3087
|
-
if (!(!a || !s || s.status !== "pending" || h || _ ||
|
|
3087
|
+
if (!(!a || !s || s.status !== "pending" || h || _ || Q(s.requestSchema))) {
|
|
3088
3088
|
g(!0), m("");
|
|
3089
3089
|
try {
|
|
3090
3090
|
await o("interactions", {
|
|
@@ -3100,11 +3100,11 @@ function De({ summary: n, scope: r, product: i, canWrite: a, command: o }) {
|
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
3102
3102
|
}
|
|
3103
|
-
return /* @__PURE__ */
|
|
3103
|
+
return /* @__PURE__ */ j("article", {
|
|
3104
3104
|
className: "team-interaction-card",
|
|
3105
3105
|
children: [
|
|
3106
|
-
/* @__PURE__ */
|
|
3107
|
-
/* @__PURE__ */
|
|
3106
|
+
/* @__PURE__ */ A("h3", { children: t.title }),
|
|
3107
|
+
/* @__PURE__ */ A("button", {
|
|
3108
3108
|
className: "team-text-button",
|
|
3109
3109
|
type: "button",
|
|
3110
3110
|
"aria-expanded": l,
|
|
@@ -3113,40 +3113,40 @@ function De({ summary: n, scope: r, product: i, canWrite: a, command: o }) {
|
|
|
3113
3113
|
},
|
|
3114
3114
|
children: l ? "收起详情" : "查看并处理"
|
|
3115
3115
|
}),
|
|
3116
|
-
l && (s ? /* @__PURE__ */
|
|
3116
|
+
l && (s ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(M, { message: s.message }), _ || s.status !== "pending" ? /* @__PURE__ */ A("p", {
|
|
3117
3117
|
role: "status",
|
|
3118
3118
|
children: _ || s.status === "resolving" ? "服务端已接收,等待执行端确认。" : s.status === "expired" ? "该事项已过期。" : s.status === "cancelled" ? "该事项已取消。" : "该事项已处理。"
|
|
3119
|
-
}) :
|
|
3119
|
+
}) : Q(s.requestSchema) ? /* @__PURE__ */ A("p", {
|
|
3120
3120
|
role: "status",
|
|
3121
3121
|
children: "此表单包含敏感字段,无法通过浏览器持久队列提交,请使用安全凭据配置入口。"
|
|
3122
|
-
}) : s.kind === "input" ? s.requestSchema && e(s.requestSchema).length > 0 ? /* @__PURE__ */
|
|
3122
|
+
}) : s.kind === "input" ? s.requestSchema && e(s.requestSchema).length > 0 ? /* @__PURE__ */ A(n, {
|
|
3123
3123
|
schema: s.requestSchema,
|
|
3124
3124
|
values: d,
|
|
3125
3125
|
onChange: f,
|
|
3126
3126
|
disabled: !a || h,
|
|
3127
3127
|
onSubmit: () => void y("submit", d),
|
|
3128
3128
|
onCancel: () => void y("cancel", {})
|
|
3129
|
-
}) : /* @__PURE__ */
|
|
3129
|
+
}) : /* @__PURE__ */ A("p", {
|
|
3130
3130
|
role: "status",
|
|
3131
3131
|
children: "缺少输入表单,暂不能提交。"
|
|
3132
|
-
}) : /* @__PURE__ */
|
|
3132
|
+
}) : /* @__PURE__ */ j("div", {
|
|
3133
3133
|
className: "team-task-actions",
|
|
3134
|
-
children: [/* @__PURE__ */
|
|
3134
|
+
children: [/* @__PURE__ */ A("button", {
|
|
3135
3135
|
className: "team-button",
|
|
3136
3136
|
disabled: !a || h,
|
|
3137
3137
|
onClick: () => void y("reject", { approved: !1 }),
|
|
3138
3138
|
children: "拒绝"
|
|
3139
|
-
}), /* @__PURE__ */
|
|
3139
|
+
}), /* @__PURE__ */ A("button", {
|
|
3140
3140
|
className: "team-button team-primary",
|
|
3141
3141
|
disabled: !a || h,
|
|
3142
3142
|
onClick: () => void y("approve", { approved: !0 }),
|
|
3143
3143
|
children: "同意"
|
|
3144
3144
|
})]
|
|
3145
|
-
})] }) : /* @__PURE__ */
|
|
3145
|
+
})] }) : /* @__PURE__ */ A("p", {
|
|
3146
3146
|
role: "status",
|
|
3147
3147
|
children: p || "正在读取审批详情…"
|
|
3148
3148
|
})),
|
|
3149
|
-
p && s && /* @__PURE__ */
|
|
3149
|
+
p && s && /* @__PURE__ */ A("p", {
|
|
3150
3150
|
role: "alert",
|
|
3151
3151
|
className: "team-inline-error",
|
|
3152
3152
|
children: p
|
|
@@ -3155,4 +3155,4 @@ function De({ summary: n, scope: r, product: i, canWrite: a, command: o }) {
|
|
|
3155
3155
|
});
|
|
3156
3156
|
}
|
|
3157
3157
|
//#endregion
|
|
3158
|
-
export {
|
|
3158
|
+
export { Ce as CloudTeamWorkspace, Te as CloudTeamWorkspaceView, ue as CreateGroupDialog, te as GroupComposer, H as GroupHeader, U as GroupTimeline, G as MemberInspector, oe as MemberRail, ne as TaskBoard, re as TaskDetail, ae as TeamInteractionTray, ee as TeamProgressCard, B as TeamStatusLabel, se as TeamWorkspace, X as useTeamChat };
|