@datalayer/agent-runtimes 1.5.65 → 1.5.70
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-RIFH8RAg.js → AgentDetails-BriiIXid.js} +1 -1
- package/dist-embed/chunks/{AgentDetailsDialog-CK7jVPSc.js → AgentDetailsDialog-Bh3yhb7O.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-DwZk4yjT.js → AgentInspector-Dd-G3TvL.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-Ct12Hqc-.js → AgentInspectorDialog-CQEiBqOl.js} +1 -1
- package/dist-embed/chunks/{CellSidebarExtension-CbVVhhaO.js → CellSidebarExtension-DbbW8AJP.js} +1 -1
- package/dist-embed/chunks/ChatView-LzqHHAEe.js +32 -0
- package/dist-embed/chunks/{ContextPie-DLR5REbp.js → ContextPie-I90j658q.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-C_ZaO_iF.js → DeckComponent-DAnUabRV.js} +2 -2
- package/dist-embed/chunks/{DocumentView-DP-dxfpu.js → DocumentView-BKFitqiB.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-D3rfKBME.js → EphemeralDocument-BRzYMd8Z.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-Dn3ku5jr.js → EphemeralNotebook-COnqhW7Q.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-B7I0SoHM.js → ExcalidrawComponent-VnKcai35.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-B2VIt9DT.js → ExcalidrawModal-DrntFjbe.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-LpJ6Rj9h.js → JupyterLexicalExtension-BBivQZvX.js} +9 -9
- package/dist-embed/chunks/{KernelVariables-ZFnygJ4R.js → KernelVariables-CNEfUsyt.js} +1 -1
- package/dist-embed/chunks/{LexicalToolRegistry-BRMKFkxC.js → LexicalToolRegistry-B8ccPURu.js} +4 -4
- package/dist-embed/chunks/{NotebookToolSurfaces-Dz_cxy8L.js → NotebookToolSurfaces-B8Rmjy_m.js} +1 -1
- package/dist-embed/chunks/{NotebookView-DG-pAyOq.js → NotebookView-BDChKuA9.js} +1 -1
- package/dist-embed/chunks/{Output-Cnq5i-bK.js → Output-CEoYDjwn.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-BzGdQmTQ.js → SandboxDetailsDialog-DuavSJSL.js} +1 -1
- package/dist-embed/chunks/SchemaForm-C6wDxDrg.js +1 -0
- package/dist-embed/chunks/{WidgetVariableView-kRHeKnmD.js → WidgetVariableView-Tm5SSEKf.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-ChwsOfjj.js → YouTubePlugin-C209681s.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-sr3TJAkV.js → abnfDiagram-VCTEODGH-CsKFU4Ej.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Byz1QYm8.js → abnfDiagram-VCTEODGH-m7LJLYga.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-D1OmbW2u.js → ar-SA-G6X2FPQ2-Dypu3IcK.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-B7rDWQh9.js → architectureDiagram-5GKGNRK7-C22xzf-o.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DOxpBf54.js → architectureDiagram-5GKGNRK7-iDgRBR0a.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-CmSoFd5x.js → az-AZ-76LH7QW2-D8CzfKb1.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-D7b2U9I0.js → bg-BG-XCXSNQG7-_NVFEM1_.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-CKmWpImQ.js → blockDiagram-868be97b-D3BurtSN.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-_fDDlpCe.js → blockDiagram-I7D4REHJ-CHicgYkf.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-bzZkd0c3.js → blockDiagram-I7D4REHJ-oDRNhSU2.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-CG3iRJ8B.js → bn-BD-2XOGV67Q-DMgdNi-k.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-zvlk6Xm2.js → c4Diagram-3f4bdde3-Dmbl9p6m.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-NpmtOeoK.js → c4Diagram-7LVT6UL2-CR3iQQ6O.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-vHp7kFMG.js → c4Diagram-7LVT6UL2-auJZQjpw.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BW4zf4cd.js → ca-ES-6MX7JW3Y-DpOQhzr4.js} +1 -1
- package/dist-embed/chunks/{celltoolbartracker-DDVXLR_l.js → celltoolbartracker-DCR86wxV.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-Blqxrfai.js → chunk-2Q5K7J3B-DpFWUcsT.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-D26LTlFj.js → chunk-2Q5K7J3B-H_DA_jTG.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-CdbSD_M8.js → chunk-5VM5RSS4-BhWUyelG.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-BcO1XpWr.js → chunk-5VM5RSS4-CaowF8Al.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BQ-ZIw-1.js → chunk-F27PBJKO-B9wgW70d.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BRe2RwsD.js → chunk-F27PBJKO-D7PuEggc.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-D-RO-dCd.js → chunk-IMKFNOWR-DhXkXQPV.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-CLFrksv5.js → chunk-IMKFNOWR-jZNuNkCa.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-wyMu098x.js → chunk-JWPE2WC7-BIShIUcJ.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-DbtWvNSt.js → chunk-JWPE2WC7-DaBG37yC.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-OgpU0qcq.js → chunk-POPQ4Y6H-DG5Q2OKT.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-lwXXWwpD.js → chunk-POPQ4Y6H-WjTzJISs.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-CtOO_gz8.js → chunk-SVP7TREG-ERRaAh-x.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-C1pZJEUL.js → chunk-SVP7TREG-bq0J6tH_.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BUeW_P5i.js → chunk-TICWLB2K-B91fA6Jd.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-B2id4fS-.js → chunk-TICWLB2K-BV_9f6ak.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-6emV99Se.js → chunk-XXDRQBXY-BAy0lBJk.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-DASCZDLb.js → chunk-XXDRQBXY-fV8doVJJ.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-BUcYJSYu.js → classDiagram-ZZMXUADV-B0pbDswj.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-DXK_VS6x.js → classDiagram-ZZMXUADV-CGdcKCOI.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-D_XtspOB.js → classDiagram-f62afe4f-tD890DEl.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-DmVGURP4.js → classDiagram-v2-604399ef-DReIuoeI.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BUcYJSYu.js → classDiagram-v2-VYDZK3BY-B0pbDswj.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DXK_VS6x.js → classDiagram-v2-VYDZK3BY-CGdcKCOI.js} +1 -1
- package/dist-embed/chunks/{code-block-IT6T5CEO-CLFy43wi.js → code-block-IT6T5CEO-DD7hwbHA.js} +1 -1
- package/dist-embed/chunks/{component-BABP_IeE.js → component-BWDcVpKW.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DkllT3uc.js → cose-bilkent-JH36ORCC-BS_pJML-.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-zloY56Dd.js → cose-bilkent-JH36ORCC-BsK2pWDL.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-B_AmUgWn.js → createText-aed3d8b3-1eVJ8jxH.js} +2 -2
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-DzWWfN4P.js → cs-CZ-2BRQDIVT-Fr-SpqHD.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-CT11o-tV.js → cynefinDiagram-5FMLGOSQ-AxJwZ7KT.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-Benlx8nr.js → cynefinDiagram-5FMLGOSQ-vmheD_S2.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-CaeirLFF.js → da-DK-5WZEPLOC-DO_sAXvt.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-B2PPWFKB.js → dagre-GXQ25YYZ-B8Ip03td.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-qys4evHY.js → dagre-GXQ25YYZ-BgrGEY09.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-DBkebtzo.js → de-DE-XR44H4JA-4JnXB_iM.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-C1EHbNes.js → diagram-S7CK7UJ4-BxRBCYVP.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-CBkf-BrM.js → diagram-S7CK7UJ4-hQvZziAN.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-CKsxaZCe.js → diagram-UQ7AKVKN-BFkOO3Wu.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-C9zuKZ5Y.js → diagram-UQ7AKVKN-BvgP6_rf.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-Cd8pBAf-.js → diagram-VSXAHHWV-Cy8iWh4H.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-Dd_PlC0S.js → diagram-VSXAHHWV-WVuzjdxU.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-DZTLEsKe.js → diagram-VX7I27RA-CCx8R8FK.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-D5qf5Kw-.js → diagram-VX7I27RA-_LUOsaBb.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-DlsBShb0.js → diagram-Z3DM3KII-CY856Sry.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-B2zosfsY.js → diagram-Z3DM3KII-Dqcrl8-1.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-VhBXkHc8.js → ebnfDiagram-PWID7BFC-DC-Zam6d.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-sUXnKXhD.js → ebnfDiagram-PWID7BFC-kqD9RLAA.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-cYsFYCgh.js → edges-b2856ca0-B3ybuHDU.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-DkmsSwGL.js → el-GR-BZB4AONW-MydAlwHl.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-DHzqp69u.js → erDiagram-5d81789a-HZ-VLc2f.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-DPzcAUZq.js → erDiagram-RLTQ6QDP-CNO4pVhU.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BRf7HEXF.js → erDiagram-RLTQ6QDP-zwXEFcAp.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-Dvnvh6dW.js → es-ES-U4NZUMDT-rQmnr_uu.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-DYX6hpyz.js → eu-ES-A7QVB2H4-j5Hf8ngk.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-Dmlm1ZjK.js → fa-IR-HGAKTJCU-DMJRRSBp.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-2ov9-9H3.js → fi-FI-Z5N7JZ37-BFLC0BFd.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-vnPYmNxZ.js → flowDb-185abca5-7Nn2obHG.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-D_P7IhnT.js → flowDiagram-1629c991-CnvM_psw.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-BUuZtbKx.js → flowDiagram-HODETNUW-BrbR1EkW.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-Dqms2kHK.js → flowDiagram-HODETNUW-Bsl5oOFb.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-jyYNkbVD.js → flowDiagram-v2-1d953310-TkF25UVC.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-CkUTQpED.js → flowchart-elk-definition-6df44142-CwiGfEuJ.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-BUlHGdL2.js → fr-FR-RHASNOE6-CxjhSJC1.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-CDk8PUcC.js → ganttDiagram-3b0b3873-DeouFDZE.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-D4fzILsk.js → ganttDiagram-EL5Y4UJY-BeK3rGHM.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Tsk8dNyJ.js → ganttDiagram-EL5Y4UJY-DfJDZVnm.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DSJR8KGU.js → gitGraphDiagram-WWUBYQGX-BujqTwbf.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-XOpfU7hY.js → gitGraphDiagram-WWUBYQGX-DkYi8eWr.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-C7QWh6IZ.js → gitGraphDiagram-f01e8bc2-mCCRVzIs.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-T3hKsmlm.js → gl-ES-HMX3MZ6V-BuuMpTaX.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-DoePgaFj.js → he-IL-6SHJWFNN-Cv3Nrcgu.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-B_E7TPlk.js → hi-IN-IWLTKZ5I-Sddst60F.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-Bu8X3BrR.js → hu-HU-A5ZG7DT2-ehrXVpD0.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-jOs7pgj2.js → id-ID-SAP4L64H-Gfb1UYxZ.js} +1 -1
- package/dist-embed/chunks/{index-JF61_zqs.js → index-5NOGMVjz.js} +1 -1
- package/dist-embed/chunks/{index-BzgczmKp.js → index-6zxVHKca.js} +10 -10
- package/dist-embed/chunks/{index-9bae90f3-BywpAnlj.js → index-9bae90f3-CzUk5Hhq.js} +1 -1
- package/dist-embed/chunks/{index-DvHqo_Qj.js → index-AHAhJxOc.js} +1 -1
- package/dist-embed/chunks/{index-7hNcqUR-.js → index-B9Ya6z2n.js} +1 -1
- package/dist-embed/chunks/{index-BwyZ8O-M.js → index-BOEhatkt.js} +1 -1
- package/dist-embed/chunks/{index-BYo3uv0g.js → index-BOGJMsUN.js} +2 -2
- package/dist-embed/chunks/{index-Bmo-OFNb.js → index-BaBNw6X5.js} +4 -4
- package/dist-embed/chunks/{index-BR58wzgU.js → index-BfvZMC2B.js} +1 -1
- package/dist-embed/chunks/{index-DnqWNX5L.js → index-BiuABva5.js} +1 -1
- package/dist-embed/chunks/{index-0m4vhMAR.js → index-BjfpYq_l.js} +1 -1
- package/dist-embed/chunks/{index-BI_0cBab.js → index-BuXVVl_h.js} +7 -7
- package/dist-embed/chunks/{index-fBSCurWE.js → index-By5Ku2wm.js} +4 -4
- package/dist-embed/chunks/{index-Bw1BRX9C.js → index-CNpJ8Y2y.js} +1 -1
- package/dist-embed/chunks/{index-zrM_sbHt.js → index-Cw1r0WFc.js} +1 -1
- package/dist-embed/chunks/{index-CS3mm6qN.js → index-D8x0MQWQ.js} +1 -1
- package/dist-embed/chunks/{index-BqpOM6Mx.js → index-DDnf06e_.js} +1 -1
- package/dist-embed/chunks/{index-B3fpdUTu.js → index-DGefzKhT.js} +1 -1
- package/dist-embed/chunks/{index-CgCcVxV_.js → index-DN6Cori6.js} +1 -1
- package/dist-embed/chunks/{index-_z7rhr9l.js → index-DQ-v6JVz.js} +4 -4
- package/dist-embed/chunks/{index-C2JsK59r.js → index-DTYZzbES.js} +1 -1
- package/dist-embed/chunks/{index-MfJ2dN-o.js → index-DWkIO3YS.js} +1 -1
- package/dist-embed/chunks/{index-CL2J1VY_.js → index-DZwyICkp.js} +1 -1
- package/dist-embed/chunks/{index-CoVJiT-h.js → index-D_vehxcD.js} +1 -1
- package/dist-embed/chunks/{index-wqOJuJys.js → index-DiTcTB7Y.js} +1 -1
- package/dist-embed/chunks/{index-COPak822.js → index-DmpLE1d4.js} +1 -1
- package/dist-embed/chunks/{index-Ca5wn1F-.js → index-Do4nOAaR.js} +1 -1
- package/dist-embed/chunks/{index-DBRbrQr1.js → index-DobaF_Ee.js} +1 -1
- package/dist-embed/chunks/{index-BfuxhQsr.js → index-DvwQdrde.js} +1 -1
- package/dist-embed/chunks/{index-KC9furSU.js → index-DzMYyq8T.js} +1 -1
- package/dist-embed/chunks/{index-Cz0vwY93.js → index-QHmZQlKN.js} +6 -6
- package/dist-embed/chunks/{index-C00mEIpi.js → index-hxIHgkzg.js} +1 -1
- package/dist-embed/chunks/{index-B27olYsx.js → index-nMwnYxTd.js} +1 -1
- package/dist-embed/chunks/{index-NvC9D0Mh.js → index-umwkqggg.js} +1 -1
- package/dist-embed/chunks/{index-3JfFVSno.js → index-yMppJWrQ.js} +1 -1
- package/dist-embed/chunks/{index.esm-BbIi4n-Y.js → index.esm-CC457Cyg.js} +1 -1
- package/dist-embed/chunks/{index.esm-ePira_es.js → index.esm-DFDbLGof.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CvSw0Uqm.js → infoDiagram-27XIBGKW-C18Zz25F.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-BagqSEKB.js → infoDiagram-27XIBGKW-DiC5_yjB.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-CY6P-RB2.js → infoDiagram-a29d40f1-DRVyx4Bf.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CJjl4-N0.js → ishikawaDiagram-5VMMS53U-3WGbru46.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DQfqd5pn.js → ishikawaDiagram-5VMMS53U-DrEzfSK9.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-CrGtxCjf.js → it-IT-JPQ66NNP-BehLHkar.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-MhHoMhnM.js → ja-JP-DBVTYXUO-BZvqIigI.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-B186toLf.js → journeyDiagram-3NMN7TZE-BZWmkUfk.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-fMuL5yIV.js → journeyDiagram-3NMN7TZE-DpWKIFIN.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-Bt2VFr_f.js → journeyDiagram-95396277-D_QLiVq4.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-otexWzw0.js → kaa-6HZHGXH3-DgAIF6rN.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Bk_pPM_n.js → kab-KAB-ZGHBKWFO-DW4thPSJ.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-tkyZOsyz.js → kanban-definition-UXKFOSKX-B84ZaZEy.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DyX3lLGq.js → kanban-definition-UXKFOSKX-DxbTprYr.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DuPx0Ivn.js → kk-KZ-P5N5QNE5-CCy_nSJ7.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-DfW3Tv6Q.js → km-KH-HSX4SM5Z-kpXyoxjS.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-CWeM03UD.js → ko-KR-MTYHY66A-CFm6WtQG.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-BpZVGVBG.js → ku-TR-6OUDTVRD-CKF85mOv.js} +1 -1
- package/dist-embed/chunks/{layout-i1FLEqsi.js → layout-DYytgC9r.js} +1 -1
- package/dist-embed/chunks/{layout-P_H-0ax9.js → layout-Dx5Hzkor.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-BjTCfdUi.js → lexicalHooks-DbTGOMyq.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-LavcVuZR.js → lt-LT-XHIRWOB4-CO9Bo5qJ.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-DWoheFP4.js → lv-LV-5QDEKY6T-CvZszc5p.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-Cltl6__q.js → mermaid.core-D0955PCw.js} +5 -5
- package/dist-embed/chunks/{mermaid.core-Bd5egiDP.js → mermaid.core-D98kc0OO.js} +3 -3
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-BmuUH3a3.js → mindmap-definition-YA3MSWOX-D86IPkt3.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-Di0Xac42.js → mindmap-definition-YA3MSWOX-_1SBIPav.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-D0Ep5LxZ.js → mindmap-definition-e4c1d938-UbbfpF-a.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-G-1tBL4-.js → mr-IN-CRQNXWMA-Cio_dB9M.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-DpmzmQ2W.js → my-MM-5M5IBNSE-Z0RQ5Vbz.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-DFU_SPCx.js → nb-NO-T6EIAALU-BEQ0YP9J.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-Dlz_okxD.js → nl-NL-IS3SIHDZ-YtkJnS_J.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-D9E-BpHw.js → nn-NO-6E72VCQL-C1j2s3qO.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-CVonm6mx.js → oc-FR-POXYY2M6-CinnjccW.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-a5ExTB9v.js → pa-IN-N4M65BXN-c_6OtC6L.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BYznG-ZK.js → pegDiagram-XKGWAZYB-BBVcHZ8T.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Cptotyez.js → pegDiagram-XKGWAZYB-BJAdJVqh.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-C2-svgs_.js → percentages-BXMCSKIN-VqMxh8LK.js} +5 -5
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-BYEkkWvq.js → pieDiagram-E7YTZNPT-C55wHgO0.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-D51avc4V.js → pieDiagram-E7YTZNPT-EvMxJb2S.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-Bcau8_Gm.js → pieDiagram-c941bede-DTmViAsB.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-BaHKKcOg.js → pl-PL-T2D74RX3-Cn_9xZgM.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-DZEHszX8.js → pt-BR-5N22H2LF-Da6r-Pp1.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BbJKz8vE.js → pt-PT-UZXXM6DQ-D6lhcuX9.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-BfWK8wgJ.js → quadrantDiagram-AXDQQJYC-BCeMrGXB.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CcMIo23m.js → quadrantDiagram-AXDQQJYC-rFaTvNlk.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Db1y7cGB.js → quadrantDiagram-cf8b8fe0-BZAbhmbg.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BzqhRF47.js → railroadDiagram-O6MQD6OU-BAXhb26s.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DCRFdpxj.js → railroadDiagram-O6MQD6OU-bR7xXZGS.js} +1 -1
- package/dist-embed/chunks/{renderer-CM-Z_1Uj.js → renderer-DfML3j-s.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-Dj564NwS.js → requirementDiagram-53bda41b-DNqx3JRF.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-dma0a-bN.js → requirementDiagram-BXWQKSXE-B0SL6Gqb.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-CIFZt_cP.js → requirementDiagram-BXWQKSXE-DHLQ_9Lw.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-szdAFgjr.js → ro-RO-JPDTUUEW-BFss9e8X.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CbdtKkxy.js → ru-RU-B4JR7IUQ-DIruW2gS.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-8ur8k-HP.js → sankeyDiagram-P5KCCOFB-CktuQIU1.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DRxZFl9I.js → sankeyDiagram-P5KCCOFB-Nk71fRsK.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-Da81kIDr.js → sankeyDiagram-c3ef121a-4-5C_fXA.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-DM8BTW5K.js → sequenceDiagram-82a5b84f-DedJ5qnD.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BH0Y4uG3.js → sequenceDiagram-WJ2MYXX4-BBGHED3s.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CNwXBdZi.js → sequenceDiagram-WJ2MYXX4-Dm3QM01Z.js} +1 -1
- package/dist-embed/chunks/{sessions-DlvFLGbP.js → sessions-lT1zQJEG.js} +2 -2
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-DfCWfEQf.js → si-LK-N5RQ5JYF-Dom-aTTE.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-D-nX-7Hv.js → sizeCapture-INFHLROL-BNuVN7vX.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-Tw2tvJ1W.js → sizeCapture-INFHLROL-BW7unDBA.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-CTeAwA1b.js → sk-SK-C5VTKIMK-CLRU9TNq.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-eFw2lQcd.js → sl-SI-NN7IZMDC-BKLCNVXA.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-H8oVn7EH.js → stateDiagram-43e79a5f-C-TVhCrM.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-DS-byRyy.js → stateDiagram-D77RDMKH-mLSMGpPQ.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-CGEuq_3Z.js → stateDiagram-D77RDMKH-tqnmMQUf.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-D7zd-PeH.js → stateDiagram-v2-2041ed4f-TVcKzajK.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-Bbn7CxXx.js → stateDiagram-v2-MP3YSRHH-C3MNIg5B.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-CllCmLuo.js → stateDiagram-v2-MP3YSRHH-C6TftAzE.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-CYP0pxwM.js → styles-455b33cd-CIILXOoF.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-dXHjU5Mc.js → styles-f932cba9-CVBMDsh6.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-CrgFTq7b.js → styles-fcc2142b-CTOmFTKK.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-BCNcfBdp.js → subset-shared.chunk-zIH7OLsP.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-nY71AE9b.js → subset-worker.chunk-b9j7PKPe.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-B3BAd7ic.js → sv-SE-XGPEYMSR-D0UV0HV7.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-DY-6e2w2.js → svgDrawCommon-148a3cd9-BCgvh5nL.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-CpFqKR23.js → swimlanes-42K2YHIH-BQTDK2Ta.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-BoshoQYI.js → swimlanes-42K2YHIH-DHcV40DB.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BNalU-se.js → swimlanesDiagram-VR7AAH4N-BV8Vb5g2.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-CUEoZUeR.js → swimlanesDiagram-VR7AAH4N-CQ7d-sbG.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-Ch7Coorh.js → ta-IN-2NMHFXQM-C-EJ3jDE.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-gmc7tguq.js → th-TH-HPSO5L25-CfQh62Qa.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-BD_Hd7OM.js → timeline-definition-24CTP7MA-CKtubk73.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-CLQC5Soj.js → timeline-definition-24CTP7MA-DJcFE1jT.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-CBNPBc2S.js → timeline-definition-7545f45a-CLycxRtq.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-DoKmjhCn.js → tr-TR-DEFEU3FU-Lz7Ka2Zr.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-uzMCDuv6.js → uk-UA-QMV73CPH-DU0hsGUJ.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Clhmiu8L.js → vennDiagram-4TSXK5OY-BMmQ-DIV.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BxbIHKUM.js → vennDiagram-4TSXK5OY-Bq0xMhnH.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-UC9RyOt8.js → vi-VN-M7AON7JQ-CDvS0SiL.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-HuiHAtr-.js → wardleyDiagram-VM6X3IG4-C1VKw6YX.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-un-PuqHe.js → wardleyDiagram-VM6X3IG4-DL5LgQWr.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-3k3NdPbU.js → xychartDiagram-3f383b91-B-BTwetN.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CIDOTVoZ.js → xychartDiagram-S5SC5T6Z-BQHFHk-x.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CvZAV0KM.js → xychartDiagram-S5SC5T6Z-BXkM4beH.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-DFA0PCzk.js → zh-CN-LNUGB5OW-CWE-bF0d.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-WzEwoBkd.js → zh-HK-E62DVLB3-pEfL2bds.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-B7w1h39x.js → zh-TW-RAJ6MFWO-Cp6UFUuD.js} +1 -1
- package/dist-embed/datalayer-app-main.js +107 -106
- package/lib/apps/apps/records.d.ts +21 -4
- package/lib/apps/apps/records.js +8 -6
- package/lib/apps/apps/threads.d.ts +11 -1
- package/lib/apps/apps/threads.js +17 -0
- package/lib/apps/core/index.d.ts +71 -0
- package/lib/apps/core/index.js +22 -0
- package/lib/apps/plugins/app-activity/AppActivity.js +10 -4
- package/lib/apps/plugins/chat/ChatView.js +123 -6
- package/lib/apps/plugins/chat/SessionActionsMenu.d.ts +40 -0
- package/lib/apps/plugins/chat/SessionActionsMenu.js +73 -0
- package/lib/apps/plugins/chat/SessionChooseDialog.d.ts +22 -0
- package/lib/apps/plugins/chat/SessionChooseDialog.js +39 -0
- package/lib/apps/plugins/chat/index.js +8 -1
- package/lib/apps/plugins/chat/sessionActions.d.ts +65 -0
- package/lib/apps/plugins/chat/sessionActions.js +184 -0
- package/lib/chat/Chat.d.ts +42 -2
- package/lib/chat/Chat.js +148 -2
- package/lib/chat/base/ChatBase.js +33 -6
- package/lib/chat/index.d.ts +1 -1
- package/lib/chat/messages/ChatMessageList.d.ts +3 -1
- package/lib/chat/messages/ChatMessageList.js +21 -2
- package/lib/portable/activity.d.ts +91 -2
- package/lib/portable/activity.js +143 -4
- package/lib/portable/fixtures.d.ts +1 -1
- package/lib/portable/fixtures.js +17 -7
- package/lib/portable/index.d.ts +1 -1
- package/lib/portable/index.js +3 -2
- package/lib/portable/sessions.d.ts +25 -1
- package/lib/portable/sessions.js +62 -4
- package/lib/specs/harnesses.js +96 -0
- package/lib/specs/index.d.ts +1 -0
- package/lib/specs/index.js +1 -0
- package/lib/specs/sessionFiles.d.ts +123 -0
- package/lib/specs/sessionFiles.js +578 -0
- package/lib/types/agentspecs.d.ts +26 -0
- package/lib/types/chat.d.ts +38 -0
- package/package.json +1 -1
- package/scripts/codegen/generate_agents.py +1 -0
- package/scripts/codegen/generate_harnesses.py +70 -0
- package/scripts/codegen/generate_session_files.py +296 -0
- package/dist-embed/chunks/ChatView-B_EEvtKi.js +0 -32
- package/dist-embed/chunks/SchemaForm-Dg9uk6m3.js +0 -1
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The record of an application (R-07), as ai-agents keeps it: what it
|
|
3
|
+
* did, session by session, written by the runtime it ran on — read here for
|
|
4
|
+
* its activity feed (R-01b, R-15): the sessions, newest first, and what each
|
|
5
|
+
* one did, step by step.
|
|
6
|
+
*
|
|
7
|
+
* Pure but for `fetch`: no React.
|
|
8
|
+
*
|
|
9
|
+
* @module apps/apps/records
|
|
10
|
+
*/
|
|
11
|
+
import { type SessionRow } from '../../portable/activity';
|
|
12
|
+
export { sessionAgentSaid, sessionLineageSaid, sessionStateSaid, type SessionRow, } from '../../portable/activity';
|
|
1
13
|
/** What a record entry is. */
|
|
2
14
|
export type RecordKind = 'session' | 'tool_call' | 'decision' | 'check' | 'approval' | 'output' | 'feedback'
|
|
3
15
|
/** A turn of a conversation: what was asked, what it answered. */
|
|
@@ -35,10 +47,15 @@ export declare function entrySaid(entry: RecordEntry): string;
|
|
|
35
47
|
/** A session in a sentence: how many calls, what stopped it, how it ended. */
|
|
36
48
|
export declare function sessionSentence(entries: readonly RecordEntry[]): string;
|
|
37
49
|
/**
|
|
38
|
-
* The sessions of an application, newest first
|
|
39
|
-
*
|
|
40
|
-
*
|
|
50
|
+
* The sessions of an application, newest first, each as the record lists
|
|
51
|
+
* it (`sessionRowOf`: state, agent, title, lineage, turns). Real use only —
|
|
52
|
+
* the sessions its tests ran are read apart (R-07) — unless `tests` says
|
|
53
|
+
* otherwise: `true` for the tests only, `null` for both. The first page;
|
|
54
|
+
* `hasMore` says whether there is a next.
|
|
41
55
|
*/
|
|
42
|
-
export declare function listSessions(context: RecordsContext, appUid: string, limit?: number, tests?: boolean | null): Promise<
|
|
56
|
+
export declare function listSessions(context: RecordsContext, appUid: string, limit?: number, tests?: boolean | null): Promise<{
|
|
57
|
+
sessions: SessionRow[];
|
|
58
|
+
hasMore: boolean;
|
|
59
|
+
}>;
|
|
43
60
|
/** What one session did, in order: a run's start is a mark, not a step (R-15). */
|
|
44
61
|
export declare function readSession(context: RecordsContext, sessionUid: string): Promise<RecordEntry[]>;
|
package/lib/apps/apps/records.js
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module apps/apps/records
|
|
14
14
|
*/
|
|
15
|
+
import { sessionPageOf } from '../../portable/activity';
|
|
15
16
|
import { RUN_END_WORDS } from '../../portable/records';
|
|
17
|
+
export { sessionAgentSaid, sessionLineageSaid, sessionStateSaid, } from '../../portable/activity';
|
|
16
18
|
/** Each kind in a word, as the feed labels it. */
|
|
17
19
|
export const RECORD_KIND_WORDS = {
|
|
18
20
|
session: 'Session',
|
|
@@ -88,15 +90,15 @@ async function read(context, path, failure) {
|
|
|
88
90
|
return body;
|
|
89
91
|
}
|
|
90
92
|
/**
|
|
91
|
-
* The sessions of an application, newest first
|
|
92
|
-
*
|
|
93
|
-
*
|
|
93
|
+
* The sessions of an application, newest first, each as the record lists
|
|
94
|
+
* it (`sessionRowOf`: state, agent, title, lineage, turns). Real use only —
|
|
95
|
+
* the sessions its tests ran are read apart (R-07) — unless `tests` says
|
|
96
|
+
* otherwise: `true` for the tests only, `null` for both. The first page;
|
|
97
|
+
* `hasMore` says whether there is a next.
|
|
94
98
|
*/
|
|
95
99
|
export async function listSessions(context, appUid, limit = 20, tests = false) {
|
|
96
100
|
const body = await read(context, `/sessions?app_uid=${encodeURIComponent(appUid)}&limit=${limit}${tests === null ? '' : `&tests=${tests}`}`, 'The sessions could not be read');
|
|
97
|
-
return
|
|
98
|
-
? body.sessions.map(entryOf)
|
|
99
|
-
: [];
|
|
101
|
+
return sessionPageOf(body);
|
|
100
102
|
}
|
|
101
103
|
/** What one session did, in order: a run's start is a mark, not a step (R-15). */
|
|
102
104
|
export async function readSession(context, sessionUid) {
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
* and goes on with it on the same thread.
|
|
11
11
|
*
|
|
12
12
|
* Opening it is `openThread` (`portable/thread`), as every client opens one;
|
|
13
|
-
* here is what a deployment's chat decides of the thread it opens on
|
|
13
|
+
* here is what a deployment's chat decides of the thread it opens on — and
|
|
14
|
+
* the web's deep link to a session, `?session=<uid>` on the chat's URL
|
|
15
|
+
* (`sessionOfSearch`).
|
|
14
16
|
*
|
|
15
17
|
* @module apps/apps/threads
|
|
16
18
|
*/
|
|
@@ -34,3 +36,11 @@ export declare function deploymentOfPayload(createPayload: Record<string, unknow
|
|
|
34
36
|
* no deployment, keeps what it was given.
|
|
35
37
|
*/
|
|
36
38
|
export declare function threadOfVisit(given: ResumedThread | undefined, deploymentUid: string, id: string): ResumedThread | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The session a chat's URL names, `?session=<uid>` (the web's deep link):
|
|
41
|
+
* the chat opens that session as its thread when its host gave none. A
|
|
42
|
+
* uid is 8 to 128 letters, digits, hyphens or underscores (`SESSION_UID`);
|
|
43
|
+
* anything else is no session and refused in a sentence rather than sent
|
|
44
|
+
* to the runtime.
|
|
45
|
+
*/
|
|
46
|
+
export declare function sessionOfSearch(search: string): string;
|
package/lib/apps/apps/threads.js
CHANGED
|
@@ -33,3 +33,20 @@ export function threadOfVisit(given, deploymentUid, id) {
|
|
|
33
33
|
}
|
|
34
34
|
return { id, messages: [] };
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* The session a chat's URL names, `?session=<uid>` (the web's deep link):
|
|
38
|
+
* the chat opens that session as its thread when its host gave none. A
|
|
39
|
+
* uid is 8 to 128 letters, digits, hyphens or underscores (`SESSION_UID`);
|
|
40
|
+
* anything else is no session and refused in a sentence rather than sent
|
|
41
|
+
* to the runtime.
|
|
42
|
+
*/
|
|
43
|
+
export function sessionOfSearch(search) {
|
|
44
|
+
const uid = (new URLSearchParams(search).get('session') ?? '').trim();
|
|
45
|
+
if (!uid) {
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
if (!/^[A-Za-z0-9_-]{8,128}$/.test(uid)) {
|
|
49
|
+
throw new Error(`?session=${uid} names no session: a session uid is 8 to 128 letters, digits, hyphens or underscores.`);
|
|
50
|
+
}
|
|
51
|
+
return uid;
|
|
52
|
+
}
|
package/lib/apps/core/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type { AssistantCharacterData } from '../../chat/assistant/formats/types'
|
|
|
10
10
|
import type { PresenceState } from '../../chat/presence/presenceStatus';
|
|
11
11
|
import type { ChatWords } from '../../chat/words';
|
|
12
12
|
import type { ChatViewMode } from '../../types/chat';
|
|
13
|
+
import type { SessionRow } from '../../portable/activity';
|
|
13
14
|
/** Lifecycle of the sandbox a workspace is attached to. */
|
|
14
15
|
export type SandboxState = 'idle' | 'starting' | 'running' | 'stopping' | 'error';
|
|
15
16
|
/** What the workspace knows about the sandbox behind it. */
|
|
@@ -532,6 +533,76 @@ export type ChatHeaderContribution = {
|
|
|
532
533
|
Component: ComponentType<LoopChatHeaderProps>;
|
|
533
534
|
};
|
|
534
535
|
export declare const LoopChatHeader: import("@datalayer/reactor").ContributionPoint<ChatHeaderContribution>;
|
|
536
|
+
/**
|
|
537
|
+
* A session of an application, as the runtime's session API describes it
|
|
538
|
+
* (`GET /api/v1/apps/sessions/{uid}`) and as the record lists it: one
|
|
539
|
+
* shape, `SessionRow` (`portable/activity`), read through `sessionRowOf` —
|
|
540
|
+
* what a thread's menu entry reads to say whether it applies, and what the
|
|
541
|
+
* thread's header says of the session (its state, where it comes from).
|
|
542
|
+
*/
|
|
543
|
+
export type SessionFacts = SessionRow;
|
|
544
|
+
/** What a menu entry may do when run: the session API, and the page's ways. */
|
|
545
|
+
export type SessionActionContext = {
|
|
546
|
+
/** The runtime's session API for this application (`appSessionsClient`). */
|
|
547
|
+
client: import('../../portable/sessions').AppSessionsClient;
|
|
548
|
+
/** Open another session as a thread, when the page can. */
|
|
549
|
+
openThread?: (uid: string) => void;
|
|
550
|
+
/** Hand the person a file to save, when the page can. */
|
|
551
|
+
download?: (name: string, text: string, mediaType: string) => void;
|
|
552
|
+
/**
|
|
553
|
+
* Ask the person to pick one of several — an agent to switch to — and
|
|
554
|
+
* say what the pick does; `undefined` when they decline. A page with no
|
|
555
|
+
* picker leaves it out, and the entry says so.
|
|
556
|
+
*/
|
|
557
|
+
choose?: (question: {
|
|
558
|
+
title: string;
|
|
559
|
+
options: {
|
|
560
|
+
id: string;
|
|
561
|
+
label: string;
|
|
562
|
+
description?: string;
|
|
563
|
+
}[];
|
|
564
|
+
/** What the pick does, shown before it is sent. */
|
|
565
|
+
says?: (id: string) => Promise<string>;
|
|
566
|
+
}) => Promise<string | undefined>;
|
|
567
|
+
/**
|
|
568
|
+
* Ask the person for a file — a session file to import — and give its
|
|
569
|
+
* text; `undefined` when they decline. A page with no picker leaves it
|
|
570
|
+
* out, and the entry says so.
|
|
571
|
+
*/
|
|
572
|
+
pickFile?: (accept: string) => Promise<string | undefined>;
|
|
573
|
+
/** Say a sentence to the person: a refusal, what was done. */
|
|
574
|
+
say: (sentence: string) => void;
|
|
575
|
+
/** The turn a *Clone from here* was pressed on, when it was; else the last. */
|
|
576
|
+
atTurn?: number;
|
|
577
|
+
};
|
|
578
|
+
/** Where an entry is offered: the thread's `⋯` menu, each turn's row, or both. */
|
|
579
|
+
export type SessionActionPlacement = 'thread' | 'turn' | 'both';
|
|
580
|
+
/**
|
|
581
|
+
* A menu entry on a thread (the thread's `⋯`): *Switch agent…*, *Clone from
|
|
582
|
+
* here*, *Export*, *Resume* are the chat plugin's; a host adds its own
|
|
583
|
+
* (*Open in the Studio*) by contributing here. `when` hides an entry that
|
|
584
|
+
* does not apply to the session as it stands — no *Resume* on an open
|
|
585
|
+
* thread, no *Switch agent* while a turn runs.
|
|
586
|
+
*/
|
|
587
|
+
export type SessionActionContribution = {
|
|
588
|
+
/** Stable id, for the registry and the graph. */
|
|
589
|
+
id: string;
|
|
590
|
+
label: string;
|
|
591
|
+
/** Whether the entry applies to this session now. */
|
|
592
|
+
when: (session: SessionFacts) => boolean;
|
|
593
|
+
run: (session: SessionFacts, context: SessionActionContext) => Promise<void> | void;
|
|
594
|
+
/** Drawn in this order, lowest first. */
|
|
595
|
+
order?: number;
|
|
596
|
+
/** Set apart from what precedes it. */
|
|
597
|
+
divider?: boolean;
|
|
598
|
+
/** Where it is offered; the thread's menu when unsaid. */
|
|
599
|
+
placement?: SessionActionPlacement;
|
|
600
|
+
};
|
|
601
|
+
export declare const LoopSessionAction: import("@datalayer/reactor").ContributionPoint<SessionActionContribution>;
|
|
602
|
+
/** The entries that apply to a session now, for one placement, in their order. */
|
|
603
|
+
export declare function sessionActionsFor(entries: readonly {
|
|
604
|
+
value: SessionActionContribution;
|
|
605
|
+
}[], session: SessionFacts | undefined, placement?: 'thread' | 'turn'): SessionActionContribution[];
|
|
535
606
|
/**
|
|
536
607
|
* The agent a capacity plugin wants the workspace to run.
|
|
537
608
|
*
|
package/lib/apps/core/index.js
CHANGED
|
@@ -166,6 +166,28 @@ export const LoopChatSurface = LoopEditorView;
|
|
|
166
166
|
export const LoopFrontendTool = defineContributionPoint('loop.frontendTool');
|
|
167
167
|
export const LoopChatComposer = defineContributionPoint('loop.chat.composer');
|
|
168
168
|
export const LoopChatHeader = defineContributionPoint('loop.chat.header');
|
|
169
|
+
export const LoopSessionAction = defineContributionPoint('loop.session.action');
|
|
170
|
+
/** The entries that apply to a session now, for one placement, in their order. */
|
|
171
|
+
export function sessionActionsFor(entries, session, placement = 'thread') {
|
|
172
|
+
if (!session) {
|
|
173
|
+
return [];
|
|
174
|
+
}
|
|
175
|
+
return entries
|
|
176
|
+
.map(entry => entry.value)
|
|
177
|
+
.filter(entry => {
|
|
178
|
+
const offered = entry.placement ?? 'thread';
|
|
179
|
+
return offered === 'both' || offered === placement;
|
|
180
|
+
})
|
|
181
|
+
.filter(entry => {
|
|
182
|
+
try {
|
|
183
|
+
return entry.when(session);
|
|
184
|
+
}
|
|
185
|
+
catch {
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
.sort((a, b) => (a.order ?? 100) - (b.order ?? 100));
|
|
190
|
+
}
|
|
169
191
|
export const LoopAgentBlueprint = defineContributionPoint('loop.agent.blueprint');
|
|
170
192
|
export const LoopChatSuggestion = defineContributionPoint('loop.chat.suggestion');
|
|
171
193
|
export const LoopAssistantCharacter = defineContributionPoint('loop.assistant.character');
|
|
@@ -7,7 +7,7 @@ import { useContributions, useSignalValue } from '@datalayer/reactor/react';
|
|
|
7
7
|
import { useCoreStore } from '@datalayer/core/lib/state';
|
|
8
8
|
import { useIAMStore } from '@datalayer/core/lib/state/substates/IAMState';
|
|
9
9
|
import { LoopChatTurn } from '../../core';
|
|
10
|
-
import { RECORD_KIND_WORDS, entrySaid, listSessions, readSession, sessionSentence, } from '../../apps/records';
|
|
10
|
+
import { RECORD_KIND_WORDS, entrySaid, listSessions, readSession, sessionAgentSaid, sessionLineageSaid, sessionSentence, sessionStateSaid, } from '../../apps/records';
|
|
11
11
|
/** What the feed says. */
|
|
12
12
|
export const APP_ACTIVITY_WORDS = {
|
|
13
13
|
title: 'Activity',
|
|
@@ -39,8 +39,14 @@ function useRead(load, key, when = true) {
|
|
|
39
39
|
}
|
|
40
40
|
function Session({ context, session, }) {
|
|
41
41
|
const [open, setOpen] = useState(false);
|
|
42
|
-
const entries = useRead(() => readSession(context, session.
|
|
43
|
-
|
|
42
|
+
const entries = useRead(() => readSession(context, session.uid), `${session.uid}:${context.token}`, open);
|
|
43
|
+
// The session as the record lists it: its state, its agent, where it comes from.
|
|
44
|
+
const facts = [
|
|
45
|
+
sessionStateSaid(session),
|
|
46
|
+
sessionAgentSaid(session),
|
|
47
|
+
sessionLineageSaid(session),
|
|
48
|
+
].filter(Boolean);
|
|
49
|
+
return (_jsxs(Box, { as: "details", onToggle: (event) => setOpen(event.currentTarget.open), borderTop: "1px solid", borderColor: "border.muted", py: 2, children: [_jsxs(Box, { as: "summary", cursor: "pointer", fontSize: 1, children: [session.startedAt ? (_jsx(RelativeTime, { datetime: session.startedAt })) : ('A session'), session.title ? ` · ${session.title}` : '', session.version ? ` · version ${session.version}` : '', facts.length ? ` · ${facts.join(' · ')}` : '', entries.value ? ` · ${sessionSentence(entries.value)}` : ''] }), !open ? null : entries.loading ? (_jsx(Spinner, { size: "small" })) : entries.error ? (_jsx(Text, { role: "alert", sx: { fontSize: 1 }, children: entries.error })) : (_jsx(Box, { as: "ol", pl: 3, mt: 2, mb: 0, fontSize: 1, children: (entries.value ?? []).map(entry => (_jsxs(Box, { as: "li", mb: 1, children: [_jsx(Label, { sx: { mr: 2 }, children: RECORD_KIND_WORDS[entry.kind] ?? entry.kind }), entrySaid(entry)] }, entry.uid))) }))] }));
|
|
44
50
|
}
|
|
45
51
|
export function AppActivity({ appUid }) {
|
|
46
52
|
const token = useIAMStore(state => state.token) ?? '';
|
|
@@ -58,6 +64,6 @@ export function AppActivity({ appUid }) {
|
|
|
58
64
|
const context = { aiAgentsUrl, token };
|
|
59
65
|
const readable = Boolean(appUid && token);
|
|
60
66
|
const sessions = useRead(() => listSessions(context, appUid ?? ''), `${appUid}:${token}:${aiAgentsUrl}:${ended}`, readable);
|
|
61
|
-
return (_jsxs(Box, { "data-testid": "app-activity", children: [_jsx(Heading, { as: "h3", sx: { fontSize: 2, mb: 2 }, children: APP_ACTIVITY_WORDS.title }), !appUid ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: APP_ACTIVITY_WORDS.unsaved })) : !token ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: APP_ACTIVITY_WORDS.signedOut })) : sessions.loading && !sessions.value ? (_jsx(Spinner, { size: "small" })) : sessions.error ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: sessions.error })) : (sessions.value ?? []).length === 0 ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: APP_ACTIVITY_WORDS.none })) : ((sessions.value ?? []).map(session => (_jsx(Session, { context: context, session: session }, session.uid))))] }));
|
|
67
|
+
return (_jsxs(Box, { "data-testid": "app-activity", children: [_jsx(Heading, { as: "h3", sx: { fontSize: 2, mb: 2 }, children: APP_ACTIVITY_WORDS.title }), !appUid ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: APP_ACTIVITY_WORDS.unsaved })) : !token ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: APP_ACTIVITY_WORDS.signedOut })) : sessions.loading && !sessions.value ? (_jsx(Spinner, { size: "small" })) : sessions.error ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: sessions.error })) : (sessions.value?.sessions ?? []).length === 0 ? (_jsx(Text, { as: "p", sx: { fontSize: 1, color: 'fg.muted', m: 0 }, children: APP_ACTIVITY_WORDS.none })) : ((sessions.value?.sessions ?? []).map(session => (_jsx(Session, { context: context, session: session }, session.uid))))] }));
|
|
62
68
|
}
|
|
63
69
|
export default AppActivity;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { IconButton, SegmentedControl, Text, Truncate } from '@primer/react';
|
|
3
|
+
import { Button, IconButton, SegmentedControl, Text, Truncate, } from '@primer/react';
|
|
4
4
|
import { Box, loopShapeVars, useColorPalette } from '@datalayer/primer-addons';
|
|
5
5
|
import { ScreenFullIcon, ScreenNormalIcon } from '@primer/octicons-react';
|
|
6
6
|
import { computed, signal } from '@datalayer/reactor';
|
|
@@ -49,8 +49,11 @@ import { isInactiveSurfaceContribution, orderToolContributions, toolsForChatView
|
|
|
49
49
|
import { agentBundleToolDefinitions, useAgentCommandTools, } from '../../../tools/adapters/commands';
|
|
50
50
|
import { NONE_EDITOR, seedEditorChoice, setEditorOptions, } from '../shell/editorChoice';
|
|
51
51
|
import { generateMessageId } from '../../../types/messages';
|
|
52
|
-
import { deploymentOfPayload, threadOfVisit } from '../../apps/threads';
|
|
52
|
+
import { deploymentOfPayload, sessionOfSearch, threadOfVisit, } from '../../apps/threads';
|
|
53
53
|
import { openThread, THREAD_WORDS } from '../../../portable/thread';
|
|
54
|
+
import { appSessionsClient } from '../../../portable/sessions';
|
|
55
|
+
import { SessionActionsMenu, SessionStateLine, TurnActions, } from './SessionActionsMenu';
|
|
56
|
+
import { SessionChooseDialog } from './SessionChooseDialog';
|
|
54
57
|
import { FaceDrawing, PresenceFace, PresenceLine, } from '../../../chat/presence/Presence';
|
|
55
58
|
import { presenceState, presenceToolOf, } from '../../../chat/presence/presenceStatus';
|
|
56
59
|
import { latestSaying, newestIsAnswer, } from '../../../chat/assistant/state';
|
|
@@ -79,6 +82,8 @@ export default function ChatView({ workspace }) {
|
|
|
79
82
|
default palette instead of throwing. */
|
|
80
83
|
const palette = useColorPalette();
|
|
81
84
|
const controlsRef = useRef(null);
|
|
85
|
+
/** The token the thread's menu calls the session API with (MH-F08). */
|
|
86
|
+
const iamTokenRef = useRef(undefined);
|
|
82
87
|
const { setViewControls } = workspace;
|
|
83
88
|
/*
|
|
84
89
|
* Say the thread a message goes on to the workspace: an application's
|
|
@@ -1062,6 +1067,11 @@ export default function ChatView({ workspace }) {
|
|
|
1062
1067
|
* sending to the host's server — on a hosted page, the page's own origin.
|
|
1063
1068
|
*/
|
|
1064
1069
|
const agentServerUrl = agentServerOf(workspace.sandbox, workspace.serverUrl);
|
|
1070
|
+
const sessionsClient = useMemo(() => appSessionsClient({
|
|
1071
|
+
baseUrl: agentServerUrl ?? '',
|
|
1072
|
+
getAccessToken: () => iamTokenRef.current,
|
|
1073
|
+
fetch: (input, init) => fetch(input, init),
|
|
1074
|
+
}), [agentServerUrl]);
|
|
1065
1075
|
/*
|
|
1066
1076
|
* Who a single request may be addressed to.
|
|
1067
1077
|
*
|
|
@@ -1333,6 +1343,7 @@ export default function ChatView({ workspace }) {
|
|
|
1333
1343
|
// not know (R-20): it runs a session of its deployment, and no more.
|
|
1334
1344
|
const embedToken = reactor.getConfig(AGENTS_PLUGIN_NAME)?.embedToken;
|
|
1335
1345
|
const iamToken = visitors ? visitor.token : embedToken || memberToken;
|
|
1346
|
+
iamTokenRef.current = iamToken || undefined;
|
|
1336
1347
|
/*
|
|
1337
1348
|
* Its voice asked of the speech service as this chat speaks to its runtime
|
|
1338
1349
|
* (VO-37, VO-19): the host's token, else this one — a visitor's,
|
|
@@ -1360,7 +1371,36 @@ export default function ChatView({ workspace }) {
|
|
|
1360
1371
|
* agent holds every visitor's turns, never drawn as this person's.
|
|
1361
1372
|
*/
|
|
1362
1373
|
const [visitThreadId] = useState(generateMessageId);
|
|
1363
|
-
|
|
1374
|
+
/*
|
|
1375
|
+
* The web's deep link (MH-27): `?session=<uid>` on the chat's URL opens
|
|
1376
|
+
* that session as the thread when the host gave none — a malformed one is
|
|
1377
|
+
* said, not sent. And the thread an action opened (MH-10, MH-27): a
|
|
1378
|
+
* clone's, an import's, a resumed one's — drawn in place of the given.
|
|
1379
|
+
*/
|
|
1380
|
+
const [deepLinked, deepLinkRefused] = useMemo(() => {
|
|
1381
|
+
try {
|
|
1382
|
+
return [
|
|
1383
|
+
sessionOfSearch(typeof window === 'undefined' ? '' : window.location.search),
|
|
1384
|
+
'',
|
|
1385
|
+
];
|
|
1386
|
+
}
|
|
1387
|
+
catch (error) {
|
|
1388
|
+
return ['', error instanceof Error ? error.message : String(error)];
|
|
1389
|
+
}
|
|
1390
|
+
}, []);
|
|
1391
|
+
const [actionThread, setActionThread] = useState(undefined);
|
|
1392
|
+
const givenThread = useMemo(() => actionThread ??
|
|
1393
|
+
threadOfVisit(config?.thread ??
|
|
1394
|
+
(deepLinked && runsApp
|
|
1395
|
+
? { id: deepLinked, messages: [], fromRuntime: true }
|
|
1396
|
+
: undefined), deploymentUid, visitThreadId), [
|
|
1397
|
+
actionThread,
|
|
1398
|
+
config?.thread,
|
|
1399
|
+
deepLinked,
|
|
1400
|
+
runsApp,
|
|
1401
|
+
deploymentUid,
|
|
1402
|
+
visitThreadId,
|
|
1403
|
+
]);
|
|
1364
1404
|
const [openedThread, setOpenedThread] = useState(null);
|
|
1365
1405
|
const opening = Boolean(givenThread?.fromRuntime && openedThread?.given !== givenThread.id);
|
|
1366
1406
|
useEffect(() => {
|
|
@@ -1422,6 +1462,68 @@ export default function ChatView({ workspace }) {
|
|
|
1422
1462
|
? openedThread.thread
|
|
1423
1463
|
: undefined
|
|
1424
1464
|
: givenThread;
|
|
1465
|
+
/*
|
|
1466
|
+
* The session the thread is, as the runtime describes it (MH-27): read
|
|
1467
|
+
* once the thread is known and again after each turn and each action, so
|
|
1468
|
+
* that the header's state words, the lineage line and the menu's entries
|
|
1469
|
+
* say the session as it stands. A thread the runtime holds no session of
|
|
1470
|
+
* yet — a visit before its first message — says nothing.
|
|
1471
|
+
*/
|
|
1472
|
+
const threadUid = workspace.thread || chatThread?.id || '';
|
|
1473
|
+
const [facts, setFacts] = useState(undefined);
|
|
1474
|
+
const [factsTick, setFactsTick] = useState(0);
|
|
1475
|
+
useEffect(() => {
|
|
1476
|
+
if (!runsApp || !agentServerUrl || !threadUid || busy) {
|
|
1477
|
+
return undefined;
|
|
1478
|
+
}
|
|
1479
|
+
let current = true;
|
|
1480
|
+
sessionsClient.described(threadUid).then(row => current && setFacts(row), () => current && setFacts(undefined));
|
|
1481
|
+
return () => {
|
|
1482
|
+
current = false;
|
|
1483
|
+
};
|
|
1484
|
+
}, [runsApp, agentServerUrl, threadUid, busy, factsTick, sessionsClient]);
|
|
1485
|
+
/* What an action said — a swap's sentence, a refusal as the runtime said
|
|
1486
|
+
it — shown above the conversation until dismissed; and the picker and
|
|
1487
|
+
the file an action asks with (`choose`, `pickFile`). */
|
|
1488
|
+
const [actionSaid, setActionSaid] = useState(deepLinkRefused);
|
|
1489
|
+
const [choice, setChoice] = useState(null);
|
|
1490
|
+
const chooseResolver = useRef(null);
|
|
1491
|
+
const fileResolver = useRef(null);
|
|
1492
|
+
const fileInput = useRef(null);
|
|
1493
|
+
const sessionContext = useMemo(() => ({
|
|
1494
|
+
client: sessionsClient,
|
|
1495
|
+
say: sentence => {
|
|
1496
|
+
setActionSaid(sentence);
|
|
1497
|
+
setFactsTick(tick => tick + 1);
|
|
1498
|
+
},
|
|
1499
|
+
openThread: uid => {
|
|
1500
|
+
setActionThread({ id: uid, messages: [], fromRuntime: true });
|
|
1501
|
+
setFactsTick(tick => tick + 1);
|
|
1502
|
+
},
|
|
1503
|
+
download: (name, text, mediaType) => {
|
|
1504
|
+
const url = URL.createObjectURL(new Blob([text], { type: mediaType }));
|
|
1505
|
+
const link = document.createElement('a');
|
|
1506
|
+
link.href = url;
|
|
1507
|
+
link.download = name;
|
|
1508
|
+
link.click();
|
|
1509
|
+
URL.revokeObjectURL(url);
|
|
1510
|
+
},
|
|
1511
|
+
choose: question => new Promise(resolve => {
|
|
1512
|
+
chooseResolver.current = resolve;
|
|
1513
|
+
setChoice(question);
|
|
1514
|
+
}),
|
|
1515
|
+
pickFile: accept => new Promise(resolve => {
|
|
1516
|
+
const input = fileInput.current;
|
|
1517
|
+
if (!input) {
|
|
1518
|
+
resolve(undefined);
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
fileResolver.current = resolve;
|
|
1522
|
+
input.accept = accept;
|
|
1523
|
+
input.value = '';
|
|
1524
|
+
input.click();
|
|
1525
|
+
}),
|
|
1526
|
+
}), [sessionsClient]);
|
|
1425
1527
|
/*
|
|
1426
1528
|
* None without a server (`noRuntime`): the chat is off and connects to
|
|
1427
1529
|
* nothing — no address is made up for it.
|
|
@@ -1847,7 +1949,16 @@ export default function ChatView({ workspace }) {
|
|
|
1847
1949
|
? 'attention.fg'
|
|
1848
1950
|
: 'danger.fg', borderColor: chatExtras.errorBanner.variant === 'warning'
|
|
1849
1951
|
? 'attention.muted'
|
|
1850
|
-
: 'danger.muted', children: chatExtras.errorBanner.message })) : null, openedThread?.said && openedThread.given === givenThread?.id ? (_jsx(Text, { as: "p", role: "status", sx: { m: 0, px: 3, py: 2, fontSize: 1, color: 'fg.muted' }, children: openedThread.said })) : null,
|
|
1952
|
+
: 'danger.muted', children: chatExtras.errorBanner.message })) : null, openedThread?.said && openedThread.given === givenThread?.id ? (_jsx(Text, { as: "p", role: "status", sx: { m: 0, px: 3, py: 2, fontSize: 1, color: 'fg.muted' }, children: openedThread.said })) : null, actionSaid ? (_jsxs(Box, { display: "flex", alignItems: "baseline", gap: 2, px: 3, py: 2, fontSize: 1, color: "fg.muted", role: "status", "data-session-said": "", children: [_jsx(Text, { sx: { flex: 1 }, children: actionSaid }), _jsx(Button, { size: "small", variant: "invisible", onClick: () => setActionSaid(''), children: "Dismiss" })] })) : null, choice ? (_jsx(SessionChooseDialog, { question: choice, onPick: id => {
|
|
1953
|
+
setChoice(null);
|
|
1954
|
+
chooseResolver.current?.(id);
|
|
1955
|
+
chooseResolver.current = null;
|
|
1956
|
+
} })) : null, _jsx("input", { ref: fileInput, type: "file", hidden: true, "data-session-file": "", onChange: async (event) => {
|
|
1957
|
+
const file = event.target.files?.[0];
|
|
1958
|
+
const text = file ? await file.text() : undefined;
|
|
1959
|
+
fileResolver.current?.(text);
|
|
1960
|
+
fileResolver.current = null;
|
|
1961
|
+
} }), _jsx(Box, { flex: "1 1 auto", minHeight: 0, display: "flex", children: opening ? (_jsx(Text, { as: "p", role: "status", sx: { m: 0, p: 3, fontSize: 1, color: 'fg.muted' }, children: THREAD_WORDS.opening })) : (_jsx(ChatBase
|
|
1851
1962
|
// The theme it wears, when the host names one (an application's).
|
|
1852
1963
|
, {
|
|
1853
1964
|
// The theme it wears, when the host names one (an application's).
|
|
@@ -1992,7 +2103,7 @@ export default function ChatView({ workspace }) {
|
|
|
1992
2103
|
See `toggleFullScreen` for why it is the browser's API rather
|
|
1993
2104
|
than a big box.
|
|
1994
2105
|
*/
|
|
1995
|
-
headerActions: _jsxs(Box, { display: "inline-flex", alignItems: "center", gap: 2, children: [workspace.chatHeaderActions, chatHeaderItems.length > 0 ? (_jsx(ReactorSlot, { slot: LoopSlots.chatHeader, props: { workspace } })) : null, _jsx(IconButton, { icon: fullScreen ? ScreenNormalIcon : ScreenFullIcon, "aria-label": fullScreen ? 'Exit full screen' : 'Enter full screen', variant: "invisible", size: "small", onClick: () => {
|
|
2106
|
+
headerActions: _jsxs(Box, { display: "inline-flex", alignItems: "center", gap: 2, children: [workspace.chatHeaderActions, runsApp && agentServerUrl ? (_jsxs(_Fragment, { children: [_jsx(SessionStateLine, { facts: facts }), _jsx(SessionActionsMenu, { uid: threadUid || undefined, describe: uid => sessionsClient.described(uid), context: sessionContext })] })) : null, chatHeaderItems.length > 0 ? (_jsx(ReactorSlot, { slot: LoopSlots.chatHeader, props: { workspace } })) : null, _jsx(IconButton, { icon: fullScreen ? ScreenNormalIcon : ScreenFullIcon, "aria-label": fullScreen ? 'Exit full screen' : 'Enter full screen', variant: "invisible", size: "small", onClick: () => {
|
|
1996
2107
|
// Whether or not it takes, the hint has been answered:
|
|
1997
2108
|
// they found the control, which is all it was for.
|
|
1998
2109
|
setHintFullScreen(false);
|
|
@@ -2080,7 +2191,13 @@ export default function ChatView({ workspace }) {
|
|
|
2080
2191
|
tool did. With an editor open the change is visible where it
|
|
2081
2192
|
happened, and the default tool row is enough.
|
|
2082
2193
|
*/
|
|
2083
|
-
notebookToolSurfacesId: active ? undefined : workspace.surfaceId, showTurnFooter: chatExtras.showTokenUsage ?? config?.showTokenUsage ?? true, onContextSnapshot: handleContextSnapshot, onLoadingChange: handleLoadingChange,
|
|
2194
|
+
notebookToolSurfacesId: active ? undefined : workspace.surfaceId, showTurnFooter: chatExtras.showTokenUsage ?? config?.showTokenUsage ?? true, onContextSnapshot: handleContextSnapshot, onLoadingChange: handleLoadingChange,
|
|
2195
|
+
/* Each turn's row offers what the registry places on a turn
|
|
2196
|
+
(MH-10): *Clone from here*, naming the turn — under the
|
|
2197
|
+
person's message, for an application's session only. */
|
|
2198
|
+
renderMessageFooter: runsApp && agentServerUrl
|
|
2199
|
+
? (message, at) => message.role === 'user' ? (_jsx(TurnActions, { facts: facts, turn: at.turn, context: sessionContext })) : null
|
|
2200
|
+
: undefined, onSpeakingChange: setSpeaking, onItemsChange: handleMessagesChange, onDisplayItemsChange: handleDisplayItemsChange, enableStreaming: true }, chatThread?.id)) }), !headerShown && chatHeaderItems.length > 0 ? (_jsx(Box, { hidden: true, children: _jsx(ReactorSlot, { slot: LoopSlots.chatHeader, props: { workspace } }) })) : null, besideChat && !promptHidden ? prompt : null] }) }));
|
|
2084
2201
|
// Off when the host asked for the menu alone: the composer's suggestions
|
|
2085
2202
|
// control carries the same openers (`suggestions` above).
|
|
2086
2203
|
const chipsEl = config?.suggestionLabels !== false && chatSuggestions.length > 0 ? (_jsx(Box, { "aria-label": chatText.suggestedPrompts, display: "flex", flexWrap: "wrap", gap: 2, px: 2, pb: "6px", children: chatSuggestions.map(item => (_jsx(Box, { as: "button", type: "button",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The thread's `⋯` menu, drawn from the `loop.session.action` registry
|
|
3
|
+
* (MH-F08): the entries that apply to the session as it stands, read when
|
|
4
|
+
* the menu opens; an entry's `when` hides what does not apply.
|
|
5
|
+
*
|
|
6
|
+
* @module apps/plugins/chat/SessionActionsMenu
|
|
7
|
+
*/
|
|
8
|
+
import type { JSX } from 'react';
|
|
9
|
+
import { type SessionActionContext, type SessionFacts } from '../../core';
|
|
10
|
+
/**
|
|
11
|
+
* What the thread's header says of its session (MH-27, MH-10): its state
|
|
12
|
+
* with the turn phase — *Open · answering*, *Paused*, *Ended* — and where it
|
|
13
|
+
* comes from — *Cloned from e67a52b2 at turn 2*, *Imported from a file…* —
|
|
14
|
+
* as the record says them. Nothing while the session is not read.
|
|
15
|
+
*/
|
|
16
|
+
export declare function SessionStateLine({ facts, }: {
|
|
17
|
+
facts: SessionFacts | undefined;
|
|
18
|
+
}): JSX.Element | null;
|
|
19
|
+
/**
|
|
20
|
+
* The entries offered on a turn's row (MH-10): *Clone from here*, naming
|
|
21
|
+
* the turn. Drawn under the person's message of that turn; nothing while
|
|
22
|
+
* the session is not read or nothing applies.
|
|
23
|
+
*/
|
|
24
|
+
export declare function TurnActions({ facts, turn, context, }: {
|
|
25
|
+
facts: SessionFacts | undefined;
|
|
26
|
+
/** The person's turn the row belongs to. */
|
|
27
|
+
turn: number;
|
|
28
|
+
context: SessionActionContext;
|
|
29
|
+
}): JSX.Element | null;
|
|
30
|
+
export type SessionActionsMenuProps = {
|
|
31
|
+
/** The session the thread is, when it is one. */
|
|
32
|
+
uid: string | undefined;
|
|
33
|
+
/** How the menu reads the session's facts when it opens. */
|
|
34
|
+
describe: (uid: string) => Promise<SessionFacts>;
|
|
35
|
+
/** What an entry may do. */
|
|
36
|
+
context: SessionActionContext;
|
|
37
|
+
};
|
|
38
|
+
/** The entries that apply, as a menu; nothing when the thread is no session. */
|
|
39
|
+
export declare function SessionActionsMenu({ uid, describe, context, }: SessionActionsMenuProps): JSX.Element | null;
|
|
40
|
+
export default SessionActionsMenu;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import { ActionList, ActionMenu, Button, IconButton, Label, Text, } from '@primer/react';
|
|
4
|
+
import { KebabHorizontalIcon } from '@primer/octicons-react';
|
|
5
|
+
import { Box } from '@datalayer/primer-addons';
|
|
6
|
+
import { useContributions } from '@datalayer/reactor/react';
|
|
7
|
+
import { LoopSessionAction, sessionActionsFor, } from '../../core';
|
|
8
|
+
import { sessionLineageSaid, sessionStateSaid, } from '../../../portable/activity';
|
|
9
|
+
/**
|
|
10
|
+
* What the thread's header says of its session (MH-27, MH-10): its state
|
|
11
|
+
* with the turn phase — *Open · answering*, *Paused*, *Ended* — and where it
|
|
12
|
+
* comes from — *Cloned from e67a52b2 at turn 2*, *Imported from a file…* —
|
|
13
|
+
* as the record says them. Nothing while the session is not read.
|
|
14
|
+
*/
|
|
15
|
+
export function SessionStateLine({ facts, }) {
|
|
16
|
+
if (!facts) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const lineage = sessionLineageSaid(facts);
|
|
20
|
+
return (_jsxs(Box, { display: "inline-flex", alignItems: "center", gap: 2, "data-session-state": facts.state, children: [_jsx(Label, { size: "small", variant: facts.state === 'open'
|
|
21
|
+
? 'accent'
|
|
22
|
+
: facts.state === 'paused'
|
|
23
|
+
? 'attention'
|
|
24
|
+
: 'secondary', children: sessionStateSaid(facts) }), lineage ? (_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, "data-session-lineage": "", children: lineage })) : null] }));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The entries offered on a turn's row (MH-10): *Clone from here*, naming
|
|
28
|
+
* the turn. Drawn under the person's message of that turn; nothing while
|
|
29
|
+
* the session is not read or nothing applies.
|
|
30
|
+
*/
|
|
31
|
+
export function TurnActions({ facts, turn, context, }) {
|
|
32
|
+
const entries = useContributions(LoopSessionAction);
|
|
33
|
+
const applicable = sessionActionsFor(entries, facts, 'turn');
|
|
34
|
+
if (!facts || applicable.length === 0 || turn < 1) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return (_jsx(Box, { display: "inline-flex", gap: 1, "data-turn-actions": turn, children: applicable.map(entry => (_jsx(Button, { size: "small", variant: "invisible", "data-turn-action": entry.id, onClick: () => {
|
|
38
|
+
Promise.resolve(entry.run(facts, { ...context, atTurn: turn })).catch(error => context.say(String(error.message ?? error)));
|
|
39
|
+
}, children: entry.label }, entry.id))) }));
|
|
40
|
+
}
|
|
41
|
+
/** The entries that apply, as a menu; nothing when the thread is no session. */
|
|
42
|
+
export function SessionActionsMenu({ uid, describe, context, }) {
|
|
43
|
+
const entries = useContributions(LoopSessionAction);
|
|
44
|
+
const [facts, setFacts] = useState(undefined);
|
|
45
|
+
const [open, setOpen] = useState(false);
|
|
46
|
+
const [said, setSaid] = useState('');
|
|
47
|
+
const saying = {
|
|
48
|
+
...context,
|
|
49
|
+
say: sentence => {
|
|
50
|
+
setSaid(sentence);
|
|
51
|
+
context.say(sentence);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const onOpenChange = useCallback((opened) => {
|
|
55
|
+
setOpen(opened);
|
|
56
|
+
if (opened && uid) {
|
|
57
|
+
describe(uid).then(setFacts, () => setFacts(undefined));
|
|
58
|
+
}
|
|
59
|
+
}, [describe, uid]);
|
|
60
|
+
if (!uid || entries.length === 0) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const applicable = sessionActionsFor(entries, facts);
|
|
64
|
+
return (_jsxs(ActionMenu, { open: open, onOpenChange: onOpenChange, children: [_jsx(ActionMenu.Anchor, { children: _jsx(IconButton, { icon: KebabHorizontalIcon, "aria-label": "Session actions", variant: "invisible", size: "small", "data-testid": "session-actions" }) }), _jsx(ActionMenu.Overlay, { width: "small", children: _jsxs(ActionList, { children: [applicable.length === 0 ? (_jsx(ActionList.Item, { disabled: true, children: facts
|
|
65
|
+
? 'Nothing applies to this session now.'
|
|
66
|
+
: 'Reading the session…' })) : (applicable.map(entry => (_jsx(ActionList.Item, { "data-session-action": entry.id, onSelect: () => {
|
|
67
|
+
if (!facts) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
Promise.resolve(entry.run(facts, saying)).catch(error => saying.say(String(error.message ?? error)));
|
|
71
|
+
}, children: entry.label }, entry.id)))), said ? (_jsxs(_Fragment, { children: [_jsx(ActionList.Divider, {}), _jsx(ActionList.Item, { disabled: true, "data-testid": "session-actions-said", children: said })] })) : null] }) })] }));
|
|
72
|
+
}
|
|
73
|
+
export default SessionActionsMenu;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The picker a session action asks with (`SessionActionContext.choose`):
|
|
3
|
+
* one of several — the agent a session is switched to — and, under the
|
|
4
|
+
* pick, what it does: the sentence the new agent will be told, shown
|
|
5
|
+
* before it is sent (MH-27). Declined, nothing is sent.
|
|
6
|
+
*
|
|
7
|
+
* @module apps/plugins/chat/SessionChooseDialog
|
|
8
|
+
*/
|
|
9
|
+
import type { JSX } from 'react';
|
|
10
|
+
import type { SessionActionContext } from '../../core';
|
|
11
|
+
/** What a `choose` asks, as the context hands it over. */
|
|
12
|
+
export type SessionChoice = Parameters<NonNullable<SessionActionContext['choose']>>[0];
|
|
13
|
+
export declare const CHOOSE_WORDS: {
|
|
14
|
+
readonly confirm: "Switch";
|
|
15
|
+
readonly cancel: "Keep it";
|
|
16
|
+
};
|
|
17
|
+
export declare function SessionChooseDialog({ question, onPick, }: {
|
|
18
|
+
question: SessionChoice;
|
|
19
|
+
/** The pick, or `undefined` when declined. */
|
|
20
|
+
onPick: (id: string | undefined) => void;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
export default SessionChooseDialog;
|