@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,174 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { log } from '@dxos/log';
|
|
8
|
+
import {
|
|
9
|
+
PromptWidget,
|
|
10
|
+
ReferenceWidget,
|
|
11
|
+
SelectWidget,
|
|
12
|
+
SuggestionWidget,
|
|
13
|
+
SummaryWidget,
|
|
14
|
+
ToggleContainer,
|
|
15
|
+
} from '@dxos/react-ui-components';
|
|
16
|
+
import { type XmlWidgetProps, type XmlWidgetRegistry, getXmlTextChild } from '@dxos/react-ui-editor';
|
|
17
|
+
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
18
|
+
import { ContentBlock, type Message } from '@dxos/types';
|
|
19
|
+
|
|
20
|
+
import { ToolBlock } from '../ToolBlock';
|
|
21
|
+
|
|
22
|
+
import { type BlockRenderer, type MessageThreadContext } from './sync';
|
|
23
|
+
|
|
24
|
+
const Fallback = ({ _tag, ...props }: XmlWidgetProps<MessageThreadContext>) => {
|
|
25
|
+
return (
|
|
26
|
+
<ToggleContainer.Root classNames='rounded-sm'>
|
|
27
|
+
<ToggleContainer.Header classNames='bg-groupSurface'>{_tag}</ToggleContainer.Header>
|
|
28
|
+
<ToggleContainer.Content classNames='bg-modalSurface'>
|
|
29
|
+
<Json classNames='!p-2 text-sm' data={props} />
|
|
30
|
+
</ToggleContainer.Content>
|
|
31
|
+
</ToggleContainer.Root>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Custom XML tags registry.
|
|
37
|
+
*/
|
|
38
|
+
export const componentRegistry: XmlWidgetRegistry = {
|
|
39
|
+
//
|
|
40
|
+
// Widgets
|
|
41
|
+
//
|
|
42
|
+
|
|
43
|
+
['prompt' as const]: {
|
|
44
|
+
block: true,
|
|
45
|
+
factory: ({ children }) => {
|
|
46
|
+
const text = getXmlTextChild(children);
|
|
47
|
+
return text ? new PromptWidget(text) : null;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
['reference' as const]: {
|
|
51
|
+
block: false,
|
|
52
|
+
factory: ({ children, ref }) => {
|
|
53
|
+
const text = getXmlTextChild(children);
|
|
54
|
+
return text && ref ? new ReferenceWidget(text, ref) : null;
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
['select' as const]: {
|
|
58
|
+
block: true,
|
|
59
|
+
factory: ({ children }) => {
|
|
60
|
+
const options = children
|
|
61
|
+
?.map((option: any) => option._tag === 'option' && getXmlTextChild(option.children))
|
|
62
|
+
.filter(Boolean);
|
|
63
|
+
return options?.length ? new SelectWidget(options) : null;
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
['suggestion' as const]: {
|
|
67
|
+
block: true,
|
|
68
|
+
factory: ({ children }) => {
|
|
69
|
+
const text = getXmlTextChild(children);
|
|
70
|
+
return text ? new SuggestionWidget(text) : null;
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
['summary' as const]: {
|
|
74
|
+
block: true,
|
|
75
|
+
factory: ({ children }) => {
|
|
76
|
+
const text = getXmlTextChild(children);
|
|
77
|
+
return text ? new SummaryWidget(text) : null;
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
//
|
|
82
|
+
// React
|
|
83
|
+
//
|
|
84
|
+
|
|
85
|
+
['toolCall' as const]: {
|
|
86
|
+
block: true,
|
|
87
|
+
Component: ToolBlock,
|
|
88
|
+
},
|
|
89
|
+
['toolResult' as const]: {
|
|
90
|
+
block: true,
|
|
91
|
+
Component: Fallback,
|
|
92
|
+
},
|
|
93
|
+
['toolkit' as const]: {
|
|
94
|
+
block: true,
|
|
95
|
+
Component: Fallback,
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
//
|
|
99
|
+
// Fallback
|
|
100
|
+
//
|
|
101
|
+
|
|
102
|
+
['json' as const]: {
|
|
103
|
+
block: true,
|
|
104
|
+
Component: Fallback,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Convert block to markdown.
|
|
110
|
+
*/
|
|
111
|
+
export const blockToMarkdown: BlockRenderer = (
|
|
112
|
+
context: MessageThreadContext,
|
|
113
|
+
message: Message.Message,
|
|
114
|
+
block: ContentBlock.Any,
|
|
115
|
+
) => {
|
|
116
|
+
let str = blockToMarkdownImpl(context, message, block);
|
|
117
|
+
if (str && !block.pending) {
|
|
118
|
+
return (str += '\n');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return str;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const blockToMarkdownImpl = (context: MessageThreadContext, message: Message.Message, block: ContentBlock.Any) => {
|
|
125
|
+
log('blockToMarkdown', { block: JSON.stringify(block) });
|
|
126
|
+
switch (block._tag) {
|
|
127
|
+
case 'text': {
|
|
128
|
+
if (message.sender.role === 'user') {
|
|
129
|
+
return `<prompt>${block.text}</prompt>`;
|
|
130
|
+
} else {
|
|
131
|
+
const text = block.text.trim();
|
|
132
|
+
if (text.length > 0) {
|
|
133
|
+
return text;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
case 'reference': {
|
|
139
|
+
const dxn = block.reference.dxn;
|
|
140
|
+
return `<reference ref="${dxn.toString()}">${context.getObjectLabel(dxn)}</reference>`;
|
|
141
|
+
}
|
|
142
|
+
case 'suggestion': {
|
|
143
|
+
if (block.pending) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
return `<suggestion>${block.text}</suggestion>`;
|
|
147
|
+
}
|
|
148
|
+
case 'select': {
|
|
149
|
+
if (block.pending || block.options.length === 0) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
return `<select>${block.options.map((option) => `<option>${option}</option>`).join('')}</select>`;
|
|
153
|
+
}
|
|
154
|
+
case 'toolCall': {
|
|
155
|
+
context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, {
|
|
156
|
+
blocks: [block],
|
|
157
|
+
});
|
|
158
|
+
return `<toolCall id="${block.toolCallId}" />`;
|
|
159
|
+
}
|
|
160
|
+
case 'toolResult': {
|
|
161
|
+
context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, ({ blocks = [] }) => ({
|
|
162
|
+
blocks: [...blocks, block],
|
|
163
|
+
}));
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
case 'summary': {
|
|
167
|
+
return `<summary>${ContentBlock.createSummaryMessage(block)}</summary>`;
|
|
168
|
+
}
|
|
169
|
+
default: {
|
|
170
|
+
// TODO(burdon): Needs stable ID.
|
|
171
|
+
return `<json id="${message.id}">\n${JSON.stringify(block)}\n</json>`;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { EditorView } from '@codemirror/view';
|
|
6
|
+
import { describe, it } from '@effect/vitest';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
|
|
9
|
+
import { type ContentBlock } from '@dxos/types';
|
|
10
|
+
|
|
11
|
+
import { createMessage } from '../../testing';
|
|
12
|
+
|
|
13
|
+
import { blockToMarkdown } from './registry';
|
|
14
|
+
import { MessageSyncer, type TextModel } from './sync';
|
|
15
|
+
|
|
16
|
+
class TestDocument implements TextModel {
|
|
17
|
+
private readonly _view = new EditorView({ extensions: [] });
|
|
18
|
+
|
|
19
|
+
get view() {
|
|
20
|
+
return this._view;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get content() {
|
|
24
|
+
return this._view.state.doc.toString();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async reset(text: string) {
|
|
28
|
+
this._view.dispatch({
|
|
29
|
+
changes: { from: 0, to: this._view.state.doc.length, insert: text },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async append(text: string) {
|
|
34
|
+
this._view.dispatch({
|
|
35
|
+
changes: { from: this._view.state.doc.length, insert: text },
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
updateWidget(_id: string, _value: any) {}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
describe('reducers', () => {
|
|
43
|
+
it.effect(
|
|
44
|
+
'basic sync',
|
|
45
|
+
Effect.fn(function* ({ expect }) {
|
|
46
|
+
const doc = new TestDocument();
|
|
47
|
+
const syncer = new MessageSyncer(doc, blockToMarkdown);
|
|
48
|
+
|
|
49
|
+
const messages = [
|
|
50
|
+
createMessage('user', [{ _tag: 'text', text: 'Hello' }]),
|
|
51
|
+
createMessage('assistant', [{ _tag: 'text', text: 'Hi there!' }]),
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
syncer.append(messages);
|
|
55
|
+
expect(doc.content).toEqual(['<prompt>Hello</prompt>', 'Hi there!', ''].join('\n'));
|
|
56
|
+
|
|
57
|
+
messages[1].blocks.push({ _tag: 'text', text: 'How can I help?' });
|
|
58
|
+
syncer.append(messages);
|
|
59
|
+
expect(doc.content).toEqual(['<prompt>Hello</prompt>', 'Hi there!', 'How can I help?', ''].join('\n'));
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
it.effect(
|
|
64
|
+
'sync with partial updates',
|
|
65
|
+
Effect.fn(function* ({ expect }) {
|
|
66
|
+
const doc = new TestDocument();
|
|
67
|
+
const syncer = new MessageSyncer(doc, blockToMarkdown);
|
|
68
|
+
|
|
69
|
+
const messages = [
|
|
70
|
+
createMessage('user', [{ _tag: 'text', text: 'Hello' }]),
|
|
71
|
+
createMessage('assistant', [{ _tag: 'text', text: 'Hi there!', pending: true }]),
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
syncer.append(messages);
|
|
75
|
+
expect(doc.content).toEqual(['<prompt>Hello</prompt>', 'Hi there!'].join('\n'));
|
|
76
|
+
|
|
77
|
+
const block = messages[1].blocks[0] as ContentBlock.Text;
|
|
78
|
+
block.text = 'Hi there! How are you?';
|
|
79
|
+
block.pending = false;
|
|
80
|
+
syncer.append(messages);
|
|
81
|
+
|
|
82
|
+
messages[1].blocks.push({ _tag: 'text', text: 'How can I help?' });
|
|
83
|
+
syncer.append(messages);
|
|
84
|
+
expect(doc.content).toEqual(
|
|
85
|
+
['<prompt>Hello</prompt>', 'Hi there! How are you?', 'How can I help?', ''].join('\n'),
|
|
86
|
+
);
|
|
87
|
+
}),
|
|
88
|
+
);
|
|
89
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type DXN } from '@dxos/echo';
|
|
6
|
+
import { log } from '@dxos/log';
|
|
7
|
+
import { type MarkdownStreamController } from '@dxos/react-ui-components';
|
|
8
|
+
import { type StateDispatch, type XmlWidgetStateManager } from '@dxos/react-ui-editor';
|
|
9
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Update document.
|
|
13
|
+
*/
|
|
14
|
+
export type TextModel = Pick<MarkdownStreamController, 'view' | 'reset' | 'append' | 'updateWidget'>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Thread context passed to renderer.
|
|
18
|
+
*/
|
|
19
|
+
export class MessageThreadContext implements Pick<MarkdownStreamController, 'updateWidget'> {
|
|
20
|
+
constructor(private readonly _widgetState?: XmlWidgetStateManager) {}
|
|
21
|
+
|
|
22
|
+
updateWidget<T>(id: string, value: StateDispatch<T>) {
|
|
23
|
+
this._widgetState?.updateWidget(id, value);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// TODO(burdon): Resolve from hypergraph.
|
|
27
|
+
getObjectLabel(_id: DXN) {
|
|
28
|
+
return 'Object';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Renders a block to markdown.
|
|
34
|
+
*/
|
|
35
|
+
export type BlockRenderer = (
|
|
36
|
+
context: MessageThreadContext,
|
|
37
|
+
message: Message.Message,
|
|
38
|
+
block: ContentBlock.Any,
|
|
39
|
+
) => string | undefined;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Syncs messages with the editor.
|
|
43
|
+
*/
|
|
44
|
+
export class MessageSyncer {
|
|
45
|
+
private _initialMessageId?: string;
|
|
46
|
+
private _currentMessageIndex = 0;
|
|
47
|
+
private _currentBlockIndex = 0;
|
|
48
|
+
private _currentBlockContent?: string;
|
|
49
|
+
|
|
50
|
+
private readonly _context: MessageThreadContext;
|
|
51
|
+
|
|
52
|
+
constructor(
|
|
53
|
+
private readonly _model: TextModel,
|
|
54
|
+
private readonly _blockRenderer: BlockRenderer,
|
|
55
|
+
) {
|
|
56
|
+
this._context = new MessageThreadContext(this._model);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
get context() {
|
|
60
|
+
return this._context;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
reset() {
|
|
64
|
+
log('reset');
|
|
65
|
+
this._initialMessageId = undefined;
|
|
66
|
+
this._currentMessageIndex = 0;
|
|
67
|
+
this._currentBlockIndex = 0;
|
|
68
|
+
this._currentBlockContent = undefined;
|
|
69
|
+
void this._model.reset('');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Syncs messages with the editor.
|
|
74
|
+
*/
|
|
75
|
+
append(messages: Message.Message[], flush = false): boolean {
|
|
76
|
+
// Check if new set of messages.
|
|
77
|
+
if (this._initialMessageId !== messages[0]?.id) {
|
|
78
|
+
this.reset();
|
|
79
|
+
this._initialMessageId = messages[0]?.id;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (flush && this._model.view?.state.doc.length === 0) {
|
|
83
|
+
const buffer: string[] = [];
|
|
84
|
+
this.process(messages, (content) => {
|
|
85
|
+
buffer.push(content);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const content = buffer.join('');
|
|
89
|
+
this._model.view?.dispatch({
|
|
90
|
+
changes: [{ from: 0, to: this._model.view?.state.doc.length ?? 0, insert: content }],
|
|
91
|
+
selection: { anchor: content.length },
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
return true;
|
|
95
|
+
} else {
|
|
96
|
+
this.process(messages, (content) => {
|
|
97
|
+
void this._model.append(content);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private process(messages: Message.Message[], append: (content: string) => void) {
|
|
105
|
+
log('sync', {
|
|
106
|
+
doc: this._model.view?.state.doc.length,
|
|
107
|
+
messages: messages.map((message) => message.blocks.length),
|
|
108
|
+
currentMessageIndex: this._currentMessageIndex,
|
|
109
|
+
currentBlockIndex: this._currentBlockIndex,
|
|
110
|
+
currentBlockContent: this._currentBlockContent,
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
let i = this._currentMessageIndex;
|
|
114
|
+
for (const message of messages.slice(this._currentMessageIndex)) {
|
|
115
|
+
if (i > this._currentMessageIndex) {
|
|
116
|
+
this._currentBlockIndex = 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
this._currentMessageIndex = i;
|
|
120
|
+
let j = this._currentBlockIndex;
|
|
121
|
+
for (const block of message.blocks.slice(this._currentBlockIndex)) {
|
|
122
|
+
this._currentBlockIndex = j;
|
|
123
|
+
const currentBlockContent = this._blockRenderer(this._context, message, block);
|
|
124
|
+
if (currentBlockContent) {
|
|
125
|
+
let content: string = '';
|
|
126
|
+
if (this._currentBlockContent && currentBlockContent.startsWith(this._currentBlockContent)) {
|
|
127
|
+
content = currentBlockContent.slice(this._currentBlockContent.length);
|
|
128
|
+
} else {
|
|
129
|
+
content = currentBlockContent;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
log('append', { message: i, block: j, content });
|
|
133
|
+
this._currentBlockContent = currentBlockContent;
|
|
134
|
+
append(content);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (block.pending) {
|
|
138
|
+
return;
|
|
139
|
+
} else {
|
|
140
|
+
this._currentBlockContent = undefined;
|
|
141
|
+
this._currentBlockIndex++;
|
|
142
|
+
}
|
|
143
|
+
j++;
|
|
144
|
+
}
|
|
145
|
+
i++;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<prompt>hi</prompt>
|
|
2
|
+
Hi! I'm Kai, your AI assistant powered by DXOS. I see you have a document in your context. Let me take a look at it to see how I can help you.
|
|
3
|
+
<toolCall id="toolu_012MB5XWrQhsyjUBoBCr7jXB" />
|
|
4
|
+
|
|
5
|
+
<summary>OK (1 tool uses · 2.62k tokens · 4.8s)</summary>
|
|
6
|
+
I can see you have a comprehensive welcome document for Composer by DXOS. This document explains what Composer is - an extensible collaborative application with features like documents, diagrams, tables, and sheets.
|
|
7
|
+
|
|
8
|
+
Here are some suggestions based on what's available:
|
|
9
|
+
<suggestion>Create a new document</suggestion>
|
|
10
|
+
<suggestion>Edit the welcome document</suggestion>
|
|
11
|
+
<suggestion>Create a table to organize information</suggestion>
|
|
12
|
+
<suggestion>Create a sketch for diagrams</suggestion>
|
|
13
|
+
<suggestion>Learn about collaboration features</suggestion>
|
|
14
|
+
|
|
15
|
+
Is there something specific you'd like to do with this document or would you like to explore other features of Composer?
|
|
16
|
+
|
|
17
|
+
<summary>OK (3.91k tokens · 7.0s)</summary>
|
|
18
|
+
<prompt>Create a table to organize information</prompt>
|
|
19
|
+
I'll help you create a table to organize information. Let me check what table creation tools are available.
|
|
20
|
+
<toolCall id="toolu_01Gk8ZNGYQEczAjGkbDZ9n1D" />
|
|
21
|
+
<summary>OK (1 tool uses · 3.99k tokens · 3.4s)</summary>
|
|
22
|
+
I need to check what artifact definitions are available for creating tables. Based on the blueprint instructions, I should first query for available artifact definitions to see what table-related tools I can use.
|
|
23
|
+
|
|
24
|
+
However, I notice that the function definitions provided don't include the artifact-related tools mentioned in the blueprint (like `require_artifact_definitions` or table creation tools). The available functions are focused on document operations (open, diff, add-to-context, open-item) and analysis mode.
|
|
25
|
+
|
|
26
|
+
Let me work with what's available. Since I can't directly create a table artifact with the current tools, I can help you create a table structure within a markdown document instead.
|
|
27
|
+
|
|
28
|
+
Would you like me to:
|
|
29
|
+
|
|
30
|
+
1. Create a simple markdown table structure in a new document that you can use to organize your information?
|
|
31
|
+
2. Or would you prefer to use Composer's built-in Tables plugin (as mentioned in the welcome document) by creating one through the Composer interface?
|
|
32
|
+
|
|
33
|
+
What kind of information are you looking to organize? This will help me suggest the best table structure for your needs.
|
|
34
|
+
<toolCall id="toolu_01CQXUsyLw2uoV3k1mPLqFee" />
|
|
35
|
+
|
|
36
|
+
<summary>OK (1 tool uses · 4.28k tokens · 11.1s)</summary>
|
|
37
|
+
<summary>OK (4.30k tokens · 1.6s)</summary>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type SurfaceComponentProps } from '@dxos/app-framework/react';
|
|
8
|
+
import { Agent } from '@dxos/assistant-toolkit';
|
|
9
|
+
import { type Prompt } from '@dxos/blueprints';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { invokeFunctionWithTracing, useComputeRuntimeCallback } from '@dxos/plugin-automation';
|
|
12
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
13
|
+
import { Toolbar, useTranslation } from '@dxos/react-ui';
|
|
14
|
+
import { useAttention } from '@dxos/react-ui-attention';
|
|
15
|
+
import { StackItem } from '@dxos/react-ui-stack';
|
|
16
|
+
|
|
17
|
+
import { meta } from '../meta';
|
|
18
|
+
|
|
19
|
+
import { TemplateEditor } from './TemplateEditor';
|
|
20
|
+
|
|
21
|
+
export type PromptArticleProps = SurfaceComponentProps<Prompt.Prompt>;
|
|
22
|
+
|
|
23
|
+
export const PromptArticle = ({ subject }: PromptArticleProps) => {
|
|
24
|
+
const { t } = useTranslation(meta.id);
|
|
25
|
+
const space = getSpace(subject);
|
|
26
|
+
const { hasAttention } = useAttention(Obj.getDXN(subject).toString());
|
|
27
|
+
|
|
28
|
+
const inputData = useMemo(
|
|
29
|
+
() =>
|
|
30
|
+
subject && {
|
|
31
|
+
prompt: space?.db.makeRef(Obj.getDXN(subject)),
|
|
32
|
+
input: {},
|
|
33
|
+
},
|
|
34
|
+
[subject, space],
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const handleRun = useComputeRuntimeCallback(space, () => invokeFunctionWithTracing(Agent.prompt, inputData), [
|
|
38
|
+
inputData,
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<StackItem.Content toolbar>
|
|
43
|
+
<Toolbar.Root disabled={!hasAttention} onClick={handleRun}>
|
|
44
|
+
<Toolbar.IconButton iconOnly icon='ph--play--regular' label={t('run prompt label')} onClick={handleRun} />
|
|
45
|
+
</Toolbar.Root>
|
|
46
|
+
<TemplateEditor id={subject.id} template={subject.instructions} classNames='container-max-width' />
|
|
47
|
+
</StackItem.Content>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default PromptArticle;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useState } from 'react';
|
|
9
7
|
|
|
@@ -11,26 +9,36 @@ import { createSystemPrompt } from '@dxos/assistant';
|
|
|
11
9
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
12
10
|
import { useClient } from '@dxos/react-client';
|
|
13
11
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
|
-
import { withLayout, withTheme } from '@dxos/
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
15
13
|
import { trim } from '@dxos/util';
|
|
16
14
|
|
|
17
15
|
import { translations } from '../../translations';
|
|
18
16
|
|
|
19
17
|
import { TemplateEditor, type TemplateEditorProps } from './TemplateEditor';
|
|
20
18
|
|
|
19
|
+
const FENCE = '```';
|
|
20
|
+
|
|
21
21
|
const TEMPLATE = trim`
|
|
22
22
|
{{! System Prompt }}
|
|
23
23
|
|
|
24
|
-
You are
|
|
24
|
+
You are an expert chess player.
|
|
25
25
|
The move history of the current game is: {{history}}.
|
|
26
26
|
If asked to suggest a move explain why it is a good move.
|
|
27
27
|
|
|
28
28
|
{{#each artifacts}}
|
|
29
|
-
|
|
29
|
+
{{this}}
|
|
30
30
|
{{/each}}
|
|
31
31
|
|
|
32
|
+
Reponse in the format: <suggestion>SUGGESTION</suggestion>
|
|
33
|
+
|
|
34
|
+
@dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M
|
|
35
|
+
|
|
32
36
|
---
|
|
33
37
|
|
|
38
|
+
${FENCE}ts
|
|
39
|
+
const x = 100;
|
|
40
|
+
${FENCE}
|
|
41
|
+
|
|
34
42
|
{{input}}
|
|
35
43
|
`;
|
|
36
44
|
|
|
@@ -61,13 +69,13 @@ const meta = {
|
|
|
61
69
|
component: TemplateEditor as any,
|
|
62
70
|
render: DefaultStory,
|
|
63
71
|
decorators: [
|
|
72
|
+
withTheme,
|
|
73
|
+
withLayout({ container: 'column' }),
|
|
64
74
|
withClientProvider({
|
|
65
75
|
types: [Blueprint.Blueprint],
|
|
66
76
|
createIdentity: true,
|
|
67
77
|
createSpace: true,
|
|
68
78
|
}),
|
|
69
|
-
withLayout({ fullscreen: true, classNames: 'justify-center bg-deckSurface' }),
|
|
70
|
-
withTheme,
|
|
71
79
|
],
|
|
72
80
|
parameters: {
|
|
73
81
|
translations,
|
|
@@ -2,31 +2,34 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { defaultHighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
7
8
|
import { type Template } from '@dxos/blueprints';
|
|
8
|
-
import { createDocAccessor } from '@dxos/
|
|
9
|
+
import { createDocAccessor } from '@dxos/echo-db';
|
|
9
10
|
import { type ThemedClassName, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
10
11
|
import {
|
|
11
12
|
createBasicExtensions,
|
|
12
13
|
createDataExtensions,
|
|
13
14
|
createMarkdownExtensions,
|
|
14
15
|
createThemeExtensions,
|
|
16
|
+
decorateMarkdown,
|
|
15
17
|
useTextEditor,
|
|
16
18
|
} from '@dxos/react-ui-editor';
|
|
17
19
|
import { mx } from '@dxos/react-ui-theme';
|
|
18
|
-
import {
|
|
20
|
+
import { isNonNullable } from '@dxos/util';
|
|
19
21
|
|
|
20
22
|
import { meta } from '../../meta';
|
|
21
23
|
|
|
22
|
-
import { handlebars } from './
|
|
24
|
+
import { handlebars, xmlDecorator } from './extensions';
|
|
23
25
|
|
|
24
26
|
export type TemplateEditorProps = ThemedClassName<{
|
|
25
27
|
id: string;
|
|
26
28
|
template: Template.Template;
|
|
29
|
+
lineNumbers?: boolean;
|
|
27
30
|
}>;
|
|
28
31
|
|
|
29
|
-
export const TemplateEditor = ({ id, classNames, template }: TemplateEditorProps) => {
|
|
32
|
+
export const TemplateEditor = ({ id, classNames, template, lineNumbers = true }: TemplateEditorProps) => {
|
|
30
33
|
const { t } = useTranslation(meta.id);
|
|
31
34
|
const { themeMode } = useThemeContext();
|
|
32
35
|
const { parentRef } = useTextEditor(() => {
|
|
@@ -38,21 +41,27 @@ export const TemplateEditor = ({ id, classNames, template }: TemplateEditorProps
|
|
|
38
41
|
return {
|
|
39
42
|
initialValue: text.content ?? '',
|
|
40
43
|
extensions: [
|
|
41
|
-
createDataExtensions({
|
|
44
|
+
createDataExtensions({
|
|
45
|
+
id,
|
|
46
|
+
text: createDocAccessor(text, ['content']),
|
|
47
|
+
}),
|
|
42
48
|
createBasicExtensions({
|
|
43
49
|
bracketMatching: false,
|
|
44
|
-
lineNumbers
|
|
50
|
+
lineNumbers,
|
|
45
51
|
lineWrapping: true,
|
|
46
52
|
placeholder: t('template placeholder'),
|
|
47
53
|
}),
|
|
48
|
-
createThemeExtensions({ themeMode }),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
createMarkdownExtensions({ themeMode }),
|
|
54
|
+
createThemeExtensions({ themeMode, slots: { content: { className: '!pie-4' } } }),
|
|
55
|
+
createMarkdownExtensions(),
|
|
56
|
+
decorateMarkdown(),
|
|
52
57
|
handlebars(),
|
|
53
|
-
|
|
58
|
+
// xml(),
|
|
59
|
+
// NOTE: Since we're using markdown only HTML nodes are parsed.
|
|
60
|
+
xmlDecorator(),
|
|
61
|
+
syntaxHighlighting(defaultHighlightStyle),
|
|
62
|
+
].filter(isNonNullable),
|
|
54
63
|
};
|
|
55
|
-
}, [themeMode, template.source?.target]);
|
|
64
|
+
}, [themeMode, template.source?.target, lineNumbers]);
|
|
56
65
|
|
|
57
66
|
return <div ref={parentRef} className={mx('bs-full overflow-hidden', classNames)} />;
|
|
58
67
|
};
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta } from '@storybook/react-vite';
|
|
8
6
|
import React, { useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
11
9
|
import { useClient } from '@dxos/react-client';
|
|
12
10
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
|
-
import { withLayout, withTheme } from '@dxos/
|
|
11
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
12
|
import { trim } from '@dxos/util';
|
|
15
13
|
|
|
16
14
|
import { translations } from '../../translations';
|
|
@@ -41,7 +39,7 @@ const DefaultStory = () => {
|
|
|
41
39
|
});
|
|
42
40
|
|
|
43
41
|
return (
|
|
44
|
-
<div role='none' className='flex
|
|
42
|
+
<div role='none' className='flex is-[40rem] border border-separator overflow-hidden'>
|
|
45
43
|
<TemplateForm id={blueprint.id} template={blueprint.instructions} />
|
|
46
44
|
</div>
|
|
47
45
|
);
|
|
@@ -52,13 +50,13 @@ const meta = {
|
|
|
52
50
|
component: TemplateForm,
|
|
53
51
|
render: DefaultStory,
|
|
54
52
|
decorators: [
|
|
53
|
+
withTheme,
|
|
54
|
+
withLayout({ container: 'column' }),
|
|
55
55
|
withClientProvider({
|
|
56
56
|
types: [Blueprint.Blueprint],
|
|
57
57
|
createIdentity: true,
|
|
58
58
|
createSpace: true,
|
|
59
59
|
}),
|
|
60
|
-
withLayout({ fullscreen: true, classNames: 'flex justify-center' }),
|
|
61
|
-
withTheme,
|
|
62
60
|
],
|
|
63
61
|
parameters: {
|
|
64
62
|
translations,
|