@dxos/plugin-assistant 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d
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/BlueprintArticle-BWSLH6LG.mjs +36 -0
- package/dist/lib/browser/BlueprintArticle-BWSLH6LG.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-OSZZZSWV.mjs +158 -0
- package/dist/lib/browser/ChatCompanion-OSZZZSWV.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-YBJBIVUZ.mjs → ChatContainer-2W6FNSJD.mjs} +22 -20
- package/dist/lib/browser/ChatContainer-2W6FNSJD.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-MTPJLEHM.mjs → ChatDialog-XQ3KDYWE.mjs} +12 -11
- package/dist/lib/browser/ChatDialog-XQ3KDYWE.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-Q7JYGFQV.mjs +59 -0
- package/dist/lib/browser/PromptArticle-Q7JYGFQV.mjs.map +7 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +19 -0
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-7AAWTWGA.mjs → app-graph-builder-LM6GVHQO.mjs} +67 -21
- package/dist/lib/browser/app-graph-builder-LM6GVHQO.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-CRZPIA5A.mjs → blueprint-definition-VBEOXNBS.mjs} +4 -4
- package/dist/lib/browser/chunk-2BOE3OTW.mjs +262 -0
- package/dist/lib/browser/chunk-2BOE3OTW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-SMIVXXAI.mjs → chunk-5JZRYQZL.mjs} +52 -25
- package/dist/lib/browser/chunk-5JZRYQZL.mjs.map +7 -0
- package/dist/lib/browser/chunk-7ZJIXQ2Y.mjs +335 -0
- package/dist/lib/browser/chunk-7ZJIXQ2Y.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IJAJRAR7.mjs → chunk-LRE4VEZV.mjs} +2 -4
- package/dist/lib/browser/chunk-LRE4VEZV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OYFQS7JM.mjs → chunk-NC2QNMBF.mjs} +60 -41
- package/dist/lib/browser/chunk-NC2QNMBF.mjs.map +7 -0
- package/dist/lib/browser/chunk-PWSTPQUY.mjs +1929 -0
- package/dist/lib/browser/chunk-PWSTPQUY.mjs.map +7 -0
- package/dist/lib/browser/chunk-WBG5PTSX.mjs +23 -0
- package/dist/lib/browser/chunk-WBG5PTSX.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +18 -0
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +142 -103
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-BQO5SVGI.mjs → intent-resolver-EEYS2GJF.mjs} +62 -31
- package/dist/lib/browser/intent-resolver-EEYS2GJF.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs +17 -0
- package/dist/lib/browser/local-model-resolver-34MVHRKD.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-VNCD2H7C.mjs → react-surface-ECKZNDSU.mjs} +24 -35
- package/dist/lib/browser/react-surface-ECKZNDSU.mjs.map +7 -0
- package/dist/lib/browser/repair-3MZXLUHO.mjs +44 -0
- package/dist/lib/browser/repair-3MZXLUHO.mjs.map +7 -0
- package/dist/lib/browser/{settings-36V3VUMW.mjs → settings-HD5WA24I.mjs} +5 -5
- package/dist/lib/browser/{settings-36V3VUMW.mjs.map → settings-HD5WA24I.mjs.map} +1 -1
- package/dist/lib/browser/{state-D5IVKNYG.mjs → state-GG7Z3NB7.mjs} +9 -5
- package/dist/lib/browser/{state-D5IVKNYG.mjs.map → state-GG7Z3NB7.mjs.map} +3 -3
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs +17 -0
- package/dist/lib/browser/toolkit-VYDAWNE4.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/BlueprintArticle-R2XYBRCK.mjs +37 -0
- package/dist/lib/node-esm/BlueprintArticle-R2XYBRCK.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-IUMU7WRQ.mjs +159 -0
- package/dist/lib/node-esm/ChatCompanion-IUMU7WRQ.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-TUCITJJW.mjs → ChatContainer-CTUNUEU3.mjs} +22 -20
- package/dist/lib/node-esm/ChatContainer-CTUNUEU3.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-JLM7RDZQ.mjs → ChatDialog-X42ASXQD.mjs} +12 -11
- package/dist/lib/node-esm/ChatDialog-X42ASXQD.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-IV7O5UZ3.mjs +60 -0
- package/dist/lib/node-esm/PromptArticle-IV7O5UZ3.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +20 -0
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-PNAFQUYT.mjs → app-graph-builder-6XUAGTRS.mjs} +67 -21
- package/dist/lib/node-esm/app-graph-builder-6XUAGTRS.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-275J3XL2.mjs → blueprint-definition-RDCLLIQH.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-CAQKGW3B.mjs → chunk-25GMMNY5.mjs} +60 -41
- package/dist/lib/node-esm/chunk-25GMMNY5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3Q22TTXW.mjs +264 -0
- package/dist/lib/node-esm/chunk-3Q22TTXW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CKW4IYLY.mjs +336 -0
- package/dist/lib/node-esm/chunk-CKW4IYLY.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7YOGZI66.mjs → chunk-E4JSYCWZ.mjs} +52 -25
- package/dist/lib/node-esm/chunk-E4JSYCWZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs +25 -0
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YPXEA46Q.mjs → chunk-YWFWT57N.mjs} +2 -4
- package/dist/lib/node-esm/chunk-YWFWT57N.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Z37USO4K.mjs +1930 -0
- package/dist/lib/node-esm/chunk-Z37USO4K.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +19 -0
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +142 -103
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-FIS3T5KP.mjs → intent-resolver-4SRYLDK5.mjs} +62 -31
- package/dist/lib/node-esm/intent-resolver-4SRYLDK5.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs +18 -0
- package/dist/lib/node-esm/local-model-resolver-TP2NTSAX.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-4NLRKNBU.mjs → react-surface-NLIG5VAI.mjs} +24 -35
- package/dist/lib/node-esm/react-surface-NLIG5VAI.mjs.map +7 -0
- package/dist/lib/node-esm/repair-RER5H7Y6.mjs +45 -0
- package/dist/lib/node-esm/repair-RER5H7Y6.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs → settings-YJQVKHH5.mjs} +5 -5
- package/dist/lib/node-esm/{settings-7ZCZ6AS5.mjs.map → settings-YJQVKHH5.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-4VLKPLW3.mjs → state-FSUHFMDM.mjs} +9 -5
- package/dist/lib/node-esm/{state-4VLKPLW3.mjs.map → state-FSUHFMDM.mjs.map} +3 -3
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs +18 -0
- package/dist/lib/node-esm/toolkit-HFJZLVIR.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/AssistantPlugin.d.ts +1 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +2 -3
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +2 -11
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair.d.ts +4 -0
- package/dist/types/src/capabilities/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintArticle.d.ts +7 -0
- package/dist/types/src/components/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +22 -11
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +4 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +2 -2
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +7 -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.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -8
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +140 -77
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/reducers.d.ts +5 -5
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -1
- 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 +42 -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/PromptArticle.d.ts +7 -0
- package/dist/types/src/components/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +121 -62
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +121 -62
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +21 -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/Toolbox/Toolbox.d.ts +2 -2
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +121 -62
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -9
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/analysis.d.ts +1 -1
- package/dist/types/src/functions/analysis.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +2 -2
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/functions/{list.d.ts → object-list.d.ts} +2 -2
- package/dist/types/src/functions/object-list.d.ts.map +1 -0
- package/dist/types/src/functions/{load.d.ts → object-load.d.ts} +2 -2
- package/dist/types/src/functions/object-load.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +2 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +5 -3
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +2 -2
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts +4 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +1 -0
- package/dist/types/src/processor/index.d.ts.map +1 -1
- package/dist/types/src/processor/presets.d.ts +1 -1
- package/dist/types/src/processor/presets.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +17 -23
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/update-name.d.ts +10 -0
- package/dist/types/src/processor/update-name.d.ts.map +1 -0
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -2
- package/dist/types/src/testing/index.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-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +246 -27
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +16 -13
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +38 -16
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +129 -82
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +96 -111
- package/src/AssistantPlugin.tsx +138 -134
- package/src/capabilities/ai-service.ts +6 -7
- package/src/capabilities/app-graph-builder.ts +69 -21
- package/src/capabilities/blueprint-definition.ts +39 -15
- package/src/capabilities/capabilities.ts +2 -16
- package/src/capabilities/edge-model-resolver.ts +5 -7
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +61 -20
- package/src/capabilities/local-model-resolver.ts +7 -9
- package/src/capabilities/react-surface.tsx +16 -20
- package/src/capabilities/repair.ts +49 -0
- package/src/capabilities/state.ts +2 -0
- package/src/capabilities/toolkit.ts +9 -155
- package/src/components/BlueprintArticle.tsx +29 -0
- package/src/components/Chat/Chat.tsx +177 -140
- package/src/components/Chat/events.ts +6 -0
- package/src/components/ChatCompanion.tsx +93 -49
- package/src/components/ChatContainer.tsx +27 -17
- package/src/components/ChatDialog.tsx +17 -10
- package/src/components/ChatProgress/ChatProgress.tsx +3 -4
- package/src/components/ChatPrompt/ChatActions.tsx +2 -4
- package/src/components/ChatPrompt/ChatOptions.tsx +48 -47
- package/src/components/ChatPrompt/ChatReferences.tsx +2 -2
- package/src/components/ChatThread/ChatThread.stories.tsx +90 -225
- package/src/components/ChatThread/ChatThread.tsx +59 -51
- package/src/components/ChatThread/Link.tsx +11 -8
- package/src/components/ChatThread/reducers.ts +6 -6
- package/src/components/ChatThread/registry.tsx +174 -0
- package/src/components/ChatThread/sync.test.ts +89 -0
- package/src/components/ChatThread/sync.ts +148 -0
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/PromptArticle.tsx +51 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +15 -7
- package/src/components/TemplateEditor/TemplateEditor.tsx +21 -12
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +4 -6
- package/src/components/TemplateEditor/TemplateForm.tsx +2 -2
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +269 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/{ChatThread → ToolBlock}/ToolBlock.tsx +46 -50
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +5 -8
- package/src/components/Toolbox/Toolbox.tsx +5 -5
- package/src/components/index.ts +2 -5
- package/src/functions/analysis.ts +5 -3
- package/src/functions/index.ts +2 -2
- package/src/functions/{list.ts → object-list.ts} +6 -4
- package/src/functions/{load.ts → object-load.ts} +10 -8
- package/src/hooks/index.ts +2 -4
- package/src/hooks/useBlueprintRegistry.ts +19 -4
- package/src/hooks/useChatProcessor.ts +23 -15
- package/src/hooks/useChatServices.ts +29 -42
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +19 -7
- package/src/hooks/useContextObjects.ts +1 -1
- package/src/hooks/{useItemTypes.ts → useFilteredTypes.ts} +8 -7
- package/src/hooks/useReferencesProvider.ts +2 -1
- package/src/index.ts +2 -0
- package/src/meta.ts +9 -6
- package/src/processor/index.ts +1 -0
- package/src/processor/presets.ts +2 -2
- package/src/processor/processor.test.ts +21 -27
- package/src/processor/processor.ts +47 -74
- package/src/processor/update-name.ts +56 -0
- package/src/queue-logger.ts +9 -13
- package/src/testing/index.ts +1 -2
- package/src/testing/test-generator.ts +261 -0
- package/src/testing/test-services.ts +2 -8
- package/src/translations.ts +30 -18
- package/src/types/Assistant.ts +11 -9
- package/src/types/AssistantAction.ts +23 -6
- package/src/types/service.ts +17 -9
- package/dist/lib/browser/BlueprintContainer-OWUSKPRK.mjs +0 -29
- package/dist/lib/browser/BlueprintContainer-OWUSKPRK.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs +0 -126
- package/dist/lib/browser/ChatCompanion-FRCVSLPP.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-YBJBIVUZ.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-MTPJLEHM.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs +0 -150
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +0 -7
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs +0 -22
- package/dist/lib/browser/ai-service-NRZPTUHO.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-7AAWTWGA.mjs.map +0 -7
- package/dist/lib/browser/chunk-6QMISAU6.mjs +0 -167
- package/dist/lib/browser/chunk-6QMISAU6.mjs.map +0 -7
- package/dist/lib/browser/chunk-CFXXQM25.mjs +0 -182
- package/dist/lib/browser/chunk-CFXXQM25.mjs.map +0 -7
- package/dist/lib/browser/chunk-IJAJRAR7.mjs.map +0 -7
- package/dist/lib/browser/chunk-O4LUJEDV.mjs +0 -20
- package/dist/lib/browser/chunk-O4LUJEDV.mjs.map +0 -7
- package/dist/lib/browser/chunk-OYFQS7JM.mjs.map +0 -7
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +0 -7
- package/dist/lib/browser/chunk-V5H5CCZA.mjs +0 -218
- package/dist/lib/browser/chunk-V5H5CCZA.mjs.map +0 -7
- package/dist/lib/browser/chunk-XL557TXF.mjs +0 -2332
- package/dist/lib/browser/chunk-XL557TXF.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs +0 -22
- package/dist/lib/browser/edge-model-resolver-E5M3CC46.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-BQO5SVGI.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs +0 -21
- package/dist/lib/browser/local-model-resolver-VZ5WZQIC.mjs.map +0 -7
- package/dist/lib/browser/react-surface-VNCD2H7C.mjs.map +0 -7
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs +0 -191
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-UFVWCRN6.mjs +0 -30
- package/dist/lib/node-esm/BlueprintContainer-UFVWCRN6.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs +0 -127
- package/dist/lib/node-esm/ChatCompanion-ZNRZEKH5.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-TUCITJJW.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-JLM7RDZQ.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs +0 -151
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs +0 -23
- package/dist/lib/node-esm/ai-service-UDEPIPTO.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PNAFQUYT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs +0 -2333
- package/dist/lib/node-esm/chunk-2X6VEO32.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CAQKGW3B.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FNZJJL7G.mjs +0 -183
- package/dist/lib/node-esm/chunk-FNZJJL7G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RLBN4RNR.mjs +0 -168
- package/dist/lib/node-esm/chunk-RLBN4RNR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs +0 -219
- package/dist/lib/node-esm/chunk-UWUUZQWJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs +0 -22
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YPXEA46Q.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs +0 -23
- package/dist/lib/node-esm/edge-model-resolver-SZHDLXCT.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FIS3T5KP.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs +0 -22
- package/dist/lib/node-esm/local-model-resolver-2KCBKMYA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-4NLRKNBU.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs +0 -192
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs.map +0 -7
- package/dist/types/src/components/BlueprintContainer.d.ts +0 -8
- package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -33
- 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/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/components/SequenceContainer.d.ts +0 -8
- package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -263
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +0 -4
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/index.d.ts +0 -2
- package/dist/types/src/components/Toolbar/index.d.ts.map +0 -1
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +0 -11
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +0 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +0 -21
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +0 -1
- package/dist/types/src/execution-graph/index.d.ts +0 -2
- package/dist/types/src/execution-graph/index.d.ts.map +0 -1
- package/dist/types/src/functions/list.d.ts.map +0 -1
- package/dist/types/src/functions/load.d.ts.map +0 -1
- package/dist/types/src/hooks/useExecutionGraph.d.ts +0 -7
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +0 -1
- package/dist/types/src/hooks/useItemTypes.d.ts +0 -4
- package/dist/types/src/hooks/useItemTypes.d.ts.map +0 -1
- package/dist/types/src/hooks/useMatcherExtension.d.ts +0 -3
- package/dist/types/src/hooks/useMatcherExtension.d.ts.map +0 -1
- package/dist/types/src/hooks/useResolveRef.d.ts +0 -4
- package/dist/types/src/hooks/useResolveRef.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/stories/Chat.stories.d.ts +0 -26
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -4
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChatContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/CommentsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -4
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/MessageContainer.d.ts +0 -4
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/SurfaceContainer.d.ts +0 -8
- package/dist/types/src/stories/components/SurfaceContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TasksContainer.d.ts +0 -4
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +0 -3
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/index.d.ts +0 -11
- package/dist/types/src/stories/components/index.d.ts.map +0 -1
- package/dist/types/src/stories/components/types.d.ts +0 -7
- package/dist/types/src/stories/components/types.d.ts.map +0 -1
- package/dist/types/src/stories/testing/data.d.ts +0 -5
- package/dist/types/src/stories/testing/data.d.ts.map +0 -1
- package/dist/types/src/stories/testing/index.d.ts +0 -3
- package/dist/types/src/stories/testing/index.d.ts.map +0 -1
- package/dist/types/src/stories/testing/testing.d.ts +0 -44
- package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -4
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -6
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/src/components/BlueprintContainer.tsx +0 -24
- package/src/components/ChatThread/ChatMessage.tsx +0 -334
- package/src/components/PromptSettings.tsx +0 -90
- package/src/components/SequenceContainer.tsx +0 -131
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -33
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/SequenceEditor/index.ts +0 -5
- package/src/components/TemplateEditor/handlebars-extension.ts +0 -165
- package/src/components/Toolbar/Toolbar.tsx +0 -20
- package/src/components/Toolbar/index.ts +0 -5
- package/src/components/Toolbar/useChatToolbarActions.ts +0 -125
- package/src/execution-graph/execution-graph.ts +0 -211
- package/src/execution-graph/index.ts +0 -5
- package/src/hooks/useExecutionGraph.ts +0 -20
- package/src/hooks/useMatcherExtension.ts +0 -45
- package/src/hooks/useResolveRef.ts +0 -33
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -76
- 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 -36
- package/src/stories/Chat.stories.tsx +0 -469
- package/src/stories/components/BlueprintContainer.tsx +0 -32
- package/src/stories/components/ChatContainer.tsx +0 -57
- package/src/stories/components/CommentsContainer.tsx +0 -25
- package/src/stories/components/GraphContainer.tsx +0 -118
- package/src/stories/components/LoggingContainer.tsx +0 -21
- package/src/stories/components/MessageContainer.tsx +0 -27
- package/src/stories/components/SurfaceContainer.tsx +0 -52
- package/src/stories/components/TasksContainer.tsx +0 -49
- package/src/stories/components/TokenManagerContainer.tsx +0 -14
- package/src/stories/components/index.ts +0 -15
- package/src/stories/components/types.ts +0 -11
- package/src/stories/testing/data.ts +0 -142
- package/src/stories/testing/index.ts +0 -6
- package/src/stories/testing/testing.tsx +0 -254
- package/src/testing/test-data.ts +0 -109
- package/src/testing/test-functions.ts +0 -16
- /package/dist/lib/browser/{blueprint-definition-CRZPIA5A.mjs.map → blueprint-definition-VBEOXNBS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{blueprint-definition-275J3XL2.mjs.map → blueprint-definition-RDCLLIQH.mjs.map} +0 -0
- /package/dist/types/src/components/TemplateEditor/{handlebars-extension.d.ts → extensions/handlebars-extension.d.ts} +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { ContextQueueService, DatabaseService } from '@dxos/functions';
|
|
9
|
+
import { faker } from '@dxos/random';
|
|
10
|
+
import { renderObjectLink } from '@dxos/react-ui-components';
|
|
11
|
+
import { type Actor, type ContentBlock, Message, Organization } from '@dxos/types';
|
|
12
|
+
import { trim } from '@dxos/util';
|
|
13
|
+
|
|
14
|
+
export const createMessage = (role: Actor.Role, blocks: ContentBlock.Any[]): Message.Message => {
|
|
15
|
+
return Obj.make(Message.Message, {
|
|
16
|
+
created: new Date().toISOString(),
|
|
17
|
+
sender: { role },
|
|
18
|
+
blocks,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type MessageGenerator = Effect.Effect<void, never, DatabaseService | ContextQueueService>;
|
|
23
|
+
|
|
24
|
+
export const createMessageGenerator = (): MessageGenerator[] => [
|
|
25
|
+
Effect.gen(function* () {
|
|
26
|
+
const { queue } = yield* ContextQueueService;
|
|
27
|
+
yield* Effect.promise(() =>
|
|
28
|
+
queue.append([
|
|
29
|
+
createMessage('user', [
|
|
30
|
+
{
|
|
31
|
+
_tag: 'text',
|
|
32
|
+
text: faker.lorem.sentence(5),
|
|
33
|
+
},
|
|
34
|
+
]),
|
|
35
|
+
]),
|
|
36
|
+
);
|
|
37
|
+
}),
|
|
38
|
+
|
|
39
|
+
Effect.gen(function* () {
|
|
40
|
+
const { queue } = yield* ContextQueueService;
|
|
41
|
+
yield* Effect.promise(() =>
|
|
42
|
+
queue.append([
|
|
43
|
+
createMessage('assistant', [
|
|
44
|
+
{
|
|
45
|
+
_tag: 'text',
|
|
46
|
+
text:
|
|
47
|
+
trim`
|
|
48
|
+
## Markdown
|
|
49
|
+
Here is a [link](https://dxos.org)
|
|
50
|
+
|
|
51
|
+
And some **bold** text.
|
|
52
|
+
|
|
53
|
+
And some JSON
|
|
54
|
+
\`\`\`json
|
|
55
|
+
{
|
|
56
|
+
"key": "value"
|
|
57
|
+
}
|
|
58
|
+
\`\`\`
|
|
59
|
+
|
|
60
|
+
And some code
|
|
61
|
+
\`\`\`js
|
|
62
|
+
const x = 1;
|
|
63
|
+
\`\`\`
|
|
64
|
+
` + '\n',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
_tag: 'text',
|
|
68
|
+
disposition: 'cot',
|
|
69
|
+
text:
|
|
70
|
+
[
|
|
71
|
+
faker.lorem.paragraph(),
|
|
72
|
+
'',
|
|
73
|
+
...Array.from({
|
|
74
|
+
length: faker.number.int({ min: 3, max: 5 }),
|
|
75
|
+
}).map((_, idx) => `${idx + 1}. ${faker.lorem.paragraph()}`),
|
|
76
|
+
].join('\n') + '\n',
|
|
77
|
+
},
|
|
78
|
+
]),
|
|
79
|
+
]),
|
|
80
|
+
);
|
|
81
|
+
}),
|
|
82
|
+
|
|
83
|
+
Effect.gen(function* () {
|
|
84
|
+
const { queue } = yield* ContextQueueService;
|
|
85
|
+
yield* Effect.promise(() =>
|
|
86
|
+
queue.append([
|
|
87
|
+
createMessage('assistant', [
|
|
88
|
+
{
|
|
89
|
+
_tag: 'text',
|
|
90
|
+
text: 'How can I help?',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
_tag: 'suggestion',
|
|
94
|
+
text: 'List tools',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
_tag: 'suggestion',
|
|
98
|
+
text: 'Show info',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
_tag: 'suggestion',
|
|
102
|
+
text: faker.lorem.paragraph(),
|
|
103
|
+
},
|
|
104
|
+
]),
|
|
105
|
+
createMessage('assistant', [
|
|
106
|
+
{
|
|
107
|
+
_tag: 'text',
|
|
108
|
+
text: 'Select an option:',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
_tag: 'select',
|
|
112
|
+
options: ['Option 1', 'Option 2', 'Option 3'],
|
|
113
|
+
},
|
|
114
|
+
]),
|
|
115
|
+
]),
|
|
116
|
+
);
|
|
117
|
+
}),
|
|
118
|
+
|
|
119
|
+
Effect.gen(function* () {
|
|
120
|
+
const { queue } = yield* ContextQueueService;
|
|
121
|
+
yield* Effect.promise(() =>
|
|
122
|
+
queue.append([
|
|
123
|
+
createMessage('assistant', [
|
|
124
|
+
{
|
|
125
|
+
_tag: 'toolkit',
|
|
126
|
+
},
|
|
127
|
+
]),
|
|
128
|
+
]),
|
|
129
|
+
);
|
|
130
|
+
}),
|
|
131
|
+
|
|
132
|
+
Effect.gen(function* () {
|
|
133
|
+
const { queue } = yield* ContextQueueService;
|
|
134
|
+
yield* Effect.promise(() =>
|
|
135
|
+
queue.append([
|
|
136
|
+
createMessage('user', [
|
|
137
|
+
{
|
|
138
|
+
_tag: 'text',
|
|
139
|
+
text: faker.lorem.sentence(5),
|
|
140
|
+
},
|
|
141
|
+
]),
|
|
142
|
+
]),
|
|
143
|
+
);
|
|
144
|
+
}),
|
|
145
|
+
|
|
146
|
+
Effect.gen(function* () {
|
|
147
|
+
const { queue } = yield* ContextQueueService;
|
|
148
|
+
const { db } = yield* DatabaseService;
|
|
149
|
+
const obj1 = db.add(Obj.make(Organization.Organization, { name: 'DXOS' }));
|
|
150
|
+
// const obj2 = db.add(Obj.make(Person.Person, { fullName: 'Alice' }));
|
|
151
|
+
// const obj3 = db.add(Obj.make(Person.Person, { fullName: 'Bob' }));
|
|
152
|
+
// const obj4 = db.add(Obj.make(Person.Person, { fullName: 'Charlie' }));
|
|
153
|
+
yield* Effect.promise(() =>
|
|
154
|
+
queue.append([
|
|
155
|
+
createMessage('assistant', [
|
|
156
|
+
// Inline tag.
|
|
157
|
+
{
|
|
158
|
+
_tag: 'text',
|
|
159
|
+
text: [faker.lorem.paragraph(), renderObjectLink(obj1), faker.lorem.paragraph(), '\n'].join(' '),
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
// Inline cards.
|
|
163
|
+
// ...[obj1, obj2, obj3, obj4].map(
|
|
164
|
+
// (obj) =>
|
|
165
|
+
// ({
|
|
166
|
+
// _tag: 'text',
|
|
167
|
+
// text: renderObjectLink(obj, true) + '\n',
|
|
168
|
+
// }) satisfies ContentBlock.Text,
|
|
169
|
+
// ),
|
|
170
|
+
]),
|
|
171
|
+
]),
|
|
172
|
+
);
|
|
173
|
+
}),
|
|
174
|
+
|
|
175
|
+
Effect.gen(function* () {
|
|
176
|
+
const { queue } = yield* ContextQueueService;
|
|
177
|
+
yield* Effect.promise(() =>
|
|
178
|
+
queue.append([
|
|
179
|
+
createMessage('assistant', [
|
|
180
|
+
{
|
|
181
|
+
_tag: 'text',
|
|
182
|
+
text: faker.lorem.paragraph() + '\n',
|
|
183
|
+
},
|
|
184
|
+
]),
|
|
185
|
+
createMessage('assistant', [
|
|
186
|
+
{
|
|
187
|
+
_tag: 'toolCall',
|
|
188
|
+
toolCallId: '1234',
|
|
189
|
+
name: 'search',
|
|
190
|
+
input: JSON.stringify({}),
|
|
191
|
+
providerExecuted: false,
|
|
192
|
+
},
|
|
193
|
+
]),
|
|
194
|
+
createMessage('user', [
|
|
195
|
+
{
|
|
196
|
+
_tag: 'toolResult',
|
|
197
|
+
toolCallId: '1234',
|
|
198
|
+
name: 'search',
|
|
199
|
+
result: 'This is a tool result.',
|
|
200
|
+
providerExecuted: false,
|
|
201
|
+
},
|
|
202
|
+
]),
|
|
203
|
+
]),
|
|
204
|
+
);
|
|
205
|
+
}),
|
|
206
|
+
|
|
207
|
+
Effect.gen(function* () {
|
|
208
|
+
const { queue } = yield* ContextQueueService;
|
|
209
|
+
yield* Effect.promise(() =>
|
|
210
|
+
queue.append([
|
|
211
|
+
createMessage('assistant', [
|
|
212
|
+
{
|
|
213
|
+
_tag: 'text',
|
|
214
|
+
text: faker.lorem.paragraph() + '\n',
|
|
215
|
+
},
|
|
216
|
+
]),
|
|
217
|
+
createMessage('assistant', [
|
|
218
|
+
{
|
|
219
|
+
_tag: 'toolCall',
|
|
220
|
+
toolCallId: '4567',
|
|
221
|
+
name: 'create',
|
|
222
|
+
input: JSON.stringify({}),
|
|
223
|
+
providerExecuted: false,
|
|
224
|
+
},
|
|
225
|
+
]),
|
|
226
|
+
createMessage('user', [
|
|
227
|
+
{
|
|
228
|
+
_tag: 'toolResult',
|
|
229
|
+
toolCallId: '4567',
|
|
230
|
+
name: 'create',
|
|
231
|
+
result: 'This is a tool result.',
|
|
232
|
+
providerExecuted: false,
|
|
233
|
+
},
|
|
234
|
+
]),
|
|
235
|
+
createMessage('assistant', [
|
|
236
|
+
{
|
|
237
|
+
_tag: 'text',
|
|
238
|
+
text:
|
|
239
|
+
Array.from({ length: faker.number.int({ min: 2, max: 3 }) })
|
|
240
|
+
.map(() => faker.lorem.paragraph())
|
|
241
|
+
.join('\n\n') + '\n',
|
|
242
|
+
},
|
|
243
|
+
]),
|
|
244
|
+
]),
|
|
245
|
+
);
|
|
246
|
+
}),
|
|
247
|
+
|
|
248
|
+
Effect.gen(function* () {
|
|
249
|
+
const { queue } = yield* ContextQueueService;
|
|
250
|
+
yield* Effect.promise(() =>
|
|
251
|
+
queue.append([
|
|
252
|
+
createMessage('assistant', [
|
|
253
|
+
{
|
|
254
|
+
_tag: 'text',
|
|
255
|
+
text: faker.lorem.paragraph(),
|
|
256
|
+
},
|
|
257
|
+
]),
|
|
258
|
+
]),
|
|
259
|
+
);
|
|
260
|
+
}),
|
|
261
|
+
];
|
|
@@ -4,16 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { Obj } from '@dxos/echo';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
type ApiAuthorization,
|
|
9
|
-
type BaseServiceRegistry,
|
|
10
|
-
type ServiceQuery,
|
|
11
|
-
ServiceType,
|
|
12
|
-
categoryIcons,
|
|
13
|
-
} from '../types';
|
|
7
|
+
import { type ApiAuthorization, type BaseServiceRegistry, ServiceType, categoryIcons } from '../types';
|
|
14
8
|
|
|
15
9
|
export class MockServiceRegistry implements BaseServiceRegistry {
|
|
16
|
-
async queryServices(
|
|
10
|
+
async queryServices(): Promise<ServiceType[]> {
|
|
17
11
|
return TEST_SERVICES;
|
|
18
12
|
}
|
|
19
13
|
}
|
package/src/translations.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
5
|
+
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
6
6
|
import { Sequence } from '@dxos/conductor';
|
|
7
|
+
import { Type } from '@dxos/echo';
|
|
7
8
|
import { type Resource } from '@dxos/react-ui';
|
|
8
9
|
|
|
9
10
|
import { meta } from './meta';
|
|
@@ -22,6 +23,17 @@ export const translations = [
|
|
|
22
23
|
'object name placeholder': 'New blueprint',
|
|
23
24
|
'rename object label': 'Rename blueprint',
|
|
24
25
|
'delete object label': 'Delete blueprint',
|
|
26
|
+
'object deleted label': 'Blueprint deleted',
|
|
27
|
+
},
|
|
28
|
+
[Type.getTypename(Prompt.Prompt)]: {
|
|
29
|
+
'typename label': 'Prompt',
|
|
30
|
+
'typename label_zero': 'Prompts',
|
|
31
|
+
'typename label_one': 'Prompt',
|
|
32
|
+
'typename label_other': 'Prompts',
|
|
33
|
+
'object name placeholder': 'New prompt',
|
|
34
|
+
'rename object label': 'Rename prompt',
|
|
35
|
+
'delete object label': 'Delete prompt',
|
|
36
|
+
'object deleted label': 'Prompt deleted',
|
|
25
37
|
},
|
|
26
38
|
// TODO(burdon): From conductor.
|
|
27
39
|
[Sequence.typename]: {
|
|
@@ -32,12 +44,14 @@ export const translations = [
|
|
|
32
44
|
'object name placeholder': 'New sequence',
|
|
33
45
|
'rename object label': 'Rename sequence',
|
|
34
46
|
'delete object label': 'Delete sequence',
|
|
47
|
+
'object deleted label': 'Sequence deleted',
|
|
35
48
|
},
|
|
36
49
|
[Assistant.Chat.typename]: {
|
|
37
50
|
'typename label': 'AI Chat',
|
|
38
51
|
'object name placeholder': 'New AI Chat',
|
|
39
52
|
'rename object label': 'Rename AI Chat',
|
|
40
53
|
'delete object label': 'Delete AI Chat',
|
|
54
|
+
'object deleted label': 'AI Chat deleted',
|
|
41
55
|
},
|
|
42
56
|
// TODO(burdon): Reconcile with react-ui-chat.
|
|
43
57
|
[meta.id]: {
|
|
@@ -60,8 +74,12 @@ export const translations = [
|
|
|
60
74
|
'service registry label': 'Service Registry',
|
|
61
75
|
'type filter placeholder': 'Type',
|
|
62
76
|
'any type filter label': 'Any',
|
|
77
|
+
'no blueprint message': 'No active blueprints',
|
|
78
|
+
'tool call label': 'Calling tool...',
|
|
79
|
+
'tool result label': 'Success',
|
|
80
|
+
'tool error label': 'Tool call failed',
|
|
63
81
|
|
|
64
|
-
'
|
|
82
|
+
'invocations label': 'Invocations',
|
|
65
83
|
|
|
66
84
|
'assistant dialog title': 'Assistant',
|
|
67
85
|
'open assistant label': 'Open assistant',
|
|
@@ -69,28 +87,22 @@ export const translations = [
|
|
|
69
87
|
'no tools': 'No tools are configured',
|
|
70
88
|
'no results': 'No results',
|
|
71
89
|
|
|
72
|
-
'button
|
|
73
|
-
'button
|
|
74
|
-
'
|
|
75
|
-
'button
|
|
76
|
-
'button save': 'Save',
|
|
77
|
-
'button run': 'Run',
|
|
78
|
-
'button new thread': 'New Chat',
|
|
90
|
+
'cancel button': 'Cancel',
|
|
91
|
+
'save button': 'Save',
|
|
92
|
+
'new thread button': 'New Chat',
|
|
93
|
+
'rename thread button': 'Rename Chat',
|
|
79
94
|
'chat history label': 'Chat History',
|
|
95
|
+
'chat update name label': 'Update AI Chat name',
|
|
80
96
|
|
|
81
97
|
'toolkit label': 'Toolkit',
|
|
82
98
|
'summary label': 'Summary',
|
|
83
99
|
|
|
84
|
-
'calling tool label': 'Calling tool...',
|
|
85
|
-
'calling label': 'Calling',
|
|
86
|
-
'error label': 'Error',
|
|
87
|
-
|
|
88
100
|
'search placeholder': 'Search...',
|
|
89
|
-
'prompt placeholder': '
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'button
|
|
93
|
-
'
|
|
101
|
+
'prompt placeholder': 'Enter question or command...',
|
|
102
|
+
'context objects button': 'Add to context',
|
|
103
|
+
'context settings button': 'Chat settings',
|
|
104
|
+
'microphone button': 'Click to speak',
|
|
105
|
+
'cancel processing button': 'Stop processing',
|
|
94
106
|
'blueprints in context title': 'Blueprints',
|
|
95
107
|
'objects in context title': 'Content',
|
|
96
108
|
'remove object in context label': 'Remove document',
|
package/src/types/Assistant.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Obj, Ref, Type } from '@dxos/echo';
|
|
8
|
+
import { FormInputAnnotation, LabelAnnotation } from '@dxos/echo/internal';
|
|
9
|
+
import { Queue } from '@dxos/echo-db';
|
|
10
10
|
|
|
11
11
|
import { LLM_PROVIDERS } from './defs';
|
|
12
12
|
|
|
@@ -14,11 +14,10 @@ import { LLM_PROVIDERS } from './defs';
|
|
|
14
14
|
* AI chat.
|
|
15
15
|
*/
|
|
16
16
|
export const Chat = Schema.Struct({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
queue: Type.Ref(Queue),
|
|
17
|
+
name: Schema.String.pipe(Schema.optional),
|
|
18
|
+
queue: Type.Ref(Queue).pipe(FormInputAnnotation.set(false)),
|
|
20
19
|
// TODO(dmaretskyi): Eventually this and the message queue will be the same.
|
|
21
|
-
traceQueue:
|
|
20
|
+
traceQueue: Type.Ref(Queue).pipe(FormInputAnnotation.set(false), Schema.optional),
|
|
22
21
|
}).pipe(
|
|
23
22
|
Type.Obj({
|
|
24
23
|
typename: 'dxos.org/type/assistant/Chat',
|
|
@@ -29,11 +28,14 @@ export const Chat = Schema.Struct({
|
|
|
29
28
|
|
|
30
29
|
export interface Chat extends Schema.Schema.Type<typeof Chat> {}
|
|
31
30
|
|
|
31
|
+
export const makeChat = ({ name, queue }: { name?: string; queue: Queue }) =>
|
|
32
|
+
Obj.make(Chat, { name, queue: Ref.fromDXN(queue.dxn) });
|
|
33
|
+
|
|
32
34
|
/**
|
|
33
35
|
* Relation between a Chat and companion objects (e.g., artifacts).
|
|
34
36
|
*/
|
|
35
37
|
export const CompanionTo = Schema.Struct({
|
|
36
|
-
id:
|
|
38
|
+
id: Obj.ID,
|
|
37
39
|
}).pipe(
|
|
38
40
|
Type.Relation({
|
|
39
41
|
typename: 'dxos.org/relation/assistant/CompanionTo',
|
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import { Blueprint } from '@dxos/blueprints';
|
|
7
|
+
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
8
8
|
import { EchoObjectSchema, SpaceSchema } from '@dxos/client/echo';
|
|
9
9
|
import { Sequence } from '@dxos/conductor';
|
|
10
|
-
import {
|
|
10
|
+
import { Collection } from '@dxos/schema';
|
|
11
11
|
|
|
12
12
|
import { meta } from '../meta';
|
|
13
13
|
|
|
14
14
|
import { Chat } from './Assistant';
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// TODO(burdon): Name?
|
|
17
|
+
export class OnCreateSpace extends Schema.TaggedClass<OnCreateSpace>()(`${meta.id}/on-space-created`, {
|
|
17
18
|
input: Schema.Struct({
|
|
18
19
|
space: SpaceSchema,
|
|
19
|
-
rootCollection:
|
|
20
|
+
rootCollection: Collection.Collection,
|
|
20
21
|
}),
|
|
21
22
|
output: Schema.Void,
|
|
22
23
|
}) {}
|
|
@@ -31,6 +32,13 @@ export class CreateChat extends Schema.TaggedClass<CreateChat>()(`${meta.id}/act
|
|
|
31
32
|
}),
|
|
32
33
|
}) {}
|
|
33
34
|
|
|
35
|
+
export class UpdateChatName extends Schema.TaggedClass<UpdateChatName>()(`${meta.id}/action/update-name`, {
|
|
36
|
+
input: Schema.Struct({
|
|
37
|
+
chat: Chat,
|
|
38
|
+
}),
|
|
39
|
+
output: Schema.Void,
|
|
40
|
+
}) {}
|
|
41
|
+
|
|
34
42
|
export const BlueprintForm = Schema.Struct({
|
|
35
43
|
key: Schema.String,
|
|
36
44
|
name: Schema.String,
|
|
@@ -44,6 +52,15 @@ export class CreateBlueprint extends Schema.TaggedClass<CreateBlueprint>()(`${me
|
|
|
44
52
|
}),
|
|
45
53
|
}) {}
|
|
46
54
|
|
|
55
|
+
export class CreatePrompt extends Schema.TaggedClass<CreatePrompt>()(`${meta.id}/action/create-prompt`, {
|
|
56
|
+
input: Schema.Struct({
|
|
57
|
+
name: Schema.optional(Schema.String),
|
|
58
|
+
}),
|
|
59
|
+
output: Schema.Struct({
|
|
60
|
+
object: Prompt.Prompt,
|
|
61
|
+
}),
|
|
62
|
+
}) {}
|
|
63
|
+
|
|
47
64
|
export class CreateSequence extends Schema.TaggedClass<CreateSequence>()(`${meta.id}/action/create-sequence`, {
|
|
48
65
|
input: Schema.Struct({
|
|
49
66
|
name: Schema.optional(Schema.String),
|
|
@@ -56,7 +73,7 @@ export class CreateSequence extends Schema.TaggedClass<CreateSequence>()(`${meta
|
|
|
56
73
|
export class SetCurrentChat extends Schema.TaggedClass<SetCurrentChat>()(`${meta.id}/action/set-current-chat`, {
|
|
57
74
|
input: Schema.Struct({
|
|
58
75
|
companionTo: EchoObjectSchema,
|
|
59
|
-
chat: Chat,
|
|
76
|
+
chat: Chat.pipe(Schema.optional),
|
|
60
77
|
}),
|
|
61
78
|
output: Schema.Void,
|
|
62
79
|
}) {}
|
package/src/types/service.ts
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
7
|
import { ComputeGraph } from '@dxos/conductor';
|
|
8
8
|
import { Type } from '@dxos/echo';
|
|
9
|
-
import { TypedObject } from '@dxos/echo
|
|
10
|
-
import {
|
|
9
|
+
import { TypedObject } from '@dxos/echo/internal';
|
|
10
|
+
import { Function } from '@dxos/functions';
|
|
11
|
+
|
|
12
|
+
// TODO(burdon): Factor out and reconcile with https://github.com/dxos/dxos/blob/main/packages/plugins/plugin-token-manager/src/defs/presets.ts#L7
|
|
11
13
|
|
|
12
14
|
const ApiAuthorizationKey = Schema.Struct({
|
|
13
15
|
type: Schema.Literal('api-key'),
|
|
@@ -36,7 +38,7 @@ export type ApiAuthorization = Schema.Schema.Type<typeof ApiAuthorization>;
|
|
|
36
38
|
|
|
37
39
|
const ServiceInterfaceFunction = Schema.Struct({
|
|
38
40
|
kind: Schema.Literal('function'),
|
|
39
|
-
fn: Type.Ref(
|
|
41
|
+
fn: Type.Ref(Function.Function),
|
|
40
42
|
});
|
|
41
43
|
|
|
42
44
|
const ServiceInterfaceWorkflow = Schema.Struct({
|
|
@@ -63,7 +65,13 @@ const ServiceInterfaceApi = Schema.Struct({
|
|
|
63
65
|
authorization: Schema.optional(ApiAuthorization),
|
|
64
66
|
});
|
|
65
67
|
|
|
66
|
-
const ServiceInterface = Schema.Union(
|
|
68
|
+
const ServiceInterface = Schema.Union(
|
|
69
|
+
// Service types.
|
|
70
|
+
ServiceInterfaceFunction,
|
|
71
|
+
ServiceInterfaceWorkflow,
|
|
72
|
+
ServiceInterfaceApi,
|
|
73
|
+
);
|
|
74
|
+
|
|
67
75
|
export type ServiceInterface = Schema.Schema.Type<typeof ServiceInterface>;
|
|
68
76
|
|
|
69
77
|
export class ServiceType extends TypedObject({
|
|
@@ -86,15 +94,15 @@ export class ServiceType extends TypedObject({
|
|
|
86
94
|
// Service Registry
|
|
87
95
|
//
|
|
88
96
|
|
|
97
|
+
export interface BaseServiceRegistry {
|
|
98
|
+
queryServices(query?: ServiceQuery): Promise<ServiceType[]>;
|
|
99
|
+
}
|
|
100
|
+
|
|
89
101
|
export type ServiceQuery = {
|
|
90
102
|
name?: string;
|
|
91
103
|
category?: string;
|
|
92
104
|
};
|
|
93
105
|
|
|
94
|
-
export interface BaseServiceRegistry {
|
|
95
|
-
queryServices(query?: ServiceQuery): Promise<ServiceType[]>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
106
|
export const categoryIcons: Record<string, string> = {
|
|
99
107
|
finance: 'ph--bank--regular',
|
|
100
108
|
health: 'ph--heart--regular',
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TemplateEditor
|
|
3
|
-
} from "./chunk-V5H5CCZA.mjs";
|
|
4
|
-
import "./chunk-O4LUJEDV.mjs";
|
|
5
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
6
|
-
|
|
7
|
-
// src/components/BlueprintContainer.tsx
|
|
8
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
9
|
-
import React from "react";
|
|
10
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
11
|
-
var BlueprintContainer = ({ blueprint }) => {
|
|
12
|
-
var _effect = _useSignals();
|
|
13
|
-
try {
|
|
14
|
-
return /* @__PURE__ */ React.createElement(StackItem.Content, {
|
|
15
|
-
classNames: "container-max-width"
|
|
16
|
-
}, /* @__PURE__ */ React.createElement(TemplateEditor, {
|
|
17
|
-
id: blueprint.id,
|
|
18
|
-
template: blueprint.instructions
|
|
19
|
-
}));
|
|
20
|
-
} finally {
|
|
21
|
-
_effect.f();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
var BlueprintContainer_default = BlueprintContainer;
|
|
25
|
-
export {
|
|
26
|
-
BlueprintContainer,
|
|
27
|
-
BlueprintContainer_default as default
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=BlueprintContainer-OWUSKPRK.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/BlueprintContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type Blueprint } from '@dxos/blueprints';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { TemplateEditor } from './TemplateEditor';\n\nexport type BlueprintContainerProps = {\n blueprint: Blueprint.Blueprint;\n};\n\nexport const BlueprintContainer = ({ blueprint }: BlueprintContainerProps) => {\n return (\n <StackItem.Content classNames='container-max-width'>\n <TemplateEditor id={blueprint.id} template={blueprint.instructions} />\n </StackItem.Content>\n );\n};\n\nexport default BlueprintContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,iBAAiB;AAQnB,IAAMC,qBAAqB,CAAC,EAAEC,UAAS,MAA2B;;;AACvE,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,gBAAAA;MAAeC,IAAIL,UAAUK;MAAIC,UAAUN,UAAUO;;;;;AAG5D;AAEA,IAAA,6BAAeR;",
|
|
6
|
-
"names": ["React", "StackItem", "BlueprintContainer", "blueprint", "StackItem", "Content", "classNames", "TemplateEditor", "id", "template", "instructions"]
|
|
7
|
-
}
|