@dxos/plugin-assistant 0.8.4-main.e098934 → 0.8.4-main.ead640a
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/{BlueprintContainer-BFNN6K46.mjs → BlueprintContainer-FOZTO447.mjs} +6 -7
- package/dist/lib/browser/{BlueprintContainer-BFNN6K46.mjs.map → BlueprintContainer-FOZTO447.mjs.map} +3 -3
- package/dist/lib/browser/{ChatCompanion-DOVN34C7.mjs → ChatCompanion-EC6LBEWF.mjs} +38 -14
- package/dist/lib/browser/ChatCompanion-EC6LBEWF.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-XIVJTCC2.mjs → ChatContainer-A2SL6WO5.mjs} +7 -9
- package/dist/lib/browser/{ChatContainer-XIVJTCC2.mjs.map → ChatContainer-A2SL6WO5.mjs.map} +3 -3
- package/dist/lib/browser/{ChatDialog-EJJMK3WL.mjs → ChatDialog-XMOUFX2P.mjs} +3 -5
- package/dist/lib/browser/{ChatDialog-EJJMK3WL.mjs.map → ChatDialog-XMOUFX2P.mjs.map} +1 -1
- package/dist/lib/browser/{SequenceContainer-TF5QNXYM.mjs → SequenceContainer-2FEWMQGW.mjs} +4 -4
- package/dist/lib/browser/SequenceContainer-2FEWMQGW.mjs.map +7 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +19 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-3C43MLCD.mjs → app-graph-builder-7AE4R5KJ.mjs} +41 -11
- package/dist/lib/browser/app-graph-builder-7AE4R5KJ.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-VHFSRTEJ.mjs → blueprint-definition-NSJARW5U.mjs} +2 -2
- package/dist/lib/browser/{chunk-GLWD66TA.mjs → chunk-2CE2KPKZ.mjs} +28 -14
- package/dist/lib/browser/chunk-2CE2KPKZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SMIVXXAI.mjs → chunk-37VMDB4P.mjs} +32 -14
- package/dist/lib/browser/chunk-37VMDB4P.mjs.map +7 -0
- package/dist/lib/browser/{chunk-R6LRGW3I.mjs → chunk-3EWE2UQD.mjs} +11 -7
- package/dist/lib/browser/chunk-3EWE2UQD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EZUSNS2J.mjs → chunk-5EGXHCAZ.mjs} +2 -5
- package/dist/lib/browser/chunk-5EGXHCAZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-O4LUJEDV.mjs → chunk-5RICKAMN.mjs} +5 -7
- package/dist/lib/browser/chunk-5RICKAMN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-C4Q2RYQM.mjs → chunk-7THOIN6F.mjs} +309 -481
- package/dist/lib/browser/chunk-7THOIN6F.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PQI3MGDN.mjs → chunk-HYYWP3KP.mjs} +6 -5
- package/dist/lib/browser/chunk-HYYWP3KP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-QD4UUISH.mjs → chunk-Z7DQT64Z.mjs} +39 -37
- package/dist/lib/browser/chunk-Z7DQT64Z.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +18 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +71 -48
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-I6M3ZDAS.mjs → intent-resolver-BZUU4UNA.mjs} +29 -11
- package/dist/lib/browser/intent-resolver-BZUU4UNA.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +17 -0
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-E4NAGB6R.mjs → react-surface-KRRUOMYY.mjs} +13 -15
- package/dist/lib/browser/react-surface-KRRUOMYY.mjs.map +7 -0
- package/dist/lib/browser/{settings-36V3VUMW.mjs → settings-PSR3WF3X.mjs} +5 -5
- package/dist/lib/browser/{settings-36V3VUMW.mjs.map → settings-PSR3WF3X.mjs.map} +1 -1
- package/dist/lib/browser/{state-AINRYS5W.mjs → state-LXTS54DI.mjs} +5 -5
- package/dist/lib/browser/{state-AINRYS5W.mjs.map → state-LXTS54DI.mjs.map} +1 -1
- package/dist/lib/browser/{toolkit-MPUS3U64.mjs → toolkit-NQ2GXCF5.mjs} +27 -19
- package/dist/lib/browser/toolkit-NQ2GXCF5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{BlueprintContainer-X4MRBKDR.mjs → BlueprintContainer-6HSEVQ7U.mjs} +6 -7
- package/dist/lib/node-esm/{BlueprintContainer-X4MRBKDR.mjs.map → BlueprintContainer-6HSEVQ7U.mjs.map} +3 -3
- package/dist/lib/node-esm/{ChatCompanion-ICWYVPRD.mjs → ChatCompanion-NDYEAUQN.mjs} +38 -14
- package/dist/lib/node-esm/ChatCompanion-NDYEAUQN.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-LMMMQD4K.mjs → ChatContainer-NMDQM5HG.mjs} +7 -9
- package/dist/lib/node-esm/{ChatContainer-LMMMQD4K.mjs.map → ChatContainer-NMDQM5HG.mjs.map} +3 -3
- package/dist/lib/node-esm/{ChatDialog-UUE3F7BT.mjs → ChatDialog-QPRWMRU4.mjs} +3 -5
- package/dist/lib/node-esm/{ChatDialog-UUE3F7BT.mjs.map → ChatDialog-QPRWMRU4.mjs.map} +1 -1
- package/dist/lib/node-esm/{SequenceContainer-UXOVZPZO.mjs → SequenceContainer-PGGJUQ46.mjs} +4 -4
- package/dist/lib/node-esm/SequenceContainer-PGGJUQ46.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +20 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-NM3JDLQ2.mjs → app-graph-builder-SJCOS64C.mjs} +41 -11
- package/dist/lib/node-esm/app-graph-builder-SJCOS64C.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-4E6XTLVN.mjs → blueprint-definition-WD2IVMAI.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-VFY2JG62.mjs → chunk-73ABYRYX.mjs} +5 -7
- package/dist/lib/node-esm/chunk-73ABYRYX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-LVTG5JTW.mjs → chunk-HDZX6TSZ.mjs} +11 -7
- package/dist/lib/node-esm/chunk-HDZX6TSZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-4WLFSXZG.mjs → chunk-TMCGJPAN.mjs} +6 -5
- package/dist/lib/node-esm/chunk-TMCGJPAN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YU62ZWJN.mjs → chunk-TW2WKKSR.mjs} +39 -37
- package/dist/lib/node-esm/chunk-TW2WKKSR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QG2KT3AT.mjs → chunk-U2NYUS2N.mjs} +28 -14
- package/dist/lib/node-esm/chunk-U2NYUS2N.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-XD4CDA4R.mjs → chunk-XQGWSZ4T.mjs} +2 -5
- package/dist/lib/node-esm/chunk-XQGWSZ4T.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-V44ZG7CU.mjs → chunk-YZYGXFVG.mjs} +309 -481
- package/dist/lib/node-esm/chunk-YZYGXFVG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7YOGZI66.mjs → chunk-ZQ3THJ2W.mjs} +32 -14
- package/dist/lib/node-esm/chunk-ZQ3THJ2W.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +19 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +71 -48
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-VIINHFMT.mjs → intent-resolver-B7YAS3NT.mjs} +29 -11
- package/dist/lib/node-esm/intent-resolver-B7YAS3NT.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +18 -0
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-5WQLRTCH.mjs → react-surface-VRDDARFF.mjs} +13 -15
- package/dist/lib/node-esm/react-surface-VRDDARFF.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs → settings-4EBIOJVK.mjs} +5 -5
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs.map → settings-4EBIOJVK.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-EQS5KP6M.mjs → state-BO6GUFLB.mjs} +5 -5
- package/dist/lib/node-esm/{state-EQS5KP6M.mjs.map → state-BO6GUFLB.mjs.map} +1 -1
- package/dist/lib/node-esm/{toolkit-PKVYDZ4H.mjs → toolkit-V57PRJNG.mjs} +27 -19
- package/dist/lib/node-esm/toolkit-V57PRJNG.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/AssistantPlugin.d.ts +1 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +2 -3
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -21
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +0 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintSettings.d.ts +6 -0
- package/dist/types/src/components/BlueprintSettings.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +2 -1
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +4 -2
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +7 -3
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +8 -3
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +4 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +4 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +1 -3
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +4 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts.map +1 -1
- package/dist/types/src/functions/list.d.ts.map +1 -1
- package/dist/types/src/functions/load.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +2 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +1 -0
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/presets.d.ts +1 -1
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +4 -3
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/update-name.d.ts +10 -0
- package/dist/types/src/processor/update-name.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +1 -1
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +16 -7
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +19 -4
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +12 -12
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +91 -112
- package/src/AssistantPlugin.tsx +138 -137
- package/src/capabilities/ai-service.ts +6 -7
- package/src/capabilities/app-graph-builder.ts +36 -4
- package/src/capabilities/blueprint-definition.ts +7 -1
- package/src/capabilities/capabilities.ts +0 -53
- package/src/capabilities/edge-model-resolver.ts +5 -7
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +26 -3
- package/src/capabilities/local-model-resolver.ts +6 -8
- package/src/capabilities/react-surface.tsx +3 -3
- package/src/capabilities/toolkit.ts +16 -11
- package/src/components/BlueprintContainer.tsx +2 -2
- package/src/components/BlueprintSettings.tsx +15 -0
- package/src/components/Chat/Chat.tsx +41 -34
- package/src/components/ChatCompanion.tsx +33 -8
- package/src/components/ChatContainer.tsx +2 -2
- package/src/components/ChatProgress/ChatProgress.tsx +1 -2
- package/src/components/ChatPrompt/ChatOptions.tsx +17 -25
- package/src/components/ChatThread/ChatThread.stories.tsx +6 -7
- package/src/components/ChatThread/ChatThread.tsx +7 -3
- package/src/components/ChatThread/registry.tsx +6 -11
- package/src/components/ChatThread/sync.test.ts +1 -1
- package/src/components/ChatThread/sync.ts +1 -1
- package/src/components/SequenceContainer.tsx +2 -2
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +5 -4
- package/src/components/SequenceEditor/SequenceEditor.tsx +2 -2
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +5 -5
- package/src/components/TemplateEditor/TemplateEditor.tsx +8 -4
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +3 -5
- package/src/components/TemplateEditor/TemplateForm.tsx +1 -1
- package/src/components/ToolBlock/ToolBlock.tsx +6 -6
- package/src/components/Toolbar/Toolbar.tsx +1 -1
- package/src/components/Toolbar/useChatToolbarActions.ts +1 -1
- package/src/components/Toolbox/Toolbox.stories.tsx +3 -6
- package/src/components/index.ts +1 -1
- package/src/functions/analysis.ts +4 -2
- package/src/functions/list.ts +4 -2
- package/src/functions/load.ts +7 -3
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useBlueprintRegistry.ts +17 -3
- package/src/hooks/useChatProcessor.ts +12 -4
- package/src/hooks/useChatServices.ts +5 -4
- package/src/hooks/useContextBinder.ts +17 -5
- package/src/hooks/useItemTypes.ts +1 -1
- package/src/index.ts +2 -0
- package/src/meta.ts +3 -5
- package/src/processor/index.ts +1 -0
- package/src/processor/presets.ts +1 -1
- package/src/processor/processor.test.ts +17 -13
- package/src/processor/processor.ts +14 -39
- package/src/processor/update-name.ts +57 -0
- package/src/testing/index.ts +0 -2
- package/src/testing/test-generator.ts +5 -1
- package/src/testing/test-services.ts +2 -8
- package/src/translations.ts +1 -0
- package/src/types/Assistant.ts +7 -4
- package/src/types/AssistantAction.ts +10 -2
- package/src/types/service.ts +15 -7
- package/dist/lib/browser/ChatCompanion-DOVN34C7.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +0 -7
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs +0 -22
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-3C43MLCD.mjs.map +0 -7
- package/dist/lib/browser/chunk-C4Q2RYQM.mjs.map +0 -7
- package/dist/lib/browser/chunk-EZUSNS2J.mjs.map +0 -7
- package/dist/lib/browser/chunk-GLWD66TA.mjs.map +0 -7
- package/dist/lib/browser/chunk-O4LUJEDV.mjs.map +0 -7
- package/dist/lib/browser/chunk-PQI3MGDN.mjs.map +0 -7
- package/dist/lib/browser/chunk-QD4UUISH.mjs.map +0 -7
- package/dist/lib/browser/chunk-R6LRGW3I.mjs.map +0 -7
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs +0 -155
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs +0 -22
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs +0 -21
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs.map +0 -7
- package/dist/lib/browser/react-surface-E4NAGB6R.mjs.map +0 -7
- package/dist/lib/browser/toolkit-MPUS3U64.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-ICWYVPRD.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs +0 -23
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-NM3JDLQ2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V44ZG7CU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YU62ZWJN.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs +0 -156
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs +0 -23
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs +0 -22
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-5WQLRTCH.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-PKVYDZ4H.mjs.map +0 -7
- package/dist/types/src/capabilities/compute-runtime.d.ts +0 -5
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +0 -1
- package/dist/types/src/components/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +0 -21
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +0 -1
- package/dist/types/src/execution-graph/index.d.ts +0 -2
- package/dist/types/src/execution-graph/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +0 -8
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +0 -1
- package/dist/types/src/hooks/useExecutionGraph.d.ts +0 -6
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +0 -1
- package/dist/types/src/stories/Chat.stories.d.ts +0 -30
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -4
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChatContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChessContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChessContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/CommentsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/DebugCard.d.ts +0 -8
- package/dist/types/src/stories/components/DebugCard.d.ts.map +0 -1
- package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/InvocationsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -7
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/MessageContainer.d.ts +0 -4
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/PromptContainer.d.ts +0 -6
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +0 -4
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +0 -1
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +0 -4
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +0 -1
- package/dist/types/src/stories/components/TasksContainer.d.ts +0 -4
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +0 -3
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TriggersContainer.d.ts +0 -14
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/index.d.ts +0 -16
- package/dist/types/src/stories/components/index.d.ts.map +0 -1
- package/dist/types/src/stories/components/types.d.ts +0 -7
- package/dist/types/src/stories/components/types.d.ts.map +0 -1
- package/dist/types/src/stories/testing/data.d.ts +0 -9
- package/dist/types/src/stories/testing/data.d.ts.map +0 -1
- package/dist/types/src/stories/testing/index.d.ts +0 -3
- package/dist/types/src/stories/testing/index.d.ts.map +0 -1
- package/dist/types/src/stories/testing/schema.d.ts +0 -7
- package/dist/types/src/stories/testing/schema.d.ts.map +0 -1
- package/dist/types/src/stories/testing/testing.d.ts +0 -48
- package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -14
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -6
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/src/capabilities/compute-runtime.ts +0 -124
- package/src/components/PromptSettings.tsx +0 -90
- package/src/execution-graph/execution-graph.ts +0 -211
- package/src/execution-graph/index.ts +0 -5
- package/src/hooks/useComputeRuntimeCallback.ts +0 -25
- package/src/hooks/useExecutionGraph.ts +0 -20
- package/src/stories/Chat.stories.tsx +0 -657
- package/src/stories/components/BlueprintContainer.tsx +0 -34
- package/src/stories/components/ChatContainer.tsx +0 -74
- package/src/stories/components/ChessContainer.tsx +0 -17
- package/src/stories/components/CommentsContainer.tsx +0 -25
- package/src/stories/components/DebugCard.tsx +0 -61
- package/src/stories/components/GraphContainer.tsx +0 -119
- package/src/stories/components/InvocationsContainer.tsx +0 -17
- package/src/stories/components/LoggingContainer.tsx +0 -33
- package/src/stories/components/MessageContainer.tsx +0 -22
- package/src/stories/components/PromptContainer.tsx +0 -52
- package/src/stories/components/ResearchInputStack.tsx +0 -30
- package/src/stories/components/ResearchOutputStack.tsx +0 -29
- package/src/stories/components/TasksContainer.tsx +0 -49
- package/src/stories/components/TokenManagerContainer.tsx +0 -14
- package/src/stories/components/TriggersContainer.tsx +0 -75
- package/src/stories/components/index.ts +0 -20
- package/src/stories/components/types.ts +0 -11
- package/src/stories/testing/data.ts +0 -142
- package/src/stories/testing/index.ts +0 -6
- package/src/stories/testing/schema.ts +0 -17
- package/src/stories/testing/testing.tsx +0 -279
- package/src/testing/test-data.ts +0 -245
- package/src/testing/test-functions.ts +0 -16
- /package/dist/lib/browser/{blueprint-definition-VHFSRTEJ.mjs.map → blueprint-definition-NSJARW5U.mjs.map} +0 -0
- /package/dist/lib/node-esm/{blueprint-definition-4E6XTLVN.mjs.map → blueprint-definition-WD2IVMAI.mjs.map} +0 -0
|
@@ -9,13 +9,13 @@ import { type Blueprint } from '@dxos/blueprints';
|
|
|
9
9
|
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
10
|
import { type Space, useQuery } from '@dxos/react-client/echo';
|
|
11
11
|
import { Icon, IconButton, Popover, Select, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
import { SearchList } from '@dxos/react-ui-searchlist';
|
|
12
|
+
import { Listbox, SearchList } from '@dxos/react-ui-searchlist';
|
|
13
13
|
import { Tabs } from '@dxos/react-ui-tabs';
|
|
14
14
|
|
|
15
15
|
import { useActiveBlueprints, useBlueprintHandlers, useBlueprints, useContextObjects, useItemTypes } from '../../hooks';
|
|
16
16
|
import { meta } from '../../meta';
|
|
17
17
|
|
|
18
|
-
const panelClassNames = 'is-[calc(100dvw-.5rem)] sm:is-max md:is-
|
|
18
|
+
const panelClassNames = 'is-[calc(100dvw-.5rem)] sm:is-max md:is-72 max-is-[--text-content]';
|
|
19
19
|
|
|
20
20
|
export type ChatOptionsProps = {
|
|
21
21
|
space: Space;
|
|
@@ -65,12 +65,12 @@ export const ChatOptions = ({
|
|
|
65
65
|
</Popover.Trigger>
|
|
66
66
|
<Popover.Portal>
|
|
67
67
|
<Popover.Content side='top' classNames={panelClassNames}>
|
|
68
|
-
<Tabs.Root orientation='horizontal' defaultValue='blueprints' defaultActivePart='list'>
|
|
68
|
+
<Tabs.Root orientation='horizontal' defaultValue='blueprints' defaultActivePart='list' tabIndex={-1}>
|
|
69
69
|
<Tabs.Viewport classNames='max-bs-[--radix-popover-content-available-height] grid grid-rows-[1fr_min-content] [&_[cmdk-root]]:contents [&_[role="tabpanel"]]:grid [&_[role="tabpanel"]]:grid-rows-[1fr_min-content] [&_[role="listbox"]]:min-bs-0 [&_[role="listbox"]]:overflow-y-auto [&_[role="tabpanel"]]:min-bs-0 [&_[role="tabpanel"]]:pli-cardSpacingChrome [&_[role="tabpanel"][data-state="active"]]:order-first [&_[role="tabpanel"][data-state="inactive"]]:hidden'>
|
|
70
|
-
<Tabs.Tabpanel value='blueprints'>
|
|
70
|
+
<Tabs.Tabpanel value='blueprints' tabIndex={-1} classNames='dx-focus-ring-inset'>
|
|
71
71
|
<BlueprintsPanel blueprintRegistry={blueprintRegistry} space={space} context={context} />
|
|
72
72
|
</Tabs.Tabpanel>
|
|
73
|
-
<Tabs.Tabpanel value='model'>
|
|
73
|
+
<Tabs.Tabpanel value='model' tabIndex={-1} classNames='dx-focus-ring-inset !pli-0'>
|
|
74
74
|
<ModelsPanel presets={presets} preset={preset} onPresetChange={onPresetChange} />
|
|
75
75
|
</Tabs.Tabpanel>
|
|
76
76
|
<Tabs.Tablist classNames='sm:overflow-x-hidden justify-center p-[--dx-cardSpacingChrome] border-bs border-subduedSeparator order-last'>
|
|
@@ -98,7 +98,7 @@ const BlueprintsPanel = ({
|
|
|
98
98
|
}: Pick<ChatOptionsProps, 'blueprintRegistry' | 'space' | 'context'>) => {
|
|
99
99
|
const { t } = useTranslation(meta.id);
|
|
100
100
|
|
|
101
|
-
const blueprints = useBlueprints({ blueprintRegistry });
|
|
101
|
+
const blueprints = useBlueprints({ blueprintRegistry, space });
|
|
102
102
|
const activeBlueprints = useActiveBlueprints({ context });
|
|
103
103
|
const { onUpdateBlueprint } = useBlueprintHandlers({ space, context, blueprintRegistry });
|
|
104
104
|
|
|
@@ -120,7 +120,7 @@ const BlueprintsPanel = ({
|
|
|
120
120
|
);
|
|
121
121
|
})}
|
|
122
122
|
</SearchList.Content>
|
|
123
|
-
<SearchList.Input placeholder={t('search placeholder')} classNames='mbe-cardSpacingChrome' />
|
|
123
|
+
<SearchList.Input placeholder={t('search placeholder')} classNames='mbe-cardSpacingChrome' autoFocus />
|
|
124
124
|
</SearchList.Root>
|
|
125
125
|
);
|
|
126
126
|
};
|
|
@@ -131,24 +131,16 @@ const ModelsPanel = ({
|
|
|
131
131
|
onPresetChange,
|
|
132
132
|
}: Pick<ChatOptionsProps, 'presets' | 'preset' | 'onPresetChange'>) => {
|
|
133
133
|
return (
|
|
134
|
-
<
|
|
134
|
+
<Listbox.Root value={preset} onValueChange={onPresetChange} autoFocus>
|
|
135
135
|
{presets?.map(({ id, label }) => {
|
|
136
|
-
const isActive = preset === id;
|
|
137
136
|
return (
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
tabIndex={0}
|
|
143
|
-
className='overflow-hidden dx-focus-ring flex gap-2 p-1 pis-2 pie-2 items-center rounded-sm select-none cursor-pointer hover:bg-hoverOverlay'
|
|
144
|
-
onClick={() => onPresetChange?.(id)}
|
|
145
|
-
>
|
|
146
|
-
<div className='grow truncate'>{label}</div>
|
|
147
|
-
<Icon icon='ph--check--regular' classNames={[!isActive && 'invisible']} />
|
|
148
|
-
</li>
|
|
137
|
+
<Listbox.Option key={id} value={id}>
|
|
138
|
+
<Listbox.OptionLabel>{label}</Listbox.OptionLabel>
|
|
139
|
+
<Listbox.OptionIndicator />
|
|
140
|
+
</Listbox.Option>
|
|
149
141
|
);
|
|
150
142
|
})}
|
|
151
|
-
</
|
|
143
|
+
</Listbox.Root>
|
|
152
144
|
);
|
|
153
145
|
};
|
|
154
146
|
|
|
@@ -184,8 +176,8 @@ const ObjectsPanel = ({ space, context }: Pick<ChatOptionsProps, 'space' | 'cont
|
|
|
184
176
|
const { objects: contextObjects, onUpdateObject } = useContextObjects({ space, context });
|
|
185
177
|
|
|
186
178
|
return (
|
|
187
|
-
<SearchList.Root
|
|
188
|
-
<SearchList.Content classNames='
|
|
179
|
+
<SearchList.Root>
|
|
180
|
+
<SearchList.Content classNames='p-cardSpacingChrome [&:has([cmdk-list-sizer]:empty)]:plb-0'>
|
|
189
181
|
{objects.length ? (
|
|
190
182
|
objects.map((object) => {
|
|
191
183
|
const label = Obj.getLabel(object) ?? Obj.getTypename(object) ?? object.id;
|
|
@@ -207,7 +199,7 @@ const ObjectsPanel = ({ space, context }: Pick<ChatOptionsProps, 'space' | 'cont
|
|
|
207
199
|
)}
|
|
208
200
|
</SearchList.Content>
|
|
209
201
|
|
|
210
|
-
<div role='none' className='grid grid-cols-[min-content_1fr] gap-2 mbe-cardSpacingChrome'>
|
|
202
|
+
<div role='none' className='grid grid-cols-[min-content_1fr] gap-2 pli-cardSpacingChrome mbe-cardSpacingChrome'>
|
|
211
203
|
<Select.Root value={typename === ANY ? undefined : typename} onValueChange={setTypename}>
|
|
212
204
|
<Select.TriggerButton density='fine' placeholder={t('type filter placeholder')} />
|
|
213
205
|
<Select.Portal>
|
|
@@ -226,7 +218,7 @@ const ObjectsPanel = ({ space, context }: Pick<ChatOptionsProps, 'space' | 'cont
|
|
|
226
218
|
</Select.Content>
|
|
227
219
|
</Select.Portal>
|
|
228
220
|
</Select.Root>
|
|
229
|
-
<SearchList.Input placeholder={t('search placeholder')} classNames='mbe-0' />
|
|
221
|
+
<SearchList.Input placeholder={t('search placeholder')} classNames='mbe-0' autoFocus />
|
|
230
222
|
</div>
|
|
231
223
|
</SearchList.Root>
|
|
232
224
|
);
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
|
-
import
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Fiber from 'effect/Fiber';
|
|
8
|
+
import * as Layer from 'effect/Layer';
|
|
9
9
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
10
10
|
|
|
11
11
|
import { ContextQueueService, DatabaseService } from '@dxos/functions';
|
|
@@ -13,10 +13,10 @@ import { faker } from '@dxos/random';
|
|
|
13
13
|
import { useQueue, useSpace } from '@dxos/react-client/echo';
|
|
14
14
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
15
|
import { Popover } from '@dxos/react-ui';
|
|
16
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
16
17
|
import { PreviewPopoverProvider, usePreviewPopover } from '@dxos/react-ui-editor/testing';
|
|
17
18
|
import { Card } from '@dxos/react-ui-stack';
|
|
18
19
|
import { DataType } from '@dxos/schema';
|
|
19
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
20
20
|
|
|
21
21
|
import { createMessageGenerator } from '../../testing';
|
|
22
22
|
import { translations } from '../../translations';
|
|
@@ -100,12 +100,11 @@ const meta = {
|
|
|
100
100
|
component: ChatThread,
|
|
101
101
|
render: DefaultStory,
|
|
102
102
|
decorators: [
|
|
103
|
-
withClientProvider({ createIdentity: true, createSpace: true, types: [DataType.Organization, DataType.Person] }),
|
|
104
|
-
withLayout({ fullscreen: true }),
|
|
105
103
|
withTheme,
|
|
104
|
+
withClientProvider({ createIdentity: true, createSpace: true, types: [DataType.Organization, DataType.Person] }),
|
|
106
105
|
],
|
|
107
106
|
parameters: {
|
|
108
|
-
layout: 'fullscreen',
|
|
107
|
+
layout: 'fullscreen',
|
|
109
108
|
translations,
|
|
110
109
|
},
|
|
111
110
|
} satisfies Meta<typeof ChatThread>;
|
|
@@ -32,12 +32,16 @@ export type ChatThreadProps = ThemedClassName<
|
|
|
32
32
|
identity?: Identity;
|
|
33
33
|
messages?: DataType.Message[];
|
|
34
34
|
error?: Error;
|
|
35
|
+
overscroll?: number;
|
|
35
36
|
onEvent?: (event: ChatEvent) => void;
|
|
36
|
-
} & Pick<MarkdownStreamProps, 'cursor' | 'fadeIn'>
|
|
37
|
+
} & Pick<MarkdownStreamProps, 'cursor' | 'fadeIn' | 'overscroll'>
|
|
37
38
|
>;
|
|
38
39
|
|
|
39
40
|
export const ChatThread = forwardRef<ChatThreadController | null, ChatThreadProps>(
|
|
40
|
-
(
|
|
41
|
+
(
|
|
42
|
+
{ classNames, identity, messages = [], error, cursor = false, fadeIn = true, overscroll, onEvent },
|
|
43
|
+
forwardedRef,
|
|
44
|
+
) => {
|
|
41
45
|
const userHue = useMemo(() => {
|
|
42
46
|
return identity?.profile?.data?.hue || keyToFallback(identity?.identityKey ?? PublicKey.random()).hue;
|
|
43
47
|
}, [identity]);
|
|
@@ -81,10 +85,10 @@ export const ChatThread = forwardRef<ChatThreadController | null, ChatThreadProp
|
|
|
81
85
|
>
|
|
82
86
|
<MarkdownStream
|
|
83
87
|
ref={setController}
|
|
84
|
-
classNames='bs-full max-is-prose overflow-hidden'
|
|
85
88
|
registry={componentRegistry}
|
|
86
89
|
cursor={cursor}
|
|
87
90
|
fadeIn={fadeIn}
|
|
91
|
+
overscroll={overscroll}
|
|
88
92
|
onEvent={handleEvent}
|
|
89
93
|
/>
|
|
90
94
|
</div>
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
SummaryWidget,
|
|
14
14
|
ToggleContainer,
|
|
15
15
|
} from '@dxos/react-ui-components';
|
|
16
|
-
import { type XmlWidgetProps, type XmlWidgetRegistry } from '@dxos/react-ui-editor';
|
|
16
|
+
import { type XmlWidgetProps, type XmlWidgetRegistry, getXmlTextChild } from '@dxos/react-ui-editor';
|
|
17
17
|
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
18
18
|
import { ContentBlock, type DataType } from '@dxos/schema';
|
|
19
19
|
|
|
@@ -32,11 +32,6 @@ const Fallback = ({ _tag, ...props }: XmlWidgetProps<MessageThreadContext>) => {
|
|
|
32
32
|
);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
const getTextChild = (children: any[]): string | null => {
|
|
36
|
-
const child = children?.[0];
|
|
37
|
-
return typeof child === 'string' ? child : null;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
35
|
/**
|
|
41
36
|
* Custom XML tags registry.
|
|
42
37
|
*/
|
|
@@ -48,14 +43,14 @@ export const componentRegistry: XmlWidgetRegistry = {
|
|
|
48
43
|
['prompt' as const]: {
|
|
49
44
|
block: true,
|
|
50
45
|
factory: (props) => {
|
|
51
|
-
const text =
|
|
46
|
+
const text = getXmlTextChild(props.children);
|
|
52
47
|
return text ? new PromptWidget(text) : null;
|
|
53
48
|
},
|
|
54
49
|
},
|
|
55
50
|
['reference' as const]: {
|
|
56
51
|
block: false,
|
|
57
52
|
factory: (props) => {
|
|
58
|
-
const text =
|
|
53
|
+
const text = getXmlTextChild(props.children);
|
|
59
54
|
return text && props.ref ? new ReferenceWidget(text, props.ref) : null;
|
|
60
55
|
},
|
|
61
56
|
},
|
|
@@ -63,7 +58,7 @@ export const componentRegistry: XmlWidgetRegistry = {
|
|
|
63
58
|
block: true,
|
|
64
59
|
factory: (props) => {
|
|
65
60
|
const options = props.children
|
|
66
|
-
?.map((option: any) => option._tag === 'option' &&
|
|
61
|
+
?.map((option: any) => option._tag === 'option' && getXmlTextChild(option.children))
|
|
67
62
|
.filter(Boolean);
|
|
68
63
|
return options?.length ? new SelectWidget(options) : null;
|
|
69
64
|
},
|
|
@@ -71,14 +66,14 @@ export const componentRegistry: XmlWidgetRegistry = {
|
|
|
71
66
|
['suggestion' as const]: {
|
|
72
67
|
block: true,
|
|
73
68
|
factory: (props) => {
|
|
74
|
-
const text =
|
|
69
|
+
const text = getXmlTextChild(props.children);
|
|
75
70
|
return text ? new SuggestionWidget(text) : null;
|
|
76
71
|
},
|
|
77
72
|
},
|
|
78
73
|
['summary' as const]: {
|
|
79
74
|
block: true,
|
|
80
75
|
factory: (props) => {
|
|
81
|
-
const text =
|
|
76
|
+
const text = getXmlTextChild(props.children);
|
|
82
77
|
return text ? new SummaryWidget(text) : null;
|
|
83
78
|
},
|
|
84
79
|
},
|
|
@@ -65,7 +65,7 @@ export class MessageSyncer {
|
|
|
65
65
|
|
|
66
66
|
sync(messages: DataType.Message[]) {
|
|
67
67
|
log('sync', {
|
|
68
|
-
messages: messages.map((
|
|
68
|
+
messages: messages.map((message) => message.blocks.length),
|
|
69
69
|
currentMessageIndex: this._currentMessageIndex,
|
|
70
70
|
currentBlockIndex: this._currentBlockIndex,
|
|
71
71
|
currentBlockContent: this._currentBlockContent,
|
|
@@ -25,7 +25,7 @@ const parseSequence = (text: string): SequenceDefinition | undefined => {
|
|
|
25
25
|
const json = JSON5.parse(text);
|
|
26
26
|
const { steps } = json;
|
|
27
27
|
return { steps };
|
|
28
|
-
} catch
|
|
28
|
+
} catch {
|
|
29
29
|
// Ignore.
|
|
30
30
|
}
|
|
31
31
|
};
|
|
@@ -40,7 +40,7 @@ export const SequenceContainer = ({ sequence }: { sequence: Sequence }) => {
|
|
|
40
40
|
});
|
|
41
41
|
}, [sequence]);
|
|
42
42
|
|
|
43
|
-
const editorRef = useRef<EditorView
|
|
43
|
+
const editorRef = useRef<EditorView>(null);
|
|
44
44
|
|
|
45
45
|
// TODO(burdon): Factor out.
|
|
46
46
|
// const toolRegistry = useMemo(() => {
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
8
7
|
|
|
9
|
-
import { withLayout, withTheme } from '@dxos/
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
10
9
|
|
|
11
10
|
import { RESEARCH_SEQUENCE_DEFINITION } from '../../testing';
|
|
12
11
|
import { translations } from '../../translations';
|
|
@@ -16,7 +15,9 @@ import { SequenceEditor } from './SequenceEditor';
|
|
|
16
15
|
const meta = {
|
|
17
16
|
title: 'plugins/plugin-assistant/SequenceEditor',
|
|
18
17
|
component: SequenceEditor,
|
|
19
|
-
|
|
18
|
+
// TODO(wittjosiah): Fix story.
|
|
19
|
+
render: () => <>TODO</>,
|
|
20
|
+
decorators: [withTheme, withLayout({ container: 'column' })],
|
|
20
21
|
parameters: {
|
|
21
22
|
translations,
|
|
22
23
|
},
|
|
@@ -21,7 +21,7 @@ export type SequenceEditorProps = ThemedClassName<{
|
|
|
21
21
|
}>;
|
|
22
22
|
|
|
23
23
|
// TODO(burdon): Factor out JsonEditor.
|
|
24
|
-
export const SequenceEditor = forwardRef<EditorView |
|
|
24
|
+
export const SequenceEditor = forwardRef<EditorView | null, SequenceEditorProps>(
|
|
25
25
|
({ classNames, sequence }, forwardedRef) => {
|
|
26
26
|
const { themeMode } = useThemeContext();
|
|
27
27
|
const { parentRef, view } = useTextEditor({
|
|
@@ -43,7 +43,7 @@ export const SequenceEditor = forwardRef<EditorView | undefined, SequenceEditorP
|
|
|
43
43
|
],
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
useImperativeHandle(forwardedRef, () => view, [view]);
|
|
46
|
+
useImperativeHandle<EditorView | null, EditorView | null>(forwardedRef, () => view, [view]);
|
|
47
47
|
|
|
48
48
|
return <div ref={parentRef} className={mx('overflow-hidden', classNames)} />;
|
|
49
49
|
},
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useState } from 'react';
|
|
9
7
|
|
|
@@ -11,7 +9,7 @@ import { createSystemPrompt } from '@dxos/assistant';
|
|
|
11
9
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
12
10
|
import { useClient } from '@dxos/react-client';
|
|
13
11
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
|
-
import { withLayout, withTheme } from '@dxos/
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
15
13
|
import { trim } from '@dxos/util';
|
|
16
14
|
|
|
17
15
|
import { translations } from '../../translations';
|
|
@@ -29,6 +27,8 @@ const TEMPLATE = trim`
|
|
|
29
27
|
- {{this}}
|
|
30
28
|
{{/each}}
|
|
31
29
|
|
|
30
|
+
Reponse in the format: <suggestion>SUGGESTION</suggestion>
|
|
31
|
+
|
|
32
32
|
---
|
|
33
33
|
|
|
34
34
|
{{input}}
|
|
@@ -61,13 +61,13 @@ const meta = {
|
|
|
61
61
|
component: TemplateEditor as any,
|
|
62
62
|
render: DefaultStory,
|
|
63
63
|
decorators: [
|
|
64
|
+
withTheme,
|
|
65
|
+
withLayout({ container: 'column' }),
|
|
64
66
|
withClientProvider({
|
|
65
67
|
types: [Blueprint.Blueprint],
|
|
66
68
|
createIdentity: true,
|
|
67
69
|
createSpace: true,
|
|
68
70
|
}),
|
|
69
|
-
withLayout({ fullscreen: true, classNames: 'justify-center bg-deckSurface' }),
|
|
70
|
-
withTheme,
|
|
71
71
|
],
|
|
72
72
|
parameters: {
|
|
73
73
|
translations,
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { xml } from '@codemirror/lang-xml';
|
|
6
|
+
import { defaultHighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
5
7
|
import React from 'react';
|
|
6
8
|
|
|
7
9
|
import { type Template } from '@dxos/blueprints';
|
|
@@ -12,10 +14,11 @@ import {
|
|
|
12
14
|
createDataExtensions,
|
|
13
15
|
createMarkdownExtensions,
|
|
14
16
|
createThemeExtensions,
|
|
17
|
+
decorateMarkdown,
|
|
15
18
|
useTextEditor,
|
|
16
19
|
} from '@dxos/react-ui-editor';
|
|
17
20
|
import { mx } from '@dxos/react-ui-theme';
|
|
18
|
-
import {
|
|
21
|
+
import { isNonNullable } from '@dxos/util';
|
|
19
22
|
|
|
20
23
|
import { meta } from '../../meta';
|
|
21
24
|
|
|
@@ -46,11 +49,12 @@ export const TemplateEditor = ({ id, classNames, template }: TemplateEditorProps
|
|
|
46
49
|
placeholder: t('template placeholder'),
|
|
47
50
|
}),
|
|
48
51
|
createThemeExtensions({ themeMode }),
|
|
49
|
-
|
|
50
|
-
// Extend markdown with handlebars support.
|
|
51
52
|
createMarkdownExtensions(),
|
|
53
|
+
decorateMarkdown(), // TODO(burdon): Move into bundle.
|
|
54
|
+
xml(),
|
|
52
55
|
handlebars(),
|
|
53
|
-
|
|
56
|
+
syntaxHighlighting(defaultHighlightStyle),
|
|
57
|
+
].filter(isNonNullable),
|
|
54
58
|
};
|
|
55
59
|
}, [themeMode, template.source?.target]);
|
|
56
60
|
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta } from '@storybook/react-vite';
|
|
8
6
|
import React, { useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
11
9
|
import { useClient } from '@dxos/react-client';
|
|
12
10
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
|
-
import { withLayout, withTheme } from '@dxos/
|
|
11
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
12
|
import { trim } from '@dxos/util';
|
|
15
13
|
|
|
16
14
|
import { translations } from '../../translations';
|
|
@@ -52,13 +50,13 @@ const meta = {
|
|
|
52
50
|
component: TemplateForm,
|
|
53
51
|
render: DefaultStory,
|
|
54
52
|
decorators: [
|
|
53
|
+
withTheme,
|
|
54
|
+
withLayout({ container: 'column' }),
|
|
55
55
|
withClientProvider({
|
|
56
56
|
types: [Blueprint.Blueprint],
|
|
57
57
|
createIdentity: true,
|
|
58
58
|
createSpace: true,
|
|
59
59
|
}),
|
|
60
|
-
withLayout({ fullscreen: true, classNames: 'flex justify-center' }),
|
|
61
|
-
withTheme,
|
|
62
60
|
],
|
|
63
61
|
parameters: {
|
|
64
62
|
translations,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import type * as Tool from '@effect/ai/Tool';
|
|
6
6
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { type AgentStatus } from '@dxos/ai';
|
|
@@ -18,8 +18,7 @@ import {
|
|
|
18
18
|
} from '@dxos/react-ui-components';
|
|
19
19
|
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
20
20
|
import { type ContentBlock, type DataType } from '@dxos/schema';
|
|
21
|
-
import { isNonNullable } from '@dxos/util';
|
|
22
|
-
import { safeParseJson } from '@dxos/util';
|
|
21
|
+
import { isNonNullable, safeParseJson } from '@dxos/util';
|
|
23
22
|
|
|
24
23
|
import { meta } from '../../meta';
|
|
25
24
|
|
|
@@ -34,7 +33,7 @@ export type ToolBlockProps = {
|
|
|
34
33
|
export const ToolBlock = ({ blocks = [] }: ToolBlockProps) => {
|
|
35
34
|
const { t } = useTranslation(meta.id);
|
|
36
35
|
|
|
37
|
-
const getToolCaption = (tool?:
|
|
36
|
+
const getToolCaption = (tool?: Tool.Any, status?: AgentStatus) => {
|
|
38
37
|
if (!tool) {
|
|
39
38
|
return t('calling tool label');
|
|
40
39
|
}
|
|
@@ -43,9 +42,9 @@ export const ToolBlock = ({ blocks = [] }: ToolBlockProps) => {
|
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
const items = useMemo(() => {
|
|
46
|
-
let lastToolCall: { tool:
|
|
45
|
+
let lastToolCall: { tool: Tool.Any | undefined; block: ContentBlock.ToolCall } | undefined;
|
|
47
46
|
// TODO(burdon): Get from context?
|
|
48
|
-
const tools:
|
|
47
|
+
const tools: Tool.Any[] = []; //processor.conversation.toolkit?.tools ?? [];
|
|
49
48
|
return blocks
|
|
50
49
|
.filter((block) => block._tag === 'toolCall' || block._tag === 'toolResult' || block._tag === 'summary')
|
|
51
50
|
.map((block) => {
|
|
@@ -114,6 +113,7 @@ type ToolContainerParams = {
|
|
|
114
113
|
items: { title: string; content: any }[];
|
|
115
114
|
};
|
|
116
115
|
|
|
116
|
+
// TODO(burdon): Maintain scroll position when closing.
|
|
117
117
|
export const ToolContainer = ({ items }: ToolContainerParams) => {
|
|
118
118
|
const tabsRef = useRef<HTMLDivElement>(null);
|
|
119
119
|
const [selected, setSelected] = useState(0);
|
|
@@ -15,7 +15,7 @@ export const Toolbar = ({ chat, companionTo, onReset, classNames }: ThemedClassN
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<MenuProvider {...menu} attendableId={companionTo ? fullyQualifiedId(companionTo) : fullyQualifiedId(chat)}>
|
|
18
|
-
<ToolbarMenu classNames={classNames} />
|
|
18
|
+
<ToolbarMenu classNames={classNames} textBlockWidth />
|
|
19
19
|
</MenuProvider>
|
|
20
20
|
);
|
|
21
21
|
};
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -15,7 +13,7 @@ import { ClientPlugin } from '@dxos/plugin-client';
|
|
|
15
13
|
import { MapPlugin } from '@dxos/plugin-map';
|
|
16
14
|
import { SpacePlugin } from '@dxos/plugin-space';
|
|
17
15
|
import { TablePlugin } from '@dxos/plugin-table';
|
|
18
|
-
import {
|
|
16
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
19
17
|
|
|
20
18
|
import { translations } from '../../translations';
|
|
21
19
|
|
|
@@ -30,6 +28,7 @@ const meta = {
|
|
|
30
28
|
component: Toolbox as any,
|
|
31
29
|
render: DefaultStory,
|
|
32
30
|
decorators: [
|
|
31
|
+
withTheme,
|
|
33
32
|
withPluginManager({
|
|
34
33
|
plugins: [
|
|
35
34
|
ClientPlugin({
|
|
@@ -37,7 +36,7 @@ const meta = {
|
|
|
37
36
|
await client.halo.createIdentity();
|
|
38
37
|
},
|
|
39
38
|
}),
|
|
40
|
-
SpacePlugin(),
|
|
39
|
+
SpacePlugin({}),
|
|
41
40
|
SettingsPlugin(),
|
|
42
41
|
IntentPlugin(),
|
|
43
42
|
ChessPlugin(),
|
|
@@ -46,8 +45,6 @@ const meta = {
|
|
|
46
45
|
],
|
|
47
46
|
capabilities,
|
|
48
47
|
}),
|
|
49
|
-
withTheme,
|
|
50
|
-
withLayout(),
|
|
51
48
|
],
|
|
52
49
|
parameters: {
|
|
53
50
|
layout: 'centered',
|
package/src/components/index.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { lazy } from 'react';
|
|
6
6
|
|
|
7
7
|
export * from './AssistantSettings';
|
|
8
|
+
export * from './BlueprintSettings';
|
|
8
9
|
export * from './Chat';
|
|
9
10
|
export * from './ChatProgress';
|
|
10
|
-
export * from './PromptSettings';
|
|
11
11
|
export * from './TemplateEditor';
|
|
12
12
|
export * from './Toolbar';
|
|
13
13
|
export * from './Toolbox';
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
6
7
|
|
|
7
8
|
import { defineFunction } from '@dxos/functions';
|
|
8
9
|
import { log } from '@dxos/log';
|
|
9
10
|
|
|
10
11
|
export default defineFunction({
|
|
11
|
-
|
|
12
|
+
key: 'dxos.org/function/assistant-analysis',
|
|
13
|
+
name: 'Assistant analysis',
|
|
12
14
|
description: 'Enter analysis analysis mode.',
|
|
13
15
|
inputSchema: Schema.Struct({
|
|
14
16
|
enable: Schema.Boolean.annotations({ description: 'Enable or disable analysis mode.' }),
|
package/src/functions/list.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
6
7
|
|
|
7
8
|
import { Filter, Obj, Query } from '@dxos/echo';
|
|
8
9
|
import { DatabaseService, defineFunction } from '@dxos/functions';
|
|
@@ -10,7 +11,8 @@ import { trim } from '@dxos/util';
|
|
|
10
11
|
|
|
11
12
|
// TODO(burdon): Factor out to space plugin.
|
|
12
13
|
export default defineFunction({
|
|
13
|
-
|
|
14
|
+
key: 'dxos.org/function/assistant/list',
|
|
15
|
+
name: 'Assistant list',
|
|
14
16
|
description:
|
|
15
17
|
// TODO(wittjosiah): Find a better way to prompt for looking up typenames before querying with them.
|
|
16
18
|
trim`
|
package/src/functions/load.ts
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Function from 'effect/Function';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
import * as Schema from 'effect/Schema';
|
|
6
9
|
|
|
7
10
|
import { ArtifactId } from '@dxos/assistant';
|
|
8
11
|
import { Obj } from '@dxos/echo';
|
|
@@ -11,7 +14,8 @@ import { DatabaseService, defineFunction } from '@dxos/functions';
|
|
|
11
14
|
// TODO(burdon): Common error handling.
|
|
12
15
|
// TODO(burdon): Factor out to space plugin.
|
|
13
16
|
export default defineFunction({
|
|
14
|
-
|
|
17
|
+
key: 'dxos.org/function/assistant/load',
|
|
18
|
+
name: 'Assistant load',
|
|
15
19
|
description: 'Loads the object.',
|
|
16
20
|
inputSchema: Schema.Struct({
|
|
17
21
|
id: ArtifactId.annotations({
|
|
@@ -27,7 +31,7 @@ export default defineFunction({
|
|
|
27
31
|
}),
|
|
28
32
|
handler: Effect.fn(function* ({ data: { id, typename } }) {
|
|
29
33
|
const object = yield* DatabaseService.resolve(ArtifactId.toDXN(id));
|
|
30
|
-
return yield* pipe(
|
|
34
|
+
return yield* Function.pipe(
|
|
31
35
|
Option.fromNullable(object),
|
|
32
36
|
Option.flatMap((object) => (Obj.getTypename(object) === typename ? Option.some(object) : Option.none())),
|
|
33
37
|
Option.match({
|
package/src/hooks/index.ts
CHANGED
|
@@ -7,10 +7,8 @@ export * from './useChatProcessor';
|
|
|
7
7
|
export * from './useChatServices';
|
|
8
8
|
export * from './useContextBinder';
|
|
9
9
|
export * from './useContextObjects';
|
|
10
|
-
export * from './useExecutionGraph';
|
|
11
10
|
export * from './useFlush';
|
|
12
11
|
export * from './useItemTypes';
|
|
13
12
|
export * from './useOnline';
|
|
14
13
|
export * from './usePresets';
|
|
15
14
|
export * from './useReferencesProvider';
|
|
16
|
-
export * from './useComputeRuntimeCallback';
|