@dxos/plugin-assistant 0.8.4-main.1da679c → 0.8.4-main.21d9917
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-WP3G5GLG.mjs +31 -0
- package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-GFSJZTOT.mjs +153 -0
- package/dist/lib/browser/ChatCompanion-GFSJZTOT.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-IHAPBIZE.mjs +72 -0
- package/dist/lib/browser/ChatContainer-IHAPBIZE.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-EGRMPCTL.mjs +85 -0
- package/dist/lib/browser/ChatDialog-EGRMPCTL.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs +53 -0
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs.map +7 -0
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs +21 -0
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs +212 -0
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs +14 -0
- package/dist/lib/browser/blueprints/index.mjs +12 -0
- package/dist/lib/browser/chunk-A75V4MOQ.mjs +1832 -0
- package/dist/lib/browser/chunk-A75V4MOQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-DKQMSMBN.mjs +326 -0
- package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +7 -0
- package/dist/lib/browser/chunk-EXVT7D4B.mjs +23 -0
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +7 -0
- package/dist/lib/browser/chunk-ML3QCFKA.mjs +265 -0
- package/dist/lib/browser/chunk-ML3QCFKA.mjs.map +7 -0
- package/dist/lib/browser/chunk-MRJVYGLU.mjs +208 -0
- package/dist/lib/browser/chunk-MRJVYGLU.mjs.map +7 -0
- package/dist/lib/browser/chunk-V772AMZM.mjs +250 -0
- package/dist/lib/browser/chunk-V772AMZM.mjs.map +7 -0
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs +41 -0
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs +20 -0
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +229 -216
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs +19 -0
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs +132 -0
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs.map +7 -0
- package/dist/lib/browser/react-surface-S7SBFOSW.mjs +109 -0
- package/dist/lib/browser/react-surface-S7SBFOSW.mjs.map +7 -0
- package/dist/lib/browser/repair-6QGAKOVM.mjs +54 -0
- package/dist/lib/browser/repair-6QGAKOVM.mjs.map +7 -0
- package/dist/lib/browser/settings-4ZDLUMYE.mjs +32 -0
- package/dist/lib/browser/settings-4ZDLUMYE.mjs.map +7 -0
- package/dist/lib/browser/state-AN6336ZX.mjs +26 -0
- package/dist/lib/browser/state-AN6336ZX.mjs.map +7 -0
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs +18 -0
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -4
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs +32 -0
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-UR7DXZ54.mjs +154 -0
- package/dist/lib/node-esm/ChatCompanion-UR7DXZ54.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-YMLLGOZK.mjs +73 -0
- package/dist/lib/node-esm/ChatContainer-YMLLGOZK.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-D24WJPK4.mjs +86 -0
- package/dist/lib/node-esm/ChatDialog-D24WJPK4.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs +54 -0
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs +22 -0
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs +213 -0
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-B6UDX5U3.mjs → blueprint-definition-SEMDEIYG.mjs} +6 -4
- package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +13 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-355W5B27.mjs +251 -0
- package/dist/lib/node-esm/chunk-355W5B27.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4BERCIES.mjs +1833 -0
- package/dist/lib/node-esm/chunk-4BERCIES.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs +327 -0
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs +209 -0
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs +42 -0
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs +25 -0
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs +267 -0
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs +21 -0
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +229 -216
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs +20 -0
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs +133 -0
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-ZR6FXGLF.mjs +110 -0
- package/dist/lib/node-esm/react-surface-ZR6FXGLF.mjs.map +7 -0
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs +55 -0
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs.map +7 -0
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs +33 -0
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs.map +7 -0
- package/dist/lib/node-esm/state-HDON4REW.mjs +27 -0
- package/dist/lib/node-esm/state-HDON4REW.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs +19 -0
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -4
- package/dist/types/src/AssistantPlugin.d.ts +2 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant-blueprint.d.ts +209 -0
- package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +7 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts +5 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts +3 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +21 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +4 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -11
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +12 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +15 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +17 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +11 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +13 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +5 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -2
- package/dist/types/src/components/AssistantSettings/AssistantSettings.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 +23 -13
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -1
- 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 +13 -5
- 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 +3 -3
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +7 -8
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +133 -74
- package/dist/types/src/components/ChatThread/ChatThread.stories.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 +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +12 -6
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- 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 +116 -61
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +12 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +117 -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 +10 -8
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +6 -7
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +116 -61
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +12 -0
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts +11 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +7 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts +5 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/index.d.ts +2 -0
- package/dist/types/src/components/Typewriter/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +10 -9
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +3 -3
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/functions/{list.d.ts → object-list.d.ts} +3 -3
- 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/functions/object-search.d.ts +10 -0
- package/dist/types/src/functions/object-search.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +5 -4
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +4 -2
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +4 -4
- 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/useContextObjects.d.ts +7 -7
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -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 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- 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 +19 -17
- 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 +0 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +6 -5
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +244 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +20 -20
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +89 -101
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +33 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +14 -216
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +118 -117
- package/src/AssistantPlugin.tsx +114 -146
- package/src/blueprints/assistant-blueprint.ts +62 -0
- package/src/blueprints/index.ts +12 -0
- package/src/capabilities/ai-service/ai-service.ts +29 -0
- package/src/capabilities/ai-service/index.ts +7 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +180 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +60 -0
- package/src/capabilities/blueprint-definition/index.ts +8 -0
- package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +32 -0
- package/src/capabilities/edge-model-resolver/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/local-model-resolver/index.ts +7 -0
- package/src/capabilities/local-model-resolver/local-model-resolver.ts +37 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +110 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +95 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +63 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +30 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +27 -0
- package/src/capabilities/toolkit/index.ts +7 -0
- package/src/capabilities/toolkit/toolkit.ts +26 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +13 -5
- package/src/components/BlueprintArticle.tsx +29 -0
- package/src/components/Chat/Chat.tsx +193 -151
- package/src/components/Chat/events.ts +7 -1
- package/src/components/ChatCompanion.tsx +143 -91
- package/src/components/ChatContainer.tsx +40 -30
- package/src/components/ChatDialog.tsx +13 -7
- package/src/components/ChatProgress/ChatProgress.tsx +4 -18
- package/src/components/ChatPrompt/ChatActions.tsx +3 -5
- package/src/components/ChatPrompt/ChatOptions.tsx +104 -99
- package/src/components/ChatPrompt/ChatReferences.tsx +7 -8
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +62 -42
- package/src/components/ChatThread/ChatThread.tsx +29 -35
- package/src/components/ChatThread/Link.tsx +3 -3
- package/src/components/ChatThread/reducers.ts +6 -6
- package/src/components/ChatThread/registry.tsx +26 -41
- package/src/components/ChatThread/sync.test.ts +33 -18
- package/src/components/ChatThread/sync.ts +54 -13
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/PromptArticle.tsx +50 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +16 -8
- package/src/components/TemplateEditor/TemplateEditor.tsx +24 -12
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +17 -11
- package/src/components/TemplateEditor/TemplateForm.tsx +77 -30
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/ToolBlock/ToolBlock.tsx +40 -49
- package/src/components/Toolbox/Toolbox.stories.tsx +11 -15
- package/src/components/Toolbox/Toolbox.tsx +18 -19
- package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
- package/src/components/Typewriter/Typewriter.stories.tsx +83 -0
- package/src/components/Typewriter/Typewriter.tsx +54 -0
- package/src/components/Typewriter/assistant-extension.tsx +144 -0
- package/src/components/Typewriter/index.ts +5 -0
- package/src/components/index.ts +2 -5
- package/src/functions/index.ts +3 -3
- package/src/functions/{list.ts → object-list.ts} +10 -7
- package/src/functions/{load.ts → object-load.ts} +15 -10
- package/src/functions/object-search.ts +46 -0
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useBlueprintRegistry.ts +44 -19
- package/src/hooks/useChatProcessor.ts +25 -14
- package/src/hooks/useChatServices.ts +16 -17
- package/src/hooks/useChatToolbarActions.ts +121 -0
- package/src/hooks/useContextBinder.ts +21 -7
- package/src/hooks/useContextObjects.ts +13 -25
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/useReferencesProvider.ts +7 -6
- package/src/index.ts +2 -1
- package/src/meta.ts +11 -8
- package/src/processor/index.ts +1 -0
- package/src/processor/presets.ts +2 -2
- package/src/processor/processor.test.ts +19 -24
- package/src/processor/processor.ts +51 -78
- package/src/processor/update-name.ts +59 -0
- package/src/queue-logger.ts +8 -9
- package/src/testing/index.ts +0 -2
- package/src/testing/test-generator.ts +19 -14
- package/src/testing/test-services.ts +10 -14
- package/src/translations.ts +28 -16
- package/src/types/Assistant.ts +13 -12
- package/src/types/AssistantAction.ts +65 -52
- package/src/types/capabilities.ts +27 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +3 -1
- package/src/types/service.ts +25 -14
- package/dist/lib/browser/BlueprintContainer-6MZHBQ25.mjs +0 -29
- package/dist/lib/browser/BlueprintContainer-6MZHBQ25.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-B4DLQE6Y.mjs +0 -124
- package/dist/lib/browser/ChatCompanion-B4DLQE6Y.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-Z7A3RKOY.mjs +0 -73
- package/dist/lib/browser/ChatContainer-Z7A3RKOY.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-PL5TSGD5.mjs +0 -86
- package/dist/lib/browser/ChatDialog-PL5TSGD5.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-4VESSFNB.mjs +0 -18
- package/dist/lib/browser/ai-service-4VESSFNB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-BBDHBJXA.mjs +0 -153
- package/dist/lib/browser/app-graph-builder-BBDHBJXA.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-3SATLYJW.mjs +0 -12
- package/dist/lib/browser/chunk-BBT6KNXA.mjs +0 -165
- package/dist/lib/browser/chunk-BBT6KNXA.mjs.map +0 -7
- package/dist/lib/browser/chunk-JDI4FEKA.mjs +0 -299
- package/dist/lib/browser/chunk-JDI4FEKA.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-PQI3MGDN.mjs +0 -169
- package/dist/lib/browser/chunk-PQI3MGDN.mjs.map +0 -7
- package/dist/lib/browser/chunk-SMIVXXAI.mjs +0 -202
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +0 -7
- package/dist/lib/browser/chunk-TMKK6VCA.mjs +0 -216
- package/dist/lib/browser/chunk-TMKK6VCA.mjs.map +0 -7
- package/dist/lib/browser/chunk-YKODYEYR.mjs +0 -16
- package/dist/lib/browser/chunk-YKODYEYR.mjs.map +0 -7
- package/dist/lib/browser/chunk-YOBHCEEI.mjs +0 -1941
- package/dist/lib/browser/chunk-YOBHCEEI.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-6YWYDPTS.mjs +0 -18
- package/dist/lib/browser/edge-model-resolver-6YWYDPTS.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MRZJU255.mjs +0 -112
- package/dist/lib/browser/intent-resolver-MRZJU255.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-QXLLTV2H.mjs +0 -17
- package/dist/lib/browser/local-model-resolver-QXLLTV2H.mjs.map +0 -7
- package/dist/lib/browser/react-surface-UKMOARXR.mjs +0 -107
- package/dist/lib/browser/react-surface-UKMOARXR.mjs.map +0 -7
- package/dist/lib/browser/settings-4AJ34FKF.mjs +0 -23
- package/dist/lib/browser/settings-4AJ34FKF.mjs.map +0 -7
- package/dist/lib/browser/state-ABR7YSSA.mjs +0 -21
- package/dist/lib/browser/state-ABR7YSSA.mjs.map +0 -7
- package/dist/lib/browser/toolkit-U7SKGAIC.mjs +0 -191
- package/dist/lib/browser/toolkit-U7SKGAIC.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-MUHW5HNY.mjs +0 -30
- package/dist/lib/node-esm/BlueprintContainer-MUHW5HNY.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-DK6FULBU.mjs +0 -125
- package/dist/lib/node-esm/ChatCompanion-DK6FULBU.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-7IN7ZICQ.mjs +0 -74
- package/dist/lib/node-esm/ChatContainer-7IN7ZICQ.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-LPE653RZ.mjs +0 -87
- package/dist/lib/node-esm/ChatDialog-LPE653RZ.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-I5JU4JN2.mjs +0 -19
- package/dist/lib/node-esm/ai-service-I5JU4JN2.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-EMR5JF6Z.mjs +0 -154
- package/dist/lib/node-esm/app-graph-builder-EMR5JF6Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs +0 -170
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5MYWJPYA.mjs +0 -167
- package/dist/lib/node-esm/chunk-5MYWJPYA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs +0 -203
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FHRJMZ7L.mjs +0 -17
- package/dist/lib/node-esm/chunk-FHRJMZ7L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GCNF3CQU.mjs +0 -217
- package/dist/lib/node-esm/chunk-GCNF3CQU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H3ZC4UL7.mjs +0 -300
- package/dist/lib/node-esm/chunk-H3ZC4UL7.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-X2YUKRBE.mjs +0 -1942
- package/dist/lib/node-esm/chunk-X2YUKRBE.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-A7B6QHLL.mjs +0 -19
- package/dist/lib/node-esm/edge-model-resolver-A7B6QHLL.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-CIXO3KMY.mjs +0 -113
- package/dist/lib/node-esm/intent-resolver-CIXO3KMY.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-JCYDHAZY.mjs +0 -18
- package/dist/lib/node-esm/local-model-resolver-JCYDHAZY.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-5NDJAWA2.mjs +0 -108
- package/dist/lib/node-esm/react-surface-5NDJAWA2.mjs.map +0 -7
- package/dist/lib/node-esm/settings-K2QW4ATZ.mjs +0 -24
- package/dist/lib/node-esm/settings-K2QW4ATZ.mjs.map +0 -7
- package/dist/lib/node-esm/state-6UHESJI5.mjs +0 -22
- package/dist/lib/node-esm/state-6UHESJI5.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-LNLRBVDU.mjs +0 -192
- package/dist/lib/node-esm/toolkit-LNLRBVDU.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-service.d.ts +0 -4
- package/dist/types/src/capabilities/ai-service.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -7
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -11
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +0 -10
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -4
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit.d.ts +0 -4
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- 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/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 -267
- 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 -5
- 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/events.d.ts +0 -4
- package/dist/types/src/events.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/analysis.d.ts +0 -5
- package/dist/types/src/functions/analysis.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 -6
- 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/stories/Chat.stories.d.ts +0 -31
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +0 -4
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChatContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ChessContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ChessContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/CommentsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/DebugCard.d.ts +0 -8
- package/dist/types/src/stories/components/DebugCard.d.ts.map +0 -1
- package/dist/types/src/stories/components/GraphContainer.d.ts +0 -6
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/InvocationsContainer.d.ts +0 -4
- package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/LoggingContainer.d.ts +0 -7
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/MessageContainer.d.ts +0 -4
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ProjectContainer.d.ts +0 -4
- package/dist/types/src/stories/components/ProjectContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/PromptContainer.d.ts +0 -6
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +0 -4
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +0 -1
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +0 -4
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +0 -1
- package/dist/types/src/stories/components/TasksContainer.d.ts +0 -4
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +0 -3
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/TriggersContainer.d.ts +0 -3
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +0 -1
- package/dist/types/src/stories/components/index.d.ts +0 -17
- package/dist/types/src/stories/components/index.d.ts.map +0 -1
- package/dist/types/src/stories/components/types.d.ts +0 -7
- package/dist/types/src/stories/components/types.d.ts.map +0 -1
- package/dist/types/src/stories/testing/data.d.ts +0 -9
- package/dist/types/src/stories/testing/data.d.ts.map +0 -1
- package/dist/types/src/stories/testing/index.d.ts +0 -3
- package/dist/types/src/stories/testing/index.d.ts.map +0 -1
- package/dist/types/src/stories/testing/schema.d.ts +0 -7
- package/dist/types/src/stories/testing/schema.d.ts.map +0 -1
- package/dist/types/src/stories/testing/testing.d.ts +0 -48
- package/dist/types/src/stories/testing/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -14
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -6
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/src/capabilities/ai-service.ts +0 -26
- package/src/capabilities/app-graph-builder.ts +0 -162
- package/src/capabilities/blueprint-definition.ts +0 -61
- package/src/capabilities/capabilities.ts +0 -18
- package/src/capabilities/edge-model-resolver.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -94
- package/src/capabilities/local-model-resolver.ts +0 -30
- package/src/capabilities/react-surface.tsx +0 -91
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -20
- package/src/capabilities/toolkit.ts +0 -163
- package/src/components/BlueprintContainer.tsx +0 -24
- 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 -21
- package/src/components/Toolbar/index.ts +0 -5
- package/src/components/Toolbar/useChatToolbarActions.ts +0 -126
- package/src/events.ts +0 -11
- package/src/execution-graph/execution-graph.ts +0 -211
- package/src/execution-graph/index.ts +0 -5
- package/src/functions/analysis.ts +0 -20
- package/src/hooks/useExecutionGraph.ts +0 -20
- package/src/hooks/useItemTypes.ts +0 -37
- package/src/stories/Chat.stories.tsx +0 -804
- package/src/stories/components/BlueprintContainer.tsx +0 -34
- package/src/stories/components/ChatContainer.tsx +0 -74
- package/src/stories/components/ChessContainer.tsx +0 -17
- package/src/stories/components/CommentsContainer.tsx +0 -25
- package/src/stories/components/DebugCard.tsx +0 -61
- package/src/stories/components/GraphContainer.tsx +0 -119
- package/src/stories/components/InvocationsContainer.tsx +0 -17
- package/src/stories/components/LoggingContainer.tsx +0 -33
- package/src/stories/components/MessageContainer.tsx +0 -22
- package/src/stories/components/ProjectContainer.tsx +0 -17
- package/src/stories/components/PromptContainer.tsx +0 -52
- package/src/stories/components/ResearchInputStack.tsx +0 -30
- package/src/stories/components/ResearchOutputStack.tsx +0 -29
- package/src/stories/components/TasksContainer.tsx +0 -49
- package/src/stories/components/TokenManagerContainer.tsx +0 -14
- package/src/stories/components/TriggersContainer.tsx +0 -12
- package/src/stories/components/index.ts +0 -21
- package/src/stories/components/types.ts +0 -11
- package/src/stories/testing/data.ts +0 -142
- package/src/stories/testing/index.ts +0 -6
- package/src/stories/testing/schema.ts +0 -17
- package/src/stories/testing/testing.tsx +0 -284
- package/src/testing/test-data.ts +0 -255
- package/src/testing/test-functions.ts +0 -16
- /package/dist/lib/browser/{blueprint-definition-3SATLYJW.mjs.map → blueprint-definition-DGHH7MUU.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprint-definition-B6UDX5U3.mjs.map → browser/blueprints/index.mjs.map} +0 -0
- /package/dist/types/src/components/TemplateEditor/{handlebars-extension.d.ts → extensions/handlebars-extension.d.ts} +0 -0
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { Atom, Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Cause from 'effect/Cause';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import * as Exit from 'effect/Exit';
|
|
9
|
+
import * as Fiber from 'effect/Fiber';
|
|
10
|
+
import * as Option from 'effect/Option';
|
|
11
|
+
import * as Runtime from 'effect/Runtime';
|
|
7
12
|
|
|
8
13
|
import {
|
|
9
14
|
AiService,
|
|
@@ -15,33 +20,33 @@ import {
|
|
|
15
20
|
} from '@dxos/ai';
|
|
16
21
|
import {
|
|
17
22
|
type AiConversation,
|
|
18
|
-
type
|
|
19
|
-
AiSession,
|
|
23
|
+
type AiConversationRunProps,
|
|
20
24
|
ArtifactDiffResolver,
|
|
21
25
|
GenerationObserver,
|
|
22
26
|
createSystemPrompt,
|
|
23
27
|
} from '@dxos/assistant';
|
|
24
28
|
import { type Blueprint } from '@dxos/blueprints';
|
|
25
29
|
import { Obj } from '@dxos/echo';
|
|
26
|
-
import {
|
|
30
|
+
import { type Database } from '@dxos/echo';
|
|
31
|
+
import { runAndForwardErrors, throwCause } from '@dxos/effect';
|
|
27
32
|
import {
|
|
28
33
|
type CredentialsService,
|
|
29
|
-
type
|
|
34
|
+
type FunctionInvocationService,
|
|
30
35
|
type QueueService,
|
|
31
|
-
type RemoteFunctionExecutionService,
|
|
32
36
|
type TracingService,
|
|
33
37
|
} from '@dxos/functions';
|
|
34
38
|
import { log } from '@dxos/log';
|
|
35
|
-
import { type ContentBlock,
|
|
36
|
-
import { trim } from '@dxos/util';
|
|
39
|
+
import { type ContentBlock, Message } from '@dxos/types';
|
|
37
40
|
|
|
38
41
|
import { type Assistant } from '../types';
|
|
39
42
|
|
|
43
|
+
import { updateName } from './update-name';
|
|
44
|
+
|
|
40
45
|
export type AiChatServices =
|
|
41
46
|
| CredentialsService
|
|
42
|
-
|
|
|
47
|
+
| Database.Service
|
|
43
48
|
| QueueService
|
|
44
|
-
|
|
|
49
|
+
| FunctionInvocationService
|
|
45
50
|
| AiService.AiService
|
|
46
51
|
| ToolExecutionService
|
|
47
52
|
| ToolResolverService
|
|
@@ -53,7 +58,7 @@ export type AiChatProcessorOptions = {
|
|
|
53
58
|
blueprintRegistry?: Blueprint.Registry;
|
|
54
59
|
observableRegistry?: Registry.Registry;
|
|
55
60
|
extensions?: ToolContextExtensions;
|
|
56
|
-
} & Pick<
|
|
61
|
+
} & Pick<AiConversationRunProps, 'system'>;
|
|
57
62
|
|
|
58
63
|
const defaultOptions: Partial<AiChatProcessorOptions> = {
|
|
59
64
|
model: DEFAULT_EDGE_MODEL,
|
|
@@ -72,31 +77,31 @@ export type AiRequest = {
|
|
|
72
77
|
* Handles streaming responses from the conversation.
|
|
73
78
|
*/
|
|
74
79
|
export class AiChatProcessor {
|
|
75
|
-
private readonly
|
|
80
|
+
private readonly _registry: Registry.Registry;
|
|
76
81
|
|
|
77
82
|
/** External observer. */
|
|
78
83
|
private readonly _observer: GenerationObserver;
|
|
79
84
|
|
|
85
|
+
/** Pending messages (incl. the current user request). */
|
|
86
|
+
private readonly _pending = Atom.make<Message.Message[]>([]);
|
|
87
|
+
|
|
88
|
+
/** Currently streaming message (from the AI service). */
|
|
89
|
+
private readonly _streaming = Atom.make<Option.Option<Message.Message>>(Option.none());
|
|
90
|
+
|
|
80
91
|
/** Currently active request fiber. */
|
|
81
92
|
private _fiber: Fiber.Fiber<void, any> | undefined;
|
|
82
93
|
|
|
83
94
|
/** Last request (for retries). */
|
|
84
95
|
private _lastRequest: AiRequest | undefined;
|
|
85
96
|
|
|
86
|
-
/** Pending messages (incl. the current user request). */
|
|
87
|
-
private readonly _pending = Rx.make<DataType.Message[]>([]);
|
|
88
|
-
|
|
89
|
-
/** Currently streaming message (from the AI service). */
|
|
90
|
-
private readonly _streaming = Rx.make<Option.Option<DataType.Message>>(Option.none());
|
|
91
|
-
|
|
92
97
|
/** Streaming state. */
|
|
93
|
-
public readonly streaming =
|
|
98
|
+
public readonly streaming = Atom.make<boolean>((get) => Option.isSome(get(this._streaming)));
|
|
94
99
|
|
|
95
100
|
/** Active state. */
|
|
96
|
-
public readonly active =
|
|
101
|
+
public readonly active = Atom.make(false);
|
|
97
102
|
|
|
98
103
|
/** Array of Messages (incl. the current message being streamed). */
|
|
99
|
-
public readonly messages =
|
|
104
|
+
public readonly messages = Atom.make<Message.Message[]>((get) =>
|
|
100
105
|
Option.match(get(this._streaming), {
|
|
101
106
|
onNone: () => get(this._pending),
|
|
102
107
|
onSome: (streaming) => [...get(this._pending), streaming],
|
|
@@ -104,7 +109,7 @@ export class AiChatProcessor {
|
|
|
104
109
|
);
|
|
105
110
|
|
|
106
111
|
/** Last error. */
|
|
107
|
-
public readonly error =
|
|
112
|
+
public readonly error = Atom.make<Option.Option<Error>>(Option.none());
|
|
108
113
|
|
|
109
114
|
constructor(
|
|
110
115
|
private readonly _conversation: AiConversation,
|
|
@@ -113,7 +118,7 @@ export class AiChatProcessor {
|
|
|
113
118
|
private readonly _options: AiChatProcessorOptions = defaultOptions,
|
|
114
119
|
) {
|
|
115
120
|
// Initialize registries and defaults before using in other logic.
|
|
116
|
-
this.
|
|
121
|
+
this._registry = this._options.observableRegistry ?? Registry.make();
|
|
117
122
|
this._observer = GenerationObserver.make({
|
|
118
123
|
onBlock: this._onBlock,
|
|
119
124
|
onMessage: this._onMessage,
|
|
@@ -139,38 +144,32 @@ export class AiChatProcessor {
|
|
|
139
144
|
/**
|
|
140
145
|
* Initiates a new request.
|
|
141
146
|
*/
|
|
142
|
-
async request(
|
|
147
|
+
async request(requestProp: AiRequest): Promise<void> {
|
|
143
148
|
if (this._fiber) {
|
|
144
149
|
await this.cancel();
|
|
145
150
|
}
|
|
146
151
|
|
|
147
152
|
try {
|
|
148
|
-
this._lastRequest =
|
|
149
|
-
this.
|
|
150
|
-
this.
|
|
153
|
+
this._lastRequest = requestProp;
|
|
154
|
+
this._registry.set(this.error, Option.none());
|
|
155
|
+
this._registry.set(this.active, true);
|
|
156
|
+
|
|
157
|
+
const services = await this._services();
|
|
151
158
|
|
|
152
159
|
// Create request.
|
|
153
160
|
const request = this._conversation.createRequest({
|
|
154
161
|
system: this._options.system,
|
|
155
|
-
prompt:
|
|
162
|
+
prompt: requestProp.message,
|
|
156
163
|
observer: this._observer,
|
|
157
164
|
});
|
|
158
165
|
|
|
159
|
-
const runtime = await this._services();
|
|
160
|
-
|
|
161
166
|
// Create fiber.
|
|
162
167
|
this._fiber = request.pipe(
|
|
163
168
|
Effect.provide(AiService.model(this._options.model ?? DEFAULT_EDGE_MODEL)),
|
|
164
|
-
|
|
165
169
|
// TODO(dmaretskyi): Move ArtifactDiffResolver upstream.
|
|
166
170
|
Effect.provideService(ArtifactDiffResolver, this._artifactDiffResolver),
|
|
167
|
-
|
|
168
171
|
Effect.asVoid,
|
|
169
|
-
|
|
170
|
-
log.error('request failed', { cause });
|
|
171
|
-
return Effect.void;
|
|
172
|
-
}),
|
|
173
|
-
Runtime.runFork(runtime), // Runs in the background.
|
|
172
|
+
Runtime.runFork(services), // Runs in the background.
|
|
174
173
|
);
|
|
175
174
|
|
|
176
175
|
// Execute request.
|
|
@@ -179,15 +178,15 @@ export class AiChatProcessor {
|
|
|
179
178
|
throwCause(response.cause);
|
|
180
179
|
}
|
|
181
180
|
|
|
182
|
-
this.
|
|
181
|
+
this._registry.set(this.error, Option.none());
|
|
183
182
|
this._lastRequest = undefined;
|
|
184
183
|
this._fiber = undefined;
|
|
185
184
|
} catch (err) {
|
|
186
|
-
log.error('request failed', { err });
|
|
187
|
-
this.
|
|
185
|
+
log.error('request failed', { error: err });
|
|
186
|
+
this._registry.set(this.error, Option.some(new Error('AI service error', { cause: err })));
|
|
188
187
|
} finally {
|
|
188
|
+
this._registry.set(this.active, false);
|
|
189
189
|
this._fiber = undefined;
|
|
190
|
-
this._rx.set(this.active, false);
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
192
|
|
|
@@ -195,7 +194,7 @@ export class AiChatProcessor {
|
|
|
195
194
|
* Cancels the current request.
|
|
196
195
|
*/
|
|
197
196
|
async cancel(): Promise<void> {
|
|
198
|
-
await
|
|
197
|
+
await runAndForwardErrors(
|
|
199
198
|
Effect.gen(this, function* () {
|
|
200
199
|
if (this._fiber) {
|
|
201
200
|
yield* this._fiber.pipe(Fiber.interrupt);
|
|
@@ -204,7 +203,7 @@ export class AiChatProcessor {
|
|
|
204
203
|
);
|
|
205
204
|
|
|
206
205
|
this._fiber = undefined;
|
|
207
|
-
this.
|
|
206
|
+
this._registry.set(this.active, false);
|
|
208
207
|
}
|
|
209
208
|
|
|
210
209
|
/**
|
|
@@ -221,33 +220,7 @@ export class AiChatProcessor {
|
|
|
221
220
|
*/
|
|
222
221
|
async updateName(chat: Assistant.Chat): Promise<void> {
|
|
223
222
|
const runtime = await this._services();
|
|
224
|
-
|
|
225
|
-
const system = trim`
|
|
226
|
-
It is extremely important that you respond only with the title and nothing else.
|
|
227
|
-
If you cannot do this effectively respond with "New Chat".
|
|
228
|
-
`;
|
|
229
|
-
|
|
230
|
-
const history = await this._conversation.getHistory();
|
|
231
|
-
const fiber = Effect.gen(this, function* () {
|
|
232
|
-
const session = new AiSession();
|
|
233
|
-
return yield* session.run({ system, prompt: 'Suggest a name for this chat', history });
|
|
234
|
-
}).pipe(
|
|
235
|
-
// TODO(burdon): Use simpler model.
|
|
236
|
-
Effect.provide(AiService.model(this._options.model ?? DEFAULT_EDGE_MODEL)),
|
|
237
|
-
Effect.tap((messages) => {
|
|
238
|
-
const message = messages.find((message) => message.sender.role === 'assistant');
|
|
239
|
-
const title = message?.blocks.find((b) => b._tag === 'text')?.text;
|
|
240
|
-
if (title) {
|
|
241
|
-
chat.name = title;
|
|
242
|
-
}
|
|
243
|
-
}),
|
|
244
|
-
Runtime.runFork(runtime), // Run in the background.
|
|
245
|
-
);
|
|
246
|
-
|
|
247
|
-
const response = await fiber.pipe(Fiber.join, Effect.runPromiseExit);
|
|
248
|
-
if (!Exit.isSuccess(response)) {
|
|
249
|
-
throwCause(response.cause);
|
|
250
|
-
}
|
|
223
|
+
await updateName(runtime, this._conversation, chat, this._options.model);
|
|
251
224
|
}
|
|
252
225
|
|
|
253
226
|
// TODO(burdon): Fix/factor out.
|
|
@@ -258,7 +231,7 @@ export class AiChatProcessor {
|
|
|
258
231
|
// artifacts.map(async (artifact) => {
|
|
259
232
|
// const {
|
|
260
233
|
// objects: [object],
|
|
261
|
-
// } = await space.db.query(Filter.
|
|
234
|
+
// } = await space.db.query(Filter.id(artifact.id)).run();
|
|
262
235
|
// if (!object) {
|
|
263
236
|
// return;
|
|
264
237
|
// }
|
|
@@ -275,22 +248,22 @@ export class AiChatProcessor {
|
|
|
275
248
|
};
|
|
276
249
|
|
|
277
250
|
private _onMessage = Effect.fn(
|
|
278
|
-
function* (this: AiChatProcessor, message:
|
|
279
|
-
this.
|
|
280
|
-
this.
|
|
251
|
+
function* (this: AiChatProcessor, message: Message.Message) {
|
|
252
|
+
this._registry.set(this._streaming, Option.none());
|
|
253
|
+
this._registry.update(this._pending, (pending) => [...pending, message]);
|
|
281
254
|
}.bind(this),
|
|
282
255
|
);
|
|
283
256
|
|
|
284
257
|
private _onBlock = Effect.fn(
|
|
285
258
|
function* (this: AiChatProcessor, block: ContentBlock.Any) {
|
|
286
|
-
this.
|
|
259
|
+
this._registry.update(this._streaming, (streaming) => {
|
|
287
260
|
const blocks = streaming.pipe(
|
|
288
|
-
Option.map((streaming) => streaming.blocks.filter((b) => !b.pending)),
|
|
261
|
+
Option.map((streaming) => streaming.blocks.filter((b: ContentBlock.Any) => !b.pending)),
|
|
289
262
|
Option.getOrElse(() => []),
|
|
290
263
|
);
|
|
291
264
|
|
|
292
265
|
return Option.some(
|
|
293
|
-
Obj.make(
|
|
266
|
+
Obj.make(Message.Message, {
|
|
294
267
|
created: new Date().toISOString(),
|
|
295
268
|
sender: { role: 'assistant' },
|
|
296
269
|
blocks: [...blocks, block],
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Exit from 'effect/Exit';
|
|
7
|
+
import * as Fiber from 'effect/Fiber';
|
|
8
|
+
import * as Runtime from 'effect/Runtime';
|
|
9
|
+
|
|
10
|
+
import { AiService, DEFAULT_EDGE_MODEL, type ModelName } from '@dxos/ai';
|
|
11
|
+
import { type AiConversation, AiSession } from '@dxos/assistant';
|
|
12
|
+
import { Obj } from '@dxos/echo';
|
|
13
|
+
import { throwCause } from '@dxos/effect';
|
|
14
|
+
import { trim } from '@dxos/util';
|
|
15
|
+
|
|
16
|
+
import { type Assistant } from '../types';
|
|
17
|
+
|
|
18
|
+
import { type AiChatServices } from './processor';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Update the current chat's name.
|
|
22
|
+
*/
|
|
23
|
+
// TODO(burdon): Convert this into a plugin tool.
|
|
24
|
+
export const updateName = async (
|
|
25
|
+
runtime: Runtime.Runtime<AiChatServices>,
|
|
26
|
+
conversation: AiConversation,
|
|
27
|
+
chat: Assistant.Chat,
|
|
28
|
+
model: ModelName = DEFAULT_EDGE_MODEL,
|
|
29
|
+
): Promise<void> => {
|
|
30
|
+
const history = await conversation.getHistory();
|
|
31
|
+
const system = trim`
|
|
32
|
+
It is extremely important that you respond only with the title and nothing else.
|
|
33
|
+
If you cannot do this effectively respond with "New Chat".
|
|
34
|
+
`;
|
|
35
|
+
const prompt = 'Suggest a name for this chat';
|
|
36
|
+
|
|
37
|
+
const fiber = Effect.gen(this, function* () {
|
|
38
|
+
const session = new AiSession();
|
|
39
|
+
return yield* session.run({ system, prompt, history });
|
|
40
|
+
}).pipe(
|
|
41
|
+
Effect.provide(AiService.model(model)),
|
|
42
|
+
Effect.tap((messages) => {
|
|
43
|
+
// TODO(burdon): Parse response (should update via tool).
|
|
44
|
+
const message = messages.find((message) => message.sender.role === 'assistant');
|
|
45
|
+
const title = message?.blocks.find((block) => block._tag === 'text')?.text;
|
|
46
|
+
if (title) {
|
|
47
|
+
Obj.change(chat, (c) => {
|
|
48
|
+
c.name = title;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
Runtime.runFork(runtime), // Run in the background.
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const response = await fiber.pipe(Fiber.join, Effect.runPromiseExit);
|
|
56
|
+
if (!Exit.isSuccess(response)) {
|
|
57
|
+
throwCause(response.cause);
|
|
58
|
+
}
|
|
59
|
+
};
|
package/src/queue-logger.ts
CHANGED
|
@@ -5,14 +5,10 @@
|
|
|
5
5
|
import { type Queue, Ref, type Space, getSpace } from '@dxos/client/echo';
|
|
6
6
|
import { type Sequence, type SequenceEvent, type SequenceLogger } from '@dxos/conductor';
|
|
7
7
|
import { DXN, Key, Obj } from '@dxos/echo';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
InvocationTraceEventType,
|
|
13
|
-
InvocationTraceStartEvent,
|
|
14
|
-
TraceEvent,
|
|
15
|
-
} from '@dxos/functions';
|
|
8
|
+
import { InvocationTraceEndEvent, InvocationTraceEventType, InvocationTraceStartEvent } from '@dxos/functions-runtime';
|
|
9
|
+
import { TraceEvent } from '@dxos/functions-runtime';
|
|
10
|
+
import { InvocationOutcome } from '@dxos/functions-runtime';
|
|
11
|
+
import { type InvocationTraceEvent } from '@dxos/functions-runtime';
|
|
16
12
|
import { invariant } from '@dxos/invariant';
|
|
17
13
|
import { QueueSubspaceTags } from '@dxos/keys';
|
|
18
14
|
|
|
@@ -27,7 +23,10 @@ export class QueueLogger implements SequenceLogger {
|
|
|
27
23
|
let dxn = this._space.properties.invocationTraceQueue?.dxn;
|
|
28
24
|
if (!dxn) {
|
|
29
25
|
dxn = DXN.fromQueue(QueueSubspaceTags.TRACE, this._space.id, Key.ObjectId.random());
|
|
30
|
-
|
|
26
|
+
const newDxn = dxn;
|
|
27
|
+
Obj.change(this._space.properties, (p) => {
|
|
28
|
+
p.invocationTraceQueue = Ref.fromDXN(newDxn);
|
|
29
|
+
});
|
|
31
30
|
}
|
|
32
31
|
this._invocationTraceQueue = this._space.queues.get(dxn);
|
|
33
32
|
}
|
package/src/testing/index.ts
CHANGED
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Obj } from '@dxos/echo';
|
|
8
|
-
import {
|
|
8
|
+
import { Database } from '@dxos/echo';
|
|
9
|
+
import { ContextQueueService } from '@dxos/functions';
|
|
9
10
|
import { faker } from '@dxos/random';
|
|
10
11
|
import { renderObjectLink } from '@dxos/react-ui-components';
|
|
11
|
-
import { type ContentBlock,
|
|
12
|
+
import { type Actor, type ContentBlock, Message, Organization } from '@dxos/types';
|
|
12
13
|
import { trim } from '@dxos/util';
|
|
13
14
|
|
|
14
|
-
export const createMessage = (role:
|
|
15
|
-
return Obj.make(
|
|
15
|
+
export const createMessage = (role: Actor.Role, blocks: ContentBlock.Any[]): Message.Message => {
|
|
16
|
+
return Obj.make(Message.Message, {
|
|
16
17
|
created: new Date().toISOString(),
|
|
17
18
|
sender: { role },
|
|
18
19
|
blocks,
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
export type MessageGenerator = Effect.Effect<void, never,
|
|
23
|
+
export type MessageGenerator = Effect.Effect<void, never, Database.Service | ContextQueueService>;
|
|
23
24
|
|
|
24
25
|
export const createMessageGenerator = (): MessageGenerator[] => [
|
|
25
26
|
Effect.gen(function* () {
|
|
@@ -70,9 +71,9 @@ export const createMessageGenerator = (): MessageGenerator[] => [
|
|
|
70
71
|
[
|
|
71
72
|
faker.lorem.paragraph(),
|
|
72
73
|
'',
|
|
73
|
-
...Array.from({
|
|
74
|
-
(
|
|
75
|
-
),
|
|
74
|
+
...Array.from({
|
|
75
|
+
length: faker.number.int({ min: 3, max: 5 }),
|
|
76
|
+
}).map((_, idx) => `${idx + 1}. ${faker.lorem.paragraph()}`),
|
|
76
77
|
].join('\n') + '\n',
|
|
77
78
|
},
|
|
78
79
|
]),
|
|
@@ -145,11 +146,11 @@ export const createMessageGenerator = (): MessageGenerator[] => [
|
|
|
145
146
|
|
|
146
147
|
Effect.gen(function* () {
|
|
147
148
|
const { queue } = yield* ContextQueueService;
|
|
148
|
-
const { db } = yield*
|
|
149
|
-
const obj1 = db.add(Obj.make(
|
|
150
|
-
// const obj2 = db.add(Obj.make(
|
|
151
|
-
// const obj3 = db.add(Obj.make(
|
|
152
|
-
// const obj4 = db.add(Obj.make(
|
|
149
|
+
const { db } = yield* Database.Service;
|
|
150
|
+
const obj1 = db.add(Obj.make(Organization.Organization, { name: 'DXOS' }));
|
|
151
|
+
// const obj2 = db.add(Obj.make(Person.Person, { fullName: 'Alice' }));
|
|
152
|
+
// const obj3 = db.add(Obj.make(Person.Person, { fullName: 'Bob' }));
|
|
153
|
+
// const obj4 = db.add(Obj.make(Person.Person, { fullName: 'Charlie' }));
|
|
153
154
|
yield* Effect.promise(() =>
|
|
154
155
|
queue.append([
|
|
155
156
|
createMessage('assistant', [
|
|
@@ -188,6 +189,7 @@ export const createMessageGenerator = (): MessageGenerator[] => [
|
|
|
188
189
|
toolCallId: '1234',
|
|
189
190
|
name: 'search',
|
|
190
191
|
input: JSON.stringify({}),
|
|
192
|
+
providerExecuted: false,
|
|
191
193
|
},
|
|
192
194
|
]),
|
|
193
195
|
createMessage('user', [
|
|
@@ -196,6 +198,7 @@ export const createMessageGenerator = (): MessageGenerator[] => [
|
|
|
196
198
|
toolCallId: '1234',
|
|
197
199
|
name: 'search',
|
|
198
200
|
result: 'This is a tool result.',
|
|
201
|
+
providerExecuted: false,
|
|
199
202
|
},
|
|
200
203
|
]),
|
|
201
204
|
]),
|
|
@@ -218,6 +221,7 @@ export const createMessageGenerator = (): MessageGenerator[] => [
|
|
|
218
221
|
toolCallId: '4567',
|
|
219
222
|
name: 'create',
|
|
220
223
|
input: JSON.stringify({}),
|
|
224
|
+
providerExecuted: false,
|
|
221
225
|
},
|
|
222
226
|
]),
|
|
223
227
|
createMessage('user', [
|
|
@@ -226,6 +230,7 @@ export const createMessageGenerator = (): MessageGenerator[] => [
|
|
|
226
230
|
toolCallId: '4567',
|
|
227
231
|
name: 'create',
|
|
228
232
|
result: 'This is a tool result.',
|
|
233
|
+
providerExecuted: false,
|
|
229
234
|
},
|
|
230
235
|
]),
|
|
231
236
|
createMessage('assistant', [
|
|
@@ -2,18 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Obj } from '@dxos/echo';
|
|
5
|
+
import { Obj, type Type } from '@dxos/echo';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type ServiceQuery,
|
|
11
|
-
ServiceType,
|
|
12
|
-
categoryIcons,
|
|
13
|
-
} from '../types';
|
|
7
|
+
import { type ApiAuthorization, type BaseServiceRegistry, ServiceType, categoryIcons } from '../types';
|
|
8
|
+
|
|
9
|
+
const ServiceTypeSchema = ServiceType as unknown as Type.Obj.Any;
|
|
14
10
|
|
|
15
11
|
export class MockServiceRegistry implements BaseServiceRegistry {
|
|
16
|
-
async queryServices(
|
|
12
|
+
async queryServices(): Promise<ServiceType[]> {
|
|
17
13
|
return TEST_SERVICES;
|
|
18
14
|
}
|
|
19
15
|
}
|
|
@@ -54,7 +50,7 @@ const VISUAL_CROSSING_CREDENTIALS: ApiAuthorization = {
|
|
|
54
50
|
// - e.g., https://github.com/konfig-sdks/openapi-examples/blob/main/xkcd/openapi.yaml
|
|
55
51
|
|
|
56
52
|
const TEST_SERVICES: ServiceType[] = [
|
|
57
|
-
Obj.make(
|
|
53
|
+
Obj.make(ServiceTypeSchema, {
|
|
58
54
|
serviceId: 'amadeus.com/service/FlightSearch',
|
|
59
55
|
name: 'Amadeus Flight Search',
|
|
60
56
|
description: 'Search for local and international flights.',
|
|
@@ -68,7 +64,7 @@ const TEST_SERVICES: ServiceType[] = [
|
|
|
68
64
|
],
|
|
69
65
|
}),
|
|
70
66
|
|
|
71
|
-
Obj.make(
|
|
67
|
+
Obj.make(ServiceTypeSchema, {
|
|
72
68
|
serviceId: 'amadeus.com/service/HotelSearch',
|
|
73
69
|
name: 'Amadeus Hotel Search',
|
|
74
70
|
description: 'Search for local and international hotels.',
|
|
@@ -82,7 +78,7 @@ const TEST_SERVICES: ServiceType[] = [
|
|
|
82
78
|
],
|
|
83
79
|
}),
|
|
84
80
|
|
|
85
|
-
Obj.make(
|
|
81
|
+
Obj.make(ServiceTypeSchema, {
|
|
86
82
|
serviceId: 'visualcrossing.com/service/Weather',
|
|
87
83
|
name: 'Visual Crossing Weather',
|
|
88
84
|
description: 'Search for global weather forecasts.',
|
|
@@ -97,7 +93,7 @@ const TEST_SERVICES: ServiceType[] = [
|
|
|
97
93
|
}),
|
|
98
94
|
|
|
99
95
|
// TODO(burdon): Needs auth.
|
|
100
|
-
Obj.make(
|
|
96
|
+
Obj.make(ServiceTypeSchema, {
|
|
101
97
|
serviceId: 'abstractapi.com/service/GeoLocation',
|
|
102
98
|
name: 'Abstract GeoLocation',
|
|
103
99
|
description: 'Get the location of any IP address.',
|
|
@@ -115,7 +111,7 @@ const TEST_SERVICES: ServiceType[] = [
|
|
|
115
111
|
//
|
|
116
112
|
|
|
117
113
|
...Array.from({ length: 20 }, (_, i) =>
|
|
118
|
-
Obj.make(
|
|
114
|
+
Obj.make(ServiceTypeSchema, {
|
|
119
115
|
serviceId: `example.com/service/test-${i}`,
|
|
120
116
|
name: `Test ${i}`,
|
|
121
117
|
description: `Test ${i}`,
|
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]: {
|
|
@@ -61,11 +75,11 @@ export const translations = [
|
|
|
61
75
|
'type filter placeholder': 'Type',
|
|
62
76
|
'any type filter label': 'Any',
|
|
63
77
|
'no blueprint message': 'No active blueprints',
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'error label': '
|
|
78
|
+
'tool call label': 'Calling tool...',
|
|
79
|
+
'tool result label': 'Success',
|
|
80
|
+
'tool error label': 'Tool call failed',
|
|
67
81
|
|
|
68
|
-
'
|
|
82
|
+
'invocations label': 'Invocations',
|
|
69
83
|
|
|
70
84
|
'assistant dialog title': 'Assistant',
|
|
71
85
|
'open assistant label': 'Open assistant',
|
|
@@ -73,24 +87,22 @@ export const translations = [
|
|
|
73
87
|
'no tools': 'No tools are configured',
|
|
74
88
|
'no results': 'No results',
|
|
75
89
|
|
|
76
|
-
'button
|
|
77
|
-
'button
|
|
78
|
-
'
|
|
79
|
-
'button
|
|
80
|
-
'button save': 'Save',
|
|
81
|
-
'button run': 'Run',
|
|
82
|
-
'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',
|
|
83
94
|
'chat history label': 'Chat History',
|
|
95
|
+
'chat update name label': 'Update AI Chat name',
|
|
84
96
|
|
|
85
97
|
'toolkit label': 'Toolkit',
|
|
86
98
|
'summary label': 'Summary',
|
|
87
99
|
|
|
88
100
|
'search placeholder': 'Search...',
|
|
89
101
|
'prompt placeholder': 'Enter question or command...',
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
'button
|
|
93
|
-
'
|
|
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',
|