@datalayer/agent-runtimes 1.5.20 → 1.5.22
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/dist-embed/chunks/{AgentDetails-DZyyuD5F.js → AgentDetails-B6vekLFY.js} +1 -1
- package/dist-embed/chunks/{AgentDetailsDialog-DaQyQxlm.js → AgentDetailsDialog-C-o8qFsS.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-CBNiiRtv.js → AgentInspector-EiBHJgc9.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-BxMOAc7K.js → AgentInspectorDialog-3fbLXnLP.js} +1 -1
- package/dist-embed/chunks/{CellSidebarExtension-Dwe7PfXi.js → CellSidebarExtension-BBXRIRgA.js} +7 -7
- package/dist-embed/chunks/ChatView-BjZ993Ch.js +32 -0
- package/dist-embed/chunks/{ContextPie-n1y886z-.js → ContextPie-Daf19Ivt.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-BSeEBNHt.js → DeckComponent-C76a8LYD.js} +2 -2
- package/dist-embed/chunks/{DocumentView-OIdQEk_n.js → DocumentView-BZhbQkbP.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-C-uLD1W7.js → EphemeralDocument-Bzv1mPpG.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-C_peDfqf.js → EphemeralNotebook-C4_wmSgk.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-DHSxnPc9.js → ExcalidrawComponent-DVOnRDkN.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-BpsfNG-u.js → ExcalidrawModal-B0h_-M3l.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-BUSLnJVL.js → JupyterLexicalExtension-B2PQrLXS.js} +9 -9
- package/dist-embed/chunks/{KernelVariables-Cu7UeFhT.js → KernelVariables-trZsXNAi.js} +1 -1
- package/dist-embed/chunks/{LexicalToolRegistry-CNg1T5sQ.js → LexicalToolRegistry-8wJyLumb.js} +4 -4
- package/dist-embed/chunks/{NotebookToolSurfaces-Cm6-oE_W.js → NotebookToolSurfaces-BuKcXArX.js} +1 -1
- package/dist-embed/chunks/{NotebookView-Be2lNZjS.js → NotebookView-Em4y6Een.js} +1 -1
- package/dist-embed/chunks/{Output-OIgTyxpD.js → Output-DA8Udq91.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-BMq0tlcE.js → SandboxDetailsDialog-o2z6YFyb.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-D3mmq2C1.js → SchemaForm-DCt_mqR1.js} +1 -1
- package/dist-embed/chunks/{WidgetVariableView-DnuwkCHl.js → WidgetVariableView-CDEFi0p0.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-Bum16ua6.js → YouTubePlugin-DxRPFzvS.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Dac38D-P.js → abnfDiagram-VCTEODGH-Cit223SC.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BMkFygW4.js → abnfDiagram-VCTEODGH-CsoEWluu.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-JDFjD_Dk.js → ar-SA-G6X2FPQ2-CjJtC55z.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-D7VBU0uf.js → architectureDiagram-5GKGNRK7-DfqpfKOB.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DXJTBh9S.js → architectureDiagram-5GKGNRK7-DyQuZM-c.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-AbN1w5Zy.js → az-AZ-76LH7QW2-B7KkL6wt.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-BULkJsTf.js → bg-BG-XCXSNQG7-D7UwtEhO.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-Bk9MNjmt.js → blockDiagram-868be97b-jJKAH_Up.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CKjKQ6Dq.js → blockDiagram-I7D4REHJ-BcQwB7-r.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BwenaP7n.js → blockDiagram-I7D4REHJ-z3xnLtdG.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-B6EtUyIk.js → bn-BD-2XOGV67Q-pDDWE9Mn.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-BGoSdP5p.js → c4Diagram-3f4bdde3-DU_-LipO.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DlkcVfDa.js → c4Diagram-7LVT6UL2-BeMfCOG_.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BZRokUDB.js → c4Diagram-7LVT6UL2-DjfnLrWZ.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BZ0wzUck.js → ca-ES-6MX7JW3Y-By1uEeFx.js} +1 -1
- package/dist-embed/chunks/{celltoolbartracker-CCRqu43G.js → celltoolbartracker-DcYHi8Du.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-DLu9zZx0.js → chunk-2Q5K7J3B-BGvvv_gg.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-CfYiHpfd.js → chunk-2Q5K7J3B-YWpfqKnX.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-yHAygNq4.js → chunk-5VM5RSS4-4bCWL_eZ.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-dV5IUPYK.js → chunk-5VM5RSS4-t-8mwHFb.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BArvzx7H.js → chunk-F27PBJKO-3yGsHIDd.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BeY8iI19.js → chunk-F27PBJKO-De9ONU-g.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-BJRUyuXy.js → chunk-IMKFNOWR-Bvbi7lre.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-iUeFNxCU.js → chunk-IMKFNOWR-DA2KJGep.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-BDUBU4vN.js → chunk-JWPE2WC7-CVkDZh_H.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-Djk-1JPJ.js → chunk-JWPE2WC7-w_AaYpEU.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-E4731IOt.js → chunk-POPQ4Y6H-C1mg0obI.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-CibXbz_c.js → chunk-POPQ4Y6H-DnstozKC.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-o7JviCXQ.js → chunk-SVP7TREG-CVLd6GtA.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-DeRyA6Ek.js → chunk-SVP7TREG-DmKkKduL.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-Zk_gUXIu.js → chunk-TICWLB2K-C-lEt3p0.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BIhZcpwn.js → chunk-TICWLB2K-xv7MPgmq.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-DATpHkZD.js → chunk-XXDRQBXY-Cq8wF2xQ.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-Cp6f69YK.js → chunk-XXDRQBXY-j7xuWjIK.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-BfpWJKcC.js → classDiagram-ZZMXUADV-DRPRMTvC.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-DcutslOq.js → classDiagram-ZZMXUADV-Dvh08RMu.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-BVLyWZwA.js → classDiagram-f62afe4f-B8-b8b-t.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-CgcAzr_L.js → classDiagram-v2-604399ef-CHogX84-.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BfpWJKcC.js → classDiagram-v2-VYDZK3BY-DRPRMTvC.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DcutslOq.js → classDiagram-v2-VYDZK3BY-Dvh08RMu.js} +1 -1
- package/dist-embed/chunks/{code-block-IT6T5CEO-D5_yhrdD.js → code-block-IT6T5CEO-Dbm1cj5T.js} +1 -1
- package/dist-embed/chunks/{component-DoyMsR16.js → component-CsXw-w1P.js} +3 -3
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B-LvsoyE.js → cose-bilkent-JH36ORCC-BrisaBwh.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DhPsWJev.js → cose-bilkent-JH36ORCC-DGpwW9PH.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-CnP7VdTn.js → createText-aed3d8b3-C8C5hNtS.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CHIiQJ-9.js → cs-CZ-2BRQDIVT-TB9QxoL2.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B4k-OykO.js → cynefinDiagram-5FMLGOSQ-B37BRKcq.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D4zzGd7W.js → cynefinDiagram-5FMLGOSQ-NXny6Mot.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-dfN2SAKQ.js → da-DK-5WZEPLOC-CLl8TZ2P.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-BlWkzzlo.js → dagre-GXQ25YYZ-b03jeXc5.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-DUrWhbsC.js → dagre-GXQ25YYZ-mM6SsGs8.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-BKsKfmfo.js → de-DE-XR44H4JA-6gY_Hl4H.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-BuRBzTwI.js → diagram-S7CK7UJ4-C8TF_Y_V.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-FxHXDIYr.js → diagram-S7CK7UJ4-fpaH_1xM.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-CeDT8Vz4.js → diagram-UQ7AKVKN-CcqaQfbU.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-FxYHrvzF.js → diagram-UQ7AKVKN-G8fspx37.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-C2icUdkA.js → diagram-VSXAHHWV-B3Q41FOl.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-Cv0WAiv8.js → diagram-VSXAHHWV-DLhWEHn-.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-AoxkG7BW.js → diagram-VX7I27RA-Dnbm3teD.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-D6VPVMhu.js → diagram-VX7I27RA-Dy-IHeZr.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-DxunLDOr.js → diagram-Z3DM3KII-BkiB9_Ay.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-CHxtPQ6F.js → diagram-Z3DM3KII-hE5FTtNp.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CfsTBJc5.js → ebnfDiagram-PWID7BFC-DJhj6Mbd.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CmJlfM6d.js → ebnfDiagram-PWID7BFC-DZiCEGSK.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-Cl5rq6T8.js → edges-b2856ca0-DuBY_rn3.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-Cs0zPSU1.js → el-GR-BZB4AONW-CFGi_gqP.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-C0jmz-br.js → erDiagram-5d81789a-BYOejxuX.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-Dyljy6tN.js → erDiagram-RLTQ6QDP-Bg2UfSBM.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-FFD_URlX.js → erDiagram-RLTQ6QDP-v1tF2vX5.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-fGOqRf0o.js → es-ES-U4NZUMDT-D_HQumEp.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-CLZ09rVe.js → eu-ES-A7QVB2H4-CvUID20p.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-Cjimbc8n.js → fa-IR-HGAKTJCU-C7_Vi5QP.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-ZXNEW916.js → fi-FI-Z5N7JZ37-SBYxKS7Q.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-Cden9aoH.js → flowDb-185abca5-C_IywhMB.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-Bar9YxSW.js → flowDiagram-1629c991-C8JQo90r.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-bg09n0_F.js → flowDiagram-HODETNUW-BigtRRvu.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-02Xo2-6n.js → flowDiagram-HODETNUW-Cd1y1bVx.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-C6FnOAb2.js → flowDiagram-v2-1d953310-DTH8N-sj.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-DcmMV2Wi.js → flowchart-elk-definition-6df44142-W8s7oFgJ.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-DQaq_g67.js → fr-FR-RHASNOE6-fAErz4Nf.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-BN61xNrz.js → ganttDiagram-3b0b3873-D_XwfPDh.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-BCLyiaOJ.js → ganttDiagram-EL5Y4UJY-BIsU1Bcw.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-JviVPOnF.js → ganttDiagram-EL5Y4UJY-VT_s02F9.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CzBMuAvA.js → gitGraphDiagram-WWUBYQGX-BDdr_2gq.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CNc3l-2t.js → gitGraphDiagram-WWUBYQGX-BvxzF9hn.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-7ecaKDp7.js → gitGraphDiagram-f01e8bc2-UBa5a0HV.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BlrLF7Sk.js → gl-ES-HMX3MZ6V-DCciQOEM.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-DLfo2nov.js → he-IL-6SHJWFNN-CuQhQVb2.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-BcbS0I1h.js → hi-IN-IWLTKZ5I-BlH8AK2z.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-B_-3TehM.js → hu-HU-A5ZG7DT2-BaBGhZVQ.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-C920eBs5.js → id-ID-SAP4L64H-Dkm1zS1g.js} +1 -1
- package/dist-embed/chunks/{index-9bae90f3-_mZDJyzh.js → index-9bae90f3-CvHGNDGk.js} +1 -1
- package/dist-embed/chunks/{index-W-qUA31l.js → index-B9aqZrHy.js} +1 -1
- package/dist-embed/chunks/{index-DbHMJ-IM.js → index-BDs-ntTo.js} +1 -1
- package/dist-embed/chunks/{index-D1CRwrf9.js → index-BQp4l7hT.js} +2 -2
- package/dist-embed/chunks/{index-D_-7qr4x.js → index-BcdbHyzT.js} +1 -1
- package/dist-embed/chunks/{index-DmKOrT_f.js → index-BqDJ3hYN.js} +1 -1
- package/dist-embed/chunks/{index-CuqMWXgT.js → index-CFP9psRB.js} +3 -3
- package/dist-embed/chunks/{index-C8N5z7FZ.js → index-CUAnjzKL.js} +1 -1
- package/dist-embed/chunks/{index-k3ISgWrJ.js → index-CWwj0zW9.js} +1 -1
- package/dist-embed/chunks/{index-DV2fNvY7.js → index-CecqH6mN.js} +1 -1
- package/dist-embed/chunks/{index-C3zGthUI.js → index-CoxYszKx.js} +1 -1
- package/dist-embed/chunks/{index-7V4MgoX0.js → index-CozDzMOf.js} +1 -1
- package/dist-embed/chunks/{index-C2UmIEOV.js → index-CrL-deXT.js} +1 -1
- package/dist-embed/chunks/{index-CW0DxnfF.js → index-CtEseCtc.js} +1 -1
- package/dist-embed/chunks/{index-OZDJ7kli.js → index-D2vkNPmG.js} +1 -1
- package/dist-embed/chunks/{index-MNZ1LVAM.js → index-D5xVRNk8.js} +1 -1
- package/dist-embed/chunks/{index-DmYrjwOw.js → index-D8wHLHbt.js} +1 -1
- package/dist-embed/chunks/{index-B0VC_nl2.js → index-DAZUOPnd.js} +1 -1
- package/dist-embed/chunks/{index-BbtA7ppb.js → index-DE_JTiwB.js} +1 -1
- package/dist-embed/chunks/{index-CLojGXLe.js → index-DMll0Yzi.js} +1 -1
- package/dist-embed/chunks/{index-DcbXB4Ou.js → index-DN-cizG6.js} +1 -1
- package/dist-embed/chunks/{index-DMTXHmrU.js → index-DPHM1WLM.js} +1 -1
- package/dist-embed/chunks/{index-Dyv67BU9.js → index-DSN70XMH.js} +2 -2
- package/dist-embed/chunks/{index-CGhVy6OJ.js → index-Dc5AqaeZ.js} +1 -1
- package/dist-embed/chunks/{index-B3qU5V3s.js → index-DdmqZZnv.js} +1 -1
- package/dist-embed/chunks/{index-BST3vALX.js → index-DlYw1KQn.js} +5 -5
- package/dist-embed/chunks/{index-C3p2Hbbg.js → index-Dobs-OKl.js} +1 -1
- package/dist-embed/chunks/{index-oJ3M8HYJ.js → index-Dp3JEvYy.js} +1 -1
- package/dist-embed/chunks/{index-D95mZTII.js → index-DsMBsL3g.js} +1 -1
- package/dist-embed/chunks/{index-BVdp0AG7.js → index-DvyxBamA.js} +4 -4
- package/dist-embed/chunks/{index-BMqDh5WU.js → index-SsFECYMb.js} +1 -1
- package/dist-embed/chunks/{index-DqwL86GY.js → index-YVrQYH-H.js} +12 -12
- package/dist-embed/chunks/{index-DSts8s_N.js → index-a9o1fYab.js} +1 -1
- package/dist-embed/chunks/{index-BVkaRzYN.js → index-bC_5dTbf.js} +4 -4
- package/dist-embed/chunks/{index--rbc1jdS.js → index-jJxXKHoT.js} +1 -1
- package/dist-embed/chunks/{index.esm-Dy7cyZyH.js → index.esm-p0OnSU9h.js} +1 -1
- package/dist-embed/chunks/{index.esm-jFa95d0B.js → index.esm-q_fIJH5v.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CuQ0a02I.js → infoDiagram-27XIBGKW-DIeaDzEK.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CDc0DV-6.js → infoDiagram-27XIBGKW-DZ6Xhv3K.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-BKWmVk4B.js → infoDiagram-a29d40f1-B9PMyz4X.js} +1 -1
- package/dist-embed/chunks/{isEqual-SWNqZJZT.js → isEqual-Cwjr2skl.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CPu6wHAG.js → ishikawaDiagram-5VMMS53U-BP4Q8nEu.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BY7eKNmA.js → ishikawaDiagram-5VMMS53U-CwrdITPn.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-CsJELR-H.js → it-IT-JPQ66NNP-BrcctIsI.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-Bh4bW0cv.js → ja-JP-DBVTYXUO-CKuJ3Sod.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-6CRYfcQL.js → journeyDiagram-3NMN7TZE-iJrCUeL0.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Cv_KZqY3.js → journeyDiagram-3NMN7TZE-wI34jsXX.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-yJruA0Fm.js → journeyDiagram-95396277-B6WhL2Fl.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-BmDtc0g0.js → kaa-6HZHGXH3-ChFYZBwI.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Bluox3dD.js → kab-KAB-ZGHBKWFO-C7C7EuVk.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Biauy1A4.js → kanban-definition-UXKFOSKX-B8AB0LN4.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Dps45ZlJ.js → kanban-definition-UXKFOSKX-gqU76cK9.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-EZjFhsK8.js → kk-KZ-P5N5QNE5-Bff18CC1.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-BpZu76AC.js → km-KH-HSX4SM5Z-DU2YQt8I.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-C5JZPTHd.js → ko-KR-MTYHY66A-CQruDlRn.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-BUaf6TOB.js → ku-TR-6OUDTVRD-DoySMeIi.js} +1 -1
- package/dist-embed/chunks/{layout-C8INuwYa.js → layout-CJFemkl6.js} +1 -1
- package/dist-embed/chunks/{layout-CEbgEIwd.js → layout-DbdaqszO.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-DFMSPigW.js → lexicalHooks-Pqoe8h_O.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-CuGmKRQr.js → lt-LT-XHIRWOB4-72Vmr8iW.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-EYERw_NP.js → lv-LV-5QDEKY6T-CxtO97qO.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-BeAq5EQp.js → mermaid.core-CAzPWd8O.js} +3 -3
- package/dist-embed/chunks/{mermaid.core-hzdTpjmh.js → mermaid.core-DaZxhAXO.js} +5 -5
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-iB7eW5x9.js → mindmap-definition-YA3MSWOX-D8W0sJ7P.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX--O06aygF.js → mindmap-definition-YA3MSWOX-DPl-uWpT.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-DCwgMhNw.js → mindmap-definition-e4c1d938-CGXwlH4A.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-SKx4bMeU.js → mr-IN-CRQNXWMA-BNGEl_QE.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-BG-vgEXz.js → my-MM-5M5IBNSE-4wIAMvGF.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-BbW-11AI.js → nb-NO-T6EIAALU-z-1s9yX9.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-CSKGpuSJ.js → nl-NL-IS3SIHDZ-CYKGEVB8.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-P1tnp9TQ.js → nn-NO-6E72VCQL-DwQFIFpO.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-vpu8tuQT.js → oc-FR-POXYY2M6-mH2n3eM_.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-CIpdGll2.js → pa-IN-N4M65BXN-DbixE6jQ.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Bon6jQ3L.js → pegDiagram-XKGWAZYB-D3qs3UBw.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-ZPizxhEX.js → pegDiagram-XKGWAZYB-DJmZupPa.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-hVEpOtFm.js → percentages-BXMCSKIN-5Q9KX_WU.js} +5 -5
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-C0Pc9GUi.js → pieDiagram-E7YTZNPT-C58cd6s7.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Di8dEHt9.js → pieDiagram-E7YTZNPT-CrZQ-dOy.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-C--hwbRv.js → pieDiagram-c941bede-Dn3GMx6q.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-Ckyj0Mzv.js → pl-PL-T2D74RX3-jOVonFYe.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-3jDc9_Aa.js → pt-BR-5N22H2LF-Cx4MrqgK.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-lhLbXf7Q.js → pt-PT-UZXXM6DQ-B2PzNwuF.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-D0QYtpIp.js → quadrantDiagram-AXDQQJYC-CJn8hkR8.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-Ffo3hgR0.js → quadrantDiagram-AXDQQJYC-haT-kxqE.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Bqmed-0s.js → quadrantDiagram-cf8b8fe0-B3wudq14.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BMC9Ldnh.js → railroadDiagram-O6MQD6OU-T23yIHww.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-aTc7bF4I.js → railroadDiagram-O6MQD6OU-Ty6XXjBy.js} +1 -1
- package/dist-embed/chunks/{renderer-CR6Lxa3d.js → renderer-Au1S-H5k.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-DExdw0ey.js → requirementDiagram-53bda41b-B-eAYQ6c.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DBj1iVv5.js → requirementDiagram-BXWQKSXE-CgkHdmYF.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-mBFLHcqA.js → requirementDiagram-BXWQKSXE-fpBmgh7Q.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-Dy9oeW3b.js → ro-RO-JPDTUUEW-BCQxuLcc.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CK16-wfD.js → ru-RU-B4JR7IUQ-CqSiHvqj.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-9W9X5V7a.js → sankeyDiagram-P5KCCOFB-DEGMK43Q.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DzaadHXz.js → sankeyDiagram-P5KCCOFB-hDbZE81L.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-B6u8wnkU.js → sankeyDiagram-c3ef121a-O14jOeqO.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-Bq8bvLh8.js → sequenceDiagram-82a5b84f-BFFzLElQ.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BNfJw8_y.js → sequenceDiagram-WJ2MYXX4-MrC4K4SC.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-B76NTf4c.js → sequenceDiagram-WJ2MYXX4-wongMGVN.js} +1 -1
- package/dist-embed/chunks/{sessions-XxjScqnJ.js → sessions-BRALW9Yv.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-AJdaUbzl.js → si-LK-N5RQ5JYF-Dbgk5YHt.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-KZBUxNmb.js → sizeCapture-INFHLROL-CiOiAAo5.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-DQ5s0TIW.js → sizeCapture-INFHLROL-j4-sCda0.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-Bk82hIVU.js → sk-SK-C5VTKIMK-OBAaNvVw.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-DSFcvf6W.js → sl-SI-NN7IZMDC-DqLxi4IM.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-BiTTNI1Z.js → stateDiagram-43e79a5f-BZm5gFdu.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-lndPMO3D.js → stateDiagram-D77RDMKH-D7_xyy8n.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-D4hQpdZ2.js → stateDiagram-D77RDMKH-DXrbH1aM.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-BbFiQEfG.js → stateDiagram-v2-2041ed4f-DiXOgJsK.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-pqcRT12A.js → stateDiagram-v2-MP3YSRHH-DLsY6ysL.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-C-kIBdBJ.js → stateDiagram-v2-MP3YSRHH-ngWpJn6k.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-U9lx7mAf.js → styles-455b33cd-CrHizSU7.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-S-lYZYdK.js → styles-f932cba9-YuCN7fSa.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-DfudfB3j.js → styles-fcc2142b-tjrOPOh4.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-f2gmZjeG.js → subset-shared.chunk-Du2agLgk.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-De1CPIQ6.js → subset-worker.chunk-BXR8pgHc.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-BbGfLHIi.js → sv-SE-XGPEYMSR-BbgHKxhC.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-ClgHG0vb.js → svgDrawCommon-148a3cd9-DTqtvo5_.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-OqZ4t-07.js → swimlanes-42K2YHIH-B289Mbni.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-CjV1bdPk.js → swimlanes-42K2YHIH-B3H_wpMu.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-9twpvQtj.js → swimlanesDiagram-VR7AAH4N-D0ZHzw-_.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BdS4NGOx.js → swimlanesDiagram-VR7AAH4N-qWg-2xN_.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-BWMJgnI2.js → ta-IN-2NMHFXQM-0pH7gQyu.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-DiP_CZXl.js → th-TH-HPSO5L25-Dvbu09CU.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-B7uSaXDu.js → timeline-definition-24CTP7MA-DUc18SdK.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-Cs4Bwobu.js → timeline-definition-24CTP7MA-DpMq7g2g.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-CHrBluu1.js → timeline-definition-7545f45a--4ypi4BE.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-CKMBvOkr.js → tr-TR-DEFEU3FU-B6YS3iEB.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-CQL0E0jU.js → uk-UA-QMV73CPH-DMG9vIVp.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-uwWpr4uC.js → vennDiagram-4TSXK5OY-CS12EGJw.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CHSyRZN_.js → vennDiagram-4TSXK5OY-CvEXE1xX.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-BpvEBNJo.js → vi-VN-M7AON7JQ-DB3ZrpeP.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-0UuvD-IO.js → wardleyDiagram-VM6X3IG4-8LfGni9_.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-zIfOyYBf.js → wardleyDiagram-VM6X3IG4-Bj02LzjH.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-ChbRPzo8.js → xychartDiagram-3f383b91-CE_OY5QR.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-hCGgyjir.js → xychartDiagram-S5SC5T6Z-BdZi5x4a.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-q9gcUSF1.js → xychartDiagram-S5SC5T6Z-DXqC0l3r.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-DWmzAIjK.js → zh-CN-LNUGB5OW-VV-lg83H.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-CQ-xPzHX.js → zh-HK-E62DVLB3-DLoyC6Q9.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DvlSTykD.js → zh-TW-RAJ6MFWO-DhFllgOW.js} +1 -1
- package/dist-embed/datalayer-app-main.js +54 -54
- package/lib/apps/apps/records.d.ts +0 -29
- package/lib/apps/apps/records.js +11 -34
- package/lib/apps/apps/threads.d.ts +2 -21
- package/lib/apps/apps/threads.js +0 -75
- package/lib/apps/embed/embedSession.d.ts +0 -8
- package/lib/apps/embed/embedSession.js +1 -38
- package/lib/apps/embed/visitorApp.d.ts +23 -4
- package/lib/apps/embed/visitorApp.js +43 -5
- package/lib/apps/plugins/chat/ChatView.js +15 -3
- package/lib/chat/ChatFloating.js +4 -1
- package/lib/chat/base/ChatBase.js +12 -4
- package/lib/chat/base/fullContextMessages.js +1 -1
- package/lib/chat/prompt/InputPrompt.d.ts +6 -1
- package/lib/chat/prompt/InputPrompt.js +12 -2
- package/lib/hooks/useAgUi.js +1 -1
- package/lib/hooks/useToolApprovals.d.ts +1 -1
- package/lib/hooks/useToolApprovals.js +1 -1
- package/lib/{protocols → portable}/agUiRefusal.d.ts +1 -1
- package/lib/{protocols → portable}/agUiRefusal.js +1 -1
- package/lib/portable/agui.d.ts +72 -0
- package/lib/portable/agui.js +174 -0
- package/lib/portable/conversation.d.ts +124 -0
- package/lib/portable/conversation.js +357 -0
- package/lib/portable/index.d.ts +11 -6
- package/lib/portable/index.js +14 -11
- package/lib/portable/records.d.ts +27 -0
- package/lib/portable/records.js +46 -0
- package/lib/portable/sessions.d.ts +92 -0
- package/lib/portable/sessions.js +134 -0
- package/lib/portable/thread.d.ts +41 -0
- package/lib/portable/thread.js +102 -0
- package/lib/protocols/AGUIAdapter.d.ts +0 -2
- package/lib/protocols/AGUIAdapter.js +39 -74
- package/lib/voice/ComposerVoice.d.ts +15 -2
- package/lib/voice/ComposerVoice.js +23 -17
- package/lib/voice/VoiceMenu.d.ts +27 -0
- package/lib/voice/VoiceMenu.js +32 -0
- package/lib/voice/chatVoice.js +2 -2
- package/lib/voice/choices.d.ts +33 -0
- package/lib/voice/choices.js +70 -0
- package/lib/voice/index.d.ts +4 -0
- package/lib/voice/index.js +3 -0
- package/lib/voice/settings.d.ts +17 -1
- package/lib/voice/settings.js +64 -1
- package/lib/voice/useVoiceSettings.d.ts +6 -0
- package/lib/voice/useVoiceSettings.js +25 -0
- package/package.json +1 -1
- package/dist-embed/chunks/ChatView-C2La9033.js +0 -32
- /package/lib/{utils → portable}/approvals.d.ts +0 -0
- /package/lib/{utils → portable}/approvals.js +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{E as N,eN as xo,r as o,j as t,eO as vo,eP as So,b_ as Rn,B as p,H as bt,T as H,c as Y,cu as zt,eu as Dt,eQ as ce,co as xt,e as yo,eR as Co,eS as wo,e3 as ko,eT as jo,aH as Io,dX as zn,dV as Eo,dY as Gt,eU as To,eV as Ro,eW as Ao,eX as Mo,eY as Po,eZ as Uo,e_ as $o,d3 as Oo,a_ as Fo,e$ as Lo,f0 as _o,f1 as zo,f2 as No,f3 as Bo,f4 as Vo,x as Nt,f5 as Ho,f6 as Wo,f7 as Do,f8 as Go,f9 as Ko,fa as Yo,fb as qo,fc as Jo,fd as Qo,fe as Xo,ff as Zo,fg as es,fh as ts,fi as ns,fj as os,fk as ss,fl as as,fm as is,fn as rs,fo as ls,fp as tt,fq as cs,fr as ds,fs as us,ft as fs,fu as An,fv as ps,fw as Fe,fx as ms,fy as gs,a$ as vt,fz as hs,fA as bs,fB as Mn,fC as xs,fD as vs,fE as Ss,fF as ys,eC as Cs,fG as Bt,fH as Ce,fI as ws,fJ as ks,fK as js,fL as Pn,fM as Is,fN as Un,fO as Es,fP as Ts,fQ as Rs,fR as As,fS as Ms,fT as Ps,fU as Us,fV as $s,fW as Os,fX as Fs,fY as St,fZ as Ls,f_ as _s,f$ as zs,I as Ns,g0 as Bs,g1 as Vs,g2 as $n,g3 as Hs,g4 as Ws,g5 as Ds,g6 as Kt,g7 as Gs,g8 as Ks,ek as Vt,g9 as Ys,ga as qs}from"../datalayer-app-main.js";import{S as Js,E as Qs,a as Xs}from"./SignInIcon-4HkE48mS.js";import{F as Zs,a as ea,b as ta}from"./LinkedInGreyIcon-BoWXE-HS.js";function Nn(){const n=N(xo);return o.useMemo(()=>n.map(a=>a.value),[n])}const Ht={github:{name:"github",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/github/callback"},google:{name:"google",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/google/callback"},linkedin:{name:"linkedin",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/linkedin/callback"}},On=()=>{if(typeof document>"u")return"";const n=document.getElementById("datalayer-config-data");if(!n?.textContent)return"";try{const a=JSON.parse(n.textContent);return String(a?.iamUrl||"").replace(/\/$/,"")}catch{return""}},na=(n,a="Unable to start social sign-in.")=>{if(n instanceof Error&&n.message)return n.message;if(typeof n=="string"&&n.trim())return n;if(n&&typeof n=="object"&&"message"in n){const l=n.message;if(typeof l=="string"&&l.trim())return l}return a},oa=jo`
|
|
2
|
+
.signin-input-theme-scope input:-webkit-autofill,
|
|
3
|
+
.signin-input-theme-scope input:-webkit-autofill:hover,
|
|
4
|
+
.signin-input-theme-scope input:-webkit-autofill:focus,
|
|
5
|
+
.signin-input-theme-scope input:-webkit-autofill:active,
|
|
6
|
+
.signin-input-theme-scope input:-webkit-autofill:disabled,
|
|
7
|
+
.signin-input-theme-scope textarea:-webkit-autofill,
|
|
8
|
+
.signin-input-theme-scope textarea:-webkit-autofill:hover,
|
|
9
|
+
.signin-input-theme-scope textarea:-webkit-autofill:focus,
|
|
10
|
+
.signin-input-theme-scope textarea:-webkit-autofill:active,
|
|
11
|
+
.signin-input-theme-scope textarea:-webkit-autofill:disabled {
|
|
12
|
+
-webkit-text-fill-color: var(--fgColor-default) !important;
|
|
13
|
+
caret-color: var(--fgColor-default) !important;
|
|
14
|
+
-webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
15
|
+
box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
16
|
+
background-color: var(--bgColor-default) !important;
|
|
17
|
+
transition: background-color 9999s ease-in-out 0s !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.signin-input-theme-scope input:disabled,
|
|
21
|
+
.signin-input-theme-scope textarea:disabled {
|
|
22
|
+
-webkit-text-fill-color: var(--fgColor-muted) !important;
|
|
23
|
+
-webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
24
|
+
box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
25
|
+
background-color: var(--bgColor-default) !important;
|
|
26
|
+
opacity: 1 !important;
|
|
27
|
+
}
|
|
28
|
+
`,sa=({onSignIn:n,onApiKeySignIn:a,loginUrl:l,name:r,title:f="Datalayer OTEL",description:x="Sign in to access the observability dashboard.",icon:y,leadingIcon:I=t.jsx(ko,{size:24}),github:d=!1,google:we=!1,linkedin:q=!1,apiKey:nt=!1,signUp:O=!0,socialSignInNavigationTarget:ee,asDoc:v=!1,fillHeight:E=!0,hideHero:te=!1,calloutTitle:Le,calloutDescription:ot,passwordToggleLabel:de="Sign in with a password",signUpTitle:Yt="Don't have an account?",signUpDescription:J="Create a free Datalayer account with your email address.",signUpLabel:yt="Sign up with email",signUpHref:_e="https://datalayer.ai/signup",onSignUp:B,forgotPasswordHref:Q="/password",forgotPasswordLabel:ze="Forgot password?",showForgotPassword:Ct=!0,socialButtonMarginTop:h=3,actionButtonMaxWidth:X=320})=>{const ne=v&&!te,st=r??(v&&f==="Datalayer OTEL"?"Datalayer Sign In":f),wt=y??(v?t.jsx(Js,{size:24}):I),F=o.useMemo(()=>{if(l)return l;const c=On();return c?`${c}/api/iam/v1/login`:"/api/iam/v1/login"},[l]),[W,ke]=o.useState(""),[ue,kt]=o.useState(""),[at,jt]=o.useState(!1),[je,fe]=o.useState(!1),[w,pe]=o.useState(!1),[oe,it]=o.useState(!1),[Ne,Ie]=o.useState(null),[L,It]=o.useState(null),[me,Ee]=o.useState(""),[Te,rt]=o.useState(null),[Re,$]=o.useState(null),{enqueueToast:ge}=vo(),[Ae,se]=o.useState(!1),[ae,he]=o.useState(""),j=o.useRef(null),Me=o.useCallback(c=>So()?Rn.URLExt.join(Rn.PageConfig.getBaseUrl(),c.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${c.oauth2CallbackUIRoute}`,[]),D=o.useMemo(()=>{if(typeof window>"u")return"/";const c=`${window.location.pathname}${window.location.search}${window.location.hash}`;return c.startsWith("/")?c:"/"},[]),V=o.useCallback(async c=>{if(!oe){$(null),Ie(c.name),it(!0);try{const k=On(),P=new URLSearchParams({provider:c.name,callback_uri:Me(c)}),g=ee===void 0?void 0:String(ee||"").trim(),R=g===void 0?D&&D!=="/"?D:void 0:g&&g.startsWith("/")&&!g.startsWith("//")?g:void 0;R&&P.set("post_auth_redirect",R);const re=`${k||""}/api/iam/v1/oauth2/authz/url?${P.toString()}`,S=await fetch(re),De=await S.json(),Pe=De?.autorization_url;if(!S.ok||!Pe)throw new Error(De?.message||"Unable to start social sign-in.");window.location.assign(Pe)}catch(k){const P=na(k);$(P),ge(P,{variant:"error"}),Ie(null),it(!1)}}},[Me,D,ge,oe,ee]);o.useEffect(()=>{Ae&&j.current?.focus()},[Ae]);const ie=o.useCallback(()=>{se(!1),he("")},[]),lt=o.useCallback(()=>{!ae.trim()||!a||(a(ae.trim()),ie())},[ae,a,ie]),ct=o.useCallback(()=>{if(B){B();return}window.location.assign(_e)},[B,_e]),G=o.useCallback(()=>{if(Q){if(Q.startsWith("http://")||Q.startsWith("https://")){window.open(Q,"_blank","noopener,noreferrer");return}window.location.assign(Q)}},[Q]),Be=o.useCallback(async()=>{if(!(v||!W||!ue||w)){pe(!0),$(null);try{const c=await fetch(F,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:W,password:ue})});if(!c.ok)throw new Error(`HTTP ${c.status}`);const k=await c.json();if(k.success&&k.token){const P=String(k?.user?.id||k?.user?.uid||"").trim();if(!!k?.user?.mfaUrl&&P){It(P),rt(k.token),$(null);return}n&&n(k.token,W)}else $(k.message||"Invalid username or password.")}catch(c){$(c instanceof Error?c.message:String(c))}finally{pe(!1)}}},[v,W,ue,w,F,n]),Ve=o.useCallback(async()=>{if(!(v||w||!L||!me.trim()||!Te)){pe(!0),$(null);try{const c=new URL(F,window.location.origin),k=c.pathname.endsWith("/api/iam/v1/login")?c.href.replace(/\/api\/iam\/v1\/login$/,""):`${c.origin}`,P=await fetch(`${k}/api/iam/v1/users/${L}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:L,code:me.trim()})}),g=await P.json();if(!P.ok||!g?.success)throw new Error(g?.message||"Failed to validate your MFA code.");n&&n(Te,W)}catch(c){const k=c instanceof Error?c.message:String(c);$(k),ge(k,{variant:"error"})}finally{pe(!1)}}},[v,ge,W,w,F,me,Te,L,n]),He=o.useCallback(c=>{c.key==="Enter"&&(L?Ve():Be())},[L,Be,Ve]),We=oe||w||v;return t.jsxs(p,{className:"signin-input-theme-scope",display:"flex",alignItems:te||ne||!E?"flex-start":"center",justifyContent:"center",minHeight:te||ne||!E?"auto":"100vh",bg:te?"transparent":"canvas.default",color:"fg.default",py:te?0:ne?2:4,children:[t.jsx(oa,{}),t.jsxs(p,{width:"100%",maxWidth:440,p:0,children:[!te&&t.jsxs(t.Fragment,{children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:2,mb:ne?2:3,justifyContent:"center",children:[wt,t.jsx(bt,{sx:{fontSize:3},children:st})]}),t.jsx(H,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:ne?2:3,textAlign:"center"},children:x})]}),(Le||ot)&&t.jsxs(p,{mb:3,textAlign:"center",children:[Le&&t.jsx(bt,{as:"h3",sx:{fontSize:2,mb:1},children:Le}),ot&&t.jsx(H,{sx:{color:"fg.muted",fontSize:1},children:ot})]}),!L&&(d||we||q)&&t.jsxs(t.Fragment,{children:[d&&t.jsx(Y,{block:!0,size:"large",leadingVisual:Ne==="github"?()=>t.jsx(zt,{size:"small"}):Zs,disabled:We,onClick:()=>V(Ht.github),sx:{mt:h,maxWidth:X,mx:"auto"},children:"Sign in with GitHub"}),we&&t.jsx(Y,{block:!0,size:"large",leadingVisual:Ne==="google"?()=>t.jsx(zt,{size:"small"}):ea,disabled:We,onClick:()=>V(Ht.google),sx:{mt:h,maxWidth:X,mx:"auto"},children:"Sign in with Google"}),q&&t.jsx(Y,{block:!0,size:"large",leadingVisual:Ne==="linkedin"?()=>t.jsx(zt,{size:"small"}):ta,disabled:We,onClick:()=>V(Ht.linkedin),sx:{mt:h,maxWidth:X,mx:"auto"},children:"Sign in with LinkedIn"})]}),!L&&!at&&t.jsx(p,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(Y,{leadingVisual:Dt,size:"large",block:!0,disabled:v||w||oe,onClick:()=>jt(!0),sx:{maxWidth:X,mx:"auto"},children:de})}),!L&&at&&t.jsxs(p,{mt:4,children:[t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Username"}),t.jsx(xt,{autoFocus:!0,block:!0,placeholder:"Your username",value:W,disabled:w||v,onChange:c=>ke(c.target.value),onKeyDown:He})]}),t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Password"}),t.jsx(xt,{block:!0,placeholder:"Your password",type:je?"text":"password",value:ue,disabled:w||v,onChange:c=>kt(c.target.value),onKeyDown:He,trailingAction:t.jsx(xt.Action,{onClick:()=>fe(!je),disabled:w||v,icon:je?Qs:Xs,"aria-label":je?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(Y,{variant:"primary",disabled:w||v||!W||!ue,onClick:Be,children:w?"Signing in…":"Sign In"}),Ct&&t.jsx(yo,{as:"button",sx:{fontSize:1,cursor:v?"not-allowed":"pointer",background:"none",border:"none",opacity:v?.6:1},onClick:()=>{v||w||G()},children:ze})]})]}),L&&t.jsxs(t.Fragment,{children:[t.jsxs(ce,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(ce.Label,{children:"MFA Code"}),t.jsx(xt,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:me,disabled:w||v,onChange:c=>Ee(c.target.value),onKeyDown:He})]}),t.jsx(Y,{variant:"primary",block:!0,disabled:w||v||!me.trim(),onClick:Ve,sx:{maxWidth:X,mx:"auto"},children:w?"Validating…":"Validate MFA Code"})]}),Re&&t.jsx(H,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:Re}),O&&t.jsxs(p,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(bt,{as:"h3",sx:{fontSize:2,mb:2},children:Yt}),t.jsx(H,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:J}),t.jsx(p,{display:"flex",justifyContent:"center",children:t.jsx(Y,{variant:"primary",size:"large",leadingVisual:Co,disabled:v||w,onClick:ct,children:yt})})]}),nt&&a&&t.jsxs(t.Fragment,{children:[t.jsxs(p,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(p,{flex:1,height:"1px",bg:"border.default"}),t.jsx(H,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(p,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(Y,{block:!0,leadingVisual:Dt,disabled:v||w||oe,onClick:()=>se(!0),sx:{maxWidth:X,mx:"auto"},children:"Sign in with an API Key"}),Ae&&t.jsx(p,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:c=>{c.key==="Escape"&&ie()},onClick:ie,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(p,{as:"form",onClick:c=>c.stopPropagation(),onSubmit:c=>{c.preventDefault(),lt()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[t.jsx(bt,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(ce,{required:!0,children:[t.jsx(ce.Label,{children:"API Key"}),t.jsx(wo,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:ae,onInput:c=>he(c.currentTarget.value),ref:j})]}),t.jsxs(p,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Y,{type:"button",onClick:ie,children:"Cancel"}),t.jsx(Y,{type:"submit",variant:"primary",disabled:!ae.trim(),children:"Authenticate"})]})]})})]})]})]})};function aa(n){const{agentId:a,instructions:l,model:r,frontendTools:f,inference:x,subagents:y,sharing:I,onSubagentEvent:d,modeEffect:we}=n;return{type:"browser-vercel-ai",endpoint:"",agentId:a,enableConfigQuery:!1,options:{instructions:l,model:r,frontendTools:f,inference:x,subagents:y,sharing:I,onSubagentEvent:d,modeEffect:we}}}const Fn=Io((n,a)=>({pending:void 0,suggest:(l,r)=>{const f=l.trim();f&&n({pending:{text:f,submit:r?.submit??!1,nonce:(a().pending?.nonce??0)+1}})},consume:()=>n({pending:void 0})}));function ia({agentName:n,sandboxStillRuns:a=!1,temporary:l=!0,onSignedIn:r,onSignUp:f}){const{configuration:x}=zn(),y=o.useCallback(I=>{Eo.getState().checkIAMToken(I),r?.()},[r]);return t.jsx(p,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(p,{maxWidth:440,mx:"auto",children:[t.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(Dt,{size:20}),t.jsx(H,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:l?"This demo runs on a shared key":"Your key has expired"})]}),t.jsxs(H,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[l?`${n??"The agent"} has used the time this key allows. Sign in to point your own agent at it, use your own data, and drop the time limit.`:`${n??"The agent"} stopped because your session ran out.`,a?" Your notebook is still running in this page.":""]}),t.jsx(sa,{hideHero:!0,fillHeight:!1,calloutTitle:"Sign in to keep going",github:!0,google:!0,linkedin:!0,socialSignInNavigationTarget:typeof window>"u"?void 0:`${window.location.pathname}${window.location.search}`,loginUrl:x?.iamUrl?`${x.iamUrl}/api/iam/v1/login`:void 0,onSignIn:y,onSignUp:f})]})})}const ra="https://r1.datalayer.run";function la(n=!0){const{configuration:a}=zn(),l=Gt(I=>I.token),r=a?.aiInferenceUrl||ra,f=To(r,n&&!l),x=l||f.token,y=o.useMemo(()=>({inferenceUrl:r,token:x||void 0}),[r,x]);return{inference:y,needsSignIn:Ro(y),anonymous:f,inferenceUrl:r}}const ca={name:"general-purpose",description:"A capable generalist for a task none of the specialists covers: research, reasoning, drafting, checking.",instructions:"You are a capable general-purpose assistant. Carry out the task you are given completely and report the result plainly, saying what you could not do."};function Ln(n){const a=n?.subagents;if(!a)return[];const l=(a.subagents??[]).map(r=>{const f=r.ref?Ao(r.ref):void 0;return{name:r.name,description:r.description||f?.description||r.name,instructions:r.instructions??f?.systemPrompt,model:r.model??f?.model??a.defaultModel,icon:f?.icon}});return a.includeGeneralPurpose?[...l,ca]:l}function da(n){return n.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function ua(n){const a=da(n);return/^executeCodeIn(Notebook|Document)$/.test(a)||/^(read|list)[A-Z]/.test(a)}function fa(n,a){return n.filter(l=>a?.has(l.name)||ua(l.name))}function pa(n,a){const l=r=>a&&r.value.id===`${a}-tools`?0:r.value.id==="notebook-tools"?1:2;return n.map((r,f)=>({entry:r,index:f,rank:l(r)})).sort((r,f)=>r.rank-f.rank||r.index-f.index).map(r=>r.entry)}function ma(n,a,l){if(!l||!n.endsWith("-tools"))return!1;const r=n.slice(0,-6);return a.has(r)&&r!==l}const ga={type:"object",properties:{}};function ha(n,a){const l=new Set(n.toolset);return n.commands.filter(r=>l.has(r.name)).map(r=>({name:r.name,description:r.description,parameters:r.parameters??ga,location:"frontend",handler:async f=>{if(!a)throw new Error(`${r.name}: the ${n.plugin??n.id} plugin is not mounted on this page.`);const x=Object.keys(f??{}).length>0?f:void 0,y=await a.executeCommand(r.command,x);return y===void 0?{ok:!0,command:r.command,argument:x}:y}}))}function Bn(n,a){return n.flatMap(l=>ha(l,a))}function ba(){const n=Mo(),a=Nn();return o.useMemo(()=>Bn(a,n),[a,n])}function xa(n){const a=n?.app_instance;if(!a||typeof a!="object")return"";const l=a.deployment_uid;return typeof l=="string"?l.trim():""}function va(n,a,l){return n||!a?n:{id:l,messages:[]}}const Sa="var(--theme-accent)";function Vn({face:n,size:a}){return typeof n=="string"?t.jsx(Po,{emoji:n,size:a,label:""}):t.jsx(t.Fragment,{children:n})}function ya({face:n,size:a,state:l}){const r=l==="thinking"||l==="working",f=l==="paused";return t.jsxs(p,{as:"span","aria-hidden":!0,"data-presence":l,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:a+8,height:a+8,flexShrink:0,fontSize:a,lineHeight:1,children:[t.jsx(p,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:f?"none":`0 0 0 2px ${Sa}`,border:f?"2px dashed":"none",borderColor:"border.default",opacity:r||l==="waiting"||f?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:r?"loopPresenceBreath 1.8s ease-in-out infinite":"none",reducedMotion:{animation:"none"},sx:{"@keyframes loopPresenceBreath":{"0%, 100%":{transform:"scale(0.92)",opacity:.35},"50%":{transform:"scale(1.06)",opacity:.9}}}}),t.jsx(p,{as:"span",display:"inline-flex",opacity:f?.55:1,filter:f?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(Vn,{face:n,size:a})})]})}function Ca({state:n}){return t.jsx(H,{role:"status","aria-live":"polite","data-presence-line":n,sx:{fontSize:0,color:n==="waiting"?"fg.default":"fg.muted",fontWeight:n==="waiting"?"semibold":"normal",whiteSpace:"nowrap",flexShrink:0},children:Uo[n]})}const wa=Kt(void 0),ka=Kt(""),ja=Kt({}),Z="",Ia=1400,_n=parseInt(Ys["--loop-face-large"],10);function Ma({workspace:n}){const a=$o(),l=Oo(),r=o.useRef(null),{setViewControls:f}=n,[x,y]=o.useState(null),I=Fo(),d=I.getConfig(Lo),we=d?.placeholder||a.placeholder,q=d?.defaultSurface??"notebook",nt=I.getConfig(_o),[O,ee]=o.useState(Z),v=o.useRef(!1),E=N(zo),te=N(No),Le=N(Bo),de=N(Vo)[0]?.value,J=Nt(de?.promptStance??wa)??de?.prompt,yt=N(Ho),_e=Wo(yt[0]?.value),B=o.useRef(_e);B.current=_e;const Q=o.useRef(""),ze=N(Do),Ct=o.useMemo(()=>Go(()=>ze.reduce((e,i)=>({...e,...i.value.extras.value}),{})),[ze]),h=Nt(ze.length>0?Ct:ja),X=o.useRef(new Set),ne=Ko(Gs,n),st=!ne.allowed,wt=st?ne.reason??"Chat is unavailable for this sandbox":void 0,[F,W]=o.useState(!1),[ke,ue]=o.useState(!1),[kt,at]=o.useState(!1),[jt,je]=o.useState({open:!1,pendingApproval:!1}),fe=Yo(F,jt,d?.presence?.paused===!0),w=d?.presence?.onPresence;o.useEffect(()=>{w?.(fe),B.current?.setPresence(fe)},[w,fe]);const pe=o.useRef(d?.presence?.onSaying);pe.current=d?.presence?.onSaying;const oe=o.useRef({answering:!1}),it=o.useCallback(e=>{r.current=e,ue(!!e)},[]),Ne=o.useCallback(e=>{const{open:i,pendingApproval:s}=qo(e);je(ye=>ye.open===i&&ye.pendingApproval===s?ye:{open:i,pendingApproval:s});const m={saying:Qo(e),answering:Jo(e)},u=oe.current;(u.saying?.id!==m.saying?.id||u.saying?.text!==m.saying?.text||u.answering!==m.answering)&&(oe.current=m,pe.current?.(m));const z=B.current;if(!z)return;z.items(e);const M=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),K={insertcell:"adding a cell",updatecell:"editing a cell",runcell:"running a cell",deletecells:"removing cells",readallcells:"reading the notebook",readcell:"reading a cell",executecode:"running code",insertblock:"adding a block",updateblock:"editing a block",runblock:"running a block",readdocument:"reading the document"};let b;for(let ye=e.length-1;ye>=0;ye-=1){const ht=e[ye];if(typeof ht.toolName=="string"&&ht.toolCallId){M.has(String(ht.status).toLowerCase())||(b=ht);break}}if(!b){z.activity(void 0);return}const Se=b.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),bo=K[Se]??`using ${b.toolName}`;z.activity(`${Q.current||"The agent"} is ${bo}…`)},[]),Ie=o.useRef(h);Ie.current=h;const L=o.useCallback(e=>{eo(e),B.current?.usage(e),Ie.current.onUsage?.(e)},[]),It=o.useCallback(e=>{W(e),e||B.current?.end("done")},[]),me=o.useCallback(e=>{const i=B.current;if(!i)return;let s=-1;for(let u=e.length-1;u>=0;u-=1)if(e[u].role==="user"){s=u;break}const m=e.slice(s+1).filter(u=>u.role==="assistant").map(Xo).filter(u=>u.trim().length>0).join(`
|
|
29
|
+
|
|
30
|
+
`);i.assistant(m)},[]),Ee=o.useRef([]),Te=o.useRef(!1),rt=o.useRef(void 0),Re=o.useRef(void 0),$=o.useRef(void 0),ge=N(Zo),Ae=o.useRef(ge);Ae.current=ge;const se=o.useCallback((e,i)=>{if(Re.current)return Re.current;const s=$.current;$.current=void 0;const m=es(Ae.current.map(M=>M.value),s?{...i??{},voice:s}:i),u=m?.loop;if(Te.current&&u?.files&&u.files.length>0){const M=rt.current;if(!M)return"A file is given to an application running on a runtime: run it on Datalayer or on your machine to give it one.";let K;try{K=u.files.map(b=>({file:ns(String(b.name??"")),base64:ts(String(b.data_url??""))}))}catch(b){return b instanceof Error?b.message:String(b)}M.execute(os(K)).then(b=>{if(!b.success){y(`The files could not be put in the sandbox: ${b.error??"it failed"}.`);return}se(`${e}
|
|
31
|
+
|
|
32
|
+
${ss(K.map(Se=>Se.file))}`,{...m,loop:Object.fromEntries(Object.entries(u).filter(([Se])=>Se!=="files"))})});return}B.current?.begin(e,r.current?.thread());const z=r.current?.send;if(!z){Ee.current.push([e,m]);return}z(e,m)},[]);o.useEffect(()=>{f(ke?{busy:F,stop:r.current?.stop,newChat:r.current?.newChat,send:se}:null)},[F,ke,f,se]),o.useEffect(()=>()=>f(null),[f]),o.useEffect(()=>n.prompts.subscribe(se),[n.prompts,se]),o.useEffect(()=>{if(!ke||Ee.current.length===0)return;const e=Ee.current.splice(0,Ee.current.length);for(const[i,s]of e)r.current?.send(i,s)},[ke]);const ae=o.useRef(!1),he=o.useCallback(async e=>{y(null);const i=await as(Ie.current,e);if(i){i.sent?Je(""):y(i.refused);return}ae.current||(ae.current=!0,nt?.firstPromptHook?.());const s=await n.submit(e);if(!s.handled){y(s.reason??null);return}Je(""),s.result?.content&&y(s.result.content)},[n,nt?.firstPromptHook]),j=o.useMemo(()=>E.find(e=>e.value.surfaceId===O)?.value,[E,O]),Me=o.useCallback(e=>{v.current=!0,ee(e)},[]);o.useEffect(()=>is(Me),[Me]),o.useEffect(()=>{rs(E.map(e=>e.value.surfaceId))},[E]),o.useEffect(()=>{ls(O&&O!==Z?O:qs)},[O]);const D=o.useMemo(()=>q===Z||q==="none"?void 0:E.find(e=>e.value.surfaceId===q),[E,q]);o.useEffect(()=>{v.current||!D||tt(D.value,n)&&ee(q)},[D,n,q]);const[V,ie]=o.useState(null),lt=o.useRef(null),ct=d?.fullScreenTopOffset??0,{fullScreen:G,usingApi:Be,toggle:Ve,topOffsetPx:He}=cs(lt,{forceOverlay:!!ct,topOffset:ct}),[We,c]=o.useState(!1),k=o.useRef(!1);o.useEffect(()=>{!F||k.current||G||(k.current=!0,c(!0))},[F,G]),o.useEffect(()=>{G&&c(!1)},[G]),o.useEffect(()=>{j&&!tt(j,n)&&(ie(j.surfaceId),ee(Z))},[j,n]);const P=o.useMemo(()=>{if(V)return E.find(e=>e.value.surfaceId===V)?.value;if(!v.current&&O===Z)return D?.value},[E,V,O,D]);o.useEffect(()=>{if(!V||O!==Z)return;const e=E.find(i=>i.value.surfaceId===V);e&&tt(e.value,n)&&(ie(null),ee(V))},[E,O,V,n]);const g=n.agentId?.trim()||"default",R=ds(n.sandbox.target??"local");Te.current=R;const C=us(),re=Nt(C?.selected??ka),S=C?.members.find(e=>e.id===re),De=N(fs)[0]?.value,Pe=De?.specId,A=An(S?.specId??g)??(Pe?An(Pe):void 0),Ge=S?void 0:De,qt=R&&!S?Ds(Pe,A):void 0;Q.current=S?.name??A?.name??g;const Jt=N(ps),Qt=h.hiddenOpeners,Xt=h.hideOpeners,Et=h.openers,Tt=o.useMemo(()=>{if(Xt)return[];const e=new Set(Qt??[]),i=b=>e.size===0?b:b.filter(Se=>!e.has(Se.text));if(Et)return i(Et);const s=Jt.flatMap(b=>b.value.suggestions);if(s.length>0)return i(s);const m=i(A?.suggestions??[]),u=i(C?.team.suggestions??[]);if(u.length===0)return m;const z=new Set(u.map(b=>b.text)),M=C?.team.name??"Team",K=S?.name??A?.name??g;return[...u.map(b=>({...b,group:M})),...m.filter(b=>!z.has(b.text)).map(b=>({...b,group:K}))]},[Jt,C,A,S,g,Qt,Xt,Et]),dt=o.useMemo(()=>Tt.map(e=>({title:e.summary??e.text,message:e.message??e.text,group:e.group})),[Tt]),Rt=Fe(A?.icon),_=d?.presence,Hn=Fe(C?.team.icon),Zt=N(ms),ut=o.useMemo(()=>{const e=[],i=new Map,s=new Set,m=new Set(E.map(u=>u.value.surfaceId));for(const u of pa(Zt,j?.surfaceId)){if(ma(u.value.id,m,j?.surfaceId))continue;let z;try{z=u.value.tools(n)}catch(M){console.warn(`[loop] frontend tools from '${u.plugin}' failed:`,M);continue}for(const M of z){const K=i.get(M.name);if(K){console.warn(`[loop] frontend tool '${M.name}' from '${u.plugin}' is shadowed by the one from '${K}'.`);continue}i.set(M.name,u.plugin),e.push(M),u.value.chatView&&s.add(M.name)}}for(const u of h.frontendTools??[])i.has(u.name)||(i.set(u.name,"chat-extras"),e.push(u),s.add(u.name));return j?e:fa(e,s)},[Zt,n.surfaceId,n.agentId,h.frontendTools,j?.surfaceId,E]),At=ba(),Ke=o.useMemo(()=>{if(At.length===0)return ut;const e=new Set(ut.map(i=>i.name));return[...ut,...At.filter(i=>!e.has(i.name))]},[ut,At]),en=Nn(),Mt=h.agentToolBundles,Wn=o.useMemo(()=>{const e=h.frontendTools??[];if(!Mt?.length)return h.frontendTools;const i=Bn(en.filter(m=>Mt.includes(m.id)),I),s=new Set(e.map(m=>m.name));return[...e,...i.filter(m=>!s.has(m.name))]},[h.frontendTools,Mt,en,I]);rt.current=R&&Ke.some(e=>e.name===gs)?I.getOutput(vt)?.sandbox:void 0;const T=hs(n.sandbox,n.serverUrl),tn=N(bs),Dn=o.useMemo(()=>tn.filter(e=>e.value.composer).map(e=>({name:e.value.name,description:e.value.description})),[tn]),Gn=o.useMemo(()=>{if(!C||!S)return Ln(A).map(s=>({name:s.name,description:s.description,icon:Fe(s.icon)}));const e=C.members.map(s=>({name:s.name,description:s.description,emoji:s.emoji,icon:Fe(s.icon),disabled:s.id===S.id,disabledReason:s.id===S.id?`You are already talking to ${s.name}`:void 0})),i=Mn(C.team,S.id).filter(s=>!C.members.some(m=>m.name===s.name)).map(s=>({name:s.name,description:s.description,icon:Fe(s.icon)}));return[...e,...i]},[C,S,A]),{inference:nn,anonymous:Kn}=la(R),Yn=Gt(e=>e.user),Pt=R&&Kn.status==="expired",on=!Yn,Ye=xs();Re.current=Ye.disabled?Ye.disableReason||"This conversation is closed here.":void 0;const Ut=T===void 0?vs(n.sandbox,a):void 0,qe=st||Pt||!!qt||!!Ut||Ye.disabled,sn=Pt?on?a.demoKeyExpired:a.keyExpired:qt??Ut??wt??(Ye.disabled?Ye.disableReason:void 0),[$t,Je]=o.useState(""),[an]=Ss(),Qe=o.useMemo(()=>d?.voice?ys(d.voice,an):void 0,[d?.voice,an]),[qn,Jn]=o.useState(!1),[Qn,rn]=o.useState(),ft=Qn??Ge?.model??A?.model??n.model??"",Ue=Cs(),ln=o.useRef(Ue),cn=o.useRef(re),dn=o.useRef(Ue);dn.current=Ue,o.useEffect(()=>{cn.current!==re&&(cn.current=re,ln.current=dn.current,rn(void 0))},[re]);const Xn=Ue&&Ue!==ln.current?Ue:null,[Zn,eo]=o.useState(),to=Xn??Zn??null,no=Bt(Ce.inpromptMenu),un=Bt(Ce.promptAction),fn=Bt(Ce.chatHeader),oo=o.useMemo(()=>C?.members.map(e=>({id:e.id,name:e.name,description:e.description,icon:Fe(e.icon)}))??[],[C]),be=Fn(e=>e.pending),[pn,so]=o.useState(0);o.useEffect(()=>ws(()=>so(e=>e+1)),[]),o.useEffect(()=>{be&&(Je(be.text),Fn.getState().consume(),be.submit&&he(be.text))},[be]);const mn=I.getConfig(vt)?.datalayerCreatePayload,xe=!!(Ge?.createPayload?.app_spec||mn?.app_spec),Xe=xa(mn),ao=Gt(e=>e.token),Ot=I.getConfig(vt)?.datalayerVisitors,io=ks(Ot),ro=I.getConfig(vt)?.embedToken,ve=Ot?io.token:ro||ao,lo=o.useMemo(()=>js(d?.voice,ve||void 0,Xe),[d?.voice,ve,Xe]),le=!!(Xe||Ot);if(le&&!xe)throw new Error("A deployment’s page runs its application: its host gave no app_spec.");const[gn]=o.useState(Pn),U=o.useMemo(()=>va(d?.thread,Xe,gn),[d?.thread,Xe,gn]),[$e,hn]=o.useState(null),co=!!(U?.fromRuntime&&$e?.given!==U.id);o.useEffect(()=>{if(!U?.fromRuntime||!xe||!T)return;let e=!0;return(async()=>{let i="";for(let s=0;s<4&&e;s+=1)try{const m=await Is({agentBaseUrl:T,agentId:g,uid:U.id,token:ve});e&&hn({given:U.id,thread:{...U,fromRuntime:!1,messages:m}});return}catch(m){i=m instanceof Error?m.message:String(m),await new Promise(u=>setTimeout(u,1500))}e&&hn({given:U.id,thread:{id:Pn(),messages:[],onStarted:U.onStarted},said:Un.notOpened(i)})})(),()=>{e=!1}},[U?.id,U?.fromRuntime,xe,T,g,ve]);const bn=U?.fromRuntime?$e?.given===U.id?$e.thread:void 0:U,Ft=o.useMemo(()=>R?aa({agentId:S?.specId??g,instructions:Es(A,Ge?.instructions),model:ft||void 0,inference:nn,frontendTools:Ke,subagents:C&&S?Mn(C.team,S.id):Ln(A),sharing:C?.sharing,onSubagentEvent:e=>Ks.getState().appendSubagentEvent(e),modeEffect:Ge?.modeEffect}):T!==void 0?{type:"ag-ui",endpoint:xe?`${T}/api/v1/apps/agents/${encodeURIComponent(g)}/ag-ui/`:`${T}/api/v1/ag-ui/${g}/`,...xe&&ve?{authToken:ve}:{},...xe?{uiSocket:`${T.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${T}/api/v1/apps/agents/${encodeURIComponent(g)}/files`,appSessions:`${T}/api/v1/apps/sessions`,...le?{ownRoutesOnly:!0}:{}}:{},agentId:g,configEndpoint:`${T}/api/v1/configure`,enableConfigQuery:!0}:void 0,[g,R,nn,S,Ke,C,A,Ge,ft,T,xe,ve,le]),pt=Ts(!R,Ft?.type==="ag-ui"?Ft.configEndpoint:void 0,void 0,g),Ze=Rs(),mt=As(g),[xn,Lt]=o.useState(void 0),[uo,fo]=o.useState(void 0);o.useEffect(()=>{if(R||T===void 0)return;const e=Ms(T,g,le);if(!e){Lt([]);return}let i=!1;return fetch(e).then(s=>s.ok?s.json():null).then(s=>{i||(Lt(s?Ps(s):[]),fo(s?Us(s):void 0))}).catch(()=>{i||Lt([])}),()=>{i=!0}},[T,g,R,le]);const po=o.useMemo(()=>$s(xn,()=>Object.values(Os).filter(e=>e.available&&Fs(e)).map(e=>({id:e.id,name:e.name,provider:e.provider}))),[xn]),vn=o.useMemo(()=>{const e=pt.data?.builtinTools??[],i=new Set(e.map(s=>s.name));return{runtime:e,frontend:Ke.filter(s=>!i.has(s.name)).map(s=>({id:s.name,name:s.name}))}},[pt.data?.builtinTools,Ke]),Sn=o.useMemo(()=>new Set((Ze.data?.skills??[]).filter(e=>e.status==="enabled"||e.status==="loaded").map(e=>e.id)),[Ze.data]),mo=o.useCallback(async e=>{if(le)throw new Error("A deployment’s chat does not switch its runtime’s model.");rn(e),!(R||T===void 0)&&await fetch(`${T}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:e})}).catch(()=>{})},[T,R,le]),yn=d?.promptPlacement==="bottom-chat",go=d?.promptPlacement==="floating",Oe=d?.promptPlacement==="top",et=d?.hidePrompt===!0||h.hidePrompt===!0,ho={onSend:()=>{he($t)},input:$t,setInput:Je,focusTrigger:be||pn?(be?.nonce??0)+pn:void 0,placement:go||J==="floating"||J==="floating-top"||J==="floating-bottom"?"floating":"docked",floatingAnchor:J==="floating-top"?"top":"bottom",isLoading:F,onStop:()=>n.viewControls.stop?.(),placeholder:sn??h.sendInstead?.says??we,typingSuggestions:Tt.map(e=>e.text),suggestions:dt,disableInputPrompt:qe,connectionConfirmed:!qe,interim:qn,padding:Oe||J==="floating-top"||J==="floating-bottom"||J==="docked-top"?2:3,promptVariant:"lexical",autoFocus:d?.autoFocusPrompt??!0,mentionableAgents:Gn,promptCommands:Dn,headerContent:no.length>0?t.jsx(St,{slot:Ce.inpromptMenu,props:{workspace:n}}):void 0,footerExtras:un.length>0||Qe&&Qe.input!=="off"?t.jsxs(t.Fragment,{children:[un.length>0?t.jsx(St,{slot:Ce.promptAction,props:{workspace:n}}):null,Qe&&Qe.input!=="off"?t.jsx(Ls,{voice:Qe,input:$t,setInput:Je,disabled:qe,speaking:kt,onStopSpeaking:()=>r.current?.stopSpeaking?.(),onInterimChange:Jn,answers:!!(d?.voice?.output&&d.voice.output!=="off"&&d.voice.speechUrl),onSpoken:e=>{$.current=e},send:(e,i)=>{$.current=i,he(e)}}):null]}):void 0,showAgentsMenu:!_,showInlineAgentsMenu:!1,agents:oo,selectedAgentId:re,onSelectAgent:e=>C?.select(e),showTokenUsage:h.showTokenUsage??d?.showTokenUsage??!0,showContextRing:!0,agentUsage:to??void 0,showModelSelector:!_&&!le,models:po,decisions:uo,selectedModel:ft,onModelSelect:e=>{mo(e)},showToolsMenu:!_,availableTools:vn.runtime,availableFrontendTools:vn.frontend,mcpServers:pt.data?.mcpServers??[],mcpStatusData:h.mcpStatusData??void 0,showSkillsMenu:!_,skills:Ze.data?.skills??[],skillsLoading:Ze.isLoading,enabledSkills:Sn,onToggleSkill:e=>Sn.has(e)?mt.disableSkill(e):mt.enableSkill(e),onToggleAllSkills:(e,i)=>e.forEach(s=>i?mt.enableSkill(s):mt.disableSkill(s)),codemodeEnabled:h.codemodeEnabled??!1,onToggleCodemode:h.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!pt.data,hasSkillsData:!!Ze.data},Cn=te[0]?.value.Component,_t=Le[0]?.value.Component,wn=!d?.hideHeader&&!!_t,gt=Cn?t.jsx(Cn,{workspace:n,composer:ho}):null,kn=E.length>0&&d?.showSurfaceSelector!==!1?t.jsx(Ea,{surfaces:E.map(e=>e.value),active:j?.surfaceId??P?.surfaceId??Z,onChange:Me,workspace:n}):null,jn=t.jsxs(t.Fragment,{children:[E.map(e=>{const i=e.value,s=j?.surfaceId===i.surfaceId;return s||X.current.has(i.surfaceId)||tt(i,n)?(X.current.add(i.surfaceId),t.jsx(p,{sx:s?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(_s,{load:i.load,props:{surfaceId:i.surfaceId,workspace:n},fallback:t.jsxs(Wt,{children:["Loading ",i.title,"…"]}),errorFallback:u=>t.jsxs(Wt,{children:[i.title," failed to load: ",u.message]})})},i.surfaceId)):null}),!j&&P?t.jsx(p,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(Wt,{children:["Starting ",P.title,"…"]})}):null]}),In=t.jsx(t.Fragment,{children:t.jsxs(p,{flex:Oe&&j?"0 0 34%":"1 1 0",maxWidth:Oe&&j?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:j?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[h.errorBanner?t.jsx(p,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:h.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:h.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:h.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:h.errorBanner.message}):null,$e?.said&&$e.given===U?.id?t.jsx(H,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:$e.said}):null,t.jsx(p,{flex:"1 1 auto",minHeight:0,display:"flex",children:co?t.jsx(H,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:Un.opening}):t.jsx(zs,{themeVariant:d?.themeVariant,themeOverrides:d?.themeOverrides,colorMode:d?.colorMode,thread:bn,voice:lo,disabled:qe,disableReason:sn,protocol:Ft,frontendTools:R?void 0:Wn,initialModel:ft||void 0,title:_?.name??S?.name??A?.name??g,description:_?.welcome??A?.description,brandIcon:_?.face?t.jsx(ya,{face:_.face,size:20,state:fe}):t.jsx(Rt,{size:20}),headerContent:_&&!Ut?t.jsx(Ca,{state:fe}):void 0,emptyState:{icon:_?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:_n,lineHeight:1},children:t.jsx(Vn,{face:_.face,size:_n})}):t.jsx(Rt,{size:48}),title:_?.name??S?.name??A?.name??g,...C&&S?{sections:[{group:C.team.name,icon:t.jsx(Hn,{size:48}),title:C.team.name,subtitle:C.team.description},{group:S.name,icon:t.jsx(Rt,{size:32}),title:S.name,subtitle:A?.description}]}:null},suggestions:Oe||de||d?.suggestionLabels===!1?[]:dt,showHeader:wn,headerButtons:{showNewChat:d?.headerButtons?.newChat??!1,showClear:d?.headerButtons?.clear??!1},renderHeader:_t?e=>t.jsx(_t,{workspace:n,header:n.chatViewModes?{...e,chatViewMode:n.chatViewModes.value,onChatViewModeChange:n.chatViewModes.onChange,offeredViewModes:n.chatViewModes.offered}:e}):void 0,showInformation:!0,headerActions:t.jsxs(p,{display:"inline-flex",alignItems:"center",gap:2,children:[n.chatHeaderActions,fn.length>0?t.jsx(St,{slot:Ce.chatHeader,props:{workspace:n}}):null,t.jsx(Ns,{icon:G?Bs:Vs,"aria-label":G?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{c(!1),Ve()},sx:We?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${l.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${l.primary}`,animation:`dla-fullscreen-hint ${Ia}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})]}),showInput:!1,onSendReady:it,notebookToolSurfacesId:j?void 0:n.surfaceId,showTurnFooter:h.showTokenUsage??d?.showTokenUsage??!0,onContextSnapshot:L,onLoadingChange:It,onSpeakingChange:at,onItemsChange:me,onDisplayItemsChange:Ne,enableStreaming:!0},bn?.id)}),!wn&&fn.length>0?t.jsx(p,{hidden:!0,children:t.jsx(St,{slot:Ce.chatHeader,props:{workspace:n}})}):null,yn&&!et?gt:null]})}),En=d?.suggestionLabels!==!1&&dt.length>0?t.jsx(p,{"aria-label":a.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:dt.map(e=>t.jsx(p,{as:"button",type:"button",title:e.message,disabled:F||qe,onClick:()=>{he(e.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:$n,flex:`0 0 ${$n}px`,borderRadius:"999px",border:"1px solid",bg:"canvas.subtle",whiteSpace:"nowrap",sx:{borderColor:"border.default",color:"fg.default",cursor:"pointer","&:hover:not(:disabled)":{borderColor:"accent.fg",color:"accent.fg"},"&:disabled":{opacity:.5,cursor:"default"}},children:t.jsx(Hs,{title:e.title,maxWidth:"100%",sx:{minWidth:0},children:e.title})},e.title))}):null,Tn=x?t.jsx(p,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:x}):null;return t.jsxs(p,{ref:lt,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...G?{bg:"canvas.default"}:null,...G&&!Be.current?{position:"fixed",top:He,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[de?t.jsx(de.Component,{workspace:n,editors:jn,hasEditor:!!j,transcript:In,prompt:et?null:gt,chips:et?null:En,picker:kn,transient:Tn}):t.jsxs(t.Fragment,{children:[Oe&&!et?t.jsxs(p,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[gt,En]}):null,kn,t.jsxs(p,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[jn,In]}),Tn,yn||et||Oe?null:gt]}),Pt?t.jsx(p,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(ia,{agentName:S?.name??A?.name,sandboxStillRuns:R,temporary:on,onSignedIn:()=>Ws.getState().clear()})}):null]})}function Ea({surfaces:n,active:a,onChange:l,workspace:r}){const f=[...n].sort((x,y)=>(x.order??100)-(y.order??100));return t.jsxs(p,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[t.jsx(H,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),t.jsxs(Vt,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(Vt.Button,{selected:a===Z,onClick:()=>l(Z),children:"Chat"}),f.map(x=>{const y=tt(x,r),I=y?void 0:x.unavailableReason?.(r)??"Not available right now";return t.jsx(Vt.Button,{selected:a===x.surfaceId,"aria-disabled":!y,title:I??x.title,leadingIcon:x.icon,onClick:()=>{y&&l(x.surfaceId)},children:x.title},x.surfaceId)})]})]})}function Wt({children:n}){return t.jsx(p,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:n})}export{Ma as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as e,B as n,T as s,q as i}from"../datalayer-app-main.js";import j from"./index-
|
|
1
|
+
import{r as x,j as e,B as n,T as s,q as i}from"../datalayer-app-main.js";import j from"./index-BcdbHyzT.js";function A({agentUsage:o,padding:y,showContextRing:T=!1}){const[k,h]=x.useState(!1),v=x.useRef(null),c=x.useRef(null),g=!!o.turnUsage,C=!!o.sessionUsage,w=!!o.costUsage&&(o.costUsage.cumulativeCostUsd>0||o.costUsage.lastTurnCostUsd>0),m=o.sessionUsage,p=o.turnUsage,b=o.costUsage,d=t=>t<.01?`$${t.toFixed(4)}`:t<1?`$${t.toFixed(3)}`:`$${t.toFixed(2)}`,f=o.totalTokens,u=o.contextWindow,S=Math.max(0,u-f),a=u>0?f/u*100:0,r=[];if(o.distribution?.children?.length){const t={"System Prompts":"#8250df","Tool Definitions":"#bf8700","User Messages":"#16A085","Assistant Messages":"#1a7f37","Tool Usage":"#cf222e"};for(const l of o.distribution.children)r.push({name:l.name,value:l.value,color:t[l.name]||"#6e7781"})}else{o.systemPromptTokens>0&&r.push({name:"System Prompts",value:o.systemPromptTokens,color:"#8250df"}),o.toolTokens>0&&r.push({name:"Tool Definitions",value:o.toolTokens,color:"#bf8700"});const t=(o.userMessageTokens||0)+(o.assistantMessageTokens||0);t>0&&r.push({name:"Messages",value:t,color:"#16A085"});const l=(o.toolCallTokens||0)+(o.toolReturnTokens||0);l>0&&r.push({name:"Tool Results",value:l,color:"#cf222e"})}const z=a>90?"#cf222e":a>70?"#bf8700":"#16A085",W="var(--bgColor-muted, #f6f8fa)",R="var(--borderColor-default, #d1d9e0)",M={animation:!1,series:[{type:"pie",radius:[0,"90%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},data:[{value:f,itemStyle:{color:z}},{value:S,itemStyle:{color:W}}]}]},P={animation:!1,series:[{type:"pie",radius:["45%","80%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},itemStyle:{borderColor:"var(--bgColor-default, #ffffff)",borderWidth:1},data:[...r.map(t=>({value:t.value,itemStyle:{color:t.color}})),{value:S,itemStyle:{color:R}}]}]};return e.jsxs(n,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,py:1,px:y,bg:"canvas.subtle",flexWrap:"nowrap",overflow:"visible",whiteSpace:"nowrap",minWidth:0,children:[T&&e.jsxs(n,{position:"relative",flexShrink:0,onMouseEnter:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!0),150)},onMouseLeave:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!1),250)},children:[e.jsx(n,{ref:v,cursor:"pointer",width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid",borderColor:"border.default",borderRadius:"50%",children:e.jsx(j,{option:M,style:{width:18,height:18},opts:{renderer:"svg"}})}),k&&e.jsxs(n,{position:"absolute",bottom:"100%",left:0,mb:1,p:3,width:260,bg:"canvas.overlay",borderRadius:2,boxShadow:"shadow.large",border:"1px solid",borderColor:"border.default",zIndex:100,children:[e.jsx(s,{sx:{fontWeight:"bold",fontSize:1,color:"fg.default",display:"block",mb:2},children:"Context"}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:1},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:i(f)})," / ",i(u)," tokens"]}),o.costUsage&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:2},children:["cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.lastTurnCostUsd)})," turn · ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.cumulativeCostUsd)})," total"]}),e.jsxs(s,{sx:{fontSize:0,color:a>90?"danger.fg":a>70?"attention.fg":"fg.muted",fontWeight:"semibold",display:"block",mb:2},children:["• ",a.toFixed(0),"%"]}),e.jsx(n,{display:"flex",justifyContent:"center",mb:2,children:e.jsx(j,{option:P,style:{width:80,height:80},opts:{renderer:"svg"}})}),e.jsx(n,{display:"flex",flexDirection:"column",gap:1,children:r.map(t=>{const l=f>0?t.value/f*100:0;return e.jsxs(n,{display:"flex",alignItems:"center",gap:2,children:[e.jsx(n,{width:8,height:8,borderRadius:"50%",bg:t.color,flexShrink:0}),e.jsx(s,{sx:{fontSize:0,color:"fg.muted",flex:1},children:t.name}),e.jsxs(s,{sx:{fontSize:0,color:"fg.default",fontWeight:"semibold"},children:[l.toFixed(1),"%"]})]},t.name)})}),a>70&&e.jsx(s,{sx:{fontSize:0,color:"attention.fg",display:"block",mt:2,fontStyle:"italic"},children:"Quality may decline as limit nears."})]})]}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:i(o.totalTokens)})," / ",i(o.contextWindow)," ctx"]}),w&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.lastTurnCostUsd??0)})," turn / ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.cumulativeCostUsd??0)})]}),C&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· session ",i(m?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(m?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]}),g&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· turn ",i(p?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(p?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]})]})}export{A as ContextPie};
|