@dxos/plugin-script 0.8.4-main.72ec0f3 → 0.8.4-main.937b3ca
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-GXNRUXF6.mjs +14 -0
- package/dist/lib/browser/{NotebookContainer-RTESC4OV.mjs → NotebookContainer-4MM2VAQF.mjs} +267 -239
- package/dist/lib/browser/NotebookContainer-4MM2VAQF.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-X6GCYZZW.mjs +149 -0
- package/dist/lib/browser/ScriptContainer-X6GCYZZW.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-7VO7AUI6.mjs +68 -0
- package/dist/lib/browser/app-graph-builder-7VO7AUI6.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-OSOUYI7A.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-OSOUYI7A.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/chunk-3O2DQGCP.mjs +113 -0
- package/dist/lib/browser/chunk-3O2DQGCP.mjs.map +7 -0
- package/dist/lib/browser/chunk-BTWHM6FH.mjs +270 -0
- package/dist/lib/browser/chunk-BTWHM6FH.mjs.map +7 -0
- package/dist/lib/browser/chunk-F3QKSKSF.mjs +35 -0
- package/dist/lib/browser/chunk-F3QKSKSF.mjs.map +7 -0
- package/dist/lib/browser/chunk-I7CSE6T3.mjs +110 -0
- package/dist/lib/browser/chunk-I7CSE6T3.mjs.map +7 -0
- package/dist/lib/browser/chunk-IQRLM6JK.mjs +137 -0
- package/dist/lib/browser/chunk-IQRLM6JK.mjs.map +7 -0
- package/dist/lib/browser/chunk-NWSK27QB.mjs +606 -0
- package/dist/lib/browser/chunk-NWSK27QB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-2G2NA6DQ.mjs → chunk-UX4GHJ5E.mjs} +28 -11
- package/dist/lib/browser/chunk-UX4GHJ5E.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5JSNQYZZ.mjs → chunk-WX2NVNFQ.mjs} +236 -196
- package/dist/lib/browser/chunk-WX2NVNFQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EB6AXFXO.mjs → chunk-WYR4QHPE.mjs} +1 -1
- package/dist/lib/browser/chunk-WYR4QHPE.mjs.map +7 -0
- package/dist/lib/browser/compiler-XRBFQFXO.mjs +161 -0
- package/dist/lib/browser/compiler-XRBFQFXO.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +96 -125
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-MUNR376F.mjs +82 -0
- package/dist/lib/browser/operation-resolver-MUNR376F.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-QEQ3QUQA.mjs → react-surface-5TEC66UY.mjs} +53 -42
- package/dist/lib/browser/react-surface-5TEC66UY.mjs.map +7 -0
- package/dist/lib/browser/settings-R4WKREUJ.mjs +35 -0
- package/dist/lib/browser/settings-R4WKREUJ.mjs.map +7 -0
- package/dist/lib/browser/templates/index.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +9 -5
- package/dist/lib/node-esm/{DeploymentDialog-GL5AUWMR.mjs → DeploymentDialog-EVFV2VJT.mjs} +6 -6
- package/dist/lib/node-esm/DeploymentDialog-EVFV2VJT.mjs.map +7 -0
- package/dist/lib/node-esm/{NotebookContainer-SVD3A3D6.mjs → NotebookContainer-QLW5ZYGS.mjs} +267 -239
- package/dist/lib/node-esm/NotebookContainer-QLW5ZYGS.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-3DZ3BMHW.mjs +150 -0
- package/dist/lib/node-esm/ScriptContainer-3DZ3BMHW.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-NVE3EVBG.mjs +69 -0
- package/dist/lib/node-esm/app-graph-builder-NVE3EVBG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-NC7NNJGI.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-NC7NNJGI.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-57JA6XL5.mjs → chunk-4F5FJZ36.mjs} +28 -11
- package/dist/lib/node-esm/chunk-4F5FJZ36.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IBV2DR36.mjs → chunk-5HSJPAK7.mjs} +1 -1
- package/dist/lib/node-esm/chunk-5HSJPAK7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KN6SQYUF.mjs +114 -0
- package/dist/lib/node-esm/chunk-KN6SQYUF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IQTBVH4L.mjs → chunk-MGWKULCD.mjs} +236 -196
- package/dist/lib/node-esm/chunk-MGWKULCD.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs +112 -0
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VWOLKNMO.mjs +271 -0
- package/dist/lib/node-esm/chunk-VWOLKNMO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Y3G5NCTP.mjs +36 -0
- package/dist/lib/node-esm/chunk-Y3G5NCTP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-YEWLTVBT.mjs +138 -0
- package/dist/lib/node-esm/chunk-YEWLTVBT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZQGHFNO3.mjs +607 -0
- package/dist/lib/node-esm/chunk-ZQGHFNO3.mjs.map +7 -0
- package/dist/lib/node-esm/compiler-ORJAXDN7.mjs +162 -0
- package/dist/lib/node-esm/compiler-ORJAXDN7.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +96 -125
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-CLE4ZCC5.mjs +83 -0
- package/dist/lib/node-esm/operation-resolver-CLE4ZCC5.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-U77YT7VF.mjs → react-surface-O3UDMKOQ.mjs} +53 -42
- package/dist/lib/node-esm/react-surface-O3UDMKOQ.mjs.map +7 -0
- package/dist/lib/node-esm/settings-OFIMHU7K.mjs +36 -0
- package/dist/lib/node-esm/settings-OFIMHU7K.mjs.map +7 -0
- package/dist/lib/node-esm/templates/index.mjs +1 -1
- package/dist/lib/node-esm/types/index.mjs +9 -5
- package/dist/types/src/ScriptPlugin.d.ts +2 -1
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts +22 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +12 -0
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +9 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler/compiler.d.ts +6 -0
- package/dist/types/src/capabilities/compiler/compiler.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler/index.d.ts +3 -0
- package/dist/types/src/capabilities/compiler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +9 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.d.ts +1 -1
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +4 -3
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -1
- package/dist/types/src/components/NotebookContainer.d.ts +3 -5
- package/dist/types/src/components/NotebookContainer.d.ts.map +1 -1
- package/dist/types/src/components/NotebookContainer.stories.d.ts +3 -247
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +3 -3
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +5 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts +5 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +13 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/index.d.ts +2 -0
- package/dist/types/src/components/QueryEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptContainer.d.ts +4 -5
- package/dist/types/src/components/ScriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +2 -2
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +5 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +4 -2
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts +1 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +3 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/e2e/ai.test.d.ts +2 -0
- package/dist/types/src/e2e/ai.test.d.ts.map +1 -0
- package/dist/types/src/e2e/deploy.test.d.ts +2 -0
- package/dist/types/src/e2e/deploy.test.d.ts.map +1 -0
- package/dist/types/src/hooks/deploy.d.ts +10 -27
- 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/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +2 -2
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts +7 -0
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -0
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/hooks/useToolbarState.d.ts +8 -1
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +24 -11
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
- package/dist/types/src/templates/anthropic.d.ts +8 -0
- package/dist/types/src/templates/anthropic.d.ts.map +1 -0
- package/dist/types/src/templates/chess-bot.d.ts +16 -0
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -0
- package/dist/types/src/templates/commentary.d.ts +16 -0
- package/dist/types/src/templates/commentary.d.ts.map +1 -0
- package/dist/types/src/templates/forex-effect.d.ts +4 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +4 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +12 -3
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +1 -4
- package/dist/types/src/templates/ping.d.ts.map +1 -1
- package/dist/types/src/testing/simulator.test.d.ts +2 -0
- package/dist/types/src/testing/simulator.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +90 -21
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/actions.d.ts +30 -44
- package/dist/types/src/types/actions.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +12 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +113 -87
- package/src/ScriptPlugin.tsx +36 -75
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/script-blueprint.ts +24 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +55 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/{artifact-definition.ts → artifact-definition/artifact-definition.ts} +97 -94
- package/src/capabilities/artifact-definition/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +23 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/compiler/compiler.ts +103 -0
- package/src/capabilities/compiler/index.ts +7 -0
- package/src/capabilities/index.ts +6 -10
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +74 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +118 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +32 -0
- package/src/compiler/compiler.ts +10 -3
- package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +27 -23
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +22 -42
- package/src/components/FrameContainer/FrameContainer.tsx +4 -2
- package/src/components/NotebookContainer.stories.tsx +23 -19
- package/src/components/NotebookContainer.tsx +54 -47
- package/src/components/NotebookStack/NotebookCell.tsx +22 -19
- package/src/components/NotebookStack/NotebookStack.stories.tsx +19 -18
- package/src/components/NotebookStack/NotebookStack.tsx +4 -4
- package/src/components/QueryEditor/QueryEditor.stories.tsx +100 -0
- package/src/components/QueryEditor/QueryEditor.tsx +47 -0
- package/src/components/QueryEditor/index.ts +5 -0
- package/src/components/ScriptContainer.tsx +48 -33
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +38 -15
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +14 -17
- package/src/components/Settings/ScriptObjectSettings.tsx +44 -32
- package/src/components/Settings/ScriptPluginSettings.tsx +8 -3
- package/src/components/TestPanel/TestContainer.tsx +5 -5
- package/src/components/TestPanel/TestPanel.tsx +1 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +13 -8
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +69 -68
- package/src/e2e/ai.test.ts +92 -0
- package/src/e2e/deploy.test.ts +64 -0
- package/src/hooks/deploy.ts +36 -28
- package/src/hooks/format.ts +5 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/template.ts +15 -9
- package/src/hooks/useCompiler.ts +24 -0
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +13 -19
- package/src/hooks/useToolbarState.ts +29 -5
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/notebook/compute-graph.test.ts +20 -8
- package/src/notebook/compute-graph.ts +45 -21
- package/src/templates/anthropic.ts +42 -0
- package/src/templates/chess-bot.ts +58 -0
- package/src/templates/commentary.ts +232 -0
- package/src/templates/data-generator.ts +1 -1
- package/src/templates/forex-effect.ts +22 -27
- package/src/templates/forex.ts +7 -6
- package/src/templates/index.ts +18 -5
- package/src/templates/ping.ts +14 -5
- package/src/testing/simulator.test.ts +40 -0
- package/src/translations.ts +2 -0
- package/src/types/Notebook.ts +10 -10
- package/src/types/actions.ts +17 -25
- package/src/types/capabilities.ts +17 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +1 -1
- package/src/util/deploy.ts +23 -29
- package/src/util/functions.ts +27 -24
- package/src/vite-env.d.ts +2 -0
- package/dist/lib/browser/DeploymentDialog-MZX4T77L.mjs +0 -14
- package/dist/lib/browser/NotebookContainer-RTESC4OV.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-T2BAZDJ4.mjs +0 -147
- package/dist/lib/browser/ScriptContainer-T2BAZDJ4.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs +0 -66
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs +0 -30
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-3IJASGG5.mjs +0 -155
- package/dist/lib/browser/chunk-3IJASGG5.mjs.map +0 -7
- package/dist/lib/browser/chunk-4M7U2WVT.mjs +0 -304
- package/dist/lib/browser/chunk-4M7U2WVT.mjs.map +0 -7
- package/dist/lib/browser/chunk-5JSNQYZZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-EB6AXFXO.mjs.map +0 -7
- package/dist/lib/browser/chunk-GAFCKEII.mjs +0 -646
- package/dist/lib/browser/chunk-GAFCKEII.mjs.map +0 -7
- package/dist/lib/browser/chunk-LNNCD2H4.mjs +0 -102
- package/dist/lib/browser/chunk-LNNCD2H4.mjs.map +0 -7
- package/dist/lib/browser/chunk-M6KJPUJK.mjs +0 -111
- package/dist/lib/browser/chunk-M6KJPUJK.mjs.map +0 -7
- package/dist/lib/browser/chunk-UOQ6NCH3.mjs +0 -15
- package/dist/lib/browser/chunk-UOQ6NCH3.mjs.map +0 -7
- package/dist/lib/browser/compiler-4KHRSX7J.mjs +0 -86
- package/dist/lib/browser/compiler-4KHRSX7J.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AFJ575VK.mjs +0 -104
- package/dist/lib/browser/intent-resolver-AFJ575VK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-QEQ3QUQA.mjs.map +0 -7
- package/dist/lib/browser/settings-LNLSTZM4.mjs +0 -26
- package/dist/lib/browser/settings-LNLSTZM4.mjs.map +0 -7
- package/dist/lib/node-esm/NotebookContainer-SVD3A3D6.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-2CE3H3JJ.mjs +0 -148
- package/dist/lib/node-esm/ScriptContainer-2CE3H3JJ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs +0 -67
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs +0 -31
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-55JZVM6K.mjs +0 -16
- package/dist/lib/node-esm/chunk-55JZVM6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs +0 -113
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IBV2DR36.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IQTBVH4L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KJKZ4KNO.mjs +0 -647
- package/dist/lib/node-esm/chunk-KJKZ4KNO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs +0 -103
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RIE676OW.mjs +0 -156
- package/dist/lib/node-esm/chunk-RIE676OW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YRTA4EHU.mjs +0 -305
- package/dist/lib/node-esm/chunk-YRTA4EHU.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-DU5NQISX.mjs +0 -87
- package/dist/lib/node-esm/compiler-DU5NQISX.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-A5VVK746.mjs +0 -105
- package/dist/lib/node-esm/intent-resolver-A5VVK746.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-U77YT7VF.mjs.map +0 -7
- package/dist/lib/node-esm/settings-IUFMOCXY.mjs +0 -27
- package/dist/lib/node-esm/settings-IUFMOCXY.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts +0 -11
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/compiler.d.ts +0 -4
- package/dist/types/src/capabilities/compiler.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/templates/chess.d.ts +0 -3
- package/dist/types/src/templates/chess.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -65
- package/src/capabilities/blueprint-definition.ts +0 -30
- package/src/capabilities/capabilities.ts +0 -12
- package/src/capabilities/compiler.ts +0 -34
- package/src/capabilities/intent-resolver.ts +0 -86
- package/src/capabilities/react-surface.tsx +0 -103
- package/src/capabilities/settings.ts +0 -21
- package/src/events.ts +0 -11
- package/src/templates/chess.ts +0 -49
- /package/dist/lib/browser/{DeploymentDialog-MZX4T77L.mjs.map → DeploymentDialog-GXNRUXF6.mjs.map} +0 -0
- /package/dist/lib/{node-esm/DeploymentDialog-GL5AUWMR.mjs.map → browser/blueprints/index.mjs.map} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEPLOYMENT_DIALOG,
|
|
3
|
+
DeploymentDialog_default
|
|
4
|
+
} from "./chunk-IQRLM6JK.mjs";
|
|
5
|
+
import "./chunk-WX2NVNFQ.mjs";
|
|
6
|
+
import "./chunk-3O2DQGCP.mjs";
|
|
7
|
+
import "./chunk-UX4GHJ5E.mjs";
|
|
8
|
+
import "./chunk-WYR4QHPE.mjs";
|
|
9
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
10
|
+
export {
|
|
11
|
+
DEPLOYMENT_DIALOG,
|
|
12
|
+
DeploymentDialog_default as default
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=DeploymentDialog-GXNRUXF6.mjs.map
|
|
@@ -1,39 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NotebookMenu,
|
|
3
3
|
NotebookStack
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-BTWHM6FH.mjs";
|
|
5
|
+
import "./chunk-I7CSE6T3.mjs";
|
|
6
6
|
import {
|
|
7
7
|
meta
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WYR4QHPE.mjs";
|
|
9
9
|
import "./chunk-J5LGTIGS.mjs";
|
|
10
10
|
|
|
11
11
|
// src/components/NotebookContainer.tsx
|
|
12
|
-
import {
|
|
12
|
+
import { RegistryContext } from "@effect-atom/atom-react";
|
|
13
13
|
import * as Cause from "effect/Cause";
|
|
14
14
|
import * as Effect from "effect/Effect";
|
|
15
15
|
import * as Exit from "effect/Exit";
|
|
16
|
-
import React, { useCallback, useMemo, useState } from "react";
|
|
16
|
+
import React, { useCallback, useContext, useMemo, useState } from "react";
|
|
17
17
|
import { Agent } from "@dxos/assistant-toolkit";
|
|
18
18
|
import { Blueprint, Prompt } from "@dxos/blueprints";
|
|
19
19
|
import { Filter, Obj, Query, Ref } from "@dxos/echo";
|
|
20
20
|
import { QueryBuilder } from "@dxos/echo-query";
|
|
21
|
-
import { FunctionInvocationService } from "@dxos/functions";
|
|
22
|
-
import { InvocationTracer } from "@dxos/functions-runtime";
|
|
23
|
-
import { TracingServiceExt } from "@dxos/functions-runtime";
|
|
21
|
+
import { FunctionInvocationService, TracingService } from "@dxos/functions";
|
|
24
22
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
25
23
|
import { log as log2 } from "@dxos/log";
|
|
26
24
|
import { useComputeRuntimeCallback } from "@dxos/plugin-automation";
|
|
27
25
|
import { Graph } from "@dxos/plugin-explorer/types";
|
|
28
|
-
import { getSpace } from "@dxos/react-client/echo";
|
|
29
26
|
import { DropdownMenu, IconButton, Toolbar, useTranslation } from "@dxos/react-ui";
|
|
30
27
|
import { useAttention } from "@dxos/react-ui-attention";
|
|
31
|
-
import {
|
|
32
|
-
import { Text } from "@dxos/schema";
|
|
28
|
+
import { Layout } from "@dxos/react-ui-mosaic";
|
|
29
|
+
import { Text, View } from "@dxos/schema";
|
|
33
30
|
import { isNonNullable } from "@dxos/util";
|
|
34
31
|
|
|
35
32
|
// src/notebook/compute-graph.ts
|
|
36
|
-
import {
|
|
33
|
+
import { Atom } from "@effect-atom/atom-react";
|
|
37
34
|
import { log } from "@dxos/log";
|
|
38
35
|
|
|
39
36
|
// src/notebook/eval.ts
|
|
@@ -388,44 +385,64 @@ var VirtualTypeScriptParser = class {
|
|
|
388
385
|
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/notebook/compute-graph.ts";
|
|
389
386
|
var ComputeGraph = class {
|
|
390
387
|
_notebook;
|
|
388
|
+
_registry;
|
|
391
389
|
_parser = new VirtualTypeScriptParser();
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
constructor(_notebook) {
|
|
390
|
+
_expressionsAtom = Atom.make({});
|
|
391
|
+
_valuesByCellIdAtom = Atom.make({});
|
|
392
|
+
_valuesByNameAtom = Atom.make({});
|
|
393
|
+
constructor(_notebook, _registry) {
|
|
396
394
|
this._notebook = _notebook;
|
|
395
|
+
this._registry = _registry;
|
|
397
396
|
}
|
|
398
397
|
/**
|
|
399
|
-
*
|
|
398
|
+
* Atom for parsed expressions by cell ID.
|
|
400
399
|
*/
|
|
401
400
|
get expressions() {
|
|
402
|
-
return this.
|
|
401
|
+
return this._expressionsAtom;
|
|
403
402
|
}
|
|
404
403
|
/**
|
|
405
|
-
*
|
|
404
|
+
* Get current expressions by cell ID.
|
|
405
|
+
*/
|
|
406
|
+
getExpressions() {
|
|
407
|
+
return this._registry.get(this._expressionsAtom);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Atom for computed values by cell ID.
|
|
406
411
|
*/
|
|
407
412
|
get values() {
|
|
408
|
-
return this.
|
|
413
|
+
return this._valuesByCellIdAtom;
|
|
409
414
|
}
|
|
410
415
|
/**
|
|
411
|
-
*
|
|
416
|
+
* Get computed values by cell ID.
|
|
417
|
+
*/
|
|
418
|
+
getValues() {
|
|
419
|
+
return this._registry.get(this._valuesByCellIdAtom);
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Atom for computed values by name.
|
|
412
423
|
*/
|
|
413
424
|
get valuesByName() {
|
|
414
|
-
return this.
|
|
425
|
+
return this._valuesByNameAtom;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Get current values by name.
|
|
429
|
+
*/
|
|
430
|
+
getValuesByName() {
|
|
431
|
+
return this._registry.get(this._valuesByNameAtom);
|
|
415
432
|
}
|
|
416
433
|
/**
|
|
417
434
|
* Get computed value by cell ID.
|
|
418
435
|
*/
|
|
419
436
|
getValue(cellId) {
|
|
420
|
-
return this.
|
|
437
|
+
return this._registry.get(this._valuesByCellIdAtom)[cellId];
|
|
421
438
|
}
|
|
422
439
|
/**
|
|
423
440
|
* Compute values.
|
|
424
441
|
*/
|
|
425
442
|
async evaluate() {
|
|
426
443
|
const { expressions, dependencyGraph } = this.parse();
|
|
427
|
-
this.
|
|
428
|
-
this.
|
|
444
|
+
this._registry.set(this._valuesByCellIdAtom, {});
|
|
445
|
+
this._registry.set(this._valuesByNameAtom, {});
|
|
429
446
|
const cellExpressions = /* @__PURE__ */ new Map();
|
|
430
447
|
Object.entries(expressions).forEach(([id, expr]) => {
|
|
431
448
|
cellExpressions.set(id, expr);
|
|
@@ -440,7 +457,7 @@ var ComputeGraph = class {
|
|
|
440
457
|
cellId
|
|
441
458
|
}, {
|
|
442
459
|
F: __dxlog_file2,
|
|
443
|
-
L:
|
|
460
|
+
L: 105,
|
|
444
461
|
S: this,
|
|
445
462
|
C: (f, a) => f(...a)
|
|
446
463
|
});
|
|
@@ -452,7 +469,7 @@ var ComputeGraph = class {
|
|
|
452
469
|
cellId
|
|
453
470
|
}, {
|
|
454
471
|
F: __dxlog_file2,
|
|
455
|
-
L:
|
|
472
|
+
L: 111,
|
|
456
473
|
S: this,
|
|
457
474
|
C: (f, a) => f(...a)
|
|
458
475
|
});
|
|
@@ -485,14 +502,14 @@ var ComputeGraph = class {
|
|
|
485
502
|
error
|
|
486
503
|
}, {
|
|
487
504
|
F: __dxlog_file2,
|
|
488
|
-
L:
|
|
505
|
+
L: 147,
|
|
489
506
|
S: this,
|
|
490
507
|
C: (f, a) => f(...a)
|
|
491
508
|
});
|
|
492
509
|
}
|
|
493
510
|
}
|
|
494
|
-
this.
|
|
495
|
-
this.
|
|
511
|
+
this._registry.set(this._valuesByCellIdAtom, valuesByCellId);
|
|
512
|
+
this._registry.set(this._valuesByNameAtom, valuesByName);
|
|
496
513
|
return valuesByCellId;
|
|
497
514
|
}
|
|
498
515
|
async eval(source, values) {
|
|
@@ -511,7 +528,7 @@ var ComputeGraph = class {
|
|
|
511
528
|
return acc;
|
|
512
529
|
}, {});
|
|
513
530
|
const dependencyGraph = this.buildDependencyGraph(expressions);
|
|
514
|
-
this.
|
|
531
|
+
this._registry.set(this._expressionsAtom, expressions);
|
|
515
532
|
return {
|
|
516
533
|
expressions,
|
|
517
534
|
dependencyGraph
|
|
@@ -558,222 +575,233 @@ var INCLUDE_BLUEPRINTS = [
|
|
|
558
575
|
"dxos.org/blueprint/assistant",
|
|
559
576
|
"dxos.org/blueprint/markdown"
|
|
560
577
|
];
|
|
561
|
-
var NotebookContainer = ({ notebook, env }) => {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
578
|
+
var NotebookContainer = ({ role, subject: notebook, env }) => {
|
|
579
|
+
const { t } = useTranslation(meta.id);
|
|
580
|
+
const registry = useContext(RegistryContext);
|
|
581
|
+
const db = notebook && Obj.getDatabase(notebook);
|
|
582
|
+
const attendableId = notebook ? Obj.getDXN(notebook).toString() : "";
|
|
583
|
+
const { hasAttention } = useAttention(attendableId);
|
|
584
|
+
const graph = useMemo(() => notebook && new ComputeGraph(notebook, registry), [
|
|
585
|
+
notebook,
|
|
586
|
+
registry
|
|
587
|
+
]);
|
|
588
|
+
const [queryValues, setQueryValues] = useState({});
|
|
589
|
+
const handleExecQueries = useCallback(async () => {
|
|
590
|
+
invariant2(db, void 0, {
|
|
591
|
+
F: __dxlog_file3,
|
|
592
|
+
L: 53,
|
|
593
|
+
S: void 0,
|
|
594
|
+
A: [
|
|
595
|
+
"db",
|
|
596
|
+
""
|
|
597
|
+
]
|
|
598
|
+
});
|
|
599
|
+
const builder = new QueryBuilder();
|
|
600
|
+
for (const cell of notebook?.cells ?? []) {
|
|
601
|
+
if (cell.type === "query") {
|
|
602
|
+
if (cell.source?.target) {
|
|
603
|
+
const source = cell.source.target.content;
|
|
604
|
+
const { name, filter } = builder.build(source);
|
|
605
|
+
if (filter) {
|
|
606
|
+
const ast = Query.select(filter).ast;
|
|
607
|
+
const graph2 = cell.graph?.target;
|
|
608
|
+
if (!graph2) {
|
|
609
|
+
const { view } = await View.makeFromDatabase({
|
|
610
|
+
db
|
|
611
|
+
});
|
|
612
|
+
const newGraph = Graph.make({
|
|
613
|
+
query: {
|
|
614
|
+
ast
|
|
615
|
+
},
|
|
616
|
+
view
|
|
617
|
+
});
|
|
618
|
+
Obj.change(notebook, (n) => {
|
|
619
|
+
const c = n.cells.find((c2) => c2.id === cell.id);
|
|
620
|
+
if (c) {
|
|
621
|
+
c.graph = Ref.make(newGraph);
|
|
622
|
+
c.name = name;
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
} else {
|
|
626
|
+
Obj.change(graph2, () => {
|
|
627
|
+
graph2.query.ast = ast;
|
|
628
|
+
});
|
|
606
629
|
}
|
|
607
630
|
}
|
|
608
|
-
if (cell.name && cell.view?.target) {
|
|
609
|
-
const view = Obj.getSnapshot(cell.view?.target);
|
|
610
|
-
const query = Query.fromAst(view.query.ast);
|
|
611
|
-
const result = await space?.db.query(query).run();
|
|
612
|
-
const objectIds = result?.objects?.map((obj) => obj.id);
|
|
613
|
-
setQueryValues((prev) => ({
|
|
614
|
-
...prev,
|
|
615
|
-
[cell.name]: objectIds
|
|
616
|
-
}));
|
|
617
|
-
}
|
|
618
631
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
const [promptResults, setPromptResults] = useState({});
|
|
626
|
-
const handleExecPrompts = useComputeRuntimeCallback(space, Effect.fnUntraced(function* () {
|
|
627
|
-
invariant2(graph, void 0, {
|
|
628
|
-
F: __dxlog_file3,
|
|
629
|
-
L: 96,
|
|
630
|
-
S: this,
|
|
631
|
-
A: [
|
|
632
|
-
"graph",
|
|
633
|
-
""
|
|
634
|
-
]
|
|
635
|
-
});
|
|
636
|
-
const prompts = notebook?.cells.filter((cell) => cell.type === "prompt").map((cell) => cell.prompt).filter(isNonNullable) ?? [];
|
|
637
|
-
for (const prompt of prompts) {
|
|
638
|
-
yield* runPrompt({
|
|
639
|
-
prompt,
|
|
640
|
-
input: {
|
|
641
|
-
...queryValues,
|
|
642
|
-
...graph.valuesByName.value
|
|
643
|
-
},
|
|
644
|
-
onResult: (result) => setPromptResults((prev) => ({
|
|
632
|
+
if (cell.name && cell.graph?.target) {
|
|
633
|
+
const graph2 = Obj.getSnapshot(cell.graph?.target);
|
|
634
|
+
const query = Query.fromAst(graph2.query.ast);
|
|
635
|
+
const objects = await db.query(query).run();
|
|
636
|
+
const objectIds = objects?.map((obj) => obj.id);
|
|
637
|
+
setQueryValues((prev) => ({
|
|
645
638
|
...prev,
|
|
646
|
-
[
|
|
647
|
-
}))
|
|
648
|
-
}
|
|
639
|
+
[cell.name]: objectIds
|
|
640
|
+
}));
|
|
641
|
+
}
|
|
649
642
|
}
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
643
|
+
}
|
|
644
|
+
}, [
|
|
645
|
+
db,
|
|
646
|
+
notebook,
|
|
647
|
+
graph
|
|
648
|
+
]);
|
|
649
|
+
const [promptResults, setPromptResults] = useState({});
|
|
650
|
+
const handleExecPrompts = useComputeRuntimeCallback(db?.spaceId, Effect.fnUntraced(function* () {
|
|
651
|
+
invariant2(graph, void 0, {
|
|
652
|
+
F: __dxlog_file3,
|
|
653
|
+
L: 97,
|
|
654
|
+
S: this,
|
|
655
|
+
A: [
|
|
656
|
+
"graph",
|
|
657
|
+
""
|
|
658
|
+
]
|
|
659
|
+
});
|
|
660
|
+
const prompts = notebook?.cells.filter((cell) => cell.type === "prompt").map((cell) => cell.prompt).filter(isNonNullable) ?? [];
|
|
661
|
+
for (const prompt of prompts) {
|
|
662
|
+
yield* runPrompt({
|
|
663
|
+
prompt,
|
|
664
|
+
input: {
|
|
665
|
+
...queryValues,
|
|
666
|
+
...graph.getValuesByName()
|
|
667
|
+
},
|
|
668
|
+
onResult: (result) => setPromptResults((prev) => ({
|
|
669
|
+
...prev,
|
|
670
|
+
[prompt.dxn.toString()]: result
|
|
671
|
+
}))
|
|
673
672
|
});
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
673
|
+
}
|
|
674
|
+
}), [
|
|
675
|
+
notebook,
|
|
676
|
+
graph,
|
|
677
|
+
queryValues
|
|
678
|
+
]);
|
|
679
|
+
const handleCompute = useCallback(async () => {
|
|
680
|
+
await graph?.evaluate();
|
|
681
|
+
await handleExecQueries();
|
|
682
|
+
await handleExecPrompts();
|
|
683
|
+
}, [
|
|
684
|
+
graph,
|
|
685
|
+
handleExecQueries,
|
|
686
|
+
handleExecPrompts
|
|
687
|
+
]);
|
|
688
|
+
const handleRearrange = useCallback((source, target) => {
|
|
689
|
+
invariant2(notebook, void 0, {
|
|
690
|
+
F: __dxlog_file3,
|
|
691
|
+
L: 130,
|
|
692
|
+
S: void 0,
|
|
693
|
+
A: [
|
|
694
|
+
"notebook",
|
|
695
|
+
""
|
|
696
|
+
]
|
|
697
|
+
});
|
|
698
|
+
const from = notebook.cells.findIndex((cell) => cell.id === source.id);
|
|
699
|
+
const to = notebook.cells.findIndex((cell) => cell.id === target.id);
|
|
700
|
+
if (from != null && to != null) {
|
|
701
|
+
Obj.change(notebook, (n) => {
|
|
702
|
+
const cell = n.cells.splice(from, 1)[0];
|
|
678
703
|
if (cell) {
|
|
679
|
-
|
|
704
|
+
n.cells.splice(to, 0, cell);
|
|
680
705
|
}
|
|
681
|
-
}
|
|
682
|
-
}, [
|
|
683
|
-
notebook
|
|
684
|
-
]);
|
|
685
|
-
const handleCellInsert = useCallback(async (type, after) => {
|
|
686
|
-
invariant2(notebook, void 0, {
|
|
687
|
-
F: __dxlog_file3,
|
|
688
|
-
L: 144,
|
|
689
|
-
S: void 0,
|
|
690
|
-
A: [
|
|
691
|
-
"notebook",
|
|
692
|
-
""
|
|
693
|
-
]
|
|
694
706
|
});
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
707
|
+
}
|
|
708
|
+
}, [
|
|
709
|
+
notebook
|
|
710
|
+
]);
|
|
711
|
+
const handleCellInsert = useCallback(async (type, after) => {
|
|
712
|
+
invariant2(notebook, void 0, {
|
|
713
|
+
F: __dxlog_file3,
|
|
714
|
+
L: 147,
|
|
715
|
+
S: void 0,
|
|
716
|
+
A: [
|
|
717
|
+
"notebook",
|
|
718
|
+
""
|
|
719
|
+
]
|
|
720
|
+
});
|
|
721
|
+
const cell = {
|
|
722
|
+
id: crypto.randomUUID(),
|
|
723
|
+
type
|
|
724
|
+
};
|
|
725
|
+
switch (type) {
|
|
726
|
+
case "markdown":
|
|
727
|
+
case "script":
|
|
728
|
+
case "query": {
|
|
729
|
+
cell.source = Ref.make(Text.make());
|
|
730
|
+
break;
|
|
731
|
+
}
|
|
732
|
+
case "prompt": {
|
|
733
|
+
if (db) {
|
|
734
|
+
const objects = await db.query(Query.select(Filter.type(Blueprint.Blueprint))).run();
|
|
735
|
+
const blueprints = objects.filter((blueprint) => INCLUDE_BLUEPRINTS.includes(blueprint.key)).map((blueprint) => Ref.make(blueprint));
|
|
736
|
+
cell.prompt = Ref.make(Prompt.make({
|
|
737
|
+
instructions: "",
|
|
738
|
+
blueprints
|
|
739
|
+
}));
|
|
716
740
|
}
|
|
741
|
+
break;
|
|
717
742
|
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
743
|
+
}
|
|
744
|
+
const idx = after ? notebook.cells.findIndex((cell2) => cell2.id === after) : notebook.cells.length;
|
|
745
|
+
Obj.change(notebook, (n) => {
|
|
746
|
+
n.cells.splice(idx, 0, cell);
|
|
747
|
+
});
|
|
748
|
+
}, [
|
|
749
|
+
db,
|
|
750
|
+
notebook
|
|
751
|
+
]);
|
|
752
|
+
const handleCellDelete = useCallback((id) => {
|
|
753
|
+
invariant2(notebook, void 0, {
|
|
754
|
+
F: __dxlog_file3,
|
|
755
|
+
L: 179,
|
|
756
|
+
S: void 0,
|
|
757
|
+
A: [
|
|
758
|
+
"notebook",
|
|
759
|
+
""
|
|
760
|
+
]
|
|
761
|
+
});
|
|
762
|
+
const idx = notebook.cells.findIndex((cell) => cell.id === id);
|
|
763
|
+
if (idx !== -1) {
|
|
764
|
+
Obj.change(notebook, (n) => {
|
|
765
|
+
n.cells.splice(idx, 1);
|
|
733
766
|
});
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
onCellDelete: handleCellDelete
|
|
773
|
-
})));
|
|
774
|
-
} finally {
|
|
775
|
-
_effect.f();
|
|
776
|
-
}
|
|
767
|
+
}
|
|
768
|
+
}, [
|
|
769
|
+
notebook
|
|
770
|
+
]);
|
|
771
|
+
return /* @__PURE__ */ React.createElement(Layout.Main, {
|
|
772
|
+
role,
|
|
773
|
+
toolbar: true
|
|
774
|
+
}, /* @__PURE__ */ React.createElement(Toolbar.Root, {
|
|
775
|
+
disabled: !hasAttention,
|
|
776
|
+
textBlockWidth: true
|
|
777
|
+
}, /* @__PURE__ */ React.createElement(DropdownMenu.Root, null, /* @__PURE__ */ React.createElement(DropdownMenu.Trigger, {
|
|
778
|
+
asChild: true
|
|
779
|
+
}, /* @__PURE__ */ React.createElement(IconButton, {
|
|
780
|
+
icon: "ph--plus--regular",
|
|
781
|
+
iconOnly: true,
|
|
782
|
+
label: t("notebook cell insert label")
|
|
783
|
+
})), /* @__PURE__ */ React.createElement(NotebookMenu, {
|
|
784
|
+
onCellInsert: handleCellInsert
|
|
785
|
+
})), /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
|
|
786
|
+
icon: "ph--play--fill",
|
|
787
|
+
iconOnly: true,
|
|
788
|
+
label: t("compute label"),
|
|
789
|
+
classNames: "text-green-500",
|
|
790
|
+
onClick: handleCompute
|
|
791
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
792
|
+
role: "none",
|
|
793
|
+
className: "flex bs-full overflow-hidden -mis-[1px] -mie-[1px]"
|
|
794
|
+
}, /* @__PURE__ */ React.createElement(NotebookStack, {
|
|
795
|
+
classNames: "container-max-width border-l border-r border-subduedSeparator",
|
|
796
|
+
db,
|
|
797
|
+
notebook,
|
|
798
|
+
graph,
|
|
799
|
+
env,
|
|
800
|
+
promptResults,
|
|
801
|
+
onRearrange: handleRearrange,
|
|
802
|
+
onCellInsert: handleCellInsert,
|
|
803
|
+
onCellDelete: handleCellDelete
|
|
804
|
+
})));
|
|
777
805
|
};
|
|
778
806
|
var NotebookContainer_default = NotebookContainer;
|
|
779
807
|
var runPrompt = Effect.fn(function* ({ prompt, input, onResult }) {
|
|
@@ -781,20 +809,20 @@ var runPrompt = Effect.fn(function* ({ prompt, input, onResult }) {
|
|
|
781
809
|
prompt,
|
|
782
810
|
input
|
|
783
811
|
};
|
|
784
|
-
const tracer = yield*
|
|
812
|
+
const tracer = yield* TracingService;
|
|
785
813
|
const trace = yield* tracer.traceInvocationStart({
|
|
786
814
|
target: void 0,
|
|
787
815
|
payload: {
|
|
788
816
|
data: {}
|
|
789
817
|
}
|
|
790
818
|
});
|
|
791
|
-
const result = yield* FunctionInvocationService.invokeFunction(Agent.prompt, inputData).pipe(Effect.provide(
|
|
819
|
+
const result = yield* FunctionInvocationService.invokeFunction(Agent.prompt, inputData).pipe(Effect.provide(trace.invocationTraceQueue ? TracingService.layerInvocation(trace) : TracingService.layerNoop), Effect.exit);
|
|
792
820
|
Exit.match(result, {
|
|
793
821
|
onFailure: (cause) => {
|
|
794
822
|
const error = Cause.prettyErrors(cause)[0];
|
|
795
823
|
log2.error(error.message, error.cause ?? error.stack, {
|
|
796
824
|
F: __dxlog_file3,
|
|
797
|
-
L:
|
|
825
|
+
L: 257,
|
|
798
826
|
S: this,
|
|
799
827
|
C: (f, a) => f(...a)
|
|
800
828
|
});
|
|
@@ -814,4 +842,4 @@ export {
|
|
|
814
842
|
NotebookContainer,
|
|
815
843
|
NotebookContainer_default as default
|
|
816
844
|
};
|
|
817
|
-
//# sourceMappingURL=NotebookContainer-
|
|
845
|
+
//# sourceMappingURL=NotebookContainer-4MM2VAQF.mjs.map
|