@dxos/plugin-script 0.8.4-main.28f8d3d → 0.8.4-main.2c6827d
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/lib/browser/DeploymentDialog-MZX4T77L.mjs +14 -0
- package/dist/lib/browser/NotebookContainer-RTESC4OV.mjs +817 -0
- package/dist/lib/browser/NotebookContainer-RTESC4OV.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-T2BAZDJ4.mjs +147 -0
- package/dist/lib/browser/ScriptContainer-T2BAZDJ4.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-IABOSTBK.mjs → app-graph-builder-2WR2ATTJ.mjs} +11 -9
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs +30 -0
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs.map +7 -0
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs +88 -0
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OAVS36Q3.mjs → chunk-3IJASGG5.mjs} +23 -21
- package/dist/lib/browser/chunk-3IJASGG5.mjs.map +7 -0
- package/dist/lib/browser/chunk-4M7U2WVT.mjs +304 -0
- package/dist/lib/browser/chunk-4M7U2WVT.mjs.map +7 -0
- package/dist/lib/browser/chunk-5JSNQYZZ.mjs +517 -0
- package/dist/lib/browser/chunk-5JSNQYZZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QYAREHGH.mjs → chunk-EB6AXFXO.mjs} +8 -5
- package/dist/lib/browser/chunk-EB6AXFXO.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OULPWKXN.mjs → chunk-GAFCKEII.mjs} +178 -87
- package/dist/lib/browser/chunk-GAFCKEII.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-LNNCD2H4.mjs +102 -0
- package/dist/lib/browser/chunk-LNNCD2H4.mjs.map +7 -0
- package/dist/lib/browser/chunk-M6KJPUJK.mjs +111 -0
- package/dist/lib/browser/chunk-M6KJPUJK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5TVBECWH.mjs → chunk-UOQ6NCH3.mjs} +2 -2
- package/dist/lib/browser/{compiler-RIWQVBPX.mjs → compiler-4KHRSX7J.mjs} +7 -6
- package/dist/lib/browser/compiler-4KHRSX7J.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +112 -42
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-SAL2TM7U.mjs → intent-resolver-AFJ575VK.mjs} +38 -23
- package/dist/lib/browser/intent-resolver-AFJ575VK.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-E3SXU6ON.mjs → react-surface-QEQ3QUQA.mjs} +47 -23
- package/dist/lib/browser/react-surface-QEQ3QUQA.mjs.map +7 -0
- package/dist/lib/browser/{settings-KCTBK5TY.mjs → settings-LNLSTZM4.mjs} +10 -8
- package/dist/lib/browser/settings-LNLSTZM4.mjs.map +7 -0
- package/dist/lib/browser/templates/index.mjs +2 -1
- package/dist/lib/browser/types/index.mjs +8 -4
- package/dist/lib/node-esm/DeploymentDialog-GL5AUWMR.mjs +15 -0
- package/dist/lib/node-esm/DeploymentDialog-GL5AUWMR.mjs.map +7 -0
- package/dist/lib/node-esm/NotebookContainer-SVD3A3D6.mjs +818 -0
- package/dist/lib/node-esm/NotebookContainer-SVD3A3D6.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-2CE3H3JJ.mjs +148 -0
- package/dist/lib/node-esm/ScriptContainer-2CE3H3JJ.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-CQTTAYHP.mjs → app-graph-builder-NCVLUL5R.mjs} +11 -9
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs +31 -0
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-35M3CHYE.mjs → chunk-55JZVM6K.mjs} +2 -2
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs +90 -0
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs +113 -0
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AHXJ6NQU.mjs → chunk-IBV2DR36.mjs} +8 -5
- package/dist/lib/node-esm/chunk-IBV2DR36.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IQTBVH4L.mjs +518 -0
- package/dist/lib/node-esm/chunk-IQTBVH4L.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6WMFL3JL.mjs → chunk-KJKZ4KNO.mjs} +178 -87
- package/dist/lib/node-esm/chunk-KJKZ4KNO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs +103 -0
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IO6T72KY.mjs → chunk-RIE676OW.mjs} +23 -21
- package/dist/lib/node-esm/chunk-RIE676OW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YRTA4EHU.mjs +305 -0
- package/dist/lib/node-esm/chunk-YRTA4EHU.mjs.map +7 -0
- package/dist/lib/node-esm/{compiler-S52P5P3F.mjs → compiler-DU5NQISX.mjs} +7 -6
- package/dist/lib/node-esm/compiler-DU5NQISX.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +112 -42
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-GO53JOPL.mjs → intent-resolver-A5VVK746.mjs} +38 -23
- package/dist/lib/node-esm/intent-resolver-A5VVK746.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-W3NRCS5O.mjs → react-surface-U77YT7VF.mjs} +47 -23
- package/dist/lib/node-esm/react-surface-U77YT7VF.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-DXZ334A3.mjs → settings-IUFMOCXY.mjs} +10 -8
- package/dist/lib/node-esm/settings-IUFMOCXY.mjs.map +7 -0
- package/dist/lib/node-esm/templates/index.mjs +2 -1
- package/dist/lib/node-esm/types/index.mjs +8 -4
- package/dist/types/src/ScriptPlugin.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts +4 -4
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +243 -13
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -1
- package/dist/types/src/components/NotebookContainer.d.ts +10 -0
- package/dist/types/src/components/NotebookContainer.d.ts.map +1 -0
- package/dist/types/src/components/NotebookContainer.stories.d.ts +251 -0
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +15 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +9 -0
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +14 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +245 -0
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/index.d.ts +3 -0
- package/dist/types/src/components/NotebookStack/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptContainer.d.ts +4 -4
- package/dist/types/src/components/ScriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +5 -6
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +242 -10
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts +2 -2
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +2 -2
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts +2 -2
- package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +4 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +11 -4
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +3 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +17 -14
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +2 -2
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +4 -14
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +45 -0
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts +2 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts.map +1 -0
- package/dist/types/src/notebook/eval.d.ts +13 -0
- package/dist/types/src/notebook/eval.d.ts.map +1 -0
- package/dist/types/src/notebook/index.d.ts +2 -0
- package/dist/types/src/notebook/index.d.ts.map +1 -0
- package/dist/types/src/notebook/vfs-parser.d.ts +74 -0
- package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -0
- package/dist/types/src/notebook/vfs-parser.test.d.ts +2 -0
- package/dist/types/src/notebook/vfs-parser.test.d.ts.map +1 -0
- package/dist/types/src/templates/chess.d.ts.map +1 -1
- package/dist/types/src/templates/data-generator.d.ts.map +1 -1
- package/dist/types/src/templates/discord.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/gmail.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +43 -1
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/{echo.d.ts → ping.d.ts} +1 -1
- package/dist/types/src/templates/ping.d.ts.map +1 -0
- package/dist/types/src/testing/data.d.ts +3 -0
- package/dist/types/src/testing/data.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +30 -5
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +31 -0
- package/dist/types/src/types/Notebook.d.ts.map +1 -0
- package/dist/types/src/types/actions.d.ts +54 -0
- package/dist/types/src/types/actions.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +6 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/util/deploy.d.ts +7 -7
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +6 -3
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +78 -69
- package/src/ScriptPlugin.tsx +96 -65
- package/src/capabilities/app-graph-builder.ts +10 -9
- package/src/capabilities/artifact-definition.ts +2 -3
- package/src/capabilities/blueprint-definition.ts +30 -0
- package/src/capabilities/compiler.ts +1 -1
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +20 -11
- package/src/capabilities/react-surface.tsx +30 -17
- package/src/capabilities/settings.ts +3 -3
- package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +39 -20
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +42 -31
- package/src/components/FrameContainer/FrameContainer.tsx +5 -4
- package/src/components/NotebookContainer.stories.tsx +83 -0
- package/src/components/NotebookContainer.tsx +263 -0
- package/src/components/NotebookStack/NotebookCell.tsx +214 -0
- package/src/components/NotebookStack/NotebookMenu.tsx +47 -0
- package/src/components/NotebookStack/NotebookStack.stories.tsx +54 -0
- package/src/components/NotebookStack/NotebookStack.tsx +86 -0
- package/src/components/NotebookStack/index.ts +6 -0
- package/src/components/ScriptContainer.tsx +5 -5
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +34 -18
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +37 -30
- package/src/components/Settings/ScriptObjectSettings.tsx +126 -35
- package/src/components/Settings/ScriptPluginSettings.tsx +37 -47
- package/src/components/TestPanel/TestContainer.tsx +2 -2
- package/src/components/TestPanel/TestPanel.tsx +42 -19
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +74 -27
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +36 -35
- package/src/components/index.ts +3 -0
- package/src/events.ts +2 -2
- package/src/hooks/deploy.ts +22 -23
- package/src/hooks/format.ts +4 -4
- package/src/hooks/template.ts +6 -15
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +10 -6
- package/src/index.ts +1 -0
- package/src/meta.ts +7 -5
- package/src/notebook/compute-graph.test.ts +70 -0
- package/src/notebook/compute-graph.ts +206 -0
- package/src/notebook/eval.ts +105 -0
- package/src/notebook/index.ts +5 -0
- package/src/notebook/vfs-parser.test.ts +149 -0
- package/src/notebook/vfs-parser.ts +451 -0
- package/src/templates/chess.ts +2 -0
- package/src/templates/data-generator.ts +2 -0
- package/src/templates/discord.ts +11 -3
- package/src/templates/forex-effect.ts +6 -2
- package/src/templates/forex.ts +2 -0
- package/src/templates/gmail.ts +32 -62
- package/src/templates/index.ts +6 -6
- package/src/testing/data.ts +72 -0
- package/src/testing/index.ts +5 -0
- package/src/translations.ts +33 -7
- package/src/types/Notebook.ts +41 -0
- package/src/types/actions.ts +53 -0
- package/src/types/index.ts +3 -1
- package/src/types/types.ts +15 -0
- package/src/util/deploy.ts +29 -46
- package/src/util/functions.ts +37 -7
- package/dist/lib/browser/DeploymentDialog-C3XH2Z56.mjs +0 -12
- package/dist/lib/browser/ScriptContainer-FUBR4OZE.mjs +0 -263
- package/dist/lib/browser/ScriptContainer-FUBR4OZE.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-IABOSTBK.mjs.map +0 -7
- package/dist/lib/browser/chunk-G4A2MGAL.mjs +0 -88
- package/dist/lib/browser/chunk-G4A2MGAL.mjs.map +0 -7
- package/dist/lib/browser/chunk-IS4OG2UW.mjs +0 -39
- package/dist/lib/browser/chunk-IS4OG2UW.mjs.map +0 -7
- package/dist/lib/browser/chunk-MWZDJNCQ.mjs +0 -283
- package/dist/lib/browser/chunk-MWZDJNCQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-OAVS36Q3.mjs.map +0 -7
- package/dist/lib/browser/chunk-OULPWKXN.mjs.map +0 -7
- package/dist/lib/browser/chunk-QYAREHGH.mjs.map +0 -7
- package/dist/lib/browser/chunk-SUOLJH55.mjs +0 -233
- package/dist/lib/browser/chunk-SUOLJH55.mjs.map +0 -7
- package/dist/lib/browser/compiler-RIWQVBPX.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-SAL2TM7U.mjs.map +0 -7
- package/dist/lib/browser/react-surface-E3SXU6ON.mjs.map +0 -7
- package/dist/lib/browser/settings-KCTBK5TY.mjs.map +0 -7
- package/dist/lib/node-esm/DeploymentDialog-O2XZVRLU.mjs +0 -13
- package/dist/lib/node-esm/ScriptContainer-VJ75TM24.mjs +0 -264
- package/dist/lib/node-esm/ScriptContainer-VJ75TM24.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-CQTTAYHP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3BBEM2U7.mjs +0 -90
- package/dist/lib/node-esm/chunk-3BBEM2U7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6WMFL3JL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7L4JDSXJ.mjs +0 -284
- package/dist/lib/node-esm/chunk-7L4JDSXJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AHXJ6NQU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IO6T72KY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JIPFLBYA.mjs +0 -40
- package/dist/lib/node-esm/chunk-JIPFLBYA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PACUN7RS.mjs +0 -234
- package/dist/lib/node-esm/chunk-PACUN7RS.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-S52P5P3F.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-GO53JOPL.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-W3NRCS5O.mjs.map +0 -7
- package/dist/lib/node-esm/settings-DXZ334A3.mjs.map +0 -7
- package/dist/types/src/templates/echo.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -38
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/types/schema.ts +0 -37
- /package/dist/lib/browser/{DeploymentDialog-C3XH2Z56.mjs.map → DeploymentDialog-MZX4T77L.mjs.map} +0 -0
- /package/dist/lib/{node-esm/DeploymentDialog-O2XZVRLU.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-5TVBECWH.mjs.map → chunk-UOQ6NCH3.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-35M3CHYE.mjs.map → chunk-55JZVM6K.mjs.map} +0 -0
- /package/src/templates/{echo.ts → ping.ts} +0 -0
|
@@ -4,18 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createSurface
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
9
10
|
import { Obj } from '@dxos/echo';
|
|
10
|
-
import {
|
|
11
|
+
import { Script } from '@dxos/functions';
|
|
11
12
|
import { SettingsStore } from '@dxos/local-storage';
|
|
12
13
|
import { getSpace } from '@dxos/react-client/echo';
|
|
13
14
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
14
|
-
import { type
|
|
15
|
+
import { type AccessToken } from '@dxos/types';
|
|
15
16
|
|
|
16
17
|
import {
|
|
17
18
|
DEPLOYMENT_DIALOG,
|
|
18
19
|
DeploymentDialog,
|
|
20
|
+
NotebookContainer,
|
|
19
21
|
ScriptContainer,
|
|
20
22
|
ScriptObjectSettings,
|
|
21
23
|
ScriptPluginSettings,
|
|
@@ -23,7 +25,7 @@ import {
|
|
|
23
25
|
TestContainer,
|
|
24
26
|
} from '../components';
|
|
25
27
|
import { meta } from '../meta';
|
|
26
|
-
import { type
|
|
28
|
+
import { Notebook, type ScriptSettings } from '../types';
|
|
27
29
|
|
|
28
30
|
import { ScriptCapabilities } from './capabilities';
|
|
29
31
|
|
|
@@ -32,46 +34,57 @@ export default () =>
|
|
|
32
34
|
createSurface({
|
|
33
35
|
id: `${meta.id}/plugin-settings`,
|
|
34
36
|
role: 'article',
|
|
35
|
-
filter: (data): data is { subject: SettingsStore<
|
|
37
|
+
filter: (data): data is { subject: SettingsStore<ScriptSettings> } =>
|
|
36
38
|
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
37
39
|
component: ({ data: { subject } }) => <ScriptPluginSettings settings={subject.value} />,
|
|
38
40
|
}),
|
|
39
41
|
createSurface({
|
|
40
|
-
id: `${meta.id}/article`,
|
|
41
|
-
role: 'article',
|
|
42
|
-
filter: (data): data is { subject:
|
|
42
|
+
id: `${meta.id}/script/article`,
|
|
43
|
+
role: ['article', 'section'],
|
|
44
|
+
filter: (data): data is { subject: Script.Script } => Obj.instanceOf(Script.Script, data.subject),
|
|
43
45
|
component: ({ data, role }) => {
|
|
44
46
|
const compiler = useCapability(ScriptCapabilities.Compiler);
|
|
45
47
|
// TODO(dmaretskyi): Since settings store is not reactive, this would break on the script plugin being enabled without a page reload.
|
|
46
|
-
const settings = useCapability(Capabilities.SettingsStore).getStore<
|
|
48
|
+
const settings = useCapability(Capabilities.SettingsStore).getStore<ScriptSettings>(meta.id)?.value;
|
|
47
49
|
return <ScriptContainer role={role} script={data.subject} settings={settings} env={compiler.environment} />;
|
|
48
50
|
},
|
|
49
51
|
}),
|
|
52
|
+
createSurface({
|
|
53
|
+
id: `${meta.id}/notebook/article`,
|
|
54
|
+
role: 'article',
|
|
55
|
+
filter: (data): data is { subject: Notebook.Notebook } => Obj.instanceOf(Notebook.Notebook, data.subject),
|
|
56
|
+
component: ({ data, role }) => {
|
|
57
|
+
const compiler = useCapability(ScriptCapabilities.Compiler);
|
|
58
|
+
return <NotebookContainer role={role} notebook={data.subject} env={compiler.environment} />;
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
// TODO(burdon): Standardize PluginSettings vs ObjectSettings.
|
|
62
|
+
// TODO(burdon): Why is ScriptProperties different from ScriptObjectSettings?
|
|
50
63
|
createSurface({
|
|
51
64
|
id: `${meta.id}/companion/base-settings`,
|
|
52
65
|
role: 'base-object-settings',
|
|
53
|
-
filter: (data): data is { subject:
|
|
66
|
+
filter: (data): data is { subject: Script.Script } => Obj.instanceOf(Script.Script, data.subject),
|
|
54
67
|
component: ({ data }) => <ScriptProperties object={data.subject} />,
|
|
55
68
|
}),
|
|
56
69
|
createSurface({
|
|
57
70
|
id: `${meta.id}/companion/settings`,
|
|
58
71
|
role: 'object-settings',
|
|
59
|
-
filter: (data): data is { subject:
|
|
72
|
+
filter: (data): data is { subject: Script.Script } => Obj.instanceOf(Script.Script, data.subject),
|
|
60
73
|
component: ({ data }) => <ScriptObjectSettings object={data.subject} />,
|
|
61
74
|
}),
|
|
62
75
|
createSurface({
|
|
63
76
|
id: `${meta.id}/companion/execute`,
|
|
64
77
|
role: 'article',
|
|
65
|
-
filter: (data): data is { companionTo:
|
|
66
|
-
Obj.instanceOf(
|
|
78
|
+
filter: (data): data is { companionTo: Script.Script } =>
|
|
79
|
+
Obj.instanceOf(Script.Script, data.companionTo) && data.subject === 'execute',
|
|
67
80
|
component: ({ data, role }) => <TestContainer script={data.companionTo} role={role} />,
|
|
68
81
|
}),
|
|
69
82
|
createSurface({
|
|
70
83
|
id: `${meta.id}/companion/logs`,
|
|
71
84
|
role: 'article',
|
|
72
|
-
filter: (data): data is { companionTo:
|
|
73
|
-
Obj.instanceOf(
|
|
74
|
-
component: ({ data
|
|
85
|
+
filter: (data): data is { companionTo: Script.Script } =>
|
|
86
|
+
Obj.instanceOf(Script.Script, data.companionTo) && data.subject === 'logs',
|
|
87
|
+
component: ({ data }) => {
|
|
75
88
|
const space = getSpace(data.companionTo);
|
|
76
89
|
return (
|
|
77
90
|
<StackItem.Content>
|
|
@@ -83,7 +96,7 @@ export default () =>
|
|
|
83
96
|
createSurface({
|
|
84
97
|
id: DEPLOYMENT_DIALOG,
|
|
85
98
|
role: 'dialog',
|
|
86
|
-
filter: (data): data is { props: { accessToken:
|
|
99
|
+
filter: (data): data is { props: { accessToken: AccessToken.AccessToken; scriptTemplates: any } } =>
|
|
87
100
|
data.component === DEPLOYMENT_DIALOG,
|
|
88
101
|
component: ({ data }) => <DeploymentDialog {...data.props} />,
|
|
89
102
|
}),
|
|
@@ -6,16 +6,16 @@ import { Capabilities, contributes } from '@dxos/app-framework';
|
|
|
6
6
|
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
8
|
import { meta } from '../meta';
|
|
9
|
-
import {
|
|
9
|
+
import { ScriptSettings } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () => {
|
|
12
|
-
const settings = live(
|
|
12
|
+
const settings = live<ScriptSettings>({
|
|
13
13
|
editorInputMode: 'vscode',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
return contributes(Capabilities.Settings, {
|
|
17
17
|
prefix: meta.id,
|
|
18
|
-
schema:
|
|
18
|
+
schema: ScriptSettings,
|
|
19
19
|
value: settings,
|
|
20
20
|
});
|
|
21
21
|
};
|
|
@@ -2,38 +2,57 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
8
|
+
import { IntentPlugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
10
12
|
import { Dialog } from '@dxos/react-ui';
|
|
11
|
-
import {
|
|
13
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
|
+
import { AccessToken } from '@dxos/types';
|
|
12
15
|
|
|
13
16
|
import { translations } from '../../translations';
|
|
14
|
-
import { DeploymentDialog } from '../DeploymentDialog/DeploymentDialog';
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{ label: 'Script 1', templateId: 'template1' },
|
|
21
|
-
{ label: 'Script 2', templateId: 'template2' },
|
|
22
|
-
{ label: 'Script 3', templateId: 'template3' },
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
render: (args: any) => (
|
|
18
|
+
import { DeploymentDialog, type DeploymentDialogProps } from './DeploymentDialog';
|
|
19
|
+
|
|
20
|
+
const DefaultStory = (props: DeploymentDialogProps) => {
|
|
21
|
+
return (
|
|
26
22
|
<Dialog.Root defaultOpen={true}>
|
|
27
|
-
<DeploymentDialog {...
|
|
23
|
+
<DeploymentDialog {...props} />
|
|
28
24
|
</Dialog.Root>
|
|
29
|
-
)
|
|
25
|
+
);
|
|
30
26
|
};
|
|
31
27
|
|
|
32
|
-
const meta
|
|
28
|
+
const meta = {
|
|
33
29
|
title: 'plugins/plugin-script/DeploymentDialog',
|
|
34
30
|
component: DeploymentDialog,
|
|
31
|
+
render: DefaultStory,
|
|
35
32
|
parameters: { translations },
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
34
|
+
decorators: [
|
|
35
|
+
withTheme,
|
|
36
|
+
withPluginManager({
|
|
37
|
+
plugins: [IntentPlugin(), ClientPlugin({})],
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
38
41
|
|
|
39
42
|
export default meta;
|
|
43
|
+
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
|
|
46
|
+
export const Default: Story = {
|
|
47
|
+
args: {
|
|
48
|
+
accessToken: Obj.make(AccessToken.AccessToken, {
|
|
49
|
+
source: 'example.com',
|
|
50
|
+
token: 'example-token',
|
|
51
|
+
}),
|
|
52
|
+
scriptTemplates: [
|
|
53
|
+
{ id: 't-1', name: 'Script 1', source: 'template1' },
|
|
54
|
+
{ id: 't-2', name: 'Script 2', source: 'template2' },
|
|
55
|
+
{ id: 't-3', name: 'Script 3', source: 'template3' },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -4,29 +4,30 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useEffect, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import { LayoutAction, createIntent
|
|
7
|
+
import { LayoutAction, createIntent } from '@dxos/app-framework';
|
|
8
|
+
import { useIntentDispatcher } from '@dxos/app-framework/react';
|
|
8
9
|
import { getSpace } from '@dxos/react-client/echo';
|
|
9
|
-
import { Button, Dialog,
|
|
10
|
-
import { type
|
|
10
|
+
import { Button, Dialog, IconButton, useTranslation } from '@dxos/react-ui';
|
|
11
|
+
import { type AccessToken } from '@dxos/types';
|
|
11
12
|
|
|
12
|
-
import { useCreateAndDeployScriptTemplates } from '../../hooks
|
|
13
|
-
import {
|
|
13
|
+
import { useCreateAndDeployScriptTemplates } from '../../hooks';
|
|
14
|
+
import { meta } from '../../meta';
|
|
14
15
|
import { type Template } from '../../templates';
|
|
15
16
|
|
|
16
|
-
export const DEPLOYMENT_DIALOG = `${
|
|
17
|
+
export const DEPLOYMENT_DIALOG = `${meta.id}/deployment/dialog`;
|
|
17
18
|
|
|
18
19
|
// TODO(ZaymonFC):
|
|
19
20
|
// - Show activity and feedback to the user.
|
|
20
21
|
// - Only take an array of templateIds and get the name from the data.
|
|
21
22
|
// - Pending / onError states.
|
|
22
23
|
|
|
23
|
-
type DeploymentDialogProps = {
|
|
24
|
-
accessToken:
|
|
24
|
+
export type DeploymentDialogProps = {
|
|
25
|
+
accessToken: AccessToken.AccessToken;
|
|
25
26
|
scriptTemplates: Template[];
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDialogProps) => {
|
|
29
|
-
const { t } = useTranslation(
|
|
30
|
+
const { t } = useTranslation(meta.id);
|
|
30
31
|
const space = useMemo(() => getSpace(accessToken), [accessToken]);
|
|
31
32
|
|
|
32
33
|
// TODO(ZaymonFC): Thinking further. All of this should get moved to intents to run async in the background.
|
|
@@ -41,35 +42,39 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
41
42
|
createIntent(LayoutAction.AddToast, {
|
|
42
43
|
part: 'toast',
|
|
43
44
|
subject: {
|
|
44
|
-
id: `${
|
|
45
|
+
id: `${meta.id}/deployment-success`,
|
|
45
46
|
icon: 'ph--check--regular',
|
|
46
47
|
duration: Infinity,
|
|
47
|
-
title: ['script deployment toast label', { ns:
|
|
48
|
-
description: ['script deployment toast description', { ns:
|
|
49
|
-
closeLabel: ['script deployment toast close label', { ns:
|
|
48
|
+
title: ['script deployment toast label', { ns: meta.id, count: scriptTemplates.length }],
|
|
49
|
+
description: ['script deployment toast description', { ns: meta.id, count: scriptTemplates.length }],
|
|
50
|
+
closeLabel: ['script deployment toast close label', { ns: meta.id, count: scriptTemplates.length }],
|
|
50
51
|
},
|
|
51
52
|
}),
|
|
52
53
|
);
|
|
53
|
-
void dispatch(
|
|
54
|
+
void dispatch(
|
|
55
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
56
|
+
part: 'dialog',
|
|
57
|
+
options: { state: false },
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
54
60
|
}
|
|
55
61
|
if (status === 'error') {
|
|
56
|
-
void dispatch(
|
|
62
|
+
void dispatch(
|
|
63
|
+
createIntent(LayoutAction.UpdateDialog, {
|
|
64
|
+
part: 'dialog',
|
|
65
|
+
options: { state: false },
|
|
66
|
+
}),
|
|
67
|
+
);
|
|
57
68
|
void dispatch(
|
|
58
69
|
createIntent(LayoutAction.AddToast, {
|
|
59
70
|
part: 'toast',
|
|
60
71
|
subject: {
|
|
61
|
-
id: `${
|
|
72
|
+
id: `${meta.id}/deployment-error`,
|
|
62
73
|
icon: 'ph--warning--regular',
|
|
63
74
|
duration: Infinity,
|
|
64
|
-
title: ['script deployment error toast label', { ns:
|
|
65
|
-
description: [
|
|
66
|
-
|
|
67
|
-
{ ns: SCRIPT_PLUGIN, count: scriptTemplates.length },
|
|
68
|
-
],
|
|
69
|
-
closeLabel: [
|
|
70
|
-
'script deployment error toast close label',
|
|
71
|
-
{ ns: SCRIPT_PLUGIN, count: scriptTemplates.length },
|
|
72
|
-
],
|
|
75
|
+
title: ['script deployment error toast label', { ns: meta.id, count: scriptTemplates.length }],
|
|
76
|
+
description: ['script deployment error toast description', { ns: meta.id, count: scriptTemplates.length }],
|
|
77
|
+
closeLabel: ['script deployment error toast close label', { ns: meta.id, count: scriptTemplates.length }],
|
|
73
78
|
},
|
|
74
79
|
}),
|
|
75
80
|
);
|
|
@@ -81,14 +86,16 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
81
86
|
<div className='flex justify-between items-center'>
|
|
82
87
|
<Dialog.Title>{t('deployment dialog title')}</Dialog.Title>
|
|
83
88
|
<Dialog.Close asChild>
|
|
84
|
-
<
|
|
85
|
-
<Icon icon='ph--x--regular' size={4} />
|
|
86
|
-
</Button>
|
|
89
|
+
<IconButton icon='ph--x--regular' size={4} label='Close' iconOnly density='fine' variant='ghost' />
|
|
87
90
|
</Dialog.Close>
|
|
88
91
|
</div>
|
|
89
92
|
<div role='none' className='plb-4'>
|
|
90
93
|
{/* TODO: Implement deployment logic and UI. */}
|
|
91
|
-
<p>
|
|
94
|
+
<p>
|
|
95
|
+
{t('deployment dialog scripts found message', {
|
|
96
|
+
count: scriptTemplates.length,
|
|
97
|
+
})}
|
|
98
|
+
</p>
|
|
92
99
|
<ul className='pbs-2'>
|
|
93
100
|
{scriptTemplates.map((template) => {
|
|
94
101
|
return <li key={template.id}>{template.name}</li>;
|
|
@@ -98,8 +105,12 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
98
105
|
<div role='none' className='flex flex-row-reverse gap-1'>
|
|
99
106
|
<Button variant='primary' onClick={handleCreateAndDeployScripts} disabled={status === 'pending'}>
|
|
100
107
|
{status === 'pending'
|
|
101
|
-
? t('deployment dialog deploy functions pending button label', {
|
|
102
|
-
|
|
108
|
+
? t('deployment dialog deploy functions pending button label', {
|
|
109
|
+
count: scriptTemplates.length,
|
|
110
|
+
})
|
|
111
|
+
: t('deployment dialog deploy functions button label', {
|
|
112
|
+
count: scriptTemplates.length,
|
|
113
|
+
})}
|
|
103
114
|
</Button>
|
|
104
115
|
<Dialog.Close asChild disabled={status === 'pending'}>
|
|
105
116
|
<Button disabled={status === 'pending'}>{t('deployment dialog skip button label')}</Button>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useEffect, useRef } from 'react';
|
|
6
6
|
|
|
7
7
|
import { clientServiceBundle } from '@dxos/client-protocol';
|
|
8
|
-
import { type BundleResult } from '@dxos/functions/bundler';
|
|
8
|
+
import { type BundleResult } from '@dxos/functions-runtime/bundler';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
@@ -48,7 +48,8 @@ export const FrameContainer = ({ containerUrl, result, debug = true }: FrameCont
|
|
|
48
48
|
// Encodes compiled code via URL.
|
|
49
49
|
invariant(result.sourceHash, 'Source hash is required.');
|
|
50
50
|
const sourceHash = Buffer.from(result.sourceHash).toString('hex');
|
|
51
|
-
const src =
|
|
51
|
+
const src =
|
|
52
|
+
'bundle' in result ? `${containerUrl}?ts=${sourceHash}#code=${encodeURIComponent(result.bundle)}` : undefined;
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
55
|
<>
|
|
@@ -59,7 +60,7 @@ export const FrameContainer = ({ containerUrl, result, debug = true }: FrameCont
|
|
|
59
60
|
<div
|
|
60
61
|
className={mx(
|
|
61
62
|
baseSurface,
|
|
62
|
-
'flex absolute right-2 bottom-2
|
|
63
|
+
'flex absolute right-2 bottom-2 is-[30rem] bs-[200px] ring rounded',
|
|
63
64
|
'z-20 overflow-x-hidden overflow-y-auto',
|
|
64
65
|
)}
|
|
65
66
|
>
|
|
@@ -68,7 +69,7 @@ export const FrameContainer = ({ containerUrl, result, debug = true }: FrameCont
|
|
|
68
69
|
{
|
|
69
70
|
timestamp: result.timestamp,
|
|
70
71
|
sourceHash,
|
|
71
|
-
error: result.error,
|
|
72
|
+
error: 'error' in result ? result.error : undefined,
|
|
72
73
|
src,
|
|
73
74
|
},
|
|
74
75
|
undefined,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { SERVICES_CONFIG } from '@dxos/ai/testing';
|
|
9
|
+
import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
|
|
10
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
|
+
import { Agent } from '@dxos/assistant-toolkit';
|
|
12
|
+
import { Filter } from '@dxos/echo';
|
|
13
|
+
import { Function, serializeFunction } from '@dxos/functions';
|
|
14
|
+
import { AssistantPlugin } from '@dxos/plugin-assistant';
|
|
15
|
+
import { AutomationPlugin } from '@dxos/plugin-automation';
|
|
16
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
17
|
+
import { ExplorerPlugin } from '@dxos/plugin-explorer';
|
|
18
|
+
import { Markdown, MarkdownPlugin } from '@dxos/plugin-markdown';
|
|
19
|
+
import { SpacePlugin } from '@dxos/plugin-space';
|
|
20
|
+
import { Config, useClient } from '@dxos/react-client';
|
|
21
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
22
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
23
|
+
import { DataTypes } from '@dxos/schema';
|
|
24
|
+
|
|
25
|
+
import { createNotebook } from '../testing';
|
|
26
|
+
import { translations } from '../translations';
|
|
27
|
+
import { Notebook } from '../types';
|
|
28
|
+
|
|
29
|
+
import { NotebookContainer } from './NotebookContainer';
|
|
30
|
+
|
|
31
|
+
const meta = {
|
|
32
|
+
title: 'plugins/plugin-script/NotebookContainer',
|
|
33
|
+
component: NotebookContainer,
|
|
34
|
+
render: (args) => {
|
|
35
|
+
const client = useClient();
|
|
36
|
+
const space = client.spaces.default;
|
|
37
|
+
const notebooks = useQuery(space?.db, Filter.type(Notebook.Notebook));
|
|
38
|
+
return <NotebookContainer {...args} notebook={notebooks[0]} />;
|
|
39
|
+
},
|
|
40
|
+
decorators: [
|
|
41
|
+
withTheme,
|
|
42
|
+
withLayout({ container: 'column', classNames: 'is-prose' }),
|
|
43
|
+
withPluginManager({
|
|
44
|
+
plugins: [
|
|
45
|
+
ClientPlugin({
|
|
46
|
+
// TODO(wittjosiah): ComputeRuntime requires edge to be configured or it will throw.
|
|
47
|
+
config: new Config({
|
|
48
|
+
runtime: {
|
|
49
|
+
services: SERVICES_CONFIG.REMOTE,
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
types: [...DataTypes, Notebook.Notebook, Function.Function, Markdown.Document],
|
|
53
|
+
onClientInitialized: async ({ client }) => {
|
|
54
|
+
await client.halo.createIdentity();
|
|
55
|
+
await client.spaces.waitUntilReady();
|
|
56
|
+
const space = client.spaces.default;
|
|
57
|
+
await space.waitUntilReady();
|
|
58
|
+
|
|
59
|
+
space.db.add(createNotebook());
|
|
60
|
+
space.db.add(Markdown.make({ content: '# Hello World' }));
|
|
61
|
+
space.db.add(serializeFunction(Agent.prompt));
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
SpacePlugin({}),
|
|
65
|
+
SettingsPlugin(),
|
|
66
|
+
IntentPlugin(),
|
|
67
|
+
AssistantPlugin(),
|
|
68
|
+
AutomationPlugin(),
|
|
69
|
+
ExplorerPlugin(),
|
|
70
|
+
MarkdownPlugin(),
|
|
71
|
+
],
|
|
72
|
+
}),
|
|
73
|
+
],
|
|
74
|
+
parameters: {
|
|
75
|
+
translations,
|
|
76
|
+
},
|
|
77
|
+
} satisfies Meta<typeof NotebookContainer>;
|
|
78
|
+
|
|
79
|
+
export default meta;
|
|
80
|
+
|
|
81
|
+
type Story = StoryObj<typeof meta>;
|
|
82
|
+
|
|
83
|
+
export const Default: Story = {};
|