@dxos/plugin-assistant 0.8.4-main.c1de068 → 0.8.4-main.dedc0f3
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/{TemplateContainer-RPJ2LBOB.mjs → BlueprintContainer-BFNN6K46.mjs} +11 -9
- package/dist/lib/browser/BlueprintContainer-BFNN6K46.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-YYYCHZYV.mjs +126 -0
- package/dist/lib/browser/ChatCompanion-YYYCHZYV.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-M3IHQLRS.mjs → ChatContainer-G6YHR6GJ.mjs} +34 -13
- package/dist/lib/browser/ChatContainer-G6YHR6GJ.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-X6VN6QZI.mjs → ChatDialog-HJ7VDRQO.mjs} +28 -12
- package/dist/lib/browser/ChatDialog-HJ7VDRQO.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-TF5QNXYM.mjs} +5 -17
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +7 -0
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs +22 -0
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-JTXBKE7O.mjs → app-graph-builder-3C43MLCD.mjs} +26 -96
- package/dist/lib/browser/app-graph-builder-3C43MLCD.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-VHFSRTEJ.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-VHFSRTEJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-EZUSNS2J.mjs +19 -0
- package/dist/lib/browser/chunk-EZUSNS2J.mjs.map +7 -0
- package/dist/lib/browser/chunk-GLWD66TA.mjs +161 -0
- package/dist/lib/browser/chunk-GLWD66TA.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-O4LUJEDV.mjs +20 -0
- package/dist/lib/browser/{chunk-FDCJSQYF.mjs.map → chunk-O4LUJEDV.mjs.map} +2 -2
- package/dist/lib/browser/chunk-PL4O4ZJU.mjs +1974 -0
- package/dist/lib/browser/chunk-PL4O4ZJU.mjs.map +7 -0
- package/dist/lib/browser/chunk-PPJAIE2T.mjs +299 -0
- package/dist/lib/browser/chunk-PPJAIE2T.mjs.map +7 -0
- package/dist/lib/browser/chunk-PQI3MGDN.mjs +169 -0
- package/dist/lib/browser/chunk-PQI3MGDN.mjs.map +7 -0
- package/dist/lib/browser/chunk-R6LRGW3I.mjs +216 -0
- package/dist/lib/browser/chunk-R6LRGW3I.mjs.map +7 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs +202 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +7 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs +155 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs +22 -0
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +166 -68
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs +112 -0
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs +21 -0
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-WNLA2636.mjs +109 -0
- package/dist/lib/browser/react-surface-WNLA2636.mjs.map +7 -0
- package/dist/lib/browser/{settings-2DGP3UTS.mjs → settings-36V3VUMW.mjs} +6 -5
- package/dist/lib/{node-esm/settings-47RYZOU4.mjs.map → browser/settings-36V3VUMW.mjs.map} +1 -1
- package/dist/lib/browser/state-AINRYS5W.mjs +21 -0
- package/dist/lib/browser/state-AINRYS5W.mjs.map +7 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs +191 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{TemplateContainer-A3NAQCZE.mjs → BlueprintContainer-X4MRBKDR.mjs} +11 -9
- package/dist/lib/node-esm/BlueprintContainer-X4MRBKDR.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-PUAFRIEC.mjs +127 -0
- package/dist/lib/node-esm/ChatCompanion-PUAFRIEC.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-VZT74PO2.mjs → ChatContainer-EZZF7RSQ.mjs} +34 -13
- package/dist/lib/node-esm/ChatContainer-EZZF7RSQ.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-RJ6FDX4Q.mjs → ChatDialog-PTQLZNJU.mjs} +28 -12
- package/dist/lib/node-esm/ChatDialog-PTQLZNJU.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-UXOVZPZO.mjs} +5 -17
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs +23 -0
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-OWSOXFTD.mjs → app-graph-builder-NM3JDLQ2.mjs} +26 -96
- package/dist/lib/node-esm/app-graph-builder-NM3JDLQ2.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-4E6XTLVN.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-4E6XTLVN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs +170 -0
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs +203 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs +217 -0
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs +163 -0
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs +22 -0
- package/dist/lib/node-esm/{chunk-QN2H2EHV.mjs.map → chunk-VFY2JG62.mjs.map} +2 -2
- package/dist/lib/node-esm/chunk-VH3LTD76.mjs +300 -0
- package/dist/lib/node-esm/chunk-VH3LTD76.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs +20 -0
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZIDP7HBI.mjs +1975 -0
- package/dist/lib/node-esm/chunk-ZIDP7HBI.mjs.map +7 -0
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs +156 -0
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs +23 -0
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +166 -68
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs +22 -0
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-GP3LU6DX.mjs +110 -0
- package/dist/lib/node-esm/react-surface-GP3LU6DX.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-47RYZOU4.mjs → settings-7ZCZ6AS5.mjs} +6 -5
- package/dist/lib/{browser/settings-2DGP3UTS.mjs.map → node-esm/settings-7ZCZ6AS5.mjs.map} +1 -1
- package/dist/lib/node-esm/state-EQS5KP6M.mjs +22 -0
- package/dist/lib/node-esm/state-EQS5KP6M.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs +192 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +5 -0
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +7 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +32 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts +5 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +12 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +10 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +4 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +8 -0
- package/dist/types/src/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +20 -17
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +13 -0
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +4 -4
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +4 -5
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -7
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +115 -74
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts +40 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +36 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +261 -2
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +261 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +2 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +258 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +19 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +5 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/index.d.ts +2 -0
- package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +11 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +262 -4
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +21 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +2 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- package/dist/types/src/functions/analysis.d.ts +5 -0
- package/dist/types/src/functions/analysis.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +4 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/list.d.ts +10 -0
- package/dist/types/src/functions/list.d.ts.map +1 -0
- package/dist/types/src/functions/load.d.ts +8 -0
- package/dist/types/src/functions/load.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +9 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +24 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +8 -21
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -6
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +8 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useExecutionGraph.d.ts +6 -0
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useItemTypes.d.ts +4 -0
- package/dist/types/src/hooks/useItemTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +2 -2
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +73 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/stories/Chat.stories.d.ts +26 -245
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +4 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/DebugCard.d.ts +8 -0
- package/dist/types/src/stories/components/DebugCard.d.ts.map +1 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts +7 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts +4 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts +6 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts +4 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts +14 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +16 -0
- package/dist/types/src/stories/components/index.d.ts.map +1 -0
- package/dist/types/src/stories/components/types.d.ts +7 -0
- package/dist/types/src/stories/components/types.d.ts.map +1 -0
- package/dist/types/src/stories/testing/data.d.ts +9 -0
- package/dist/types/src/stories/testing/data.d.ts.map +1 -0
- package/dist/types/src/stories/testing/index.d.ts +3 -0
- package/dist/types/src/stories/testing/index.d.ts.map +1 -0
- package/dist/types/src/stories/testing/schema.d.ts +7 -0
- package/dist/types/src/stories/testing/schema.d.ts.map +1 -0
- package/dist/types/src/stories/testing/testing.d.ts +48 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +14 -0
- package/dist/types/src/testing/test-data.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +5 -2
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +7 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +29 -22
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +42 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +107 -0
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +2 -0
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +6 -3
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +106 -82
- package/src/AssistantPlugin.tsx +82 -12
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +43 -134
- package/src/capabilities/blueprint-definition.ts +58 -0
- package/src/capabilities/capabilities.ts +71 -0
- package/src/capabilities/compute-runtime.ts +124 -0
- package/src/capabilities/edge-model-resolver.ts +27 -0
- package/src/capabilities/index.ts +10 -0
- package/src/capabilities/intent-resolver.ts +50 -14
- package/src/capabilities/local-model-resolver.ts +32 -0
- package/src/capabilities/react-surface.tsx +17 -64
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +163 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
- package/src/components/BlueprintContainer.tsx +24 -0
- package/src/components/Chat/Chat.tsx +175 -174
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatCompanion.tsx +111 -0
- package/src/components/ChatContainer.tsx +19 -13
- package/src/components/ChatDialog.tsx +18 -14
- package/src/components/ChatProgress/ChatProgress.tsx +68 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -24
- package/src/components/ChatPrompt/ChatOptions.tsx +233 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +31 -36
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +97 -110
- package/src/components/ChatThread/ChatThread.tsx +65 -29
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/ChatThread/registry.tsx +189 -0
- package/src/components/ChatThread/sync.test.ts +81 -0
- package/src/components/ChatThread/sync.ts +113 -0
- package/src/components/PromptSettings.tsx +1 -0
- package/src/components/SequenceContainer.tsx +27 -28
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +5 -4
- package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +27 -14
- package/src/components/TemplateEditor/TemplateEditor.tsx +20 -51
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +15 -8
- package/src/components/TemplateEditor/TemplateForm.tsx +6 -3
- package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
- package/src/components/ToolBlock/ToolBlock.tsx +152 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbar/Toolbar.tsx +21 -0
- package/src/components/Toolbar/index.ts +5 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +10 -16
- package/src/components/Toolbox/Toolbox.tsx +21 -51
- package/src/components/index.ts +4 -5
- package/src/events.ts +2 -2
- package/src/execution-graph/execution-graph.ts +211 -0
- package/src/execution-graph/index.ts +5 -0
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +46 -0
- package/src/functions/load.ts +42 -0
- package/src/hooks/index.ts +9 -4
- package/src/hooks/useBlueprintRegistry.ts +80 -0
- package/src/hooks/useChatProcessor.ts +21 -98
- package/src/hooks/useChatServices.ts +28 -71
- package/src/hooks/useComputeRuntimeCallback.ts +25 -0
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useExecutionGraph.ts +20 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useItemTypes.ts +37 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/meta.ts +1 -1
- package/src/processor/index.ts +6 -0
- package/src/{hooks → processor}/presets.ts +14 -6
- package/src/processor/processor.test.ts +77 -0
- package/src/processor/processor.ts +302 -0
- package/src/queue-logger.ts +10 -10
- package/src/stories/Chat.stories.tsx +594 -315
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +74 -0
- package/src/stories/components/ChessContainer.tsx +17 -0
- package/src/stories/components/CommentsContainer.tsx +25 -0
- package/src/stories/components/DebugCard.tsx +61 -0
- package/src/stories/components/GraphContainer.tsx +119 -0
- package/src/stories/components/InvocationsContainer.tsx +17 -0
- package/src/stories/components/LoggingContainer.tsx +33 -0
- package/src/stories/components/MessageContainer.tsx +22 -0
- package/src/stories/components/PromptContainer.tsx +52 -0
- package/src/stories/components/ResearchInputStack.tsx +30 -0
- package/src/stories/components/ResearchOutputStack.tsx +29 -0
- package/src/stories/components/TasksContainer.tsx +49 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/TriggersContainer.tsx +75 -0
- package/src/stories/components/index.ts +20 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/testing/data.ts +142 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/schema.ts +17 -0
- package/src/stories/testing/testing.tsx +279 -0
- package/src/testing/index.ts +3 -1
- package/src/testing/test-data.ts +245 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-generator.ts +257 -0
- package/src/testing/test-sequence.ts +2 -27
- package/src/translations.ts +32 -22
- package/src/types/Assistant.ts +61 -0
- package/src/types/AssistantAction.ts +62 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -1
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEAEKWOC.mjs +0 -98
- package/dist/lib/browser/chunk-AEAEKWOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs +0 -108
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-JQBVLTM5.mjs +0 -158
- package/dist/lib/browser/chunk-JQBVLTM5.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWY4CUQY.mjs +0 -2245
- package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs +0 -60
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-66VY37YQ.mjs +0 -150
- package/dist/lib/browser/react-surface-66VY37YQ.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs +0 -99
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs +0 -159
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs +0 -109
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs +0 -2246
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs +0 -61
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs +0 -151
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs.map +0 -7
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -8
- package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.d.ts +0 -86
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/presets.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -88
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatThread/ChatMessage.tsx +0 -268
- package/src/components/ChatThread/ToolBlock.tsx +0 -121
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/components/TemplateContainer.tsx +0 -24
- package/src/hooks/chat-processor.test.ts +0 -16
- package/src/hooks/chat-processor.ts +0 -314
- package/src/hooks/useBlueprints.ts +0 -57
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/shims.d.ts +0 -8
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/schema.ts +0 -95
- package/src/typings.d.ts +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-assistant",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.dedc0f3",
|
|
4
4
|
"description": "Assistant plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
16
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
17
|
},
|
|
17
18
|
"./types": {
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
18
20
|
"types": "./dist/types/src/types/index.d.ts",
|
|
19
21
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
20
22
|
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
@@ -34,105 +36,127 @@
|
|
|
34
36
|
"src"
|
|
35
37
|
],
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@codemirror/autocomplete": "^6.18.
|
|
38
|
-
"@codemirror/language": "^6.
|
|
39
|
-
"@codemirror/search": "^6.5.
|
|
40
|
-
"@codemirror/state": "^6.
|
|
41
|
-
"@codemirror/view": "^6.
|
|
42
|
-
"@effect/ai": "0.
|
|
39
|
+
"@codemirror/autocomplete": "^6.18.7",
|
|
40
|
+
"@codemirror/language": "^6.11.3",
|
|
41
|
+
"@codemirror/search": "^6.5.11",
|
|
42
|
+
"@codemirror/state": "^6.5.2",
|
|
43
|
+
"@codemirror/view": "^6.38.2",
|
|
44
|
+
"@effect/ai": "0.25.2",
|
|
45
|
+
"@effect/ai-anthropic": "^0.16.1",
|
|
46
|
+
"@effect/ai-openai": "^0.29.1",
|
|
47
|
+
"@effect/platform-browser": "0.70.0",
|
|
43
48
|
"@lezer/highlight": "^1.2.1",
|
|
49
|
+
"@lezer/markdown": "^1.3.1",
|
|
44
50
|
"@preact-signals/safe-react": "^0.9.0",
|
|
45
51
|
"@preact/signals-core": "^1.9.0",
|
|
46
52
|
"@preact/signals-react": "^3.2.0",
|
|
47
53
|
"@radix-ui/react-context": "1.1.1",
|
|
48
|
-
"
|
|
49
|
-
"effect": "3.17.0",
|
|
54
|
+
"effect": "3.17.7",
|
|
50
55
|
"exa-js": "^1.5.12",
|
|
51
56
|
"json5": "^2.2.3",
|
|
52
57
|
"jsonpointer": "^5.0.1",
|
|
53
58
|
"lodash.defaultsdeep": "^4.6.1",
|
|
54
59
|
"unified": "^11.0.0",
|
|
55
60
|
"use-deep-compare-effect": "^1.8.1",
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/assistant": "0.8.4-main.
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
69
|
-
"@dxos/echo-
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/keys": "0.8.4-main.
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/plugin-
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/plugin-
|
|
87
|
-
"@dxos/plugin-
|
|
88
|
-
"@dxos/plugin-
|
|
89
|
-
"@dxos/plugin-
|
|
90
|
-
"@dxos/plugin-
|
|
91
|
-
"@dxos/plugin-
|
|
92
|
-
"@dxos/plugin-
|
|
93
|
-
"@dxos/plugin-
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/react-
|
|
98
|
-
"@dxos/react-
|
|
99
|
-
"@dxos/react-ui-
|
|
100
|
-
"@dxos/react-ui-canvas-compute": "0.8.4-main.
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/react-ui-
|
|
103
|
-
"@dxos/react-ui-
|
|
104
|
-
"@dxos/react-ui-
|
|
105
|
-
"@dxos/react-ui-
|
|
106
|
-
"@dxos/react-ui-
|
|
107
|
-
"@dxos/react-ui-
|
|
108
|
-
"@dxos/react-ui-
|
|
109
|
-
"@dxos/react-ui-
|
|
110
|
-
"@dxos/
|
|
111
|
-
"@dxos/
|
|
61
|
+
"@dxos/app-framework": "0.8.4-main.dedc0f3",
|
|
62
|
+
"@dxos/ai": "0.8.4-main.dedc0f3",
|
|
63
|
+
"@dxos/assistant": "0.8.4-main.dedc0f3",
|
|
64
|
+
"@dxos/assistant-testing": "0.8.4-main.dedc0f3",
|
|
65
|
+
"@dxos/async": "0.8.4-main.dedc0f3",
|
|
66
|
+
"@dxos/client": "0.8.4-main.dedc0f3",
|
|
67
|
+
"@dxos/blueprints": "0.8.4-main.dedc0f3",
|
|
68
|
+
"@dxos/compute": "0.8.4-main.dedc0f3",
|
|
69
|
+
"@dxos/config": "0.8.4-main.dedc0f3",
|
|
70
|
+
"@dxos/conductor": "0.8.4-main.dedc0f3",
|
|
71
|
+
"@dxos/devtools": "0.8.4-main.dedc0f3",
|
|
72
|
+
"@dxos/echo": "0.8.4-main.dedc0f3",
|
|
73
|
+
"@dxos/echo-db": "0.8.4-main.dedc0f3",
|
|
74
|
+
"@dxos/echo-schema": "0.8.4-main.dedc0f3",
|
|
75
|
+
"@dxos/edge-client": "0.8.4-main.dedc0f3",
|
|
76
|
+
"@dxos/effect": "0.8.4-main.dedc0f3",
|
|
77
|
+
"@dxos/echo-protocol": "0.8.4-main.dedc0f3",
|
|
78
|
+
"@dxos/functions": "0.8.4-main.dedc0f3",
|
|
79
|
+
"@dxos/graph": "0.8.4-main.dedc0f3",
|
|
80
|
+
"@dxos/invariant": "0.8.4-main.dedc0f3",
|
|
81
|
+
"@dxos/keys": "0.8.4-main.dedc0f3",
|
|
82
|
+
"@dxos/context": "0.8.4-main.dedc0f3",
|
|
83
|
+
"@dxos/lit-ui": "0.8.4-main.dedc0f3",
|
|
84
|
+
"@dxos/debug": "0.8.4-main.dedc0f3",
|
|
85
|
+
"@dxos/local-storage": "0.8.4-main.dedc0f3",
|
|
86
|
+
"@dxos/log": "0.8.4-main.dedc0f3",
|
|
87
|
+
"@dxos/plugin-attention": "0.8.4-main.dedc0f3",
|
|
88
|
+
"@dxos/plugin-board": "0.8.4-main.dedc0f3",
|
|
89
|
+
"@dxos/plugin-client": "0.8.4-main.dedc0f3",
|
|
90
|
+
"@dxos/live-object": "0.8.4-main.dedc0f3",
|
|
91
|
+
"@dxos/plugin-deck": "0.8.4-main.dedc0f3",
|
|
92
|
+
"@dxos/plugin-graph": "0.8.4-main.dedc0f3",
|
|
93
|
+
"@dxos/plugin-markdown": "0.8.4-main.dedc0f3",
|
|
94
|
+
"@dxos/plugin-preview": "0.8.4-main.dedc0f3",
|
|
95
|
+
"@dxos/plugin-script": "0.8.4-main.dedc0f3",
|
|
96
|
+
"@dxos/plugin-explorer": "0.8.4-main.dedc0f3",
|
|
97
|
+
"@dxos/plugin-sketch": "0.8.4-main.dedc0f3",
|
|
98
|
+
"@dxos/plugin-stack": "0.8.4-main.dedc0f3",
|
|
99
|
+
"@dxos/plugin-wnfs": "0.8.4-main.dedc0f3",
|
|
100
|
+
"@dxos/plugin-transcription": "0.8.4-main.dedc0f3",
|
|
101
|
+
"@dxos/protocols": "0.8.4-main.dedc0f3",
|
|
102
|
+
"@dxos/react-client": "0.8.4-main.dedc0f3",
|
|
103
|
+
"@dxos/react-edge-client": "0.8.4-main.dedc0f3",
|
|
104
|
+
"@dxos/react-ui-attention": "0.8.4-main.dedc0f3",
|
|
105
|
+
"@dxos/react-ui-canvas-compute": "0.8.4-main.dedc0f3",
|
|
106
|
+
"@dxos/plugin-space": "0.8.4-main.dedc0f3",
|
|
107
|
+
"@dxos/react-ui-chat": "0.8.4-main.dedc0f3",
|
|
108
|
+
"@dxos/react-ui-canvas-editor": "0.8.4-main.dedc0f3",
|
|
109
|
+
"@dxos/react-ui-components": "0.8.4-main.dedc0f3",
|
|
110
|
+
"@dxos/react-ui-graph": "0.8.4-main.dedc0f3",
|
|
111
|
+
"@dxos/react-ui-editor": "0.8.4-main.dedc0f3",
|
|
112
|
+
"@dxos/react-ui-form": "0.8.4-main.dedc0f3",
|
|
113
|
+
"@dxos/react-ui-list": "0.8.4-main.dedc0f3",
|
|
114
|
+
"@dxos/react-ui-menu": "0.8.4-main.dedc0f3",
|
|
115
|
+
"@dxos/react-ui-sfx": "0.8.4-main.dedc0f3",
|
|
116
|
+
"@dxos/react-ui-searchlist": "0.8.4-main.dedc0f3",
|
|
117
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.dedc0f3",
|
|
118
|
+
"@dxos/react-ui-stack": "0.8.4-main.dedc0f3",
|
|
119
|
+
"@dxos/util": "0.8.4-main.dedc0f3",
|
|
120
|
+
"@dxos/react-ui-tag-picker": "0.8.4-main.dedc0f3",
|
|
121
|
+
"@dxos/react-ui-tabs": "0.8.4-main.dedc0f3",
|
|
122
|
+
"@dxos/schema": "0.8.4-main.dedc0f3"
|
|
112
123
|
},
|
|
113
124
|
"devDependencies": {
|
|
114
125
|
"@effect-rx/rx-react": "^0.38.0",
|
|
115
|
-
"@effect/platform": "0.
|
|
126
|
+
"@effect/platform": "0.90.2",
|
|
116
127
|
"@types/lodash.defaultsdeep": "^4.6.6",
|
|
117
128
|
"@types/react": "~18.2.0",
|
|
118
129
|
"@types/react-dom": "~18.2.0",
|
|
119
|
-
"effect": "3.17.
|
|
130
|
+
"effect": "3.17.7",
|
|
120
131
|
"openapi-types": "^12.1.3",
|
|
121
132
|
"react": "~18.2.0",
|
|
122
133
|
"react-dom": "~18.2.0",
|
|
123
|
-
"vite": "
|
|
124
|
-
"@dxos/
|
|
125
|
-
"@dxos/
|
|
126
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
127
|
-
"@dxos/plugin-
|
|
128
|
-
"@dxos/plugin-
|
|
129
|
-
"@dxos/plugin-
|
|
130
|
-
"@dxos/
|
|
131
|
-
"@dxos/
|
|
132
|
-
"@dxos/plugin-
|
|
133
|
-
"@dxos/
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/
|
|
134
|
+
"vite": "7.1.1",
|
|
135
|
+
"@dxos/devtools": "0.8.4-main.dedc0f3",
|
|
136
|
+
"@dxos/assistant-testing": "0.8.4-main.dedc0f3",
|
|
137
|
+
"@dxos/echo-db": "0.8.4-main.dedc0f3",
|
|
138
|
+
"@dxos/plugin-automation": "0.8.4-main.dedc0f3",
|
|
139
|
+
"@dxos/plugin-chess": "0.8.4-main.dedc0f3",
|
|
140
|
+
"@dxos/plugin-inbox": "0.8.4-main.dedc0f3",
|
|
141
|
+
"@dxos/plugin-markdown": "0.8.4-main.dedc0f3",
|
|
142
|
+
"@dxos/plugin-map": "0.8.4-main.dedc0f3",
|
|
143
|
+
"@dxos/plugin-script": "0.8.4-main.dedc0f3",
|
|
144
|
+
"@dxos/plugin-sketch": "0.8.4-main.dedc0f3",
|
|
145
|
+
"@dxos/plugin-stack": "0.8.4-main.dedc0f3",
|
|
146
|
+
"@dxos/plugin-table": "0.8.4-main.dedc0f3",
|
|
147
|
+
"@dxos/plugin-theme": "0.8.4-main.dedc0f3",
|
|
148
|
+
"@dxos/plugin-preview": "0.8.4-main.dedc0f3",
|
|
149
|
+
"@dxos/plugin-thread": "0.8.4-main.dedc0f3",
|
|
150
|
+
"@dxos/plugin-token-manager": "0.8.4-main.dedc0f3",
|
|
151
|
+
"@dxos/plugin-wnfs": "0.8.4-main.dedc0f3",
|
|
152
|
+
"@dxos/random": "0.8.4-main.dedc0f3",
|
|
153
|
+
"@dxos/react-ui": "0.8.4-main.dedc0f3",
|
|
154
|
+
"@dxos/react-ui-table": "0.8.4-main.dedc0f3",
|
|
155
|
+
"@dxos/react-ui-menu": "0.8.4-main.dedc0f3",
|
|
156
|
+
"@dxos/plugin-board": "0.8.4-main.dedc0f3",
|
|
157
|
+
"@dxos/plugin-attention": "0.8.4-main.dedc0f3",
|
|
158
|
+
"@dxos/react-ui-theme": "0.8.4-main.dedc0f3",
|
|
159
|
+
"@dxos/storybook-utils": "0.8.4-main.dedc0f3"
|
|
136
160
|
},
|
|
137
161
|
"peerDependencies": {
|
|
138
162
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -140,8 +164,8 @@
|
|
|
140
164
|
"effect": "^3.13.3",
|
|
141
165
|
"react": "~18.2.0",
|
|
142
166
|
"react-dom": "~18.2.0",
|
|
143
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
144
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
167
|
+
"@dxos/react-ui": "0.8.4-main.dedc0f3",
|
|
168
|
+
"@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
|
|
145
169
|
},
|
|
146
170
|
"publishConfig": {
|
|
147
171
|
"access": "public"
|
package/src/AssistantPlugin.tsx
CHANGED
|
@@ -3,17 +3,31 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { ResearchGraph } from '@dxos/assistant-testing';
|
|
7
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
7
8
|
import { Sequence } from '@dxos/conductor';
|
|
8
9
|
import { Type } from '@dxos/echo';
|
|
9
10
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
10
11
|
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
11
12
|
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
12
13
|
|
|
13
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
AiService,
|
|
16
|
+
AppGraphBuilder,
|
|
17
|
+
AssistantState,
|
|
18
|
+
BlueprintDefinition,
|
|
19
|
+
ComputeRuntime,
|
|
20
|
+
EdgeModelResolver,
|
|
21
|
+
IntentResolver,
|
|
22
|
+
LocalModelResolver,
|
|
23
|
+
ReactSurface,
|
|
24
|
+
Settings,
|
|
25
|
+
Toolkit,
|
|
26
|
+
} from './capabilities';
|
|
27
|
+
import { AssistantEvents } from './events';
|
|
14
28
|
import { meta } from './meta';
|
|
15
29
|
import { translations } from './translations';
|
|
16
|
-
import { Assistant, ServiceType } from './types';
|
|
30
|
+
import { Assistant, AssistantAction, ServiceType } from './types';
|
|
17
31
|
|
|
18
32
|
export const AssistantPlugin = () =>
|
|
19
33
|
definePlugin(meta, [
|
|
@@ -27,20 +41,34 @@ export const AssistantPlugin = () =>
|
|
|
27
41
|
activatesOn: Events.SetupSettings,
|
|
28
42
|
activate: Settings,
|
|
29
43
|
}),
|
|
44
|
+
defineModule({
|
|
45
|
+
id: `${meta.id}/module/state`,
|
|
46
|
+
// TODO(wittjosiah): Does not integrate with settings store.
|
|
47
|
+
// Should this be a different event?
|
|
48
|
+
// Should settings store be renamed to be more generic?
|
|
49
|
+
activatesOn: Events.SetupSettings,
|
|
50
|
+
activate: AssistantState,
|
|
51
|
+
}),
|
|
30
52
|
defineModule({
|
|
31
53
|
id: `${meta.id}/module/metadata`,
|
|
32
54
|
activatesOn: Events.SetupMetadata,
|
|
33
55
|
activate: () => [
|
|
34
56
|
contributes(Capabilities.Metadata, {
|
|
35
|
-
id: Type.getTypename(
|
|
57
|
+
id: Type.getTypename(Assistant.Chat),
|
|
36
58
|
metadata: {
|
|
37
|
-
icon: 'ph--
|
|
59
|
+
icon: 'ph--atom--regular',
|
|
38
60
|
},
|
|
39
61
|
}),
|
|
40
62
|
contributes(Capabilities.Metadata, {
|
|
41
|
-
id: Type.getTypename(
|
|
63
|
+
id: Type.getTypename(Blueprint.Blueprint),
|
|
42
64
|
metadata: {
|
|
43
|
-
icon: 'ph--
|
|
65
|
+
icon: 'ph--blueprint--regular',
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
68
|
+
contributes(Capabilities.Metadata, {
|
|
69
|
+
id: Type.getTypename(Sequence),
|
|
70
|
+
metadata: {
|
|
71
|
+
icon: 'ph--circuitry--regular',
|
|
44
72
|
},
|
|
45
73
|
}),
|
|
46
74
|
],
|
|
@@ -53,14 +81,22 @@ export const AssistantPlugin = () =>
|
|
|
53
81
|
SpaceCapabilities.ObjectForm,
|
|
54
82
|
defineObjectForm({
|
|
55
83
|
objectSchema: Assistant.Chat,
|
|
56
|
-
getIntent: (_, options) => createIntent(
|
|
84
|
+
getIntent: (_, options) => createIntent(AssistantAction.CreateChat, { space: options.space }),
|
|
85
|
+
}),
|
|
86
|
+
),
|
|
87
|
+
contributes(
|
|
88
|
+
SpaceCapabilities.ObjectForm,
|
|
89
|
+
defineObjectForm({
|
|
90
|
+
objectSchema: Blueprint.Blueprint,
|
|
91
|
+
formSchema: AssistantAction.BlueprintForm,
|
|
92
|
+
getIntent: (props) => createIntent(AssistantAction.CreateBlueprint, props),
|
|
57
93
|
}),
|
|
58
94
|
),
|
|
59
95
|
contributes(
|
|
60
96
|
SpaceCapabilities.ObjectForm,
|
|
61
97
|
defineObjectForm({
|
|
62
98
|
objectSchema: Sequence,
|
|
63
|
-
getIntent: () => createIntent(
|
|
99
|
+
getIntent: () => createIntent(AssistantAction.CreateSequence),
|
|
64
100
|
}),
|
|
65
101
|
),
|
|
66
102
|
],
|
|
@@ -68,14 +104,14 @@ export const AssistantPlugin = () =>
|
|
|
68
104
|
defineModule({
|
|
69
105
|
id: `${meta.id}/module/schema`,
|
|
70
106
|
activatesOn: ClientEvents.SetupSchema,
|
|
71
|
-
activate: () => contributes(ClientCapabilities.Schema, [ServiceType,
|
|
107
|
+
activate: () => contributes(ClientCapabilities.Schema, [ServiceType, Assistant.CompanionTo, ResearchGraph]),
|
|
72
108
|
}),
|
|
73
109
|
defineModule({
|
|
74
110
|
id: `${meta.id}/module/on-space-created`,
|
|
75
111
|
activatesOn: SpaceEvents.SpaceCreated,
|
|
76
112
|
activate: () =>
|
|
77
|
-
contributes(SpaceCapabilities.OnSpaceCreated, ({
|
|
78
|
-
createIntent(
|
|
113
|
+
contributes(SpaceCapabilities.OnSpaceCreated, ({ rootCollection, space }) =>
|
|
114
|
+
createIntent(AssistantAction.OnSpaceCreated, { rootCollection, space }),
|
|
79
115
|
),
|
|
80
116
|
}),
|
|
81
117
|
defineModule({
|
|
@@ -95,4 +131,38 @@ export const AssistantPlugin = () =>
|
|
|
95
131
|
activatesBefore: [Events.SetupArtifactDefinition],
|
|
96
132
|
activate: ReactSurface,
|
|
97
133
|
}),
|
|
134
|
+
defineModule({
|
|
135
|
+
id: `${meta.id}/module/edge-model-resolver`,
|
|
136
|
+
activatesOn: AssistantEvents.SetupAiServiceProviders,
|
|
137
|
+
activate: EdgeModelResolver,
|
|
138
|
+
}),
|
|
139
|
+
defineModule({
|
|
140
|
+
id: `${meta.id}/module/local-model-resolver`,
|
|
141
|
+
activatesOn: AssistantEvents.SetupAiServiceProviders,
|
|
142
|
+
activate: LocalModelResolver,
|
|
143
|
+
}),
|
|
144
|
+
defineModule({
|
|
145
|
+
id: `${meta.id}/module/ai-service`,
|
|
146
|
+
activatesBefore: [AssistantEvents.SetupAiServiceProviders],
|
|
147
|
+
// TODO(dmaretskyi): This should activate lazily when the AI chat is used.
|
|
148
|
+
activatesOn: Events.Startup,
|
|
149
|
+
activate: AiService,
|
|
150
|
+
}),
|
|
151
|
+
defineModule({
|
|
152
|
+
id: `${meta.id}/module/blueprint`,
|
|
153
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
154
|
+
activate: BlueprintDefinition,
|
|
155
|
+
}),
|
|
156
|
+
defineModule({
|
|
157
|
+
id: `${meta.id}/module/toolkit`,
|
|
158
|
+
// TODO(wittjosiah): Use a different event.
|
|
159
|
+
activatesOn: Events.Startup,
|
|
160
|
+
activate: Toolkit,
|
|
161
|
+
}),
|
|
162
|
+
defineModule({
|
|
163
|
+
id: `${meta.id}/module/compute-runtime`,
|
|
164
|
+
// TODO(wittjosiah): Use a different event.
|
|
165
|
+
activatesOn: Events.Startup,
|
|
166
|
+
activate: ComputeRuntime,
|
|
167
|
+
}),
|
|
98
168
|
]);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Effect, Layer } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { AiServiceRouter } from '@dxos/ai';
|
|
8
|
+
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
9
|
+
|
|
10
|
+
import { AssistantCapabilities } from './capabilities';
|
|
11
|
+
|
|
12
|
+
export default (context: PluginContext) => {
|
|
13
|
+
const resolvers = context.getCapabilities(AssistantCapabilities.AiModelResolver);
|
|
14
|
+
|
|
15
|
+
// TODO(dmaretskyi): Extract function to reduce them.
|
|
16
|
+
const combinedLayer = resolvers.reduce(
|
|
17
|
+
(acc, resolver) => resolver.pipe(Layer.provide(acc)),
|
|
18
|
+
AiServiceRouter.AiModelResolver.fromModelMap(Effect.succeed({})), // Empty resolver as fallback.
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
return [
|
|
22
|
+
// TODO(dmaretskyi): Read config from settings.
|
|
23
|
+
contributes(
|
|
24
|
+
AssistantCapabilities.AiServiceLayer,
|
|
25
|
+
AiServiceRouter.AiModelResolver.buildAiService.pipe(Layer.provide(combinedLayer)),
|
|
26
|
+
),
|
|
27
|
+
];
|
|
28
|
+
};
|
|
@@ -7,33 +7,26 @@ import { Option, pipe } from 'effect';
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
Capabilities,
|
|
10
|
-
contributes,
|
|
11
|
-
createIntent,
|
|
12
10
|
LayoutAction,
|
|
13
|
-
type PromiseIntentDispatcher,
|
|
14
11
|
type PluginContext,
|
|
12
|
+
type PromiseIntentDispatcher,
|
|
13
|
+
contributes,
|
|
14
|
+
createIntent,
|
|
15
15
|
} from '@dxos/app-framework';
|
|
16
|
-
import { Template } from '@dxos/blueprints';
|
|
17
16
|
import { Sequence } from '@dxos/conductor';
|
|
18
17
|
import { Obj } from '@dxos/echo';
|
|
19
18
|
import { invariant } from '@dxos/invariant';
|
|
20
19
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
21
|
-
import {
|
|
22
|
-
import { createExtension,
|
|
23
|
-
import { getActiveSpace
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
type Space,
|
|
27
|
-
Filter,
|
|
28
|
-
Query,
|
|
29
|
-
type QueryResult,
|
|
30
|
-
fullyQualifiedId,
|
|
31
|
-
getSpace,
|
|
32
|
-
isSpace,
|
|
33
|
-
} from '@dxos/react-client/echo';
|
|
20
|
+
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
21
|
+
import { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';
|
|
22
|
+
import { getActiveSpace } from '@dxos/plugin-space';
|
|
23
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
24
|
+
import { Query, type Space, fullyQualifiedId } from '@dxos/react-client/echo';
|
|
34
25
|
|
|
35
26
|
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
36
|
-
import { Assistant } from '../types';
|
|
27
|
+
import { Assistant, AssistantAction } from '../types';
|
|
28
|
+
|
|
29
|
+
import { AssistantCapabilities } from './capabilities';
|
|
37
30
|
|
|
38
31
|
export default (context: PluginContext) =>
|
|
39
32
|
contributes(Capabilities.AppGraphBuilder, [
|
|
@@ -88,44 +81,36 @@ export default (context: PluginContext) =>
|
|
|
88
81
|
}),
|
|
89
82
|
|
|
90
83
|
createExtension({
|
|
91
|
-
id: `${meta.id}/
|
|
84
|
+
id: `${meta.id}/companion-chat`,
|
|
92
85
|
connector: (node) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
label: ['assistant chat label', { ns: meta.id }],
|
|
122
|
-
icon: 'ph--sparkle--regular',
|
|
123
|
-
position: 'hoist',
|
|
124
|
-
disposition: 'hidden',
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
];
|
|
128
|
-
});
|
|
86
|
+
return Rx.make((get) =>
|
|
87
|
+
pipe(
|
|
88
|
+
get(node),
|
|
89
|
+
Option.flatMap((node) => (Obj.isObject(node.data) ? Option.some(node.data) : Option.none())),
|
|
90
|
+
Option.map((object) => {
|
|
91
|
+
const currentChat = get(
|
|
92
|
+
rxFromSignal(
|
|
93
|
+
() => context.getCapability(AssistantCapabilities.State).currentChat[fullyQualifiedId(object)],
|
|
94
|
+
),
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
return [
|
|
98
|
+
{
|
|
99
|
+
id: [fullyQualifiedId(object), 'assistant-chat'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
100
|
+
type: PLANK_COMPANION_TYPE,
|
|
101
|
+
data: currentChat ?? 'assistant-chat',
|
|
102
|
+
properties: {
|
|
103
|
+
label: ['assistant chat label', { ns: meta.id }],
|
|
104
|
+
icon: 'ph--sparkle--regular',
|
|
105
|
+
position: 'hoist',
|
|
106
|
+
disposition: 'hidden',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
}),
|
|
111
|
+
Option.getOrElse(() => []),
|
|
112
|
+
),
|
|
113
|
+
);
|
|
129
114
|
},
|
|
130
115
|
}),
|
|
131
116
|
|
|
@@ -152,81 +137,6 @@ export default (context: PluginContext) =>
|
|
|
152
137
|
),
|
|
153
138
|
),
|
|
154
139
|
}),
|
|
155
|
-
|
|
156
|
-
createExtension({
|
|
157
|
-
id: `${meta.id}/root`,
|
|
158
|
-
connector: (node) => {
|
|
159
|
-
let query: QueryResult<Template.Template> | undefined;
|
|
160
|
-
return Rx.make((get) =>
|
|
161
|
-
pipe(
|
|
162
|
-
get(node),
|
|
163
|
-
Option.flatMap((node) =>
|
|
164
|
-
node.type === SPACE_TYPE && isSpace(node.data) ? Option.some(node.data) : Option.none(),
|
|
165
|
-
),
|
|
166
|
-
Option.map((space) => {
|
|
167
|
-
if (!query) {
|
|
168
|
-
query = space.db.query(Query.type(Template.Template));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const templates = get(rxFromQuery(query));
|
|
172
|
-
return templates.length > 0
|
|
173
|
-
? [
|
|
174
|
-
{
|
|
175
|
-
id: `${meta.id}/templates`,
|
|
176
|
-
type: `${meta.id}/templates`,
|
|
177
|
-
data: null,
|
|
178
|
-
properties: {
|
|
179
|
-
label: ['templates label', { ns: meta.id }],
|
|
180
|
-
icon: 'ph--file-code--regular',
|
|
181
|
-
space,
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
]
|
|
185
|
-
: [];
|
|
186
|
-
}),
|
|
187
|
-
Option.getOrElse(() => []),
|
|
188
|
-
),
|
|
189
|
-
);
|
|
190
|
-
},
|
|
191
|
-
}),
|
|
192
|
-
|
|
193
|
-
createExtension({
|
|
194
|
-
id: `${meta.id}/templates`,
|
|
195
|
-
connector: (node) => {
|
|
196
|
-
let query: QueryResult<Template.Template> | undefined;
|
|
197
|
-
return Rx.make((get) =>
|
|
198
|
-
pipe(
|
|
199
|
-
get(node),
|
|
200
|
-
Option.flatMap((node) =>
|
|
201
|
-
node.id === `${meta.id}/templates` && isSpace(node.properties.space)
|
|
202
|
-
? Option.some(node.properties.space)
|
|
203
|
-
: Option.none(),
|
|
204
|
-
),
|
|
205
|
-
Option.map((space) => {
|
|
206
|
-
if (!query) {
|
|
207
|
-
query = space.db.query(Query.type(Template.Template));
|
|
208
|
-
}
|
|
209
|
-
return get(rxFromQuery(query))
|
|
210
|
-
.toSorted((a, b) => {
|
|
211
|
-
const nameA = a.name ?? '';
|
|
212
|
-
const nameB = b.name ?? '';
|
|
213
|
-
return nameA.localeCompare(nameB);
|
|
214
|
-
})
|
|
215
|
-
.map((template) => ({
|
|
216
|
-
id: fullyQualifiedId(template),
|
|
217
|
-
type: `${meta.id}/template`,
|
|
218
|
-
data: template,
|
|
219
|
-
properties: {
|
|
220
|
-
label: template.name ?? ['object placeholder', { ns: meta.id }],
|
|
221
|
-
icon: 'ph--file-code--regular',
|
|
222
|
-
},
|
|
223
|
-
}));
|
|
224
|
-
}),
|
|
225
|
-
Option.getOrElse(() => []),
|
|
226
|
-
),
|
|
227
|
-
);
|
|
228
|
-
},
|
|
229
|
-
}),
|
|
230
140
|
]);
|
|
231
141
|
|
|
232
142
|
// TODO(burdon): Factor out.
|
|
@@ -239,14 +149,13 @@ const getOrCreateChat = async (
|
|
|
239
149
|
const { objects: relatedChats } = await space.db
|
|
240
150
|
.query(Query.type(Assistant.Chat).sourceOf(Assistant.CompanionTo).source())
|
|
241
151
|
.run();
|
|
152
|
+
|
|
242
153
|
const chats = allChats.filter((chat) => !relatedChats.includes(chat));
|
|
243
|
-
// console.log('objects', JSON.stringify(objects, null, 2));
|
|
244
154
|
if (chats.length > 0) {
|
|
245
|
-
|
|
246
|
-
return chats[chats.length - 1];
|
|
155
|
+
return chats.at(-1);
|
|
247
156
|
}
|
|
248
157
|
|
|
249
|
-
const { data } = await dispatch(createIntent(
|
|
158
|
+
const { data } = await dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
250
159
|
invariant(Obj.instanceOf(Assistant.Chat, data?.object));
|
|
251
160
|
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: data.object }));
|
|
252
161
|
return data.object;
|