@dxos/plugin-assistant 0.8.3 → 0.8.4-main.1068cf700f
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-6SP2ZWJ2.mjs +30 -0
- package/dist/lib/browser/BlueprintArticle-6SP2ZWJ2.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-JOTRKE7B.mjs +200 -0
- package/dist/lib/browser/ChatCompanion-JOTRKE7B.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-ESDLG5JY.mjs +73 -0
- package/dist/lib/browser/ChatContainer-ESDLG5JY.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-LKY3FTYO.mjs +85 -0
- package/dist/lib/browser/ChatDialog-LKY3FTYO.mjs.map +7 -0
- package/dist/lib/browser/InitiativeContainer-T2SQ4O6J.mjs +267 -0
- package/dist/lib/browser/InitiativeContainer-T2SQ4O6J.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs +52 -0
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs.map +7 -0
- package/dist/lib/browser/ai-service-CY2BYPH6.mjs +22 -0
- package/dist/lib/browser/ai-service-CY2BYPH6.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs +234 -0
- package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs +14 -0
- package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +12 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-3ETBCBMH.mjs +47 -0
- package/dist/lib/browser/chunk-3ETBCBMH.mjs.map +7 -0
- package/dist/lib/browser/chunk-6BVCG5SJ.mjs +230 -0
- package/dist/lib/browser/chunk-6BVCG5SJ.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-IJYAKPEU.mjs +286 -0
- package/dist/lib/browser/chunk-IJYAKPEU.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-POPBT2AQ.mjs +198 -0
- package/dist/lib/browser/chunk-POPBT2AQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q4QUMX62.mjs +1974 -0
- package/dist/lib/browser/chunk-Q4QUMX62.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs +21 -0
- package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +329 -207
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs +20 -0
- package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-2673CFJS.mjs +133 -0
- package/dist/lib/browser/operation-resolver-2673CFJS.mjs.map +7 -0
- package/dist/lib/browser/react-surface-I7YJVK4K.mjs +125 -0
- package/dist/lib/browser/react-surface-I7YJVK4K.mjs.map +7 -0
- package/dist/lib/browser/repair-IRXDYF4R.mjs +51 -0
- package/dist/lib/browser/repair-IRXDYF4R.mjs.map +7 -0
- package/dist/lib/browser/settings-XF6GKHCG.mjs +33 -0
- package/dist/lib/browser/settings-XF6GKHCG.mjs.map +7 -0
- package/dist/lib/browser/state-OYDPWLKA.mjs +26 -0
- package/dist/lib/browser/state-OYDPWLKA.mjs.map +7 -0
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs +19 -0
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +11 -20
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs +31 -0
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-52OWAARX.mjs +201 -0
- package/dist/lib/node-esm/ChatCompanion-52OWAARX.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-VLWSQ3ZO.mjs +74 -0
- package/dist/lib/node-esm/ChatContainer-VLWSQ3ZO.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-5DUQIF2T.mjs +86 -0
- package/dist/lib/node-esm/ChatDialog-5DUQIF2T.mjs.map +7 -0
- package/dist/lib/node-esm/InitiativeContainer-ATD3D23L.mjs +268 -0
- package/dist/lib/node-esm/InitiativeContainer-ATD3D23L.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs +53 -0
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs +23 -0
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs +235 -0
- package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.mjs +15 -0
- package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.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-2LEN26ZQ.mjs +48 -0
- package/dist/lib/node-esm/chunk-2LEN26ZQ.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-ESDMBGF7.mjs +1975 -0
- package/dist/lib/node-esm/chunk-ESDMBGF7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-F6LA7XNS.mjs +199 -0
- package/dist/lib/node-esm/chunk-F6LA7XNS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LB72WG6R.mjs +231 -0
- package/dist/lib/node-esm/chunk-LB72WG6R.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MJD5XWQV.mjs +288 -0
- package/dist/lib/node-esm/chunk-MJD5XWQV.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/edge-model-resolver-CMJ3KNLQ.mjs +22 -0
- package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +329 -207
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs +21 -0
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs +134 -0
- package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-2CWJ6GZW.mjs +126 -0
- package/dist/lib/node-esm/react-surface-2CWJ6GZW.mjs.map +7 -0
- package/dist/lib/node-esm/repair-DMI55PON.mjs +52 -0
- package/dist/lib/node-esm/repair-DMI55PON.mjs.map +7 -0
- package/dist/lib/node-esm/settings-NGGZA7S7.mjs +34 -0
- package/dist/lib/node-esm/settings-NGGZA7S7.mjs.map +7 -0
- package/dist/lib/node-esm/state-VSCPGN7R.mjs +27 -0
- package/dist/lib/node-esm/state-VSCPGN7R.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs +20 -0
- package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +11 -20
- 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 +11 -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 +6 -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 +26 -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 +7 -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 +11 -6
- 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 +13 -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 +18 -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 +6 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +6 -4
- 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 +63 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/events.d.ts +39 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +3 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatCompanion.d.ts +13 -0
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +17 -9
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts +8 -0
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +11 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts +11 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +10 -0
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +10 -0
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts +6 -0
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +21 -0
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +455 -0
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/index.d.ts +2 -0
- package/dist/types/src/components/ChatThread/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +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/InitiativeContainer.d.ts +9 -0
- package/dist/types/src/components/InitiativeContainer.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 +5 -8
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +431 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +16 -5
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +429 -3
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
- 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 +13 -12
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +432 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts +4 -0
- package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/components/TriggerStatus/index.d.ts +2 -0
- package/dist/types/src/components/TriggerStatus/index.d.ts.map +1 -0
- 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 +11 -14
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +4 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/object-list.d.ts +10 -0
- package/dist/types/src/functions/object-list.d.ts.map +1 -0
- package/dist/types/src/functions/object-load.d.ts +8 -0
- 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 +10 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +13 -11
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +13 -0
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts +7 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -0
- package/dist/types/src/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 +4 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/processor/presets.d.ts +13 -0
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +79 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- 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 +5 -5
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +8 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +4 -0
- package/dist/types/src/testing/test-sequence.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 +416 -113
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +20 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +97 -0
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
- 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/defs.d.ts +2 -0
- package/dist/types/src/types/defs.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 +6 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +14 -213
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +127 -92
- package/src/AssistantPlugin.tsx +159 -115
- package/src/blueprints/assistant-blueprint.ts +57 -0
- package/src/blueprints/index.ts +12 -0
- package/src/capabilities/ai-service/ai-service.ts +30 -0
- package/src/capabilities/ai-service/index.ts +7 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +200 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +74 -0
- package/src/capabilities/blueprint-definition/index.ts +8 -0
- package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +33 -0
- package/src/capabilities/edge-model-resolver/index.ts +7 -0
- package/src/capabilities/index.ts +11 -9
- package/src/capabilities/local-model-resolver/index.ts +7 -0
- package/src/capabilities/local-model-resolver/local-model-resolver.ts +38 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +112 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +111 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +62 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +31 -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 +27 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +94 -79
- package/src/components/BlueprintArticle.tsx +28 -0
- package/src/components/Chat/Chat.tsx +458 -0
- package/src/components/Chat/events.ts +63 -0
- package/src/components/Chat/index.ts +7 -0
- package/src/components/ChatCompanion.tsx +226 -0
- package/src/components/ChatContainer.tsx +55 -26
- package/src/components/ChatDialog.tsx +75 -0
- package/src/components/ChatProgress/ChatProgress.tsx +53 -0
- package/src/components/{AmbientDialog → ChatProgress}/index.ts +1 -1
- package/src/components/ChatPrompt/ChatActions.tsx +63 -0
- package/src/components/ChatPrompt/ChatOptions.tsx +238 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +29 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +47 -0
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +42 -0
- package/src/components/ChatPrompt/index.ts +9 -0
- package/src/components/ChatThread/ChatThread.stories.tsx +150 -0
- package/src/components/ChatThread/ChatThread.tsx +96 -0
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/{experimental/transcription → components/ChatThread}/index.ts +2 -0
- package/src/components/ChatThread/registry.tsx +174 -0
- package/src/components/ChatThread/sync.test.ts +97 -0
- package/src/components/ChatThread/sync.ts +154 -0
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/InitiativeContainer.tsx +340 -0
- package/src/components/PromptArticle.tsx +49 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +57 -41
- package/src/components/TemplateEditor/TemplateEditor.tsx +40 -46
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +39 -26
- package/src/components/TemplateEditor/TemplateForm.tsx +121 -79
- 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 +143 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +18 -29
- package/src/components/Toolbox/Toolbox.tsx +77 -53
- package/src/components/TriggerStatus/TriggerStatus.tsx +142 -0
- package/src/components/TriggerStatus/index.ts +5 -0
- 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 +16 -12
- package/src/functions/index.ts +7 -0
- package/src/functions/object-list.ts +49 -0
- package/src/functions/object-load.ts +44 -0
- package/src/functions/object-search.ts +46 -0
- package/src/hooks/index.ts +10 -6
- package/src/hooks/useBlueprintRegistry.ts +105 -0
- package/src/hooks/useChatProcessor.ts +78 -0
- package/src/hooks/useChatServices.ts +47 -0
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +32 -0
- package/src/hooks/useContextObjects.ts +46 -0
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +58 -0
- package/src/index.ts +2 -1
- package/src/meta.ts +11 -8
- package/src/processor/index.ts +7 -0
- package/src/processor/presets.ts +60 -0
- package/src/processor/processor.test.ts +72 -0
- package/src/processor/processor.ts +301 -0
- package/src/processor/update-name.ts +58 -0
- package/src/queue-logger.ts +23 -24
- package/src/testing/index.ts +2 -2
- package/src/testing/test-generator.ts +262 -0
- package/src/testing/test-sequence.ts +26 -0
- package/src/testing/test-services.ts +10 -14
- package/src/translations.ts +90 -27
- package/src/types/Assistant.ts +28 -0
- package/src/types/AssistantAction.ts +76 -0
- package/src/types/capabilities.ts +27 -0
- package/src/types/defs.ts +5 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +9 -3
- package/src/types/service.ts +25 -14
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/AssistantDialog-MQOOR364.mjs +0 -47
- package/dist/lib/browser/AssistantDialog-MQOOR364.mjs.map +0 -7
- package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs +0 -321
- package/dist/lib/browser/BlueprintContainer-AT5Y7EXG.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs +0 -40
- package/dist/lib/browser/ChatContainer-C2NEAS3A.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-QQHVOTSI.mjs +0 -28
- package/dist/lib/browser/TemplateContainer-QQHVOTSI.mjs.map +0 -7
- package/dist/lib/browser/ai-client-MK2ZZII2.mjs +0 -39
- package/dist/lib/browser/ai-client-MK2ZZII2.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs +0 -225
- package/dist/lib/browser/app-graph-builder-E4H5DCOJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-AAOKC2JN.mjs +0 -208
- package/dist/lib/browser/chunk-AAOKC2JN.mjs.map +0 -7
- package/dist/lib/browser/chunk-BI6AHRNJ.mjs +0 -157
- package/dist/lib/browser/chunk-BI6AHRNJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-JO4W3MF7.mjs +0 -2101
- package/dist/lib/browser/chunk-JO4W3MF7.mjs.map +0 -7
- package/dist/lib/browser/chunk-JQFUME3B.mjs +0 -87
- package/dist/lib/browser/chunk-JQFUME3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-MEGMOFJB.mjs +0 -16
- package/dist/lib/browser/chunk-MEGMOFJB.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs +0 -96
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs.map +0 -7
- package/dist/lib/browser/chunk-UE3IZ4PN.mjs +0 -15
- package/dist/lib/browser/chunk-UE3IZ4PN.mjs.map +0 -7
- package/dist/lib/browser/chunk-XOZ7YMO3.mjs +0 -20
- package/dist/lib/browser/chunk-XOZ7YMO3.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3UICTGPM.mjs +0 -43
- package/dist/lib/browser/intent-resolver-3UICTGPM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-LXCNUSZN.mjs +0 -159
- package/dist/lib/browser/react-surface-LXCNUSZN.mjs.map +0 -7
- package/dist/lib/browser/settings-XRHXVWGB.mjs +0 -22
- package/dist/lib/browser/settings-XRHXVWGB.mjs.map +0 -7
- package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs +0 -73
- package/dist/lib/node/AssistantDialog-AN4Z6YUV.cjs.map +0 -7
- package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs +0 -344
- package/dist/lib/node/BlueprintContainer-NOWLDYCZ.cjs.map +0 -7
- package/dist/lib/node/ChatContainer-VKYBQHUB.cjs +0 -68
- package/dist/lib/node/ChatContainer-VKYBQHUB.cjs.map +0 -7
- package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs +0 -58
- package/dist/lib/node/TemplateContainer-JZF2DCCG.cjs.map +0 -7
- package/dist/lib/node/ai-client-7HNSMUMT.cjs +0 -53
- package/dist/lib/node/ai-client-7HNSMUMT.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs +0 -235
- package/dist/lib/node/app-graph-builder-PPR5B5KU.cjs.map +0 -7
- package/dist/lib/node/chunk-4EEWTDQK.cjs +0 -117
- package/dist/lib/node/chunk-4EEWTDQK.cjs.map +0 -7
- package/dist/lib/node/chunk-FUAGEO7Q.cjs +0 -52
- package/dist/lib/node/chunk-FUAGEO7Q.cjs.map +0 -7
- package/dist/lib/node/chunk-HRNIUYVQ.cjs +0 -128
- package/dist/lib/node/chunk-HRNIUYVQ.cjs.map +0 -7
- package/dist/lib/node/chunk-IKZBMHSW.cjs +0 -184
- package/dist/lib/node/chunk-IKZBMHSW.cjs.map +0 -7
- package/dist/lib/node/chunk-LMDJEGZ2.cjs +0 -233
- package/dist/lib/node/chunk-LMDJEGZ2.cjs.map +0 -7
- package/dist/lib/node/chunk-NIDICM57.cjs +0 -2080
- package/dist/lib/node/chunk-NIDICM57.cjs.map +0 -7
- package/dist/lib/node/chunk-P74TWGMG.cjs +0 -44
- package/dist/lib/node/chunk-P74TWGMG.cjs.map +0 -7
- package/dist/lib/node/chunk-QGPWY6GW.cjs +0 -34
- package/dist/lib/node/chunk-QGPWY6GW.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -289
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-QSWGTKON.cjs +0 -58
- package/dist/lib/node/intent-resolver-QSWGTKON.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-D3NBYRZ6.cjs +0 -172
- package/dist/lib/node/react-surface-D3NBYRZ6.cjs.map +0 -7
- package/dist/lib/node/settings-2JXLKYGE.cjs +0 -36
- package/dist/lib/node/settings-2JXLKYGE.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -54
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs +0 -48
- package/dist/lib/node-esm/AssistantDialog-6WEMLUPU.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs +0 -322
- package/dist/lib/node-esm/BlueprintContainer-STOJAVML.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs +0 -41
- package/dist/lib/node-esm/ChatContainer-3MVBTUJN.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-SOEWY2ZN.mjs +0 -29
- package/dist/lib/node-esm/TemplateContainer-SOEWY2ZN.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs +0 -40
- package/dist/lib/node-esm/ai-client-XGZBJ6BE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs +0 -226
- package/dist/lib/node-esm/app-graph-builder-3SY5MBIK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-34EX6E5Q.mjs +0 -18
- package/dist/lib/node-esm/chunk-34EX6E5Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs +0 -16
- package/dist/lib/node-esm/chunk-3UEZLJ2V.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BB2TAT4P.mjs +0 -22
- package/dist/lib/node-esm/chunk-BB2TAT4P.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs +0 -98
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs +0 -209
- package/dist/lib/node-esm/chunk-J6UXXZGJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OD574YIU.mjs +0 -2102
- package/dist/lib/node-esm/chunk-OD574YIU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs +0 -88
- package/dist/lib/node-esm/chunk-OYN6HLXZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UCOFKNKN.mjs +0 -158
- package/dist/lib/node-esm/chunk-UCOFKNKN.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs +0 -44
- package/dist/lib/node-esm/intent-resolver-E6MXTYAU.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs +0 -160
- package/dist/lib/node-esm/react-surface-7HA5EDWY.mjs.map +0 -7
- package/dist/lib/node-esm/settings-5IAY6BT4.mjs +0 -23
- package/dist/lib/node-esm/settings-5IAY6BT4.mjs.map +0 -7
- package/dist/types/src/capabilities/ai-client.d.ts +0 -5
- package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
- package/dist/types/src/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/capabilities.d.ts +0 -6
- package/dist/types/src/capabilities/capabilities.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/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/components/AmbientDialog/AmbientDialog.d.ts +0 -10
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts +0 -8
- package/dist/types/src/components/AmbientDialog/AmbientDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/AmbientDialog/index.d.ts +0 -2
- package/dist/types/src/components/AmbientDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/AssistantDialog.d.ts +0 -7
- package/dist/types/src/components/AssistantDialog.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +0 -9
- package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts +0 -13
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts +0 -8
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintEditor/index.d.ts +0 -2
- package/dist/types/src/components/BlueprintEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/Prompt.d.ts +0 -23
- package/dist/types/src/components/Prompt/Prompt.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts +0 -13
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/PromptBar.d.ts +0 -16
- package/dist/types/src/components/Prompt/PromptBar.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts +0 -9
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/autocomplete.d.ts +0 -25
- package/dist/types/src/components/Prompt/autocomplete.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/index.d.ts +0 -3
- package/dist/types/src/components/Prompt/index.d.ts.map +0 -1
- package/dist/types/src/components/Prompt/references.d.ts +0 -30
- package/dist/types/src/components/Prompt/references.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/TemplateContainer.d.ts +0 -8
- package/dist/types/src/components/TemplateContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Thread.d.ts +0 -28
- package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
- package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -11
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadContainer.d.ts +0 -13
- package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +0 -16
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -16
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
- package/dist/types/src/components/Thread/ToolInvocations.d.ts +0 -13
- package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +0 -1
- package/dist/types/src/components/Thread/index.d.ts +0 -3
- package/dist/types/src/components/Thread/index.d.ts.map +0 -1
- package/dist/types/src/components/Thread/reducer.d.ts +0 -12
- package/dist/types/src/components/Thread/reducer.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/experimental/transcription/index.d.ts +0 -1
- package/dist/types/src/experimental/transcription/index.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.d.ts +0 -72
- package/dist/types/src/hooks/processor.d.ts.map +0 -1
- package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +0 -17
- package/dist/types/src/hooks/useContextProvider.d.ts.map +0 -1
- package/dist/types/src/hooks/useMessageQueue.d.ts +0 -42
- package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
- package/dist/types/src/hooks/useServices.d.ts +0 -7
- package/dist/types/src/hooks/useServices.d.ts.map +0 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts +0 -13
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +0 -1
- package/dist/types/src/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/Prompt.stories.d.ts +0 -8
- package/dist/types/src/stories/Prompt.stories.d.ts.map +0 -1
- package/dist/types/src/stories/Query.stories.d.ts +0 -19
- package/dist/types/src/stories/Query.stories.d.ts.map +0 -1
- package/dist/types/src/stories/Research.stories.d.ts +0 -15
- package/dist/types/src/stories/Research.stories.d.ts.map +0 -1
- package/dist/types/src/stories/test-data.d.ts +0 -3
- package/dist/types/src/stories/test-data.d.ts.map +0 -1
- package/dist/types/src/stories/testing.d.ts +0 -12
- package/dist/types/src/stories/testing.d.ts.map +0 -1
- package/dist/types/src/testing/test-blueprint.d.ts +0 -8
- package/dist/types/src/testing/test-blueprint.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -3
- package/dist/types/src/testing/test-functions.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/chat.d.ts +0 -23
- package/dist/types/src/types/chat.d.ts.map +0 -1
- package/dist/types/src/types/template.d.ts +0 -56
- package/dist/types/src/types/template.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -50
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/capabilities/ai-client.ts +0 -42
- package/src/capabilities/app-graph-builder.ts +0 -248
- package/src/capabilities/capabilities.ts +0 -15
- package/src/capabilities/intent-resolver.ts +0 -45
- package/src/capabilities/react-surface.tsx +0 -137
- package/src/capabilities/settings.ts +0 -19
- package/src/components/AmbientDialog/AmbientDialog.stories.tsx +0 -84
- package/src/components/AmbientDialog/AmbientDialog.tsx +0 -117
- package/src/components/AssistantDialog.tsx +0 -37
- package/src/components/BlueprintContainer.tsx +0 -148
- package/src/components/BlueprintEditor/BlueprintEditor.stories.tsx +0 -32
- package/src/components/BlueprintEditor/BlueprintEditor.tsx +0 -50
- package/src/components/BlueprintEditor/index.ts +0 -5
- package/src/components/Prompt/Prompt.stories.tsx +0 -121
- package/src/components/Prompt/Prompt.tsx +0 -124
- package/src/components/Prompt/PromptBar.stories.tsx +0 -69
- package/src/components/Prompt/PromptBar.tsx +0 -105
- package/src/components/Prompt/autocomplete.ts +0 -218
- package/src/components/Prompt/index.ts +0 -6
- package/src/components/Prompt/references.ts +0 -180
- package/src/components/PromptSettings.tsx +0 -91
- package/src/components/TemplateContainer.tsx +0 -23
- package/src/components/Thread/Thread.stories.tsx +0 -201
- package/src/components/Thread/Thread.tsx +0 -118
- package/src/components/Thread/ThreadContainer.stories.tsx +0 -283
- package/src/components/Thread/ThreadContainer.tsx +0 -105
- package/src/components/Thread/ThreadMessage.tsx +0 -234
- package/src/components/Thread/ToolInvocations.tsx +0 -106
- package/src/components/Thread/index.ts +0 -6
- package/src/components/Thread/reducer.ts +0 -52
- package/src/events.ts +0 -11
- package/src/hooks/processor.test.ts +0 -15
- package/src/hooks/processor.ts +0 -238
- package/src/hooks/useChatProcessor.tsx +0 -97
- package/src/hooks/useContextProvider.ts +0 -55
- package/src/hooks/useMessageQueue.ts +0 -22
- package/src/hooks/useServices.ts +0 -28
- package/src/hooks/useTextInputEvents.ts +0 -49
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/shims.d.ts +0 -8
- package/src/stories/Prompt.stories.tsx +0 -60
- package/src/stories/Query.stories.tsx +0 -514
- package/src/stories/Research.stories.tsx +0 -482
- package/src/stories/test-data.ts +0 -128
- package/src/stories/testing.ts +0 -60
- package/src/testing/test-blueprint.ts +0 -58
- package/src/testing/test-functions.ts +0 -11
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/chat.ts +0 -32
- package/src/types/template.ts +0 -66
- package/src/types/types.ts +0 -48
- package/src/typings.d.ts +0 -9
- /package/dist/types/src/{hooks → processor}/processor.test.d.ts +0 -0
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Effect } from 'effect';
|
|
6
|
-
import React, { useEffect, useMemo } from 'react';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, contributes, createIntent, createSurface, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
-
import { Blueprint } from '@dxos/assistant';
|
|
10
|
-
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
11
|
-
import { Filter, type Key, Obj, Query } from '@dxos/echo';
|
|
12
|
-
import { SettingsStore } from '@dxos/local-storage';
|
|
13
|
-
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
14
|
-
import { fullyQualifiedId, getSpace, getTypename } from '@dxos/react-client/echo';
|
|
15
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
16
|
-
|
|
17
|
-
import {
|
|
18
|
-
AssistantDialog,
|
|
19
|
-
AssistantSettings,
|
|
20
|
-
BlueprintContainer,
|
|
21
|
-
ChatContainer,
|
|
22
|
-
PromptSettings,
|
|
23
|
-
TemplateContainer,
|
|
24
|
-
} from '../components';
|
|
25
|
-
import { ASSISTANT_PLUGIN, ASSISTANT_DIALOG } from '../meta';
|
|
26
|
-
import { AIChatType, AssistantAction, type AssistantSettingsProps, CompanionTo, TemplateType } from '../types';
|
|
27
|
-
|
|
28
|
-
export default () =>
|
|
29
|
-
contributes(Capabilities.ReactSurface, [
|
|
30
|
-
createSurface({
|
|
31
|
-
id: `${ASSISTANT_PLUGIN}/plugin-settings`,
|
|
32
|
-
role: 'article',
|
|
33
|
-
filter: (data): data is { subject: SettingsStore<AssistantSettingsProps> } =>
|
|
34
|
-
data.subject instanceof SettingsStore && data.subject.prefix === ASSISTANT_PLUGIN,
|
|
35
|
-
component: ({ data: { subject } }) => <AssistantSettings settings={subject.value} />,
|
|
36
|
-
}),
|
|
37
|
-
createSurface({
|
|
38
|
-
id: `${ASSISTANT_PLUGIN}/chat`,
|
|
39
|
-
role: 'article',
|
|
40
|
-
filter: (data): data is { subject: AIChatType; variant: undefined } =>
|
|
41
|
-
Obj.instanceOf(AIChatType, data.subject) && data.variant !== 'assistant-chat',
|
|
42
|
-
component: ({ data, role }) => <ChatContainer role={role} chat={data.subject} />,
|
|
43
|
-
}),
|
|
44
|
-
createSurface({
|
|
45
|
-
id: `${ASSISTANT_PLUGIN}/object-chat`,
|
|
46
|
-
role: 'article',
|
|
47
|
-
filter: (data): data is { companionTo: Obj.Any; subject: AIChatType | 'assistant-chat' } =>
|
|
48
|
-
Obj.isObject(data.companionTo) &&
|
|
49
|
-
(Obj.instanceOf(AIChatType, data.subject) || data.subject === 'assistant-chat'),
|
|
50
|
-
component: ({ data, role }) => {
|
|
51
|
-
const { dispatch } = useIntentDispatcher();
|
|
52
|
-
const associatedArtifact = useMemo(
|
|
53
|
-
() => ({
|
|
54
|
-
id: fullyQualifiedId(data.companionTo),
|
|
55
|
-
typename: getTypename(data.companionTo) ?? 'unknown',
|
|
56
|
-
spaceId: (getSpace(data.companionTo)?.id ?? 'unknown') as Key.SpaceId,
|
|
57
|
-
}),
|
|
58
|
-
[data.companionTo],
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
// TODO(wittjosiah): Factor out to container.
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
const timeout = setTimeout(async () => {
|
|
64
|
-
const space = getSpace(data.companionTo);
|
|
65
|
-
if (space && data.subject === 'assistant-chat') {
|
|
66
|
-
const result = await space.db
|
|
67
|
-
.query(Query.select(Filter.ids(data.companionTo.id)).targetOf(CompanionTo).source())
|
|
68
|
-
.run();
|
|
69
|
-
if (result.objects.length > 0) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const program = Effect.gen(function* () {
|
|
74
|
-
const { object } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
75
|
-
yield* dispatch(createIntent(SpaceAction.AddObject, { object, target: space, hidden: true }));
|
|
76
|
-
yield* dispatch(
|
|
77
|
-
createIntent(SpaceAction.AddRelation, {
|
|
78
|
-
space,
|
|
79
|
-
schema: CompanionTo,
|
|
80
|
-
source: object,
|
|
81
|
-
target: data.companionTo,
|
|
82
|
-
}),
|
|
83
|
-
);
|
|
84
|
-
});
|
|
85
|
-
void Effect.runPromise(program);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return () => clearTimeout(timeout);
|
|
90
|
-
}, [data.subject]);
|
|
91
|
-
|
|
92
|
-
if (data.subject === 'assistant-chat') {
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return <ChatContainer role={role} chat={data.subject} associatedArtifact={associatedArtifact} />;
|
|
97
|
-
},
|
|
98
|
-
}),
|
|
99
|
-
createSurface({
|
|
100
|
-
id: `${ASSISTANT_PLUGIN}/blueprint`,
|
|
101
|
-
role: 'article',
|
|
102
|
-
filter: (data): data is { subject: Blueprint } => Obj.instanceOf(Blueprint, data.subject),
|
|
103
|
-
component: ({ data, role }) => <BlueprintContainer role={role} blueprint={data.subject} />,
|
|
104
|
-
}),
|
|
105
|
-
createSurface({
|
|
106
|
-
id: `${ASSISTANT_PLUGIN}/companion/logs`,
|
|
107
|
-
role: 'article',
|
|
108
|
-
filter: (data): data is { companionTo: Blueprint } =>
|
|
109
|
-
Obj.instanceOf(Blueprint, data.companionTo) && data.subject === 'logs',
|
|
110
|
-
component: ({ data, role }) => {
|
|
111
|
-
const space = getSpace(data.companionTo);
|
|
112
|
-
return (
|
|
113
|
-
<StackItem.Content role={role}>
|
|
114
|
-
<InvocationTraceContainer space={space} target={data.companionTo} detailAxis='block' />
|
|
115
|
-
</StackItem.Content>
|
|
116
|
-
);
|
|
117
|
-
},
|
|
118
|
-
}),
|
|
119
|
-
createSurface({
|
|
120
|
-
id: `${ASSISTANT_PLUGIN}/template`,
|
|
121
|
-
role: 'article',
|
|
122
|
-
filter: (data): data is { subject: TemplateType } => Obj.instanceOf(TemplateType, data.subject),
|
|
123
|
-
component: ({ data, role }) => <TemplateContainer role={role} template={data.subject} />,
|
|
124
|
-
}),
|
|
125
|
-
createSurface({
|
|
126
|
-
id: ASSISTANT_DIALOG,
|
|
127
|
-
role: 'dialog',
|
|
128
|
-
filter: (data): data is { props: { chat: AIChatType } } => data.component === ASSISTANT_DIALOG,
|
|
129
|
-
component: ({ data }) => <AssistantDialog {...data.props} />,
|
|
130
|
-
}),
|
|
131
|
-
createSurface({
|
|
132
|
-
id: `${ASSISTANT_PLUGIN}/prompt-settings`,
|
|
133
|
-
role: 'object-settings',
|
|
134
|
-
filter: (data): data is { subject: TemplateType } => Obj.instanceOf(TemplateType, data.subject),
|
|
135
|
-
component: ({ data }) => <PromptSettings template={data.subject} />,
|
|
136
|
-
}),
|
|
137
|
-
]);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
import { type AssistantSettingsProps, AssistantSettingsSchema } from '../types';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const settings = live<AssistantSettingsProps>({});
|
|
13
|
-
|
|
14
|
-
return contributes(Capabilities.Settings, {
|
|
15
|
-
prefix: meta.id,
|
|
16
|
-
schema: AssistantSettingsSchema,
|
|
17
|
-
value: settings,
|
|
18
|
-
});
|
|
19
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
|
-
import React, { useState } from 'react';
|
|
9
|
-
|
|
10
|
-
import { IntentPlugin } from '@dxos/app-framework';
|
|
11
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
-
import { Config } from '@dxos/client';
|
|
13
|
-
import { faker } from '@dxos/random';
|
|
14
|
-
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
|
-
import { Dialog, Toolbar, Button } from '@dxos/react-ui';
|
|
16
|
-
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
17
|
-
|
|
18
|
-
import { AmbientDialog } from './AmbientDialog';
|
|
19
|
-
import translations from '../../translations';
|
|
20
|
-
|
|
21
|
-
const meta: Meta<typeof AmbientDialog> = {
|
|
22
|
-
title: 'plugins/plugin-assistant/AmbientDialog',
|
|
23
|
-
component: AmbientDialog,
|
|
24
|
-
render: () => {
|
|
25
|
-
const [open, setOpen] = useState(true);
|
|
26
|
-
const [items, setItems] = useState<string[]>([]);
|
|
27
|
-
return (
|
|
28
|
-
<>
|
|
29
|
-
<div>
|
|
30
|
-
<Toolbar.Root>
|
|
31
|
-
<Toolbar.Button onClick={() => setOpen(true)}>Open</Toolbar.Button>
|
|
32
|
-
</Toolbar.Root>
|
|
33
|
-
</div>
|
|
34
|
-
<Dialog.Root open={open} onOpenChange={setOpen}>
|
|
35
|
-
<AmbientDialog>
|
|
36
|
-
<div className='flex flex-col h-full overflow-hidden'>
|
|
37
|
-
<div className='flex flex-col h-full gap-2 overflow-auto'>
|
|
38
|
-
{items.map((item) => (
|
|
39
|
-
<div key={item} className='px-2'>
|
|
40
|
-
{item}
|
|
41
|
-
</div>
|
|
42
|
-
))}
|
|
43
|
-
{items.length > 0 && <div className='pbe-2' />}
|
|
44
|
-
</div>
|
|
45
|
-
<div className='shrink-0 h-[40px]'>
|
|
46
|
-
<Button onClick={() => setItems([...items, faker.lorem.word()])}>Add</Button>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</AmbientDialog>
|
|
50
|
-
</Dialog.Root>
|
|
51
|
-
</>
|
|
52
|
-
);
|
|
53
|
-
},
|
|
54
|
-
decorators: [
|
|
55
|
-
// TODO(burdon): Replace with ClientPlugin.
|
|
56
|
-
withClientProvider({
|
|
57
|
-
config: new Config({
|
|
58
|
-
runtime: {
|
|
59
|
-
client: { edgeFeatures: { signaling: true } },
|
|
60
|
-
services: {
|
|
61
|
-
edge: { url: 'https://edge.dxos.workers.dev/' },
|
|
62
|
-
iceProviders: [{ urls: 'https://edge.dxos.workers.dev/ice' }],
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
}),
|
|
66
|
-
createIdentity: true,
|
|
67
|
-
createSpace: true,
|
|
68
|
-
}),
|
|
69
|
-
withPluginManager({
|
|
70
|
-
plugins: [IntentPlugin()],
|
|
71
|
-
}),
|
|
72
|
-
withTheme,
|
|
73
|
-
withLayout({ fullscreen: true }),
|
|
74
|
-
],
|
|
75
|
-
parameters: {
|
|
76
|
-
translations,
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default meta;
|
|
81
|
-
|
|
82
|
-
type Story = StoryObj<typeof AmbientDialog>;
|
|
83
|
-
|
|
84
|
-
export const Default: Story = {};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type PropsWithChildren, useCallback, useEffect, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { Dialog, Icon, IconButton } from '@dxos/react-ui';
|
|
8
|
-
import { resizeAttributes, ResizeHandle, type Size, sizeStyle } from '@dxos/react-ui-dnd';
|
|
9
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
10
|
-
|
|
11
|
-
const preventDefault = (event: Event) => event.preventDefault();
|
|
12
|
-
|
|
13
|
-
const minSize = 5;
|
|
14
|
-
|
|
15
|
-
export type AmbientDialogProps = PropsWithChildren<{
|
|
16
|
-
open?: boolean;
|
|
17
|
-
title?: string;
|
|
18
|
-
resizeable?: boolean;
|
|
19
|
-
onOpenChange?: (open: boolean) => void;
|
|
20
|
-
onEscape?: () => void;
|
|
21
|
-
}>;
|
|
22
|
-
|
|
23
|
-
export const AmbientDialog = ({
|
|
24
|
-
children,
|
|
25
|
-
open: controlledOpen,
|
|
26
|
-
title,
|
|
27
|
-
resizeable = true,
|
|
28
|
-
onOpenChange,
|
|
29
|
-
onEscape,
|
|
30
|
-
}: AmbientDialogProps) => {
|
|
31
|
-
const [resizeKey, setReizeKey] = useState(0);
|
|
32
|
-
const [size, setSize] = useState<Size>('min-content');
|
|
33
|
-
const [open, setOpen] = useState(controlledOpen);
|
|
34
|
-
|
|
35
|
-
// Update controlled value.
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
setOpen(controlledOpen);
|
|
38
|
-
}, [controlledOpen]);
|
|
39
|
-
|
|
40
|
-
// Update size and key.
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
setSize(open ? 'min-content' : minSize);
|
|
43
|
-
setReizeKey((key) => key + 1);
|
|
44
|
-
}, [open]);
|
|
45
|
-
|
|
46
|
-
// TODO(burdon): Animate open/close.
|
|
47
|
-
// NOTE: We set the min size to 5rem (80px), and the header and prompt bar to 40px (i.e., the rail-size) each.
|
|
48
|
-
// The dialog has no vertical padding and has box-content so that when closed it collapses to the size of the header and prompt bar.
|
|
49
|
-
const handleToggle = useCallback(() => {
|
|
50
|
-
setOpen((open) => {
|
|
51
|
-
onOpenChange?.(!open);
|
|
52
|
-
return !open;
|
|
53
|
-
});
|
|
54
|
-
}, []);
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<div role='none' className='dx-dialog__overlay bg-transparent pointer-events-none' data-block-align='end'>
|
|
58
|
-
<Dialog.Content
|
|
59
|
-
classNames='relative box-content p-0 md:is-[35rem] md:max-is-none overflow-hidden pointer-events-auto transition-[block-size] ease-in-out duration-0 [&:not([data-dx-resizing="true"])]:duration-200'
|
|
60
|
-
inOverlayLayout
|
|
61
|
-
{...resizeAttributes}
|
|
62
|
-
style={{
|
|
63
|
-
...(resizeable ? sizeStyle(size, 'vertical', true) : {}),
|
|
64
|
-
maxBlockSize: 'calc(100dvh - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 9rem)',
|
|
65
|
-
}}
|
|
66
|
-
onEscapeKeyDown={onEscape}
|
|
67
|
-
onInteractOutside={preventDefault}
|
|
68
|
-
>
|
|
69
|
-
{(resizeable && (
|
|
70
|
-
<>
|
|
71
|
-
<ResizeHandle
|
|
72
|
-
key={resizeKey}
|
|
73
|
-
side='block-start'
|
|
74
|
-
defaultSize='min-content'
|
|
75
|
-
minSize={minSize}
|
|
76
|
-
fallbackSize={minSize}
|
|
77
|
-
iconPosition='center'
|
|
78
|
-
onSizeChange={setSize}
|
|
79
|
-
/>
|
|
80
|
-
|
|
81
|
-
<DialogHeader open={open} title={title} onToggle={handleToggle} />
|
|
82
|
-
</>
|
|
83
|
-
)) || <Dialog.Title srOnly />}
|
|
84
|
-
|
|
85
|
-
{children}
|
|
86
|
-
</Dialog.Content>
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Matches same layout grid as PromptBar.
|
|
93
|
-
*/
|
|
94
|
-
const DialogHeader = ({ open, title, onToggle }: { open?: boolean; title?: string; onToggle: () => void }) => {
|
|
95
|
-
return (
|
|
96
|
-
<div className='flex shrink-0 w-full grid grid-cols-[var(--rail-action)_1fr_var(--rail-action)] items-center overflow-hidden'>
|
|
97
|
-
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
98
|
-
<Dialog.Close>
|
|
99
|
-
<Icon icon='ph--x--regular' />
|
|
100
|
-
</Dialog.Close>
|
|
101
|
-
</div>
|
|
102
|
-
<div className='grow'>
|
|
103
|
-
<Dialog.Title classNames='flex justify-center text-xs text-subdued'>{title}</Dialog.Title>
|
|
104
|
-
</div>
|
|
105
|
-
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
106
|
-
<IconButton
|
|
107
|
-
variant='ghost'
|
|
108
|
-
icon={'ph--caret-up--regular'}
|
|
109
|
-
classNames={mx('[&>svg]:transition [&>svg]:duration-200', open && '[&>svg]:rotate-180')}
|
|
110
|
-
iconOnly
|
|
111
|
-
label='Shrink'
|
|
112
|
-
onClick={onToggle}
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type FC, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { useCapability, Capabilities, useCapabilities } from '@dxos/app-framework';
|
|
8
|
-
import { TranscriptionCapabilities } from '@dxos/plugin-transcription';
|
|
9
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
-
|
|
11
|
-
import { AmbientDialog } from './AmbientDialog';
|
|
12
|
-
import { ThreadContainer } from './Thread';
|
|
13
|
-
import { ASSISTANT_PLUGIN } from '../meta';
|
|
14
|
-
import { type AssistantSettingsProps, type AIChatType } from '../types';
|
|
15
|
-
|
|
16
|
-
export const AssistantDialog: FC<{ chat?: AIChatType }> = ({ chat }) => {
|
|
17
|
-
const { t } = useTranslation(ASSISTANT_PLUGIN);
|
|
18
|
-
const transcription = useCapabilities(TranscriptionCapabilities.Transcriber).length > 0;
|
|
19
|
-
const settings = useCapability(Capabilities.SettingsStore).getStore<AssistantSettingsProps>(ASSISTANT_PLUGIN)?.value;
|
|
20
|
-
|
|
21
|
-
// TODO(burdon): Refocus when open.
|
|
22
|
-
const [open, setOpen] = useState(false);
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<AmbientDialog open={open} onOpenChange={setOpen} title={t('assistant dialog title')}>
|
|
26
|
-
<ThreadContainer
|
|
27
|
-
part={'dialog'}
|
|
28
|
-
chat={chat}
|
|
29
|
-
onOpenChange={setOpen}
|
|
30
|
-
settings={settings}
|
|
31
|
-
transcription={transcription}
|
|
32
|
-
/>
|
|
33
|
-
</AmbientDialog>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default AssistantDialog;
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type EditorView } from '@codemirror/view';
|
|
6
|
-
import JSON5 from 'json5';
|
|
7
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
8
|
-
|
|
9
|
-
import { ToolRegistry } from '@dxos/ai';
|
|
10
|
-
import { useCapability } from '@dxos/app-framework';
|
|
11
|
-
import {
|
|
12
|
-
type Blueprint,
|
|
13
|
-
type BlueprintDefinition,
|
|
14
|
-
BlueprintMachine,
|
|
15
|
-
createLocalSearchTool,
|
|
16
|
-
createExaTool,
|
|
17
|
-
createGraphWriterTool,
|
|
18
|
-
} from '@dxos/assistant';
|
|
19
|
-
import { getSpace } from '@dxos/client/echo';
|
|
20
|
-
import { DXN, Key } from '@dxos/echo';
|
|
21
|
-
import { Toolbar, useTranslation } from '@dxos/react-ui';
|
|
22
|
-
import { getSelectionSet, useSelectionManager } from '@dxos/react-ui-attention';
|
|
23
|
-
import { StackItem, type StackItemContentProps } from '@dxos/react-ui-stack';
|
|
24
|
-
|
|
25
|
-
import { BlueprintEditor } from './BlueprintEditor';
|
|
26
|
-
import { AssistantCapabilities } from '../capabilities';
|
|
27
|
-
import { meta } from '../meta';
|
|
28
|
-
import { QueueLogger } from '../queue-logger';
|
|
29
|
-
|
|
30
|
-
// TODO(burdon): Move to config.
|
|
31
|
-
export const EXA_API_KEY = '9c7e17ff-0c85-4cd5-827a-8b489f139e03';
|
|
32
|
-
|
|
33
|
-
// TODO(burdon): Validate.
|
|
34
|
-
const parseBlueprint = (text: string): BlueprintDefinition | undefined => {
|
|
35
|
-
try {
|
|
36
|
-
const json = JSON5.parse(text);
|
|
37
|
-
const { steps } = json;
|
|
38
|
-
return { steps };
|
|
39
|
-
} catch (error) {
|
|
40
|
-
// Ignore.
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const BlueprintContainer = ({
|
|
45
|
-
role,
|
|
46
|
-
blueprint,
|
|
47
|
-
}: Pick<StackItemContentProps, 'role'> & { blueprint: Blueprint }) => {
|
|
48
|
-
const { t } = useTranslation(meta.id);
|
|
49
|
-
const aiClient = useCapability(AssistantCapabilities.AiClient);
|
|
50
|
-
const selectionManager = useSelectionManager();
|
|
51
|
-
const [definition, setDefinition] = useState<BlueprintDefinition>();
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
setDefinition({
|
|
54
|
-
steps: blueprint.steps.map(({ instructions, tools }) => ({ instructions, tools })),
|
|
55
|
-
});
|
|
56
|
-
}, [blueprint]);
|
|
57
|
-
|
|
58
|
-
const editorRef = useRef<EditorView | undefined>(undefined);
|
|
59
|
-
|
|
60
|
-
// TODO(burdon): Factor out.
|
|
61
|
-
const toolRegistry = useMemo(() => {
|
|
62
|
-
const space = getSpace(blueprint);
|
|
63
|
-
if (!space) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// TODO(burdon): How should the queue be created?
|
|
68
|
-
const queue = space.queues.create();
|
|
69
|
-
|
|
70
|
-
return new ToolRegistry([
|
|
71
|
-
createExaTool({ apiKey: EXA_API_KEY }),
|
|
72
|
-
createLocalSearchTool(space.db, queue),
|
|
73
|
-
createGraphWriterTool({
|
|
74
|
-
db: space.db,
|
|
75
|
-
queue,
|
|
76
|
-
schema: [], // TODO(burdon): Get schema from client/blueprint?
|
|
77
|
-
onDone: async (objects) => {
|
|
78
|
-
await queue.append(objects);
|
|
79
|
-
},
|
|
80
|
-
}),
|
|
81
|
-
]);
|
|
82
|
-
}, [blueprint]);
|
|
83
|
-
|
|
84
|
-
const formatAndSave = useCallback((): BlueprintDefinition | undefined => {
|
|
85
|
-
if (!blueprint) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const text = editorRef.current?.state.doc.toString();
|
|
90
|
-
if (!text) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const definition = parseBlueprint(text);
|
|
95
|
-
if (!definition) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
setDefinition(definition);
|
|
100
|
-
const formatted = JSON.stringify(definition, null, 2);
|
|
101
|
-
editorRef.current?.dispatch({
|
|
102
|
-
changes: { from: 0, to: text.length, insert: formatted },
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
blueprint.steps.length = 0;
|
|
106
|
-
for (const step of definition.steps) {
|
|
107
|
-
blueprint.steps.push({
|
|
108
|
-
id: Key.ObjectId.random(),
|
|
109
|
-
instructions: step.instructions,
|
|
110
|
-
tools: step.tools,
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return blueprint;
|
|
115
|
-
}, [blueprint]);
|
|
116
|
-
|
|
117
|
-
// TODO(burdon): Save raw blueprint separately from parsed blueprint? (like Script).
|
|
118
|
-
const handleSave = useCallback(() => formatAndSave(), [formatAndSave]);
|
|
119
|
-
|
|
120
|
-
const handleRun = useCallback(async () => {
|
|
121
|
-
if (!aiClient?.value || !toolRegistry) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
formatAndSave();
|
|
126
|
-
|
|
127
|
-
// Get input from selection.
|
|
128
|
-
const input = Array.from(getSelectionSet(selectionManager)).map((id) => DXN.fromLocalObjectId(id));
|
|
129
|
-
if (!input.length) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const machine = new BlueprintMachine(toolRegistry, blueprint).setLogger(new QueueLogger(blueprint));
|
|
134
|
-
await machine.runToCompletion({ aiClient: aiClient.value, input });
|
|
135
|
-
}, [aiClient.value, blueprint, formatAndSave, selectionManager, toolRegistry]);
|
|
136
|
-
|
|
137
|
-
return (
|
|
138
|
-
<StackItem.Content role={role} toolbar>
|
|
139
|
-
<Toolbar.Root>
|
|
140
|
-
<Toolbar.Button onClick={handleSave}>{t('button save')}</Toolbar.Button>
|
|
141
|
-
<Toolbar.Button onClick={handleRun}>{t('button run')}</Toolbar.Button>
|
|
142
|
-
</Toolbar.Root>
|
|
143
|
-
{definition && <BlueprintEditor ref={editorRef} blueprint={definition} />}
|
|
144
|
-
</StackItem.Content>
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export default BlueprintContainer;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
|
-
|
|
9
|
-
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
10
|
-
|
|
11
|
-
import { BlueprintEditor } from './BlueprintEditor';
|
|
12
|
-
import { RESEARCH_BLUEPRINT_DEFINITION } from '../../testing';
|
|
13
|
-
import translations from '../../translations';
|
|
14
|
-
|
|
15
|
-
const meta: Meta<typeof BlueprintEditor> = {
|
|
16
|
-
title: 'plugins/plugin-assistant/BlueprintEditor',
|
|
17
|
-
component: BlueprintEditor,
|
|
18
|
-
decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'mli-auto max-is-[50rem] justify-center' })],
|
|
19
|
-
parameters: {
|
|
20
|
-
translations,
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default meta;
|
|
25
|
-
|
|
26
|
-
type Story = StoryObj<typeof BlueprintEditor>;
|
|
27
|
-
|
|
28
|
-
export const Default: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
blueprint: RESEARCH_BLUEPRINT_DEFINITION,
|
|
31
|
-
},
|
|
32
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
6
|
-
|
|
7
|
-
import { BlueprintDefinition } from '@dxos/assistant';
|
|
8
|
-
import { Type } from '@dxos/echo';
|
|
9
|
-
import { useThemeContext, type ThemedClassName } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
11
|
-
type EditorView,
|
|
12
|
-
createBasicExtensions,
|
|
13
|
-
createJsonExtensions,
|
|
14
|
-
createThemeExtensions,
|
|
15
|
-
useTextEditor,
|
|
16
|
-
} from '@dxos/react-ui-editor';
|
|
17
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
18
|
-
|
|
19
|
-
export type BlueprintEditorProps = ThemedClassName<{
|
|
20
|
-
blueprint: BlueprintDefinition;
|
|
21
|
-
}>;
|
|
22
|
-
|
|
23
|
-
// TODO(burdon): Factor out JsonEditor.
|
|
24
|
-
export const BlueprintEditor = forwardRef<EditorView | undefined, BlueprintEditorProps>(
|
|
25
|
-
({ classNames, blueprint }, forwardedRef) => {
|
|
26
|
-
const { themeMode } = useThemeContext();
|
|
27
|
-
const { parentRef, view } = useTextEditor({
|
|
28
|
-
initialValue: JSON.stringify(blueprint, null, 2),
|
|
29
|
-
extensions: [
|
|
30
|
-
createBasicExtensions({
|
|
31
|
-
lineNumbers: true,
|
|
32
|
-
lineWrapping: false,
|
|
33
|
-
monospace: true,
|
|
34
|
-
scrollPastEnd: true,
|
|
35
|
-
}),
|
|
36
|
-
createThemeExtensions({
|
|
37
|
-
themeMode,
|
|
38
|
-
syntaxHighlighting: true,
|
|
39
|
-
}),
|
|
40
|
-
createJsonExtensions({
|
|
41
|
-
schema: Type.toJsonSchema(BlueprintDefinition, { strict: true }),
|
|
42
|
-
}),
|
|
43
|
-
],
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
useImperativeHandle(forwardedRef, () => view, [view]);
|
|
47
|
-
|
|
48
|
-
return <div ref={parentRef} className={mx('overflow-hidden', classNames)} />;
|
|
49
|
-
},
|
|
50
|
-
);
|