@dxos/plugin-script 0.9.0 → 0.9.1-staging.ee54ba693a
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/PLUGIN.mdl +9 -9
- package/dist/lib/neutral/{DeploymentDialog-M3AFYQHC.mjs → DeploymentDialog-7OIIL7LB.mjs} +10 -10
- package/dist/lib/neutral/DeploymentDialog-7OIIL7LB.mjs.map +7 -0
- package/dist/lib/neutral/{NotebookArticle-NV4AHOOS.mjs → NotebookArticle-AOBB3XGD.mjs} +28 -46
- package/dist/lib/neutral/NotebookArticle-AOBB3XGD.mjs.map +7 -0
- package/dist/lib/neutral/{ScriptArticle-QW26LOKU.mjs → ScriptArticle-I3DOJARR.mjs} +4 -4
- package/dist/lib/neutral/ScriptArticle-I3DOJARR.mjs.map +7 -0
- package/dist/lib/neutral/ScriptPlugin.mjs +6 -6
- package/dist/lib/neutral/ScriptPlugin.mjs.map +4 -4
- package/dist/lib/neutral/ScriptPlugin.node.mjs +3 -3
- package/dist/lib/neutral/ScriptPlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/{ScriptProperties-RLXNAN3N.mjs → ScriptProperties-RHDQGMGT.mjs} +153 -154
- package/dist/lib/neutral/ScriptProperties-RHDQGMGT.mjs.map +7 -0
- package/dist/lib/neutral/ScriptSettings-NS3ZY7ZR.mjs +35 -0
- package/dist/lib/neutral/ScriptSettings-NS3ZY7ZR.mjs.map +7 -0
- package/dist/lib/neutral/{app-graph-builder-7AWFCEQF.mjs → app-graph-builder-POP3CX6G.mjs} +3 -3
- package/dist/lib/neutral/{app-graph-builder-7AWFCEQF.mjs.map → app-graph-builder-POP3CX6G.mjs.map} +3 -3
- package/dist/lib/neutral/capabilities/index.mjs +8 -8
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/capabilities/node.mjs +6 -6
- package/dist/lib/neutral/capabilities/node.mjs.map +3 -3
- package/dist/lib/neutral/{chunk-HABDH5SS.mjs → chunk-652CIABA.mjs} +14 -13
- package/dist/lib/neutral/chunk-652CIABA.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-TRKXIP2Q.mjs → chunk-6DOWVKIW.mjs} +4 -5
- package/dist/lib/neutral/chunk-6DOWVKIW.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BDHDBPVM.mjs → chunk-CHNFYLKW.mjs} +12 -12
- package/dist/lib/neutral/chunk-CHNFYLKW.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-VXDJH6OL.mjs → chunk-INFWOSTM.mjs} +14 -8
- package/dist/lib/neutral/chunk-INFWOSTM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BKXYHCJ6.mjs → chunk-KSVKXCTX.mjs} +2 -2
- package/dist/lib/neutral/chunk-NVV5UYY4.mjs +50 -0
- package/dist/lib/neutral/chunk-NVV5UYY4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-USJ44FIU.mjs +8 -0
- package/dist/lib/neutral/{chunk-XFM63AKT.mjs.map → chunk-USJ44FIU.mjs.map} +1 -1
- package/dist/lib/neutral/{chunk-PHKPB5JN.mjs → chunk-WAGQ77UQ.mjs} +16 -16
- package/dist/lib/neutral/chunk-WAGQ77UQ.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +124 -93
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +6 -4
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-AAA53WDL.mjs → create-SGHWWTET.mjs} +4 -4
- package/dist/lib/neutral/{create-AAA53WDL.mjs.map → create-SGHWWTET.mjs.map} +4 -4
- package/dist/lib/neutral/{create-object-FZM5ASWM.mjs → create-object-QW66KQWS.mjs} +1 -3
- package/dist/lib/neutral/{create-object-FZM5ASWM.mjs.map → create-object-QW66KQWS.mjs.map} +3 -3
- package/dist/lib/neutral/{create-script-P46JOEHH.mjs → create-script-CIEJOBIU.mjs} +4 -4
- package/dist/lib/neutral/{create-script-P46JOEHH.mjs.map → create-script-CIEJOBIU.mjs.map} +3 -3
- package/dist/lib/neutral/{delete-HCQIQFVP.mjs → delete-72RXVLVI.mjs} +3 -3
- package/dist/lib/neutral/{delete-HCQIQFVP.mjs.map → delete-72RXVLVI.mjs.map} +1 -1
- package/dist/lib/neutral/{deploy-7JVMMHSH.mjs → deploy-PJTJAQZY.mjs} +10 -6
- package/dist/lib/neutral/deploy-PJTJAQZY.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +6 -6
- package/dist/lib/neutral/hooks/index.mjs.map +3 -3
- package/dist/lib/neutral/index.mjs +9 -9
- package/dist/lib/neutral/{inspect-invocations-TAOYDT4H.mjs → inspect-invocations-ZUXVUAML.mjs} +5 -5
- package/dist/lib/neutral/inspect-invocations-ZUXVUAML.mjs.map +7 -0
- package/dist/lib/neutral/{install-function-FJIE2JAI.mjs → install-function-YFDZLVMJ.mjs} +4 -4
- package/dist/lib/neutral/{install-function-FJIE2JAI.mjs.map → install-function-YFDZLVMJ.mjs.map} +1 -1
- package/dist/lib/neutral/{invoke-3HVWY2KF.mjs → invoke-CDRBQ2WA.mjs} +4 -4
- package/dist/lib/neutral/{invoke-3HVWY2KF.mjs.map → invoke-CDRBQ2WA.mjs.map} +1 -1
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{operation-handler-YMUADD7Y.mjs → operation-handler-M3B6IRMV.mjs} +3 -3
- package/dist/lib/neutral/{operation-handler-YMUADD7Y.mjs.map → operation-handler-M3B6IRMV.mjs.map} +1 -1
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/{query-deployed-functions-F4FHJNWO.mjs → query-deployed-functions-RBQMGON2.mjs} +4 -4
- package/dist/lib/neutral/{query-deployed-functions-F4FHJNWO.mjs.map → query-deployed-functions-RBQMGON2.mjs.map} +1 -1
- package/dist/lib/neutral/{react-surface-ACNZ35FV.mjs → react-surface-GEXOZLBC.mjs} +7 -8
- package/dist/lib/neutral/react-surface-GEXOZLBC.mjs.map +7 -0
- package/dist/lib/neutral/{read-RQESBAQI.mjs → read-OY3K5R3V.mjs} +3 -3
- package/dist/lib/neutral/{read-RQESBAQI.mjs.map → read-OY3K5R3V.mjs.map} +3 -3
- package/dist/lib/neutral/{settings-VJBW4OMK.mjs → settings-FD7HXEY6.mjs} +3 -3
- package/dist/lib/neutral/{settings-VJBW4OMK.mjs.map → settings-FD7HXEY6.mjs.map} +3 -3
- package/dist/lib/neutral/skill-definition-JZ7UYBT7.mjs +15 -0
- package/dist/lib/neutral/skill-definition-JZ7UYBT7.mjs.map +7 -0
- package/dist/lib/neutral/skills/index.mjs +10 -0
- package/dist/lib/neutral/templates/index.mjs +1 -1
- package/dist/lib/neutral/translations.mjs +7 -8
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +2 -2
- package/dist/lib/neutral/update-Z5VGOLBN.mjs +44 -0
- package/dist/lib/neutral/update-Z5VGOLBN.mjs.map +7 -0
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/compiler.d.ts +1 -2
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +1 -12
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -17
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +4 -15
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -3
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +2 -3
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +18 -21
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +18 -21
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +18 -21
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +20 -23
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +20 -23
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts +7 -0
- package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts +8 -0
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts.map +1 -0
- package/dist/types/src/{components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts → containers/ScriptSettings/ScriptSettings.stories.d.ts} +20 -23
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptSettings/index.d.ts +2 -0
- package/dist/types/src/containers/ScriptSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -0
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +14 -15
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +6 -1
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +6 -1
- package/dist/types/src/hooks/template.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 +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-script.d.ts.map +1 -1
- package/dist/types/src/skills/functions/create.d.ts.map +1 -0
- package/dist/types/src/skills/functions/definitions.d.ts +75 -0
- package/dist/types/src/skills/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/skills/functions/delete.d.ts +7 -0
- package/dist/types/src/skills/functions/delete.d.ts.map +1 -0
- package/dist/types/src/skills/functions/deploy.d.ts +11 -0
- package/dist/types/src/skills/functions/deploy.d.ts.map +1 -0
- package/dist/types/src/skills/functions/index.d.ts.map +1 -0
- package/dist/types/src/skills/functions/inspect-invocations.d.ts +18 -0
- package/dist/types/src/skills/functions/inspect-invocations.d.ts.map +1 -0
- package/dist/types/src/skills/functions/install-function.d.ts.map +1 -0
- package/dist/types/src/skills/functions/invoke.d.ts +11 -0
- package/dist/types/src/skills/functions/invoke.d.ts.map +1 -0
- package/dist/types/src/skills/functions/query-deployed-functions.d.ts.map +1 -0
- package/dist/types/src/skills/functions/read.d.ts +11 -0
- package/dist/types/src/skills/functions/read.d.ts.map +1 -0
- package/dist/types/src/skills/functions/update.d.ts +16 -0
- package/dist/types/src/skills/functions/update.d.ts.map +1 -0
- package/dist/types/src/skills/index.d.ts +2 -0
- package/dist/types/src/skills/index.d.ts.map +1 -0
- package/dist/types/src/skills/script-skill.d.ts +4 -0
- package/dist/types/src/skills/script-skill.d.ts.map +1 -0
- package/dist/types/src/templates/chess-bot.d.ts +1 -4
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts +1 -4
- package/dist/types/src/templates/commentary.d.ts.map +1 -1
- package/dist/types/src/testing/test-script.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +18 -21
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +11 -81
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/ScriptEvents.d.ts.map +1 -1
- package/dist/types/src/types/ScriptOperation.d.ts +2 -10
- package/dist/types/src/types/ScriptOperation.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts +1 -1
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +26 -0
- package/package.json +77 -75
- package/src/ScriptPlugin.node.ts +2 -2
- package/src/ScriptPlugin.test.ts +2 -2
- package/src/ScriptPlugin.tsx +3 -3
- package/src/capabilities/app-graph-builder.ts +2 -2
- package/src/capabilities/create-object.ts +0 -2
- package/src/capabilities/index.ts +1 -7
- package/src/capabilities/node.ts +1 -7
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +11 -9
- package/src/capabilities/settings.ts +2 -2
- package/src/capabilities/skill-definition.ts +14 -0
- package/src/components/NotebookStack/NotebookCell.tsx +13 -31
- package/src/components/NotebookStack/NotebookMenu.tsx +1 -1
- package/src/components/NotebookStack/NotebookStack.stories.tsx +3 -3
- package/src/components/NotebookStack/NotebookStack.tsx +102 -44
- package/src/components/QueryEditor/QueryEditor.stories.tsx +2 -7
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +3 -2
- package/src/components/TestPanel/TestPanel.tsx +1 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +2 -2
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +7 -7
- package/src/components/index.ts +0 -4
- package/src/constants.ts +1 -1
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +15 -9
- package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +6 -5
- package/src/containers/NotebookArticle/NotebookArticle.tsx +21 -43
- package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +5 -5
- package/src/containers/ScriptArticle/ScriptArticle.tsx +3 -3
- package/src/containers/ScriptProperties/FunctionBinding.tsx +2 -2
- package/src/containers/ScriptProperties/FunctionPublishing.tsx +2 -2
- package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +5 -5
- package/src/containers/ScriptProperties/ScriptProperties.tsx +13 -6
- package/src/containers/ScriptProperties/{BlueprintEditor.tsx → SkillEditor.tsx} +23 -23
- package/src/{components/ScriptPluginSettings/ScriptPluginSettings.stories.tsx → containers/ScriptSettings/ScriptSettings.stories.tsx} +4 -4
- package/src/containers/ScriptSettings/ScriptSettings.tsx +47 -0
- package/src/containers/ScriptSettings/index.ts +5 -0
- package/src/containers/index.ts +1 -0
- package/src/e2e/ai.test.ts +14 -11
- package/src/e2e/deploy.test.ts +5 -1
- package/src/hooks/deploy.ts +4 -4
- package/src/hooks/format.ts +1 -1
- package/src/index.ts +1 -1
- package/src/meta.ts +3 -19
- package/src/operations/create-script.ts +1 -1
- package/src/{blueprints → skills}/functions/create.ts +1 -1
- package/src/{blueprints → skills}/functions/definitions.ts +4 -2
- package/src/{blueprints → skills}/functions/deploy.ts +7 -2
- package/src/{blueprints → skills}/functions/inspect-invocations.ts +2 -2
- package/src/{blueprints → skills}/functions/read.ts +1 -1
- package/src/skills/functions/update.ts +48 -0
- package/src/skills/index.ts +5 -0
- package/src/{blueprints/script-blueprint.ts → skills/script-skill.ts} +12 -12
- package/src/templates/anthropic.ts +1 -1
- package/src/templates/chess-bot.ts +2 -2
- package/src/templates/commentary.ts +8 -7
- package/src/templates/discord.ts +1 -1
- package/src/templates/gmail.ts +1 -1
- package/src/testing/test-notebook.ts +5 -5
- package/src/testing/test-script.ts +1 -1
- package/src/translations.ts +7 -8
- package/src/types/Notebook.ts +9 -13
- package/src/types/ScriptCapabilities.ts +4 -2
- package/src/types/ScriptEvents.ts +1 -1
- package/src/types/ScriptOperation.ts +3 -3
- package/src/util/deploy.ts +7 -3
- package/src/util/functions.ts +3 -3
- package/dist/lib/neutral/DeploymentDialog-M3AFYQHC.mjs.map +0 -7
- package/dist/lib/neutral/NotebookArticle-NV4AHOOS.mjs.map +0 -7
- package/dist/lib/neutral/ScriptArticle-QW26LOKU.mjs.map +0 -7
- package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs +0 -31
- package/dist/lib/neutral/ScriptPluginSettings-T4JMUSHN.mjs.map +0 -7
- package/dist/lib/neutral/ScriptProperties-RLXNAN3N.mjs.map +0 -7
- package/dist/lib/neutral/blueprint-definition-PJ7I3JIQ.mjs +0 -15
- package/dist/lib/neutral/blueprint-definition-PJ7I3JIQ.mjs.map +0 -7
- package/dist/lib/neutral/blueprints/index.mjs +0 -10
- package/dist/lib/neutral/chunk-BDHDBPVM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HABDH5SS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PHKPB5JN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TRKXIP2Q.mjs.map +0 -7
- package/dist/lib/neutral/chunk-UA3BWOCZ.mjs +0 -38
- package/dist/lib/neutral/chunk-UA3BWOCZ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VXDJH6OL.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XFM63AKT.mjs +0 -8
- package/dist/lib/neutral/deploy-7JVMMHSH.mjs.map +0 -7
- package/dist/lib/neutral/inspect-invocations-TAOYDT4H.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-ACNZ35FV.mjs.map +0 -7
- package/dist/lib/neutral/update-CO7B6UBS.mjs +0 -63
- package/dist/lib/neutral/update-CO7B6UBS.mjs.map +0 -7
- package/dist/types/src/blueprints/functions/create.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/definitions.d.ts +0 -135
- package/dist/types/src/blueprints/functions/definitions.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/delete.d.ts +0 -17
- package/dist/types/src/blueprints/functions/delete.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/deploy.d.ts +0 -21
- package/dist/types/src/blueprints/functions/deploy.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/inspect-invocations.d.ts +0 -28
- package/dist/types/src/blueprints/functions/inspect-invocations.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/install-function.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/invoke.d.ts +0 -21
- package/dist/types/src/blueprints/functions/invoke.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/query-deployed-functions.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/read.d.ts +0 -21
- package/dist/types/src/blueprints/functions/read.d.ts.map +0 -1
- package/dist/types/src/blueprints/functions/update.d.ts +0 -26
- package/dist/types/src/blueprints/functions/update.d.ts.map +0 -1
- package/dist/types/src/blueprints/index.d.ts +0 -2
- package/dist/types/src/blueprints/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/script-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts +0 -8
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +0 -1
- package/dist/types/src/components/ScriptPluginSettings/ScriptPluginSettings.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptPluginSettings/index.d.ts +0 -2
- package/dist/types/src/components/ScriptPluginSettings/index.d.ts.map +0 -1
- package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts +0 -7
- package/dist/types/src/containers/ScriptProperties/BlueprintEditor.d.ts.map +0 -1
- package/src/blueprints/functions/update.ts +0 -68
- package/src/blueprints/index.ts +0 -5
- package/src/capabilities/blueprint-definition.ts +0 -19
- package/src/components/ScriptPluginSettings/ScriptPluginSettings.tsx +0 -42
- package/src/components/ScriptPluginSettings/index.ts +0 -5
- /package/dist/lib/neutral/{chunk-BKXYHCJ6.mjs.map → chunk-KSVKXCTX.mjs.map} +0 -0
- /package/dist/lib/neutral/{blueprints → skills}/index.mjs.map +0 -0
- /package/dist/types/src/{blueprints → skills}/functions/create.d.ts +0 -0
- /package/dist/types/src/{blueprints → skills}/functions/index.d.ts +0 -0
- /package/dist/types/src/{blueprints → skills}/functions/install-function.d.ts +0 -0
- /package/dist/types/src/{blueprints → skills}/functions/query-deployed-functions.d.ts +0 -0
- /package/src/{blueprints → skills}/functions/delete.ts +0 -0
- /package/src/{blueprints → skills}/functions/index.ts +0 -0
- /package/src/{blueprints → skills}/functions/install-function.ts +0 -0
- /package/src/{blueprints → skills}/functions/invoke.ts +0 -0
- /package/src/{blueprints → skills}/functions/query-deployed-functions.ts +0 -0
|
@@ -3,15 +3,12 @@ import {
|
|
|
3
3
|
} from "../chunk-2REUEDUA.mjs";
|
|
4
4
|
import "../chunk-J5LGTIGS.mjs";
|
|
5
5
|
|
|
6
|
-
// src/components/index.ts
|
|
7
|
-
import { lazy } from "react";
|
|
8
|
-
|
|
9
6
|
// src/components/NotebookStack/NotebookMenu.tsx
|
|
10
7
|
import React from "react";
|
|
11
8
|
import { DropdownMenu, useTranslation } from "@dxos/react-ui";
|
|
12
9
|
import { meta } from "#meta";
|
|
13
10
|
var NotebookMenu = ({ cell, onCellInsert, onCellDelete }) => {
|
|
14
|
-
const { t } = useTranslation(meta.
|
|
11
|
+
const { t } = useTranslation(meta.profile.key);
|
|
15
12
|
return /* @__PURE__ */ React.createElement(DropdownMenu.Portal, null, /* @__PURE__ */ React.createElement(DropdownMenu.Content, null, /* @__PURE__ */ React.createElement(DropdownMenu.Viewport, null, /* @__PURE__ */ React.createElement(DropdownMenu.Item, {
|
|
16
13
|
onClick: () => onCellInsert?.("script", cell?.id)
|
|
17
14
|
}, t("notebook-cell-insert-script.label")), /* @__PURE__ */ React.createElement(DropdownMenu.Item, {
|
|
@@ -26,10 +23,13 @@ var NotebookMenu = ({ cell, onCellInsert, onCellDelete }) => {
|
|
|
26
23
|
};
|
|
27
24
|
|
|
28
25
|
// src/components/NotebookStack/NotebookStack.tsx
|
|
29
|
-
import React4 from "react";
|
|
30
|
-
import {
|
|
26
|
+
import React4, { useCallback as useCallback2, useMemo as useMemo2, useState } from "react";
|
|
27
|
+
import { Obj as Obj2 } from "@dxos/echo";
|
|
28
|
+
import { DropdownMenu as DropdownMenu2, IconButton, ScrollArea, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
31
29
|
import { composable as composable2, composableProps as composableProps2 } from "@dxos/react-ui";
|
|
32
|
-
import {
|
|
30
|
+
import { Mosaic } from "@dxos/react-ui-mosaic";
|
|
31
|
+
import { mx as mx2 } from "@dxos/ui-theme";
|
|
32
|
+
import { arrayMove } from "@dxos/util";
|
|
33
33
|
import { meta as meta3 } from "#meta";
|
|
34
34
|
|
|
35
35
|
// src/components/NotebookStack/NotebookCell.tsx
|
|
@@ -37,9 +37,9 @@ import React3, { useCallback, useMemo } from "react";
|
|
|
37
37
|
import { Surface } from "@dxos/app-framework/ui";
|
|
38
38
|
import { AppSurface } from "@dxos/app-toolkit/ui";
|
|
39
39
|
import { Obj } from "@dxos/echo";
|
|
40
|
-
import {
|
|
40
|
+
import { Doc } from "@dxos/echo-doc";
|
|
41
41
|
import { invariant } from "@dxos/invariant";
|
|
42
|
-
import { TemplateEditor } from "@dxos/plugin-
|
|
42
|
+
import { TemplateEditor } from "@dxos/plugin-routine/components";
|
|
43
43
|
import { useThemeContext as useThemeContext2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
44
44
|
import { QueryEditor } from "@dxos/react-ui-components";
|
|
45
45
|
import { Editor } from "@dxos/react-ui-editor";
|
|
@@ -75,20 +75,20 @@ var TypescriptEditor = composable(({ classNames, id, role = "article", inputMode
|
|
|
75
75
|
scrollTo,
|
|
76
76
|
extensions: [
|
|
77
77
|
extensions,
|
|
78
|
+
createThemeExtensions({
|
|
79
|
+
monospace: true,
|
|
80
|
+
themeMode,
|
|
81
|
+
syntaxHighlighting: true
|
|
82
|
+
}),
|
|
78
83
|
createBasicExtensions({
|
|
79
84
|
highlightActiveLine: true,
|
|
80
85
|
indentWithTab: true,
|
|
81
86
|
lineNumbers: true,
|
|
82
87
|
lineWrapping: false,
|
|
83
|
-
scrollPastEnd: role
|
|
88
|
+
scrollPastEnd: role === "article",
|
|
84
89
|
search: true,
|
|
85
90
|
...options
|
|
86
91
|
}),
|
|
87
|
-
createThemeExtensions({
|
|
88
|
-
monospace: true,
|
|
89
|
-
themeMode,
|
|
90
|
-
syntaxHighlighting: true
|
|
91
|
-
}),
|
|
92
92
|
InputModeExtensions[inputMode],
|
|
93
93
|
javascript({
|
|
94
94
|
typescript: true
|
|
@@ -162,16 +162,16 @@ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-script/src/components
|
|
|
162
162
|
var editorStyles = "p-2 ps-3";
|
|
163
163
|
var valueStyles = "p-1 ps-3";
|
|
164
164
|
var NotebookCell = ({ db, graph, dragging, cell, promptResults, env }) => {
|
|
165
|
-
const { t } = useTranslation2(meta2.
|
|
165
|
+
const { t } = useTranslation2(meta2.profile.key);
|
|
166
166
|
const extensions = useMemo(() => {
|
|
167
167
|
return cell.source?.target ? [
|
|
168
168
|
createDataExtensions({
|
|
169
169
|
id: cell.id,
|
|
170
|
-
text:
|
|
170
|
+
text: Doc.createAccessor(cell.source.target, [
|
|
171
171
|
"content"
|
|
172
172
|
])
|
|
173
173
|
})
|
|
174
|
-
]
|
|
174
|
+
] : [];
|
|
175
175
|
}, [
|
|
176
176
|
cell.source?.target
|
|
177
177
|
]);
|
|
@@ -199,7 +199,9 @@ var NotebookCell = ({ db, graph, dragging, cell, promptResults, env }) => {
|
|
|
199
199
|
if (!cell.source?.target) {
|
|
200
200
|
return null;
|
|
201
201
|
}
|
|
202
|
-
return /* @__PURE__ */ React3.createElement(
|
|
202
|
+
return /* @__PURE__ */ React3.createElement("div", {
|
|
203
|
+
className: "flex flex-col divide-y divide-subdued-separator"
|
|
204
|
+
}, /* @__PURE__ */ React3.createElement(TypescriptEditor, {
|
|
203
205
|
id: cell.id,
|
|
204
206
|
role: "section",
|
|
205
207
|
classNames: editorStyles,
|
|
@@ -223,10 +225,7 @@ var NotebookCell = ({ db, graph, dragging, cell, promptResults, env }) => {
|
|
|
223
225
|
className: mx("h-full overflow-hidden grid", explorerGraph && !dragging && "grid-rows-[min-content_1fr]")
|
|
224
226
|
}, /* @__PURE__ */ React3.createElement(QueryEditor, {
|
|
225
227
|
id: cell.id,
|
|
226
|
-
classNames:
|
|
227
|
-
editorStyles,
|
|
228
|
-
"border-b border-subdued-separator"
|
|
229
|
-
],
|
|
228
|
+
classNames: editorStyles,
|
|
230
229
|
db,
|
|
231
230
|
value: cell.source.target.content,
|
|
232
231
|
onChange: handleQueryChange
|
|
@@ -245,7 +244,7 @@ var NotebookCell = ({ db, graph, dragging, cell, promptResults, env }) => {
|
|
|
245
244
|
}
|
|
246
245
|
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(TemplateEditor, {
|
|
247
246
|
id: cell.id,
|
|
248
|
-
source: cell.prompt.target.
|
|
247
|
+
source: cell.prompt.target.text,
|
|
249
248
|
lineNumbers: false,
|
|
250
249
|
classNames: editorStyles
|
|
251
250
|
}), /* @__PURE__ */ React3.createElement(NotebookPromptResult, {
|
|
@@ -263,7 +262,7 @@ var NotebookCellValue = ({ cell, graph }) => {
|
|
|
263
262
|
return null;
|
|
264
263
|
}
|
|
265
264
|
return /* @__PURE__ */ React3.createElement("div", {
|
|
266
|
-
className: mx("flex w-full bg-group-surface
|
|
265
|
+
className: mx("flex w-full bg-group-surface text-description font-mono", valueStyles)
|
|
267
266
|
}, name && /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("span", {
|
|
268
267
|
className: "text-success-text"
|
|
269
268
|
}, name), /* @__PURE__ */ React3.createElement("span", {
|
|
@@ -286,26 +285,30 @@ var NotebookPromptResult = ({ cell, promptResults }) => {
|
|
|
286
285
|
}));
|
|
287
286
|
};
|
|
288
287
|
var NotebookTextEditor = ({ extensions: extensionsProp, readOnly, ...props }) => {
|
|
289
|
-
const { t } = useTranslation2(meta2.
|
|
288
|
+
const { t } = useTranslation2(meta2.profile.key);
|
|
290
289
|
const { themeMode } = useThemeContext2();
|
|
291
290
|
const extensions = useMemo(() => {
|
|
292
291
|
return [
|
|
293
|
-
createBasicExtensions2({
|
|
294
|
-
placeholder: t("notebook-markdown.placeholder"),
|
|
295
|
-
readOnly
|
|
296
|
-
}),
|
|
297
292
|
createThemeExtensions2({
|
|
298
293
|
themeMode,
|
|
299
294
|
syntaxHighlighting: true
|
|
300
295
|
}),
|
|
296
|
+
createBasicExtensions2({
|
|
297
|
+
placeholder: t("notebook-markdown.placeholder"),
|
|
298
|
+
readOnly
|
|
299
|
+
}),
|
|
301
300
|
createMarkdownExtensions(),
|
|
302
301
|
decorateMarkdown(),
|
|
303
302
|
extensionsProp
|
|
304
303
|
].filter(isNonNullable2);
|
|
305
304
|
}, [
|
|
306
|
-
extensionsProp
|
|
305
|
+
extensionsProp,
|
|
306
|
+
readOnly,
|
|
307
|
+
themeMode,
|
|
308
|
+
t
|
|
307
309
|
]);
|
|
308
310
|
return /* @__PURE__ */ React3.createElement(Editor.Root, null, /* @__PURE__ */ React3.createElement(Editor.View, {
|
|
311
|
+
classNames: "border",
|
|
309
312
|
...props,
|
|
310
313
|
extensions,
|
|
311
314
|
selectionEnd: true
|
|
@@ -314,46 +317,86 @@ var NotebookTextEditor = ({ extensions: extensionsProp, readOnly, ...props }) =>
|
|
|
314
317
|
|
|
315
318
|
// src/components/NotebookStack/NotebookStack.tsx
|
|
316
319
|
var minSectionHeight = "min-h-[16rem]";
|
|
317
|
-
var
|
|
318
|
-
|
|
320
|
+
var getCellId = (cell) => cell.id;
|
|
321
|
+
var NotebookStack = composable2(({ notebook, db, graph, promptResults, onCellInsert, onCellDelete, env, ...props }, forwardedRef) => {
|
|
322
|
+
const [viewport, setViewport] = useState(null);
|
|
323
|
+
const Tile = useCallback2((tileProps) => /* @__PURE__ */ React4.createElement(NotebookSection, {
|
|
324
|
+
...tileProps,
|
|
319
325
|
db,
|
|
320
326
|
graph,
|
|
321
327
|
promptResults,
|
|
322
328
|
onCellInsert,
|
|
323
329
|
onCellDelete,
|
|
324
330
|
env
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
331
|
+
}), [
|
|
332
|
+
db,
|
|
333
|
+
graph,
|
|
334
|
+
promptResults,
|
|
335
|
+
onCellInsert,
|
|
336
|
+
onCellDelete,
|
|
337
|
+
env
|
|
338
|
+
]);
|
|
339
|
+
const eventHandler = useMemo2(() => ({
|
|
340
|
+
id: notebook?.id ?? "notebook",
|
|
341
|
+
// Only the notebook's own cells are droppable; onDrop only reorders within this notebook.
|
|
342
|
+
canDrop: ({ source }) => !!notebook && notebook.cells.some((cell) => cell.id === source.id),
|
|
343
|
+
onDrop: ({ source, target }) => {
|
|
344
|
+
if (!notebook || !target) {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
const to = target.type === "tile" || target.type === "placeholder" ? target.location : target.type === "container" ? notebook.cells.length : -1;
|
|
348
|
+
const insertIndex = typeof to === "number" && to >= 0 ? Math.floor(to) : -1;
|
|
349
|
+
if (insertIndex < 0) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
Obj2.update(notebook, (notebook2) => {
|
|
353
|
+
const from = notebook2.cells.findIndex((cell) => cell.id === source.id);
|
|
354
|
+
if (from !== -1) {
|
|
355
|
+
arrayMove(notebook2.cells, from, insertIndex);
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}), [
|
|
360
|
+
notebook
|
|
361
|
+
]);
|
|
362
|
+
return /* @__PURE__ */ React4.createElement(Mosaic.Root, {
|
|
332
363
|
ref: forwardedRef
|
|
333
|
-
},
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
364
|
+
}, /* @__PURE__ */ React4.createElement(Mosaic.Container, {
|
|
365
|
+
asChild: true,
|
|
366
|
+
orientation: "vertical",
|
|
367
|
+
autoScroll: viewport,
|
|
368
|
+
eventHandler
|
|
369
|
+
}, /* @__PURE__ */ React4.createElement(ScrollArea.Root, {
|
|
370
|
+
orientation: "vertical",
|
|
371
|
+
padding: true,
|
|
372
|
+
...composableProps2(props)
|
|
373
|
+
}, /* @__PURE__ */ React4.createElement(ScrollArea.Viewport, {
|
|
374
|
+
ref: setViewport
|
|
375
|
+
}, /* @__PURE__ */ React4.createElement(Mosaic.Stack, {
|
|
376
|
+
orientation: "vertical",
|
|
377
|
+
items: notebook?.cells ?? [],
|
|
378
|
+
getId: getCellId,
|
|
379
|
+
Tile
|
|
380
|
+
})))));
|
|
338
381
|
});
|
|
339
|
-
var NotebookSection = ({ cell, db, env, promptResults, onCellInsert, onCellDelete, ...
|
|
340
|
-
const { t } = useTranslation3(meta3.
|
|
382
|
+
var NotebookSection = ({ data: cell, db, env, graph, promptResults, onCellInsert, onCellDelete, ...tileProps }) => {
|
|
383
|
+
const { t } = useTranslation3(meta3.profile.key);
|
|
341
384
|
const resizable = cell.type === "query";
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
asChild: true
|
|
385
|
+
const [dragHandle, setDragHandle] = useState(null);
|
|
386
|
+
return /* @__PURE__ */ React4.createElement(Mosaic.Tile, {
|
|
387
|
+
...tileProps,
|
|
388
|
+
data: cell,
|
|
389
|
+
dragHandle,
|
|
390
|
+
classNames: mx2("grid grid-cols-[min-content_1fr] overflow-visible border border-subdued-separator", resizable && minSectionHeight)
|
|
391
|
+
}, /* @__PURE__ */ React4.createElement("div", {
|
|
392
|
+
className: "flex flex-col p-1 border-e border-subdued-separator dx-attention-surface"
|
|
351
393
|
}, /* @__PURE__ */ React4.createElement(IconButton, {
|
|
394
|
+
ref: setDragHandle,
|
|
352
395
|
variant: "ghost",
|
|
353
396
|
icon: "ph--dots-six-vertical--regular",
|
|
354
397
|
iconOnly: true,
|
|
355
398
|
label: "Drag handle"
|
|
356
|
-
})
|
|
399
|
+
}), /* @__PURE__ */ React4.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React4.createElement(DropdownMenu2.Trigger, {
|
|
357
400
|
asChild: true
|
|
358
401
|
}, /* @__PURE__ */ React4.createElement(IconButton, {
|
|
359
402
|
variant: "ghost",
|
|
@@ -364,26 +407,17 @@ var NotebookSection = ({ cell, db, env, promptResults, onCellInsert, onCellDelet
|
|
|
364
407
|
cell,
|
|
365
408
|
onCellInsert,
|
|
366
409
|
onCellDelete
|
|
367
|
-
}))
|
|
368
|
-
classNames: "overflow-visible bg-group-surface border border-subdued-separator"
|
|
369
|
-
}, /* @__PURE__ */ React4.createElement(NotebookCell, {
|
|
370
|
-
db,
|
|
371
|
-
cell: cell2,
|
|
372
|
-
env,
|
|
373
|
-
dragging: true
|
|
374
|
-
}))), /* @__PURE__ */ React4.createElement(StackItem.Content, {
|
|
375
|
-
classNames: "overflow-visible"
|
|
376
|
-
}, /* @__PURE__ */ React4.createElement(NotebookCell, {
|
|
410
|
+
}))), /* @__PURE__ */ React4.createElement(NotebookCell, {
|
|
377
411
|
db,
|
|
378
412
|
cell,
|
|
379
413
|
env,
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}))
|
|
414
|
+
graph,
|
|
415
|
+
promptResults
|
|
416
|
+
}));
|
|
383
417
|
};
|
|
384
418
|
|
|
385
419
|
// src/components/QueryEditor/QueryEditor.tsx
|
|
386
|
-
import React5, { useState } from "react";
|
|
420
|
+
import React5, { useState as useState2 } from "react";
|
|
387
421
|
import { ModuleResolutionKind, ScriptTarget } from "typescript";
|
|
388
422
|
import queryApi from "@dxos/echo-query/api.d.ts?raw";
|
|
389
423
|
import { useAsyncEffect } from "@dxos/react-ui";
|
|
@@ -401,7 +435,7 @@ var GLOBALS = `
|
|
|
401
435
|
export {};
|
|
402
436
|
`;
|
|
403
437
|
var QueryEditor2 = (props) => {
|
|
404
|
-
const [compiler, setCompiler] =
|
|
438
|
+
const [compiler, setCompiler] = useState2();
|
|
405
439
|
useAsyncEffect(async () => {
|
|
406
440
|
const compiler2 = new Compiler({
|
|
407
441
|
lib: [
|
|
@@ -425,18 +459,19 @@ var QueryEditor2 = (props) => {
|
|
|
425
459
|
|
|
426
460
|
// src/components/ScriptToolbar/ScriptToolbar.tsx
|
|
427
461
|
import { Atom } from "@effect-atom/atom-react";
|
|
428
|
-
import React6, { useMemo as
|
|
462
|
+
import React6, { useMemo as useMemo3 } from "react";
|
|
463
|
+
import { AppSurface as AppSurface2 } from "@dxos/app-toolkit/ui";
|
|
429
464
|
import { ElevationProvider, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
430
465
|
import { composable as composable3, composableProps as composableProps3 } from "@dxos/react-ui";
|
|
431
466
|
import { Menu, createGapSeparator, useMenuActions } from "@dxos/react-ui-menu";
|
|
432
467
|
import { createDeploy, createFormat, createTemplateSelect, useDeployDeps } from "#hooks";
|
|
433
468
|
import { meta as meta4 } from "#meta";
|
|
434
469
|
var ScriptToolbar = composable3(({ script, attendableId, role, state, ...props }, forwardedRef) => {
|
|
435
|
-
const { t } = useTranslation4(meta4.
|
|
470
|
+
const { t } = useTranslation4(meta4.profile.key);
|
|
436
471
|
const options = useDeployDeps({
|
|
437
472
|
script
|
|
438
473
|
});
|
|
439
|
-
const menuCreator =
|
|
474
|
+
const menuCreator = useMemo3(() => createToolbarActions({
|
|
440
475
|
state,
|
|
441
476
|
script,
|
|
442
477
|
t,
|
|
@@ -449,7 +484,7 @@ var ScriptToolbar = composable3(({ script, attendableId, role, state, ...props }
|
|
|
449
484
|
]);
|
|
450
485
|
const menuActions = useMenuActions(menuCreator);
|
|
451
486
|
return /* @__PURE__ */ React6.createElement(ElevationProvider, {
|
|
452
|
-
elevation: role ===
|
|
487
|
+
elevation: role === AppSurface2.Section.role ? "positioned" : "base"
|
|
453
488
|
}, /* @__PURE__ */ React6.createElement(Menu.Root, {
|
|
454
489
|
...menuActions,
|
|
455
490
|
attendableId
|
|
@@ -485,20 +520,20 @@ var createToolbarActions = ({ state, script, ...options }) => Atom.make((get) =>
|
|
|
485
520
|
});
|
|
486
521
|
|
|
487
522
|
// src/components/TestPanel/TestPanel.tsx
|
|
488
|
-
import React7, { forwardRef, useRef, useState as
|
|
523
|
+
import React7, { forwardRef, useRef, useState as useState3 } from "react";
|
|
489
524
|
import { log } from "@dxos/log";
|
|
490
|
-
import { Avatar, Icon, Input, ScrollArea, Toolbar, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
525
|
+
import { Avatar, Icon, Input, ScrollArea as ScrollArea2, Toolbar, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
491
526
|
import { composable as composable4, composableProps as composableProps4 } from "@dxos/react-ui";
|
|
492
527
|
import { JsonHighlighter } from "@dxos/react-ui-syntax-highlighter";
|
|
493
|
-
import { mx as
|
|
528
|
+
import { mx as mx3 } from "@dxos/ui-theme";
|
|
494
529
|
import { meta as meta5 } from "#meta";
|
|
495
530
|
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/components/TestPanel/TestPanel.tsx";
|
|
496
531
|
var TestPanel = composable4(({ classNames, onInvoke, ...props }, forwardedRef) => {
|
|
497
|
-
const { t } = useTranslation5(meta5.
|
|
532
|
+
const { t } = useTranslation5(meta5.profile.key);
|
|
498
533
|
const inputRef = useRef(null);
|
|
499
|
-
const [input, setInput] =
|
|
500
|
-
const [state, setState] =
|
|
501
|
-
const [history, setHistory] =
|
|
534
|
+
const [input, setInput] = useState3("");
|
|
535
|
+
const [state, setState] = useState3(null);
|
|
536
|
+
const [history, setHistory] = useState3([]);
|
|
502
537
|
const scrollerRef = useRef(null);
|
|
503
538
|
const handleScroll = () => {
|
|
504
539
|
if (scrollerRef.current) {
|
|
@@ -605,11 +640,11 @@ var TestPanel = composable4(({ classNames, onInvoke, ...props }, forwardedRef) =
|
|
|
605
640
|
})));
|
|
606
641
|
});
|
|
607
642
|
var MessageThread = /* @__PURE__ */ forwardRef(({ state, history }, forwardedRef) => {
|
|
608
|
-
return /* @__PURE__ */ React7.createElement(
|
|
643
|
+
return /* @__PURE__ */ React7.createElement(ScrollArea2.Root, {
|
|
609
644
|
orientation: "vertical",
|
|
610
645
|
classNames: "h-full",
|
|
611
646
|
ref: forwardedRef
|
|
612
|
-
}, /* @__PURE__ */ React7.createElement(
|
|
647
|
+
}, /* @__PURE__ */ React7.createElement(ScrollArea2.Viewport, {
|
|
613
648
|
classNames: "gap-6 p-2"
|
|
614
649
|
}, history.map((message, i) => /* @__PURE__ */ React7.createElement("div", {
|
|
615
650
|
key: i,
|
|
@@ -634,14 +669,14 @@ var MessageItem = ({ classNames, message }) => {
|
|
|
634
669
|
const { type, text, data, error } = message;
|
|
635
670
|
const wrapper = "p-1 px-2 rounded-md bg-hover-surface overflow-auto";
|
|
636
671
|
return /* @__PURE__ */ React7.createElement("div", {
|
|
637
|
-
className:
|
|
672
|
+
className: mx3("flex", type === "request" ? "ml-[1rem] justify-end" : "mr-[1rem]", classNames)
|
|
638
673
|
}, error && /* @__PURE__ */ React7.createElement("div", {
|
|
639
|
-
className:
|
|
674
|
+
className: mx3(wrapper, "whitespace-pre text-error-text")
|
|
640
675
|
}, String(error)), text !== void 0 && /* @__PURE__ */ React7.createElement("div", {
|
|
641
|
-
className:
|
|
676
|
+
className: mx3(wrapper, type === "request" && "bg-primary-500 dark:bg-primary-600")
|
|
642
677
|
}, text || "\xD8"), data && /* @__PURE__ */ React7.createElement(JsonHighlighter, {
|
|
643
678
|
data,
|
|
644
|
-
classNames:
|
|
679
|
+
classNames: mx3(wrapper, "text-xs")
|
|
645
680
|
}));
|
|
646
681
|
};
|
|
647
682
|
var RobotAvatar = () => /* @__PURE__ */ React7.createElement(Avatar.Root, null, /* @__PURE__ */ React7.createElement(Avatar.Content, {
|
|
@@ -649,14 +684,10 @@ var RobotAvatar = () => /* @__PURE__ */ React7.createElement(Avatar.Root, null,
|
|
|
649
684
|
variant: "circle",
|
|
650
685
|
icon: "ph--drone--regular"
|
|
651
686
|
}));
|
|
652
|
-
|
|
653
|
-
// src/components/index.ts
|
|
654
|
-
var ScriptPluginSettings = lazy(() => import("../ScriptPluginSettings-T4JMUSHN.mjs"));
|
|
655
687
|
export {
|
|
656
688
|
NotebookMenu,
|
|
657
689
|
NotebookStack,
|
|
658
690
|
QueryEditor2 as QueryEditor,
|
|
659
|
-
ScriptPluginSettings,
|
|
660
691
|
ScriptToolbar,
|
|
661
692
|
TestPanel,
|
|
662
693
|
TypescriptEditor
|