@dxos/plugin-assistant 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d
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-6ZGGH5T4.mjs → BlueprintContainer-H7H4BQ2C.mjs} +10 -9
- package/dist/lib/browser/BlueprintContainer-H7H4BQ2C.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-6XNB5NEI.mjs → ChatContainer-OUVSX5V5.mjs} +36 -17
- package/dist/lib/browser/ChatContainer-OUVSX5V5.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-IMWPRXTO.mjs → ChatDialog-P4FLEOHG.mjs} +22 -10
- package/dist/lib/browser/ChatDialog-P4FLEOHG.mjs.map +7 -0
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs +163 -0
- package/dist/lib/browser/SequenceContainer-627OQ557.mjs.map +7 -0
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs +22 -0
- package/dist/lib/browser/ai-service-7KJ5LXBT.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-UJ5NHRGK.mjs → app-graph-builder-AVHHQ3KV.mjs} +16 -73
- package/dist/lib/browser/app-graph-builder-AVHHQ3KV.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs +146 -0
- package/dist/lib/browser/blueprint-definition-CMGIZAOW.mjs.map +7 -0
- package/dist/lib/browser/chunk-BRLHDHOF.mjs +244 -0
- package/dist/lib/browser/chunk-BRLHDHOF.mjs.map +7 -0
- package/dist/lib/browser/chunk-HRLMD35M.mjs +191 -0
- package/dist/lib/browser/chunk-HRLMD35M.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-44HZKIAW.mjs → chunk-NZDCKQ6W.mjs} +32 -30
- package/dist/lib/browser/chunk-NZDCKQ6W.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NTBGTFTV.mjs → chunk-QB7OVS6Z.mjs} +3 -2
- package/dist/lib/browser/chunk-QB7OVS6Z.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TQ3QW3HJ.mjs → chunk-VEBVAHNM.mjs} +1041 -882
- package/dist/lib/browser/chunk-VEBVAHNM.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs +24 -0
- package/dist/lib/browser/edge-model-resolver-2HB4PCWH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +116 -88
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs +81 -0
- package/dist/lib/browser/intent-resolver-MVOIEJXZ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-TMF7JJA4.mjs → react-surface-4HXS3YLT.mjs} +52 -45
- package/dist/lib/browser/react-surface-4HXS3YLT.mjs.map +7 -0
- package/dist/lib/browser/{settings-N4HEXADL.mjs → settings-G2EZXMWT.mjs} +5 -4
- package/dist/lib/{node-esm/settings-WQ76EG6O.mjs.map → browser/settings-G2EZXMWT.mjs.map} +1 -1
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs +105 -0
- package/dist/lib/browser/toolkit-IW4FBLLB.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -13
- package/dist/lib/node-esm/{TemplateContainer-6KRNEMVE.mjs → BlueprintContainer-VH4EE4CM.mjs} +10 -9
- package/dist/lib/node-esm/BlueprintContainer-VH4EE4CM.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-VOLG7J6N.mjs → ChatContainer-D5FABDNE.mjs} +36 -17
- package/dist/lib/node-esm/ChatContainer-D5FABDNE.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-B2XNUNRM.mjs → ChatDialog-NKWVXHJP.mjs} +22 -10
- package/dist/lib/node-esm/ChatDialog-NKWVXHJP.mjs.map +7 -0
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs +164 -0
- package/dist/lib/node-esm/SequenceContainer-EQ5NP2PG.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-LDD32477.mjs +23 -0
- package/dist/lib/node-esm/ai-service-LDD32477.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-MEQ5CYNI.mjs → app-graph-builder-RMOUJMMG.mjs} +16 -73
- package/dist/lib/node-esm/app-graph-builder-RMOUJMMG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs +147 -0
- package/dist/lib/node-esm/blueprint-definition-AEWYMW6I.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-D3HTVK5D.mjs → chunk-3SOC5GOP.mjs} +1041 -882
- package/dist/lib/node-esm/chunk-3SOC5GOP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs +192 -0
- package/dist/lib/node-esm/chunk-F7RXCX5Y.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VESVUAOS.mjs → chunk-GAWXJ7K5.mjs} +32 -30
- package/dist/lib/node-esm/chunk-GAWXJ7K5.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-RD755HN3.mjs +245 -0
- package/dist/lib/node-esm/chunk-RD755HN3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-E6V2RUQ2.mjs → chunk-X6AANUHZ.mjs} +3 -2
- package/dist/lib/node-esm/chunk-X6AANUHZ.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs +25 -0
- package/dist/lib/node-esm/edge-model-resolver-UDDR2IA6.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +116 -88
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs +82 -0
- package/dist/lib/node-esm/intent-resolver-DTDNCX3C.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-6XL6SWL2.mjs → react-surface-V6JNEZVO.mjs} +52 -45
- package/dist/lib/node-esm/react-surface-V6JNEZVO.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-WQ76EG6O.mjs → settings-AIP5FOJG.mjs} +5 -4
- package/dist/lib/{browser/settings-N4HEXADL.mjs.map → node-esm/settings-AIP5FOJG.mjs.map} +1 -1
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs +106 -0
- package/dist/lib/node-esm/toolkit-2VNUL77B.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -13
- 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.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +8 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +5 -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 +16 -13
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +30 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +1 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +5 -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/ChatPrompt/ChatActions.d.ts +6 -5
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +13 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts +11 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +2 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +2 -2
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +10 -10
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +6 -12
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +54 -60
- 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/ToolBlock.d.ts +4 -3
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +4 -4
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +1 -1
- package/dist/types/src/components/PromptSettings.d.ts +2 -2
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts +1 -2
- 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 +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +4 -3
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +2 -2
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +5 -4
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/Timeline/Timeline.d.ts +24 -0
- package/dist/types/src/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts +9 -0
- package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/types/src/components/Timeline/index.d.ts +2 -0
- package/dist/types/src/components/Timeline/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +6 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +1 -2
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -3
- 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/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/chat-processor.d.ts +34 -44
- package/dist/types/src/hooks/chat-processor.d.ts.map +1 -1
- package/dist/types/src/hooks/errors.d.ts +4 -0
- package/dist/types/src/hooks/errors.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +8 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/presets.d.ts +13 -0
- package/dist/types/src/hooks/presets.d.ts.map +1 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +21 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +9 -18
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +13 -0
- package/dist/types/src/hooks/useChatServices.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 +7 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
- package/dist/types/src/hooks/useResolveRef.d.ts +4 -0
- package/dist/types/src/hooks/useResolveRef.d.ts.map +1 -0
- package/dist/types/src/parser/filter-generator.d.ts.map +1 -1
- package/dist/types/src/parser/index.d.ts +1 -1
- package/dist/types/src/parser/index.d.ts.map +1 -1
- package/dist/types/src/parser/query-parser.d.ts.map +1 -1
- package/dist/types/src/stories/Chat.stories.d.ts +87 -18
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +5 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +5 -0
- package/dist/types/src/stories/components/ChatContainer.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/LoggingContainer.d.ts +5 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/SurfaceContainer.d.ts +8 -0
- package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts +5 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +8 -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/hooks/index.d.ts +3 -0
- package/dist/types/src/stories/hooks/index.d.ts.map +1 -0
- package/dist/types/src/stories/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/stories/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts +3 -0
- package/dist/types/src/stories/hooks/useMatcherExtension.d.ts.map +1 -0
- package/dist/types/src/stories/testing/data.d.ts +142 -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/testing.d.ts +26 -0
- package/dist/types/src/stories/testing/testing.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-sequence.d.ts.map +1 -1
- package/dist/types/src/tools/function.d.ts.map +1 -1
- package/dist/types/src/tools/openapi.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +25 -13
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +40 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +90 -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 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +6 -6
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +83 -73
- package/src/AssistantPlugin.tsx +61 -41
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +9 -92
- package/src/capabilities/blueprint-definition.ts +32 -0
- package/src/capabilities/capabilities.ts +11 -3
- package/src/capabilities/edge-model-resolver.ts +29 -0
- package/src/capabilities/index.ts +6 -3
- package/src/capabilities/intent-resolver.ts +39 -11
- package/src/capabilities/react-surface.tsx +35 -27
- package/src/capabilities/toolkit.ts +106 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +1 -1
- package/src/components/BlueprintContainer.tsx +24 -0
- package/src/components/Chat/Chat.tsx +148 -95
- package/src/components/Chat/events.ts +50 -0
- package/src/components/Chat/index.ts +2 -0
- package/src/components/ChatContainer.tsx +39 -15
- package/src/components/ChatDialog.tsx +10 -7
- package/src/components/ChatPrompt/ChatActions.tsx +15 -20
- package/src/components/ChatPrompt/ChatOptions.tsx +59 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +28 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +11 -8
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +17 -4
- package/src/components/ChatPrompt/index.ts +2 -3
- package/src/components/ChatThread/ChatMessage.tsx +192 -148
- package/src/components/ChatThread/ChatThread.stories.tsx +221 -109
- package/src/components/ChatThread/ChatThread.tsx +12 -23
- package/src/components/ChatThread/Link.tsx +39 -0
- package/src/components/ChatThread/ToolBlock.tsx +41 -27
- package/src/components/ChatThread/reducer.ts +14 -14
- package/src/components/PromptSettings.tsx +41 -43
- package/src/components/SequenceContainer.tsx +32 -38
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +3 -2
- package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +37 -35
- package/src/components/TemplateEditor/TemplateEditor.tsx +39 -23
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +23 -16
- package/src/components/TemplateEditor/TemplateForm.tsx +50 -55
- package/src/components/Timeline/Timeline.stories.tsx +53 -0
- package/src/components/Timeline/Timeline.tsx +159 -0
- package/src/components/Timeline/index.ts +5 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +7 -13
- package/src/components/Toolbox/Toolbox.tsx +21 -42
- package/src/components/index.ts +2 -5
- package/src/events.ts +2 -2
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +42 -0
- package/src/functions/load.ts +43 -0
- package/src/hooks/chat-processor.ts +167 -188
- package/src/hooks/errors.ts +8 -0
- package/src/hooks/index.ts +8 -4
- package/src/hooks/presets.ts +53 -0
- package/src/hooks/useBlueprintRegistry.ts +79 -0
- package/src/hooks/useChatProcessor.ts +81 -0
- package/src/hooks/useChatServices.ts +72 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +45 -0
- package/src/hooks/{useContextProvider.ts → useReferencesProvider.ts} +18 -22
- package/src/hooks/useResolveRef.ts +33 -0
- package/src/parser/filter-generator.ts +6 -13
- package/src/parser/index.ts +1 -1
- package/src/parser/query-parser.ts +1 -1
- package/src/queue-logger.ts +5 -5
- package/src/stories/Chat.stories.tsx +246 -198
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +80 -0
- package/src/stories/components/GraphContainer.tsx +118 -0
- package/src/stories/components/LoggingContainer.tsx +22 -0
- package/src/stories/components/SurfaceContainer.tsx +62 -0
- package/src/stories/components/TasksContainer.tsx +51 -0
- package/src/stories/components/index.ts +12 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/hooks/index.ts +6 -0
- package/src/stories/hooks/useFlush.ts +35 -0
- package/src/stories/hooks/useMatcherExtension.ts +45 -0
- package/src/stories/testing/data.ts +130 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/testing.tsx +162 -0
- package/src/testing/test-functions.ts +9 -4
- package/src/testing/test-sequence.ts +18 -20
- package/src/tools/function.ts +4 -1
- package/src/tools/openapi.test.ts +10 -8
- package/src/tools/openapi.ts +4 -1
- package/src/translations.ts +29 -13
- package/src/types/Assistant.ts +59 -0
- package/src/types/AssistantAction.ts +54 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -2
- package/dist/lib/browser/ChatContainer-6XNB5NEI.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-IMWPRXTO.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs +0 -322
- package/dist/lib/browser/SequenceContainer-6XOYB2RN.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-6ZGGH5T4.mjs.map +0 -7
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs +0 -39
- package/dist/lib/browser/ai-client-ML7OQWAO.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-UJ5NHRGK.mjs.map +0 -7
- package/dist/lib/browser/chunk-44HZKIAW.mjs.map +0 -7
- package/dist/lib/browser/chunk-NTBGTFTV.mjs.map +0 -7
- package/dist/lib/browser/chunk-OZL4OHTU.mjs +0 -157
- package/dist/lib/browser/chunk-OZL4OHTU.mjs.map +0 -7
- package/dist/lib/browser/chunk-TQ3QW3HJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs +0 -203
- package/dist/lib/browser/chunk-TU7UUGWQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-WPZ4UANI.mjs +0 -16
- package/dist/lib/browser/chunk-WPZ4UANI.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs +0 -42
- package/dist/lib/browser/intent-resolver-LEAPB55Q.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TMF7JJA4.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VOLG7J6N.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-B2XNUNRM.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs +0 -323
- package/dist/lib/node-esm/SequenceContainer-WWG6IMN3.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-6KRNEMVE.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs +0 -40
- package/dist/lib/node-esm/ai-client-2FQ434CT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-MEQ5CYNI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-D3HTVK5D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E6V2RUQ2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs +0 -158
- package/dist/lib/node-esm/chunk-HVMVHP4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs +0 -18
- package/dist/lib/node-esm/chunk-HXKRKIN2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VESVUAOS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs +0 -204
- package/dist/lib/node-esm/chunk-YYUVTTVK.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs +0 -43
- package/dist/lib/node-esm/intent-resolver-4ULF3F7U.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6XL6SWL2.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-client.d.ts +0 -5
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- 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/ChatPrompt/events.d.ts +0 -17
- package/dist/types/src/components/ChatPrompt/events.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -9
- package/dist/types/src/components/TemplateContainer.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/useBlueprints.d.ts +0 -4
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +0 -23
- package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
- package/dist/types/src/hooks/useServiceContainer.d.ts +0 -8
- package/dist/types/src/hooks/useServiceContainer.d.ts.map +0 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -71
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/template.d.ts +0 -56
- package/dist/types/src/types/template.d.ts.map +0 -1
- package/src/capabilities/ai-client.ts +0 -39
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatPrompt/events.ts +0 -12
- package/src/components/TemplateContainer.tsx +0 -25
- package/src/hooks/chat-processor.test.ts +0 -15
- package/src/hooks/useBlueprints.ts +0 -31
- package/src/hooks/useChatProcessor.tsx +0 -142
- package/src/hooks/useServiceContainer.ts +0 -42
- package/src/hooks/useTextInputEvents.ts +0 -49
- package/src/types/schema.ts +0 -86
- package/src/types/template.ts +0 -66
|
@@ -2,17 +2,40 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Effect } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, type PluginContext, contributes, createIntent, createResolver } from '@dxos/app-framework';
|
|
8
|
+
import { Blueprint, Template } from '@dxos/blueprints';
|
|
6
9
|
import { Sequence } from '@dxos/conductor';
|
|
7
10
|
import { Key, Obj, Ref } from '@dxos/echo';
|
|
11
|
+
import { CollectionAction } from '@dxos/plugin-space/types';
|
|
8
12
|
|
|
9
|
-
import { Assistant } from '../types';
|
|
13
|
+
import { Assistant, AssistantAction } from '../types';
|
|
10
14
|
|
|
11
|
-
export default () => [
|
|
12
|
-
contributes(
|
|
13
|
-
Capabilities.IntentResolver,
|
|
15
|
+
export default (context: PluginContext) => [
|
|
16
|
+
contributes(Capabilities.IntentResolver, [
|
|
14
17
|
createResolver({
|
|
15
|
-
intent:
|
|
18
|
+
intent: AssistantAction.OnSpaceCreated,
|
|
19
|
+
resolve: ({ space, rootCollection }) =>
|
|
20
|
+
Effect.gen(function* () {
|
|
21
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
22
|
+
const { object: chatCollection } = yield* dispatch(
|
|
23
|
+
createIntent(CollectionAction.CreateQueryCollection, { typename: Assistant.Chat.typename }),
|
|
24
|
+
);
|
|
25
|
+
const { object: blueprintCollection } = yield* dispatch(
|
|
26
|
+
createIntent(CollectionAction.CreateQueryCollection, { typename: Blueprint.Blueprint.typename }),
|
|
27
|
+
);
|
|
28
|
+
rootCollection.objects.push(Ref.make(chatCollection), Ref.make(blueprintCollection));
|
|
29
|
+
const { object: chat } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
30
|
+
space.db.add(chat);
|
|
31
|
+
|
|
32
|
+
// TODO(wittjosiah): Create default blueprint.
|
|
33
|
+
// const { object: blueprint } = yield* dispatch(createIntent(AssistantAction.CreateBlueprint, { ... }));
|
|
34
|
+
// space.db.add(blueprint);
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
createResolver({
|
|
38
|
+
intent: AssistantAction.CreateChat,
|
|
16
39
|
resolve: ({ space, name }) => ({
|
|
17
40
|
data: {
|
|
18
41
|
object: Obj.make(Assistant.Chat, {
|
|
@@ -22,11 +45,16 @@ export default () => [
|
|
|
22
45
|
},
|
|
23
46
|
}),
|
|
24
47
|
}),
|
|
25
|
-
),
|
|
26
|
-
contributes(
|
|
27
|
-
Capabilities.IntentResolver,
|
|
28
48
|
createResolver({
|
|
29
|
-
intent:
|
|
49
|
+
intent: AssistantAction.CreateBlueprint,
|
|
50
|
+
resolve: ({ key, name, description }) => ({
|
|
51
|
+
data: {
|
|
52
|
+
object: Blueprint.make({ key, name, description, instructions: Template.make({ source: '' }) }),
|
|
53
|
+
},
|
|
54
|
+
}),
|
|
55
|
+
}),
|
|
56
|
+
createResolver({
|
|
57
|
+
intent: AssistantAction.CreateSequence,
|
|
30
58
|
resolve: ({ name }) => ({
|
|
31
59
|
data: {
|
|
32
60
|
object: Obj.make(Sequence, {
|
|
@@ -41,5 +69,5 @@ export default () => [
|
|
|
41
69
|
},
|
|
42
70
|
}),
|
|
43
71
|
}),
|
|
44
|
-
),
|
|
72
|
+
]),
|
|
45
73
|
];
|
|
@@ -3,27 +3,29 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Effect } from 'effect';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { useCallback, useEffect } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, contributes, createIntent, createSurface, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
-
import {
|
|
9
|
+
import { Blueprint } from '@dxos/blueprints';
|
|
10
|
+
import { getSpace } from '@dxos/client/echo';
|
|
10
11
|
import { Sequence } from '@dxos/conductor';
|
|
11
12
|
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
12
|
-
import { Filter,
|
|
13
|
+
import { Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
13
14
|
import { SettingsStore } from '@dxos/local-storage';
|
|
14
15
|
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
15
16
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
16
17
|
|
|
17
18
|
import {
|
|
18
19
|
AssistantSettings,
|
|
20
|
+
BlueprintContainer,
|
|
19
21
|
ChatContainer,
|
|
20
22
|
ChatDialog,
|
|
21
23
|
PromptSettings,
|
|
22
24
|
SequenceContainer,
|
|
23
|
-
TemplateContainer,
|
|
24
25
|
} from '../components';
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
26
|
+
import { type AiChatProcessor } from '../hooks';
|
|
27
|
+
import { ASSISTANT_DIALOG, meta } from '../meta';
|
|
28
|
+
import { Assistant, AssistantAction } from '../types';
|
|
27
29
|
|
|
28
30
|
export default () =>
|
|
29
31
|
contributes(Capabilities.ReactSurface, [
|
|
@@ -49,15 +51,8 @@ export default () =>
|
|
|
49
51
|
(Obj.instanceOf(Assistant.Chat, data.subject) || data.subject === 'assistant-chat'),
|
|
50
52
|
component: ({ data, role }) => {
|
|
51
53
|
const { dispatch } = useIntentDispatcher();
|
|
52
|
-
const associatedArtifact = useMemo(
|
|
53
|
-
() => ({
|
|
54
|
-
id: fullyQualifiedId(data.companionTo),
|
|
55
|
-
typename: getTypename(data.companionTo) ?? 'unknown',
|
|
56
|
-
spaceId: (getSpace(data.companionTo)?.id ?? 'unknown') as Key.SpaceId,
|
|
57
|
-
}),
|
|
58
|
-
[data.companionTo],
|
|
59
|
-
);
|
|
60
54
|
|
|
55
|
+
// Initialize companion chat if it doesn't exist.
|
|
61
56
|
// TODO(wittjosiah): Factor out to container.
|
|
62
57
|
useEffect(() => {
|
|
63
58
|
const timeout = setTimeout(async () => {
|
|
@@ -71,7 +66,7 @@ export default () =>
|
|
|
71
66
|
}
|
|
72
67
|
|
|
73
68
|
const program = Effect.gen(function* () {
|
|
74
|
-
const { object } = yield* dispatch(createIntent(
|
|
69
|
+
const { object } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
75
70
|
yield* dispatch(createIntent(SpaceAction.AddObject, { object, target: space, hidden: true }));
|
|
76
71
|
yield* dispatch(
|
|
77
72
|
createIntent(SpaceAction.AddRelation, {
|
|
@@ -82,6 +77,7 @@ export default () =>
|
|
|
82
77
|
}),
|
|
83
78
|
);
|
|
84
79
|
});
|
|
80
|
+
|
|
85
81
|
void Effect.runPromise(program);
|
|
86
82
|
}
|
|
87
83
|
});
|
|
@@ -89,18 +85,30 @@ export default () =>
|
|
|
89
85
|
return () => clearTimeout(timeout);
|
|
90
86
|
}, [data.subject]);
|
|
91
87
|
|
|
88
|
+
// TODO(wittjosiah): Factor out to container.
|
|
89
|
+
const handleProcessorReady = useCallback(
|
|
90
|
+
(processor: AiChatProcessor) => {
|
|
91
|
+
if (Obj.instanceOf(Blueprint.Blueprint, data.companionTo)) {
|
|
92
|
+
void processor.context.bind({ blueprints: [Ref.make(data.companionTo)] });
|
|
93
|
+
} else {
|
|
94
|
+
void processor.context.bind({ objects: [Ref.make(data.companionTo)] });
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
[data.companionTo],
|
|
98
|
+
);
|
|
99
|
+
|
|
92
100
|
if (data.subject === 'assistant-chat') {
|
|
93
101
|
return null;
|
|
94
102
|
}
|
|
95
103
|
|
|
96
|
-
return <ChatContainer role={role} chat={data.subject}
|
|
104
|
+
return <ChatContainer role={role} chat={data.subject} onProcessorReady={handleProcessorReady} />;
|
|
97
105
|
},
|
|
98
106
|
}),
|
|
99
107
|
createSurface({
|
|
100
108
|
id: `${meta.id}/sequence`,
|
|
101
109
|
role: 'article',
|
|
102
110
|
filter: (data): data is { subject: Sequence } => Obj.instanceOf(Sequence, data.subject),
|
|
103
|
-
component: ({ data
|
|
111
|
+
component: ({ data }) => <SequenceContainer sequence={data.subject} />,
|
|
104
112
|
}),
|
|
105
113
|
createSurface({
|
|
106
114
|
id: `${meta.id}/companion/logs`,
|
|
@@ -110,17 +118,23 @@ export default () =>
|
|
|
110
118
|
component: ({ data, role }) => {
|
|
111
119
|
const space = getSpace(data.companionTo);
|
|
112
120
|
return (
|
|
113
|
-
<StackItem.Content
|
|
121
|
+
<StackItem.Content>
|
|
114
122
|
<InvocationTraceContainer space={space} target={data.companionTo} detailAxis='block' />
|
|
115
123
|
</StackItem.Content>
|
|
116
124
|
);
|
|
117
125
|
},
|
|
118
126
|
}),
|
|
119
127
|
createSurface({
|
|
120
|
-
id: `${meta.id}/
|
|
128
|
+
id: `${meta.id}/blueprint`,
|
|
121
129
|
role: 'article',
|
|
122
|
-
filter: (data): data is { subject:
|
|
123
|
-
component: ({ data
|
|
130
|
+
filter: (data): data is { subject: Blueprint.Blueprint } => Obj.instanceOf(Blueprint.Blueprint, data.subject),
|
|
131
|
+
component: ({ data }) => <BlueprintContainer blueprint={data.subject} />,
|
|
132
|
+
}),
|
|
133
|
+
createSurface({
|
|
134
|
+
id: `${meta.id}/prompt-settings`,
|
|
135
|
+
role: 'object-settings',
|
|
136
|
+
filter: (data): data is { subject: Blueprint.Blueprint } => Obj.instanceOf(Blueprint.Blueprint, data.subject),
|
|
137
|
+
component: ({ data }) => <PromptSettings template={data.subject.instructions} />,
|
|
124
138
|
}),
|
|
125
139
|
createSurface({
|
|
126
140
|
id: ASSISTANT_DIALOG,
|
|
@@ -128,10 +142,4 @@ export default () =>
|
|
|
128
142
|
filter: (data): data is { props: { chat: Assistant.Chat } } => data.component === ASSISTANT_DIALOG,
|
|
129
143
|
component: ({ data }) => <ChatDialog {...data.props} />,
|
|
130
144
|
}),
|
|
131
|
-
createSurface({
|
|
132
|
-
id: `${meta.id}/prompt-settings`,
|
|
133
|
-
role: 'object-settings',
|
|
134
|
-
filter: (data): data is { subject: TemplateType } => Obj.instanceOf(TemplateType, data.subject),
|
|
135
|
-
component: ({ data }) => <PromptSettings template={data.subject} />,
|
|
136
|
-
}),
|
|
137
145
|
]);
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { AiTool, AiToolkit } from '@effect/ai';
|
|
6
|
+
import { Effect, Schema } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
9
|
+
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
|
+
import { DatabaseService } from '@dxos/functions';
|
|
11
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
12
|
+
import { SpaceCapabilities, getActiveSpace } from '@dxos/plugin-space';
|
|
13
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
14
|
+
import { DataType } from '@dxos/schema';
|
|
15
|
+
import { trim } from '@dxos/util';
|
|
16
|
+
|
|
17
|
+
class SchemaToolkit extends AiToolkit.make(
|
|
18
|
+
AiTool.make('get-schemas', {
|
|
19
|
+
description: trim`
|
|
20
|
+
Retrieves schemas definitions.
|
|
21
|
+
`,
|
|
22
|
+
parameters: {
|
|
23
|
+
// TODO(wittjosiah): Remove this once parameter-less tools are fixed.
|
|
24
|
+
limit: Schema.Number,
|
|
25
|
+
},
|
|
26
|
+
// TODO(dmaretskyi): Effect returns ({ result, encodedResult })
|
|
27
|
+
success: Schema.Any,
|
|
28
|
+
failure: Schema.Never,
|
|
29
|
+
}),
|
|
30
|
+
AiTool.make('create-record', {
|
|
31
|
+
description: trim`
|
|
32
|
+
Creates a new record.
|
|
33
|
+
Get the schema from the get-schemas tool and ensure that the data matches the corresponding schema.
|
|
34
|
+
Note that only record schemas are supported.
|
|
35
|
+
`,
|
|
36
|
+
parameters: {
|
|
37
|
+
typename: Schema.String,
|
|
38
|
+
data: Schema.Any,
|
|
39
|
+
},
|
|
40
|
+
success: Schema.Any,
|
|
41
|
+
failure: Schema.Never,
|
|
42
|
+
}),
|
|
43
|
+
) {
|
|
44
|
+
static layer = (context: PluginContext) =>
|
|
45
|
+
SchemaToolkit.toLayer({
|
|
46
|
+
//
|
|
47
|
+
'get-schemas': () => {
|
|
48
|
+
const space = getActiveSpace(context);
|
|
49
|
+
const service = space ? DatabaseService.layer(space.db) : DatabaseService.notAvailable;
|
|
50
|
+
return Effect.gen(function* () {
|
|
51
|
+
const forms = context.getCapabilities(SpaceCapabilities.ObjectForm).map((form) => ({
|
|
52
|
+
typename: Type.getTypename(form.objectSchema),
|
|
53
|
+
jsonSchema: Type.toJsonSchema(form.objectSchema),
|
|
54
|
+
kind: 'item',
|
|
55
|
+
}));
|
|
56
|
+
const allowed = context
|
|
57
|
+
.getCapabilities(ClientCapabilities.SchemaWhiteList)
|
|
58
|
+
.flat()
|
|
59
|
+
.map((schema) => ({
|
|
60
|
+
typename: Type.getTypename(schema),
|
|
61
|
+
jsonSchema: Type.toJsonSchema(schema),
|
|
62
|
+
kind: 'record',
|
|
63
|
+
}));
|
|
64
|
+
const schemas = [...forms, ...allowed];
|
|
65
|
+
if (space) {
|
|
66
|
+
const { objects } = yield* DatabaseService.runQuery(Filter.type(DataType.StoredSchema));
|
|
67
|
+
schemas.push(
|
|
68
|
+
...objects.map((object) => ({
|
|
69
|
+
typename: object.typename,
|
|
70
|
+
jsonSchema: object.jsonSchema,
|
|
71
|
+
kind: 'record',
|
|
72
|
+
})),
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
return schemas.map((schema) => schema.typename);
|
|
76
|
+
}).pipe(Effect.provide(service));
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
//
|
|
80
|
+
'create-record': ({ typename, data }) => {
|
|
81
|
+
const space = getActiveSpace(context);
|
|
82
|
+
const service = space ? DatabaseService.layer(space.db) : DatabaseService.notAvailable;
|
|
83
|
+
console.log('create-record', { typename, data, space });
|
|
84
|
+
return Effect.gen(function* () {
|
|
85
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
86
|
+
const schemas = context.getCapabilities(ClientCapabilities.SchemaWhiteList).flat();
|
|
87
|
+
const { objects } = yield* DatabaseService.runQuery(Filter.type(DataType.StoredSchema));
|
|
88
|
+
schemas.push(...objects.map((object) => Type.toEffectSchema(object.jsonSchema)));
|
|
89
|
+
|
|
90
|
+
const schema = schemas.find((schema) => Type.getTypename(schema) === typename);
|
|
91
|
+
if (!schema) {
|
|
92
|
+
throw new Error(`Schema not found for ${typename}`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const object = Obj.make(schema, data);
|
|
96
|
+
yield* dispatch(createIntent(SpaceAction.AddObject, { object, target: space!, hidden: true }));
|
|
97
|
+
return object;
|
|
98
|
+
}).pipe(Effect.provide(service), Effect.orDie);
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export default (context: PluginContext) => [
|
|
104
|
+
contributes(Capabilities.Toolkit, SchemaToolkit),
|
|
105
|
+
contributes(Capabilities.ToolkitHandler, SchemaToolkit.layer(context)),
|
|
106
|
+
];
|
|
@@ -9,7 +9,7 @@ import { Input, Select, useTranslation } from '@dxos/react-ui';
|
|
|
9
9
|
import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
11
|
import { meta } from '../../meta';
|
|
12
|
-
import {
|
|
12
|
+
import { type Assistant, LLM_PROVIDERS } from '../../types';
|
|
13
13
|
|
|
14
14
|
// TODO(burdon): Factor out default Selector.
|
|
15
15
|
const DEFAULT_VALUE = '__default';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
8
|
+
import { StackItem } from '@dxos/react-ui-stack';
|
|
9
|
+
|
|
10
|
+
import { TemplateEditor } from './TemplateEditor';
|
|
11
|
+
|
|
12
|
+
export type BlueprintContainerProps = {
|
|
13
|
+
blueprint: Blueprint.Blueprint;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const BlueprintContainer = ({ blueprint }: BlueprintContainerProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<StackItem.Content classNames='container-max-width'>
|
|
19
|
+
<TemplateEditor id={blueprint.id} template={blueprint.instructions} />
|
|
20
|
+
</StackItem.Content>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default BlueprintContainer;
|