@dxos/plugin-assistant 0.8.4-main.c1de068 → 0.8.4-main.c85a9c8dae
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/AssistantSettings-2LFAG5OQ.mjs +93 -0
- package/dist/lib/browser/AssistantSettings-2LFAG5OQ.mjs.map +7 -0
- package/dist/lib/browser/BlueprintArticle-CCS25MNW.mjs +36 -0
- package/dist/lib/browser/BlueprintArticle-CCS25MNW.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-UGD4V34A.mjs +202 -0
- package/dist/lib/browser/ChatCompanion-UGD4V34A.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-ZGRSZ5EU.mjs +12 -0
- package/dist/lib/browser/ChatContainer-ZGRSZ5EU.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-AET7GVIB.mjs +85 -0
- package/dist/lib/browser/ChatDialog-AET7GVIB.mjs.map +7 -0
- package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs +91 -0
- package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs.map +7 -0
- package/dist/lib/browser/ProjectSettings-R6RRARLO.mjs +194 -0
- package/dist/lib/browser/ProjectSettings-R6RRARLO.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-USQO4WX6.mjs +71 -0
- package/dist/lib/browser/PromptArticle-USQO4WX6.mjs.map +7 -0
- package/dist/lib/browser/TriggerStatus-65X3EUSN.mjs +122 -0
- package/dist/lib/browser/TriggerStatus-65X3EUSN.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-SFYYUKTT.mjs +234 -0
- package/dist/lib/browser/app-graph-builder-SFYYUKTT.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-RB5RHZZM.mjs +34 -0
- package/dist/lib/browser/blueprint-definition-RB5RHZZM.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-7DXYAXLZ.mjs +230 -0
- package/dist/lib/browser/chunk-7DXYAXLZ.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-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-JYY5AD65.mjs +286 -0
- package/dist/lib/browser/chunk-JYY5AD65.mjs.map +7 -0
- package/dist/lib/browser/chunk-LEXIQDXZ.mjs +26 -0
- package/dist/lib/browser/chunk-LEXIQDXZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-RU4G5NY4.mjs +69 -0
- package/dist/lib/browser/chunk-RU4G5NY4.mjs.map +7 -0
- package/dist/lib/browser/chunk-UUA6GNGG.mjs +2125 -0
- package/dist/lib/browser/chunk-UUA6GNGG.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 +299 -161
- 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-ELXDQZEG.mjs +136 -0
- package/dist/lib/browser/operation-resolver-ELXDQZEG.mjs.map +7 -0
- package/dist/lib/browser/react-surface-KYQSZO2I.mjs +144 -0
- package/dist/lib/browser/react-surface-KYQSZO2I.mjs.map +7 -0
- package/dist/lib/browser/repair-ZFZWZALX.mjs +52 -0
- package/dist/lib/browser/repair-ZFZWZALX.mjs.map +7 -0
- package/dist/lib/browser/settings-YREVQAZ5.mjs +33 -0
- package/dist/lib/browser/settings-YREVQAZ5.mjs.map +7 -0
- package/dist/lib/browser/state-MPG42ZO4.mjs +26 -0
- package/dist/lib/browser/state-MPG42ZO4.mjs.map +7 -0
- package/dist/lib/browser/toolkit-XRSBBB3L.mjs +16 -0
- package/dist/lib/browser/toolkit-XRSBBB3L.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +11 -4
- package/dist/lib/node-esm/AssistantSettings-QWFEMJG7.mjs +94 -0
- package/dist/lib/node-esm/AssistantSettings-QWFEMJG7.mjs.map +7 -0
- package/dist/lib/node-esm/BlueprintArticle-SNEN6LOY.mjs +37 -0
- package/dist/lib/node-esm/BlueprintArticle-SNEN6LOY.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-NP4R5BFE.mjs +203 -0
- package/dist/lib/node-esm/ChatCompanion-NP4R5BFE.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-IFHDIFJH.mjs +13 -0
- package/dist/lib/node-esm/ChatContainer-IFHDIFJH.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-UZNQBTKZ.mjs +86 -0
- package/dist/lib/node-esm/ChatDialog-UZNQBTKZ.mjs.map +7 -0
- package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs +92 -0
- package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs.map +7 -0
- package/dist/lib/node-esm/ProjectSettings-Q5QY6BYS.mjs +195 -0
- package/dist/lib/node-esm/ProjectSettings-Q5QY6BYS.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-PGMJMQK7.mjs +72 -0
- package/dist/lib/node-esm/PromptArticle-PGMJMQK7.mjs.map +7 -0
- package/dist/lib/node-esm/TriggerStatus-UR5S7PXJ.mjs +123 -0
- package/dist/lib/node-esm/TriggerStatus-UR5S7PXJ.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-E25JXI34.mjs +235 -0
- package/dist/lib/node-esm/app-graph-builder-E25JXI34.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-L7XKRYIW.mjs +35 -0
- package/dist/lib/node-esm/blueprint-definition-L7XKRYIW.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3QBVFAYO.mjs +28 -0
- package/dist/lib/node-esm/chunk-3QBVFAYO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6NCLKQCL.mjs +70 -0
- package/dist/lib/node-esm/chunk-6NCLKQCL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GZ4ERNT2.mjs +2126 -0
- package/dist/lib/node-esm/chunk-GZ4ERNT2.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-JMBYVUD6.mjs +288 -0
- package/dist/lib/node-esm/chunk-JMBYVUD6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MWYYLALM.mjs +231 -0
- package/dist/lib/node-esm/chunk-MWYYLALM.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 +299 -161
- 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-Q5GNP2GH.mjs +137 -0
- package/dist/lib/node-esm/operation-resolver-Q5GNP2GH.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-JJRGVGKD.mjs +145 -0
- package/dist/lib/node-esm/react-surface-JJRGVGKD.mjs.map +7 -0
- package/dist/lib/node-esm/repair-LXFVOK4B.mjs +53 -0
- package/dist/lib/node-esm/repair-LXFVOK4B.mjs.map +7 -0
- package/dist/lib/node-esm/settings-N452OW6Y.mjs +34 -0
- package/dist/lib/node-esm/settings-N452OW6Y.mjs.map +7 -0
- package/dist/lib/node-esm/state-WHZFKIEL.mjs +27 -0
- package/dist/lib/node-esm/state-WHZFKIEL.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-5IWGLUF4.mjs +17 -0
- package/dist/lib/node-esm/toolkit-5IWGLUF4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +11 -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 +4 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +2 -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 +6 -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 +3 -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 -4
- 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/Chat/Chat.d.ts +39 -22
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +10 -1
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +5 -6
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +13 -11
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +285 -71
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/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/TemplateEditor/TemplateEditor.d.ts +3 -6
- 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 +13 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +428 -2
- 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 +9 -15
- 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/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 +0 -8
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts +8 -0
- package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -0
- package/dist/types/src/containers/AssistantSettings/index.d.ts +3 -0
- package/dist/types/src/containers/AssistantSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +3 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +12 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts +3 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +18 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts +3 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/Project/ProjectArticle.d.ts +7 -0
- package/dist/types/src/containers/Project/ProjectArticle.d.ts.map +1 -0
- package/dist/types/src/containers/Project/ProjectSettings.d.ts +6 -0
- package/dist/types/src/containers/Project/ProjectSettings.d.ts.map +1 -0
- package/dist/types/src/containers/Project/index.d.ts +7 -0
- package/dist/types/src/containers/Project/index.d.ts.map +1 -0
- package/dist/types/src/containers/Project/triggers.d.ts +6 -0
- package/dist/types/src/containers/Project/triggers.d.ts.map +1 -0
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +6 -0
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts +3 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +4 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts +3 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +8 -3
- 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 +10 -20
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +7 -8
- 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 +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.map +1 -1
- package/dist/types/src/index.d.ts +3 -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/{hooks → processor}/presets.d.ts +3 -3
- 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 +2 -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.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -1
- 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 +0 -4
- package/dist/types/src/testing/test-sequence.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 +376 -37
- 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 +93 -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 -1
- 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 +125 -96
- package/src/AssistantPlugin.tsx +162 -88
- package/src/blueprints/assistant/blueprint.conversations.json +1 -0
- package/src/blueprints/assistant/blueprint.test.ts +48 -0
- package/src/blueprints/assistant/blueprint.ts +27 -0
- package/src/blueprints/assistant/index.ts +5 -0
- package/src/{components/SequenceEditor → blueprints}/index.ts +1 -1
- 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 +198 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +48 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -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 -6
- 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 +121 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +121 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +69 -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 +15 -0
- package/src/components/Chat/Chat.tsx +278 -198
- package/src/components/Chat/events.ts +14 -1
- package/src/components/ChatProgress/ChatProgress.tsx +53 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +20 -28
- package/src/components/ChatPrompt/ChatOptions.tsx +258 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +42 -38
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +124 -117
- package/src/components/ChatThread/ChatThread.tsx +75 -36
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/registry.tsx +207 -0
- package/src/components/ChatThread/sync.test.ts +99 -0
- package/src/components/ChatThread/sync.ts +160 -0
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +41 -20
- package/src/components/TemplateEditor/TemplateEditor.tsx +33 -52
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +30 -17
- package/src/components/TemplateEditor/TemplateForm.tsx +85 -36
- 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 +19 -29
- package/src/components/Toolbox/Toolbox.tsx +68 -100
- package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
- package/src/components/Typewriter/Typewriter.stories.tsx +86 -0
- package/src/components/Typewriter/Typewriter.tsx +54 -0
- package/src/components/Typewriter/assistant-extension.tsx +142 -0
- package/src/components/Typewriter/index.ts +5 -0
- package/src/components/index.ts +0 -13
- package/src/containers/AssistantSettings/AssistantSettings.tsx +120 -0
- package/src/containers/AssistantSettings/index.ts +7 -0
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +30 -0
- package/src/containers/BlueprintArticle/index.ts +7 -0
- package/src/containers/ChatCompanion/ChatCompanion.tsx +225 -0
- package/src/containers/ChatCompanion/index.ts +7 -0
- package/src/containers/ChatContainer/ChatContainer.tsx +69 -0
- package/src/containers/ChatContainer/index.ts +7 -0
- package/src/containers/ChatDialog/ChatDialog.tsx +72 -0
- package/src/containers/ChatDialog/index.ts +7 -0
- package/src/containers/Project/ProjectArticle.tsx +117 -0
- package/src/containers/Project/ProjectSettings.tsx +118 -0
- package/src/containers/Project/index.ts +16 -0
- package/src/containers/Project/triggers.ts +131 -0
- package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
- package/src/containers/PromptArticle/index.ts +7 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +150 -0
- package/src/containers/TriggerStatus/index.ts +7 -0
- package/src/containers/index.ts +15 -0
- package/src/hooks/index.ts +8 -4
- package/src/hooks/useBlueprintRegistry.ts +108 -0
- package/src/hooks/useChatProcessor.ts +40 -105
- package/src/hooks/useChatServices.ts +31 -75
- 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 +12 -13
- package/src/index.ts +3 -1
- package/src/meta.ts +11 -8
- package/src/processor/index.ts +7 -0
- package/src/{hooks → processor}/presets.ts +16 -8
- package/src/processor/processor.test.ts +73 -0
- package/src/processor/processor.ts +296 -0
- package/src/processor/update-name.ts +58 -0
- package/src/queue-logger.ts +17 -18
- package/src/testing/index.ts +1 -1
- package/src/testing/test-generator.ts +262 -0
- package/src/testing/test-sequence.ts +5 -30
- package/src/testing/test-services.ts +10 -14
- package/src/translations.ts +71 -28
- 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 -1
- package/src/types/service.ts +27 -16
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs +0 -54
- package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs +0 -72
- package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs +0 -162
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs +0 -27
- package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs +0 -223
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEAEKWOC.mjs +0 -98
- package/dist/lib/browser/chunk-AEAEKWOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs +0 -108
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
- package/dist/lib/browser/chunk-JQBVLTM5.mjs +0 -158
- package/dist/lib/browser/chunk-JQBVLTM5.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWY4CUQY.mjs +0 -2245
- package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs +0 -60
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-66VY37YQ.mjs +0 -150
- package/dist/lib/browser/react-surface-66VY37YQ.mjs.map +0 -7
- package/dist/lib/browser/settings-2DGP3UTS.mjs +0 -22
- package/dist/lib/browser/settings-2DGP3UTS.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs +0 -55
- package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs +0 -73
- package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs +0 -163
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs +0 -28
- package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs +0 -224
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs +0 -99
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs +0 -159
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs +0 -109
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs +0 -2246
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs +0 -61
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs +0 -151
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs.map +0 -7
- package/dist/lib/node-esm/settings-47RYZOU4.mjs +0 -23
- package/dist/lib/node-esm/settings-47RYZOU4.mjs.map +0 -7
- 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/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/AssistantSettings/AssistantSettings.d.ts +0 -6
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +0 -1
- package/dist/types/src/components/AssistantSettings/index.d.ts +0 -2
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -11
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.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 -8
- 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/TemplateContainer.d.ts +0 -8
- package/dist/types/src/components/TemplateContainer.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/hooks/chat-processor.d.ts +0 -86
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/presets.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/stories/Chat.stories.d.ts +0 -249
- package/dist/types/src/stories/Chat.stories.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/schema.d.ts +0 -88
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -253
- package/src/capabilities/intent-resolver.ts +0 -58
- package/src/capabilities/react-surface.tsx +0 -138
- package/src/capabilities/settings.ts +0 -19
- package/src/components/AssistantSettings/AssistantSettings.tsx +0 -105
- package/src/components/AssistantSettings/index.ts +0 -5
- package/src/components/ChatContainer.tsx +0 -45
- package/src/components/ChatDialog.tsx +0 -64
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatThread/ChatMessage.tsx +0 -268
- package/src/components/ChatThread/ToolBlock.tsx +0 -121
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/components/PromptSettings.tsx +0 -89
- package/src/components/SequenceContainer.tsx +0 -132
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -32
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/TemplateContainer.tsx +0 -24
- package/src/events.ts +0 -11
- package/src/hooks/chat-processor.test.ts +0 -16
- package/src/hooks/chat-processor.ts +0 -314
- package/src/hooks/useBlueprints.ts +0 -57
- 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/Chat.stories.tsx +0 -378
- 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/schema.ts +0 -95
- package/src/typings.d.ts +0 -9
|
@@ -2,67 +2,57 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
8
7
|
import React from 'react';
|
|
9
8
|
|
|
10
|
-
import { IntentPlugin, Capabilities, useCapabilities, SettingsPlugin } from '@dxos/app-framework';
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
-
import { capabilities } from '@dxos/assistant-testing';
|
|
10
|
+
import { capabilities } from '@dxos/assistant-toolkit/testing';
|
|
13
11
|
import { ChessPlugin } from '@dxos/plugin-chess';
|
|
14
12
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
15
13
|
import { MapPlugin } from '@dxos/plugin-map';
|
|
16
|
-
import { SpacePlugin } from '@dxos/plugin-space';
|
|
17
14
|
import { TablePlugin } from '@dxos/plugin-table';
|
|
18
|
-
import {
|
|
15
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
16
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
19
17
|
|
|
20
|
-
import { Toolbox, type ToolboxProps } from './Toolbox';
|
|
21
18
|
import { translations } from '../../translations';
|
|
22
19
|
|
|
20
|
+
import { Toolbox, type ToolboxProps } from './Toolbox';
|
|
21
|
+
|
|
23
22
|
const DefaultStory = (props: ToolboxProps) => {
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Toolbox
|
|
27
|
-
{...props}
|
|
28
|
-
artifacts={artifactDefinitions}
|
|
29
|
-
classNames='w-[30rem] h-[15rem] rounded-sm border border-separator py-1'
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
23
|
+
return <Toolbox {...props} classNames='h-[15rem] w-[30rem] py-1 rounded-xs border border-separator' />;
|
|
32
24
|
};
|
|
33
25
|
|
|
34
|
-
const meta
|
|
35
|
-
title: 'plugins/plugin-assistant/Toolbox',
|
|
36
|
-
component: Toolbox,
|
|
26
|
+
const meta = {
|
|
27
|
+
title: 'plugins/plugin-assistant/components/Toolbox',
|
|
28
|
+
component: Toolbox as any,
|
|
37
29
|
render: DefaultStory,
|
|
38
30
|
decorators: [
|
|
31
|
+
withTheme(),
|
|
39
32
|
withPluginManager({
|
|
40
33
|
plugins: [
|
|
34
|
+
...corePlugins(),
|
|
41
35
|
ClientPlugin({
|
|
42
|
-
onClientInitialized:
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
onClientInitialized: ({ client }) =>
|
|
37
|
+
Effect.gen(function* () {
|
|
38
|
+
yield* Effect.promise(() => client.halo.createIdentity());
|
|
39
|
+
}),
|
|
45
40
|
}),
|
|
46
|
-
SpacePlugin(),
|
|
47
|
-
SettingsPlugin(),
|
|
48
|
-
IntentPlugin(),
|
|
49
41
|
ChessPlugin(),
|
|
50
42
|
MapPlugin(),
|
|
51
43
|
TablePlugin(),
|
|
52
44
|
],
|
|
53
45
|
capabilities,
|
|
54
46
|
}),
|
|
55
|
-
withTheme,
|
|
56
|
-
withLayout(),
|
|
57
47
|
],
|
|
58
48
|
parameters: {
|
|
59
49
|
layout: 'centered',
|
|
60
50
|
translations,
|
|
61
51
|
},
|
|
62
|
-
}
|
|
52
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
63
53
|
|
|
64
54
|
export default meta;
|
|
65
55
|
|
|
66
|
-
type Story =
|
|
56
|
+
type Story = StoryObj<typeof meta>;
|
|
67
57
|
|
|
68
58
|
export const Default: Story = {};
|
|
@@ -2,101 +2,69 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { type FC, Fragment, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { parseToolName, type Tool } from '@dxos/ai';
|
|
8
|
-
import { Capabilities, useCapabilities } from '@dxos/app-framework';
|
|
9
|
-
import { type ArtifactDefinition } from '@dxos/blueprints';
|
|
10
7
|
import { type Blueprint } from '@dxos/blueprints';
|
|
11
|
-
import { type Ref } from '@dxos/echo';
|
|
12
|
-
import {
|
|
8
|
+
import { type Database, type Ref } from '@dxos/echo';
|
|
9
|
+
import { Function } from '@dxos/functions';
|
|
13
10
|
import { log } from '@dxos/log';
|
|
14
|
-
import { Filter,
|
|
15
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
16
|
-
import {
|
|
17
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
11
|
+
import { Filter, useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
import { ScrollArea, type ThemedClassName } from '@dxos/react-ui';
|
|
13
|
+
import { mx } from '@dxos/ui-theme';
|
|
18
14
|
|
|
19
|
-
import { type
|
|
20
|
-
import { meta } from '../../meta';
|
|
21
|
-
import { createToolsFromService } from '../../tools';
|
|
15
|
+
import { type AiChatProcessor } from '../../processor';
|
|
22
16
|
import { ServiceType } from '../../types';
|
|
23
17
|
|
|
24
18
|
export type ToolboxProps = ThemedClassName<{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
services?: { service: ServiceType }[];
|
|
20
|
+
functions?: Function.Function[];
|
|
21
|
+
// TODO(burdon): Combine into single array.
|
|
22
|
+
blueprints?: readonly Blueprint.Blueprint[];
|
|
29
23
|
activeBlueprints?: readonly Ref.Ref<Blueprint.Blueprint>[];
|
|
30
|
-
striped?: boolean;
|
|
31
24
|
}>;
|
|
32
25
|
|
|
33
|
-
export const Toolbox = ({
|
|
34
|
-
classNames,
|
|
35
|
-
artifacts,
|
|
36
|
-
functions,
|
|
37
|
-
services,
|
|
38
|
-
blueprints,
|
|
39
|
-
activeBlueprints,
|
|
40
|
-
striped,
|
|
41
|
-
}: ToolboxProps) => {
|
|
42
|
-
const { t } = useTranslation(meta.id);
|
|
43
|
-
|
|
26
|
+
export const Toolbox = ({ classNames, functions, services, blueprints, activeBlueprints }: ToolboxProps) => {
|
|
44
27
|
return (
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
name,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
title='
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
subitems: tools.map(({ name, description }) => ({ name: `∙ ${name}`, description })),
|
|
86
|
-
}))}
|
|
87
|
-
/>
|
|
88
|
-
)}
|
|
89
|
-
|
|
90
|
-
{functions && functions.length > 0 && (
|
|
91
|
-
<Section title='Functions' items={functions.map(({ name, description }) => ({ name, description }))} />
|
|
92
|
-
)}
|
|
93
|
-
|
|
94
|
-
{!blueprints?.length &&
|
|
95
|
-
!activeBlueprints?.length &&
|
|
96
|
-
!artifacts?.length &&
|
|
97
|
-
!services?.length &&
|
|
98
|
-
!functions?.length && <div>{t('no tools')}</div>}
|
|
99
|
-
</div>
|
|
28
|
+
<ScrollArea.Root thin orientation='vertical'>
|
|
29
|
+
<ScrollArea.Viewport classNames={classNames}>
|
|
30
|
+
{blueprints && blueprints.length > 0 && (
|
|
31
|
+
<Section
|
|
32
|
+
title='Blueprints'
|
|
33
|
+
items={blueprints.map(({ name, description, tools }) => ({
|
|
34
|
+
name,
|
|
35
|
+
description,
|
|
36
|
+
subitems: tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
|
|
37
|
+
}))}
|
|
38
|
+
/>
|
|
39
|
+
)}
|
|
40
|
+
|
|
41
|
+
{activeBlueprints && activeBlueprints.length > 0 && (
|
|
42
|
+
<Section
|
|
43
|
+
title='Blueprints'
|
|
44
|
+
items={activeBlueprints.map(({ target }) => ({
|
|
45
|
+
name: target?.name ?? '',
|
|
46
|
+
description: target?.description ?? '',
|
|
47
|
+
subitems: target?.tools.map((toolId) => ({ name: `∙ ${safeToolId(toolId)}` })),
|
|
48
|
+
}))}
|
|
49
|
+
/>
|
|
50
|
+
)}
|
|
51
|
+
|
|
52
|
+
{services && services.length > 0 && (
|
|
53
|
+
<Section
|
|
54
|
+
title='Services'
|
|
55
|
+
items={services.map(({ service: { serviceId, name, description } }) => ({
|
|
56
|
+
name: name ?? serviceId,
|
|
57
|
+
description,
|
|
58
|
+
// subitems: tools.map(({ name, description }) => ({ name: `∙ ${name}`, description })),
|
|
59
|
+
}))}
|
|
60
|
+
/>
|
|
61
|
+
)}
|
|
62
|
+
|
|
63
|
+
{functions && functions.length > 0 && (
|
|
64
|
+
<Section title='Functions' items={functions.map(({ name, description }) => ({ name, description }))} />
|
|
65
|
+
)}
|
|
66
|
+
</ScrollArea.Viewport>
|
|
67
|
+
</ScrollArea.Root>
|
|
100
68
|
);
|
|
101
69
|
};
|
|
102
70
|
|
|
@@ -135,38 +103,38 @@ const Section: FC<{
|
|
|
135
103
|
};
|
|
136
104
|
|
|
137
105
|
export type ToolboxContainerProps = ThemedClassName<{
|
|
138
|
-
|
|
139
|
-
processor?:
|
|
106
|
+
db?: Database.Database;
|
|
107
|
+
processor?: AiChatProcessor;
|
|
140
108
|
}>;
|
|
141
109
|
|
|
142
|
-
export const ToolboxContainer = ({ classNames,
|
|
143
|
-
// Plugin artifacts.
|
|
144
|
-
const artifactDefinitions = useCapabilities(Capabilities.ArtifactDefinition);
|
|
145
|
-
|
|
110
|
+
export const ToolboxContainer = ({ classNames, db, processor }: ToolboxContainerProps) => {
|
|
146
111
|
// Registered services.
|
|
147
|
-
const services = useQuery(
|
|
148
|
-
const [serviceTools, setServiceTools] = useState<{ service: ServiceType
|
|
112
|
+
const services = useQuery(db, Filter.type(ServiceType));
|
|
113
|
+
const [serviceTools, setServiceTools] = useState<{ service: ServiceType }[]>([]);
|
|
149
114
|
useEffect(() => {
|
|
150
115
|
log('creating service tools...', { services: services.length });
|
|
151
116
|
queueMicrotask(async () => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
setServiceTools(tools);
|
|
117
|
+
// TODO(burdon): Fix.
|
|
118
|
+
// const tools = await Promise.all(
|
|
119
|
+
// services.map(async (service) => ({ service, tools: await createToolsFromService(service) })),
|
|
120
|
+
// );
|
|
121
|
+
// setServiceTools(tools);
|
|
157
122
|
});
|
|
158
123
|
}, [services]);
|
|
159
124
|
|
|
160
125
|
// Deployed functions.
|
|
161
|
-
const functions = useQuery(
|
|
126
|
+
const functions = useQuery(db, Filter.type(Function.Function));
|
|
162
127
|
|
|
163
128
|
return (
|
|
164
129
|
<Toolbox
|
|
165
130
|
classNames={classNames}
|
|
166
|
-
blueprints={processor?.context.
|
|
167
|
-
artifacts={artifactDefinitions}
|
|
131
|
+
blueprints={processor?.context.getBlueprints()}
|
|
168
132
|
services={serviceTools}
|
|
169
133
|
functions={functions}
|
|
170
134
|
/>
|
|
171
135
|
);
|
|
172
136
|
};
|
|
137
|
+
|
|
138
|
+
const safeToolId = (name: string) => {
|
|
139
|
+
return name.split('_').pop();
|
|
140
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type EditorView } from '@codemirror/view';
|
|
6
|
+
import * as LanguageModel from '@effect/ai/LanguageModel';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import type * as Runtime from 'effect/Runtime';
|
|
9
|
+
import React, { useState } from 'react';
|
|
10
|
+
|
|
11
|
+
import { runInRuntime } from '@dxos/effect';
|
|
12
|
+
import { log } from '@dxos/log';
|
|
13
|
+
import { Button, Icon, Input, ThemeProvider } from '@dxos/react-ui';
|
|
14
|
+
|
|
15
|
+
export type AssistantToolbarProps = {
|
|
16
|
+
view: EditorView;
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
runtime: Runtime.Runtime<LanguageModel.LanguageModel>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const AssistantToolbar = ({ view, from, to, runtime }: AssistantToolbarProps) => {
|
|
23
|
+
const [isProcessing, setIsProcessing] = useState(false);
|
|
24
|
+
const [showPromptInput, setShowPromptInput] = useState(false);
|
|
25
|
+
const [customPrompt, setCustomPrompt] = useState('');
|
|
26
|
+
|
|
27
|
+
const runEffect = async (text: string, prompt: string) => {
|
|
28
|
+
setIsProcessing(true);
|
|
29
|
+
try {
|
|
30
|
+
const newText = await runInRuntime(
|
|
31
|
+
runtime,
|
|
32
|
+
Effect.gen(function* () {
|
|
33
|
+
// Construct meaningful system prompt context
|
|
34
|
+
const response = yield* LanguageModel.generateText({
|
|
35
|
+
prompt: `${prompt}:\n"${text}"`,
|
|
36
|
+
});
|
|
37
|
+
return response.text;
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// Apply change - check if selection is still valid/same?
|
|
42
|
+
// For simple demo, we just apply to the passed from/to, but ideally we check current selection.
|
|
43
|
+
// We can just rely on from/to passed as props, assuming the toolbar unmounts if selection changes.
|
|
44
|
+
view.dispatch({
|
|
45
|
+
changes: { from, to, insert: newText },
|
|
46
|
+
});
|
|
47
|
+
} catch (e) {
|
|
48
|
+
log.error('Assistant action failed', { error: e });
|
|
49
|
+
} finally {
|
|
50
|
+
setIsProcessing(false);
|
|
51
|
+
setShowPromptInput(false);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const currentText = view.state.sliceDoc(from, to);
|
|
56
|
+
|
|
57
|
+
const handleRegenerate = () => {
|
|
58
|
+
void runEffect(
|
|
59
|
+
currentText,
|
|
60
|
+
'You are a typewriting agent. Agent only outputs the result; one version; no explanation or formatting. Re-write the following text to be more clear and concise, keep the same meaning.',
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const handleCasual = () => handleChangeTone('casual');
|
|
65
|
+
const handleFormal = () => handleChangeTone('formal');
|
|
66
|
+
|
|
67
|
+
const handleChangeTone = (tone: 'formal' | 'casual') => {
|
|
68
|
+
void runEffect(
|
|
69
|
+
currentText,
|
|
70
|
+
`You are a typewriting agent. Agent only outputs the result; one version; no explanation or formatting. Rewrite the following text to be more ${tone}`,
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const handleEditWithPrompt = () => {
|
|
75
|
+
if (!customPrompt) return;
|
|
76
|
+
void runEffect(currentText, customPrompt);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<ThemeProvider>
|
|
81
|
+
{showPromptInput ? (
|
|
82
|
+
<div
|
|
83
|
+
className='flex items-center gap-2 p-1 bg-white/90 dark:bg-neutral-800/90 backdrop-blur-md rounded-full shadow-xl border border-neutral-200 dark:border-neutral-700 animate-in fade-in zoom-in-95 duration-150 mt-2'
|
|
84
|
+
onMouseDown={(e) => e.preventDefault()}
|
|
85
|
+
>
|
|
86
|
+
<Input.Root>
|
|
87
|
+
<Input.TextInput
|
|
88
|
+
placeholder='Instruction...'
|
|
89
|
+
value={customPrompt}
|
|
90
|
+
onChange={(e) => setCustomPrompt(e.target.value)}
|
|
91
|
+
onKeyDown={(e) => {
|
|
92
|
+
if (e.key === 'Enter') handleEditWithPrompt();
|
|
93
|
+
if (e.key === 'Escape') setShowPromptInput(false);
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
}}
|
|
96
|
+
autoFocus
|
|
97
|
+
classNames='border-none bg-transparent focus-visible:ring-0 p-1 text-sm min-w-[200px]'
|
|
98
|
+
/>
|
|
99
|
+
</Input.Root>
|
|
100
|
+
<Button
|
|
101
|
+
variant='ghost'
|
|
102
|
+
classNames='p-1 min-h-0 h-6 w-6 rounded-full'
|
|
103
|
+
onClick={handleEditWithPrompt}
|
|
104
|
+
disabled={!customPrompt || isProcessing}
|
|
105
|
+
>
|
|
106
|
+
<Icon icon='ph--arrows-clockwise--regular' classNames={isProcessing ? 'animate-spin' : ''} />
|
|
107
|
+
</Button>
|
|
108
|
+
</div>
|
|
109
|
+
) : (
|
|
110
|
+
<div
|
|
111
|
+
className='flex items-center gap-1 p-1 bg-white/50 dark:bg-neutral-800/50 backdrop-blur-md rounded-xl shadow-xl border border-neutral-200 dark:border-neutral-700 animate-in fade-in zoom-in-95 duration-150 mt-2'
|
|
112
|
+
onMouseDown={(e) => e.preventDefault()}
|
|
113
|
+
>
|
|
114
|
+
<div className='flex items-center gap-1'>
|
|
115
|
+
<Button
|
|
116
|
+
variant='ghost'
|
|
117
|
+
classNames='flex flex-col items-center gap-1 p-1 h-auto w-auto rounded-lg hover:bg-neutral-100 dark:hover:bg-neutral-700'
|
|
118
|
+
onClick={handleCasual}
|
|
119
|
+
disabled={isProcessing}
|
|
120
|
+
>
|
|
121
|
+
<Icon icon='ph--caret-left--regular' size={4} />
|
|
122
|
+
<span className='text-[10px] leading-none text-neutral-500 font-medium'>Casual</span>
|
|
123
|
+
</Button>
|
|
124
|
+
|
|
125
|
+
<Button
|
|
126
|
+
variant='ghost'
|
|
127
|
+
classNames='flex flex-col items-center gap-1 p-1 h-auto w-auto rounded-lg hover:bg-neutral-100 dark:hover:bg-neutral-700'
|
|
128
|
+
onClick={handleRegenerate}
|
|
129
|
+
disabled={isProcessing}
|
|
130
|
+
>
|
|
131
|
+
<Icon icon='ph--arrows-clockwise--regular' size={4} classNames={isProcessing ? 'animate-spin' : ''} />
|
|
132
|
+
<span className='text-[10px] leading-none text-neutral-500 font-medium'>Different</span>
|
|
133
|
+
</Button>
|
|
134
|
+
|
|
135
|
+
<Button
|
|
136
|
+
variant='ghost'
|
|
137
|
+
classNames='flex flex-col gap-1 p-1 h-auto w-auto rounded-lg hover:bg-neutral-100 dark:hover:bg-neutral-700'
|
|
138
|
+
onClick={handleFormal}
|
|
139
|
+
disabled={isProcessing}
|
|
140
|
+
>
|
|
141
|
+
<Icon icon='ph--caret-right--regular' size={4} />
|
|
142
|
+
<span className='text-[10px] leading-none text-neutral-500 font-medium'>Formal</span>
|
|
143
|
+
</Button>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div className='w-px h-8 bg-neutral-200 dark:bg-neutral-700 mx-1' />
|
|
147
|
+
|
|
148
|
+
<Button
|
|
149
|
+
variant='ghost'
|
|
150
|
+
classNames='flex flex-col gap-1 p-1 h-auto w-auto rounded-lg hover:bg-neutral-100 dark:hover:bg-neutral-700'
|
|
151
|
+
onClick={() => setShowPromptInput(true)}
|
|
152
|
+
disabled={isProcessing}
|
|
153
|
+
>
|
|
154
|
+
<Icon icon='ph--keyboard--regular' size={4} />
|
|
155
|
+
<span className='text-[10px] leading-none text-neutral-500 font-medium'>Instruct</span>
|
|
156
|
+
</Button>
|
|
157
|
+
</div>
|
|
158
|
+
)}
|
|
159
|
+
</ThemeProvider>
|
|
160
|
+
);
|
|
161
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import type * as LanguageModel from '@effect/ai/LanguageModel';
|
|
6
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
7
|
+
import * as Layer from 'effect/Layer';
|
|
8
|
+
import * as ManagedRuntime from 'effect/ManagedRuntime';
|
|
9
|
+
import type * as Runtime from 'effect/Runtime';
|
|
10
|
+
import React, { useEffect, useState } from 'react';
|
|
11
|
+
|
|
12
|
+
import { AiService } from '@dxos/ai';
|
|
13
|
+
import { AiServiceTestingPreset } from '@dxos/ai/testing';
|
|
14
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
15
|
+
|
|
16
|
+
import { Typewriter } from './Typewriter';
|
|
17
|
+
|
|
18
|
+
const meta: Meta<typeof Typewriter> = {
|
|
19
|
+
title: 'plugins/plugin-assistant/components/Typewriter',
|
|
20
|
+
component: Typewriter,
|
|
21
|
+
decorators: [withTheme(), withLayout({ layout: 'column' })],
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof Typewriter>;
|
|
27
|
+
|
|
28
|
+
const sampleText = `# The Future of Artificial Intelligence
|
|
29
|
+
|
|
30
|
+
Artificial Intelligence (AI) has rapidly evolved from a theoretical concept to a transformative force reshaping industries, economies, and daily life. At its core, AI refers to the development of computer systems capable of performing tasks that typically require human intelligence, such as visual perception, speech recognition, decision-making, and language translation.
|
|
31
|
+
|
|
32
|
+
## Machine Learning and Neural Networks
|
|
33
|
+
|
|
34
|
+
The resurgence of AI in recent years is largely driven by advancements in machine learning (ML) and deep learning. Neural networks, inspired by the human brain's architecture, enable computers to learn from vast amounts of data. This has led to breakthroughs in areas like natural language processing (NLP), allowing models like GPT-4 to generate human-like text and code.
|
|
35
|
+
|
|
36
|
+
## Ethical Considerations
|
|
37
|
+
|
|
38
|
+
As AI becomes more autonomous, ethical concerns have moved to the forefront. Issues such as algorithmic bias, data privacy, and the potential displacement of jobs are critical topics of debate. Ensuring that AI systems are fair, transparent, and aligned with human values is essential for their sustainable development.
|
|
39
|
+
|
|
40
|
+
## Conclusion
|
|
41
|
+
|
|
42
|
+
The journey of AI is just beginning. With responsible innovation and global collaboration, AI has the potential to solve some of humanity's most pressing challenges, from climate change to personalized medicine.
|
|
43
|
+
|
|
44
|
+
(try selecting some text to see the AI assistant, or wait for the proofreader to find the typo below)
|
|
45
|
+
|
|
46
|
+
The quick brown fox jumps over teh lazy dog. i think this is cool.
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
export const Default: Story = {
|
|
50
|
+
render: () => {
|
|
51
|
+
const [runtime, setRuntime] = useState<Runtime.Runtime<LanguageModel.LanguageModel>>();
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
let disposed = false;
|
|
54
|
+
const rt = ManagedRuntime.make(
|
|
55
|
+
AiService.model('@anthropic/claude-haiku-4-5').pipe(
|
|
56
|
+
Layer.provide(AiServiceTestingPreset('edge-remote')),
|
|
57
|
+
Layer.orDie,
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
queueMicrotask(async () => {
|
|
61
|
+
try {
|
|
62
|
+
if (disposed) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const runtime = await rt.runtime();
|
|
66
|
+
if (disposed) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
setRuntime(runtime);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error('Failed to initialize runtime:', error);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return () => {
|
|
75
|
+
disposed = true;
|
|
76
|
+
void rt.dispose();
|
|
77
|
+
};
|
|
78
|
+
}, []);
|
|
79
|
+
|
|
80
|
+
if (!runtime) {
|
|
81
|
+
return <div>...Loading</div>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return <Typewriter initialContent={sampleText} runtime={runtime} />;
|
|
85
|
+
},
|
|
86
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Extension } from '@codemirror/state';
|
|
6
|
+
import type * as LanguageModel from '@effect/ai/LanguageModel';
|
|
7
|
+
import type * as Runtime from 'effect/Runtime';
|
|
8
|
+
import React, { useMemo, useRef } from 'react';
|
|
9
|
+
|
|
10
|
+
import { DensityProvider, ThemeProvider } from '@dxos/react-ui';
|
|
11
|
+
import { Editor, type EditorController } from '@dxos/react-ui-editor';
|
|
12
|
+
import {
|
|
13
|
+
createBasicExtensions,
|
|
14
|
+
createMarkdownExtensions,
|
|
15
|
+
createThemeExtensions,
|
|
16
|
+
decorateMarkdown,
|
|
17
|
+
} from '@dxos/ui-editor';
|
|
18
|
+
|
|
19
|
+
import { assistant } from './assistant-extension';
|
|
20
|
+
|
|
21
|
+
export type TypewriterProps = {
|
|
22
|
+
initialContent?: string;
|
|
23
|
+
extensions?: Extension[];
|
|
24
|
+
runtime: Runtime.Runtime<LanguageModel.LanguageModel>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Typewriter = ({ initialContent = '', extensions = [], runtime }: TypewriterProps) => {
|
|
28
|
+
const editorRef = useRef<EditorController>(null);
|
|
29
|
+
const extension = useMemo(
|
|
30
|
+
() => [
|
|
31
|
+
createBasicExtensions({ scrollPastEnd: true, search: true }),
|
|
32
|
+
createThemeExtensions({ syntaxHighlighting: true }),
|
|
33
|
+
createMarkdownExtensions(),
|
|
34
|
+
decorateMarkdown(),
|
|
35
|
+
assistant(runtime),
|
|
36
|
+
...extensions,
|
|
37
|
+
],
|
|
38
|
+
[runtime, extensions],
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<ThemeProvider>
|
|
43
|
+
<DensityProvider density='fine'>
|
|
44
|
+
<div className='w-full h-full grid overflow-hidden'>
|
|
45
|
+
<Editor.Root ref={editorRef}>
|
|
46
|
+
<Editor.Viewport>
|
|
47
|
+
<Editor.Content initialValue={initialContent} extensions={extension} />
|
|
48
|
+
</Editor.Viewport>
|
|
49
|
+
</Editor.Root>
|
|
50
|
+
</div>
|
|
51
|
+
</DensityProvider>
|
|
52
|
+
</ThemeProvider>
|
|
53
|
+
);
|
|
54
|
+
};
|