@dxos/plugin-assistant 0.8.2-staging.7ac8446 → 0.8.3-main.672df60
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/AssistantDialog-UAZSN6GT.mjs +46 -0
- package/dist/lib/browser/AssistantDialog-UAZSN6GT.mjs.map +7 -0
- package/dist/lib/browser/BlueprintEditor-DGV4KJDM.mjs +45 -0
- package/dist/lib/browser/BlueprintEditor-DGV4KJDM.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-UTN3AO5U.mjs +39 -0
- package/dist/lib/browser/ChatContainer-UTN3AO5U.mjs.map +7 -0
- package/dist/lib/browser/TemplateContainer-AKUYL4AV.mjs +28 -0
- package/dist/lib/browser/TemplateContainer-AKUYL4AV.mjs.map +7 -0
- package/dist/lib/browser/{ai-client-CDZLSNXE.mjs → ai-client-COXVUC6V.mjs} +6 -6
- package/dist/lib/browser/ai-client-COXVUC6V.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-56OZ5RW4.mjs +206 -0
- package/dist/lib/browser/app-graph-builder-56OZ5RW4.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TXJWGWJ7.mjs → chunk-3F44MBHU.mjs} +3 -3
- package/dist/lib/browser/chunk-3F44MBHU.mjs.map +7 -0
- package/dist/lib/browser/chunk-6SD7S7W5.mjs +157 -0
- package/dist/lib/browser/chunk-6SD7S7W5.mjs.map +7 -0
- package/dist/lib/browser/chunk-JQFUME3B.mjs +87 -0
- package/dist/lib/{node-esm/chunk-PBZA7XJR.mjs.map → browser/chunk-JQFUME3B.mjs.map} +1 -1
- package/dist/lib/browser/chunk-NBSPGIHL.mjs +206 -0
- package/dist/lib/browser/chunk-NBSPGIHL.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs +96 -0
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FMB7RGMP.mjs → chunk-Q6XE3O3E.mjs} +1714 -1536
- package/dist/lib/browser/chunk-Q6XE3O3E.mjs.map +7 -0
- package/dist/lib/browser/{chunk-3HCI5FIL.mjs → chunk-XOZ7YMO3.mjs} +3 -3
- package/dist/lib/browser/{chunk-3HCI5FIL.mjs.map → chunk-XOZ7YMO3.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +47 -23
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-GWELYIX2.mjs +39 -0
- package/dist/lib/browser/intent-resolver-GWELYIX2.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-DGS34EON.mjs +144 -0
- package/dist/lib/browser/react-surface-DGS34EON.mjs.map +7 -0
- package/dist/lib/browser/{settings-U6UFQX32.mjs → settings-BTFB7IQ6.mjs} +5 -5
- package/dist/lib/browser/settings-BTFB7IQ6.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -2
- package/dist/lib/node/AssistantDialog-RTB5Q7FP.cjs +72 -0
- package/dist/lib/node/AssistantDialog-RTB5Q7FP.cjs.map +7 -0
- package/dist/lib/node/BlueprintEditor-43VM3XPO.cjs +72 -0
- package/dist/lib/node/BlueprintEditor-43VM3XPO.cjs.map +7 -0
- package/dist/lib/node/{ChatContainer-ZJ5JXF6A.cjs → ChatContainer-P3JL4VZ7.cjs} +25 -19
- package/dist/lib/node/ChatContainer-P3JL4VZ7.cjs.map +7 -0
- package/dist/lib/node/TemplateContainer-CTG2MB4W.cjs +58 -0
- package/dist/lib/node/TemplateContainer-CTG2MB4W.cjs.map +7 -0
- package/dist/lib/node/{ai-client-URCCYU6B.cjs → ai-client-R2CGEYZW.cjs} +13 -13
- package/dist/lib/node/ai-client-R2CGEYZW.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-QLF353LH.cjs +216 -0
- package/dist/lib/node/app-graph-builder-QLF353LH.cjs.map +7 -0
- package/dist/lib/node/{chunk-XI2ARIEO.cjs → chunk-4EEWTDQK.cjs} +45 -39
- package/dist/lib/node/{chunk-XI2ARIEO.cjs.map → chunk-4EEWTDQK.cjs.map} +1 -1
- package/dist/lib/node/chunk-BWL5A3O5.cjs +184 -0
- package/dist/lib/node/chunk-BWL5A3O5.cjs.map +7 -0
- package/dist/lib/node/chunk-HRNIUYVQ.cjs +128 -0
- package/dist/lib/node/chunk-HRNIUYVQ.cjs.map +7 -0
- package/dist/lib/node/{chunk-Q5XWEMHB.cjs → chunk-P74TWGMG.cjs} +6 -6
- package/dist/lib/node/{chunk-Q5XWEMHB.cjs.map → chunk-P74TWGMG.cjs.map} +1 -1
- package/dist/lib/node/{chunk-RPBKMP2E.cjs → chunk-PG7YNQ4R.cjs} +1523 -1338
- package/dist/lib/node/chunk-PG7YNQ4R.cjs.map +7 -0
- package/dist/lib/node/{chunk-GBUNQ257.cjs → chunk-TS3H5OSX.cjs} +7 -7
- package/dist/lib/node/chunk-TS3H5OSX.cjs.map +7 -0
- package/dist/lib/node/chunk-UNVDZOLA.cjs +231 -0
- package/dist/lib/node/chunk-UNVDZOLA.cjs.map +7 -0
- package/dist/lib/node/index.cjs +88 -65
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-R3OSTIMH.cjs → intent-resolver-U7663JU7.cjs} +15 -21
- package/dist/lib/node/intent-resolver-U7663JU7.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-QXZTILW6.cjs +157 -0
- package/dist/lib/node/react-surface-QXZTILW6.cjs.map +7 -0
- package/dist/lib/node/{settings-TXGRCYAL.cjs → settings-LBJMT6YB.cjs} +9 -9
- package/dist/lib/node/settings-LBJMT6YB.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +17 -13
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/AssistantDialog-DONAO6SA.mjs +47 -0
- package/dist/lib/node-esm/AssistantDialog-DONAO6SA.mjs.map +7 -0
- package/dist/lib/node-esm/BlueprintEditor-CTARB2FO.mjs +47 -0
- package/dist/lib/node-esm/BlueprintEditor-CTARB2FO.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-FVIGCDIG.mjs +40 -0
- package/dist/lib/node-esm/ChatContainer-FVIGCDIG.mjs.map +7 -0
- package/dist/lib/node-esm/TemplateContainer-IVDQ4XQG.mjs +29 -0
- package/dist/lib/node-esm/TemplateContainer-IVDQ4XQG.mjs.map +7 -0
- package/dist/lib/node-esm/{ai-client-WMHS5EGV.mjs → ai-client-I5LXHMOZ.mjs} +6 -6
- package/dist/lib/node-esm/ai-client-I5LXHMOZ.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-5YX5TKKT.mjs +207 -0
- package/dist/lib/node-esm/app-graph-builder-5YX5TKKT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ECRK6TUQ.mjs → chunk-BB2TAT4P.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-ECRK6TUQ.mjs.map → chunk-BB2TAT4P.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs +98 -0
- package/dist/lib/node-esm/chunk-CDAILLCU.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GJE4WCUJ.mjs +158 -0
- package/dist/lib/node-esm/chunk-GJE4WCUJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-6JK5HEUQ.mjs → chunk-HLPGKJ7N.mjs} +3 -3
- package/dist/lib/node-esm/chunk-HLPGKJ7N.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MVDAY3CZ.mjs → chunk-MNH6E6EB.mjs} +1714 -1536
- package/dist/lib/node-esm/chunk-MNH6E6EB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PBZA7XJR.mjs → chunk-OYN6HLXZ.mjs} +42 -36
- package/dist/lib/{browser/chunk-NFUHCW2J.mjs.map → node-esm/chunk-OYN6HLXZ.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-TQYSF2GS.mjs +207 -0
- package/dist/lib/node-esm/chunk-TQYSF2GS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +47 -23
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-N5TM3RTL.mjs +40 -0
- package/dist/lib/node-esm/intent-resolver-N5TM3RTL.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-FTKGQQD2.mjs +145 -0
- package/dist/lib/node-esm/react-surface-FTKGQQD2.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-DZU5PNXM.mjs → settings-TGCCAH5D.mjs} +5 -5
- package/dist/lib/node-esm/settings-TGCCAH5D.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -2
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-client.d.ts +3 -3
- package/dist/types/src/capabilities/ai-client.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -179
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts +3 -1
- package/dist/types/src/components/AmbientDialog/AmbientDialog.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts +8 -0
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.d.ts.map +1 -0
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts +8 -0
- package/dist/types/src/components/BlueprintEditor/BlueprintEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/BlueprintEditor/index.d.ts +3 -0
- package/dist/types/src/components/BlueprintEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +4 -3
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Prompt/Prompt.d.ts +5 -2
- package/dist/types/src/components/Prompt/Prompt.d.ts.map +1 -1
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts +6 -3
- package/dist/types/src/components/Prompt/Prompt.stories.d.ts.map +1 -1
- package/dist/types/src/components/Prompt/PromptBar.d.ts +9 -4
- package/dist/types/src/components/Prompt/PromptBar.d.ts.map +1 -1
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts +9 -0
- package/dist/types/src/components/Prompt/PromptBar.stories.d.ts.map +1 -0
- package/dist/types/src/components/Prompt/autocomplete.d.ts +5 -1
- package/dist/types/src/components/Prompt/autocomplete.d.ts.map +1 -1
- package/dist/types/src/components/Prompt/references.d.ts.map +1 -1
- package/dist/types/src/components/PromptSettings.d.ts +6 -0
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -0
- package/dist/types/src/components/TemplateContainer.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +2 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/Thread/Thread.d.ts +2 -2
- package/dist/types/src/components/Thread/Thread.d.ts.map +1 -1
- package/dist/types/src/components/Thread/Thread.stories.d.ts.map +1 -1
- package/dist/types/src/components/Thread/ThreadContainer.d.ts +1 -1
- package/dist/types/src/components/Thread/ThreadContainer.d.ts.map +1 -1
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts +2 -2
- package/dist/types/src/components/Thread/ThreadContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Thread/ThreadMessage.d.ts +4 -2
- package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +1 -1
- package/dist/types/src/components/Thread/ToolInvocations.d.ts +1 -1
- package/dist/types/src/components/Thread/ToolInvocations.d.ts.map +1 -1
- package/dist/types/src/components/Thread/reducer.d.ts +1 -1
- package/dist/types/src/components/Thread/reducer.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +3 -2
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/experimental/transcription/index.d.ts +1 -0
- package/dist/types/src/experimental/transcription/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/processor.d.ts +6 -5
- package/dist/types/src/hooks/processor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextProvider.d.ts +1 -1
- package/dist/types/src/hooks/useContextProvider.d.ts.map +1 -1
- package/dist/types/src/hooks/useMessageQueue.d.ts +11 -10
- package/dist/types/src/hooks/useMessageQueue.d.ts.map +1 -1
- package/dist/types/src/hooks/useServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useTextInputEvents.d.ts.map +1 -1
- package/dist/types/src/parser/filter-generator.d.ts +4 -0
- package/dist/types/src/parser/filter-generator.d.ts.map +1 -0
- package/dist/types/src/parser/filter-generator.test.d.ts +2 -0
- package/dist/types/src/parser/filter-generator.test.d.ts.map +1 -0
- package/dist/types/src/parser/index.d.ts +4 -0
- package/dist/types/src/parser/index.d.ts.map +1 -0
- package/dist/types/src/parser/query-parser.d.ts +15 -0
- package/dist/types/src/parser/query-parser.d.ts.map +1 -0
- package/dist/types/src/parser/query-parser.test.d.ts +2 -0
- package/dist/types/src/parser/query-parser.test.d.ts.map +1 -0
- package/dist/types/src/parser/types.d.ts +24 -0
- package/dist/types/src/parser/types.d.ts.map +1 -0
- package/dist/types/src/stories/Prompt.stories.d.ts +8 -0
- package/dist/types/src/stories/Prompt.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Query.stories.d.ts +19 -0
- package/dist/types/src/stories/Query.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Research.stories.d.ts +15 -0
- package/dist/types/src/stories/Research.stories.d.ts.map +1 -0
- package/dist/types/src/stories/test-data.d.ts +3 -0
- package/dist/types/src/stories/test-data.d.ts.map +1 -0
- package/dist/types/src/stories/testing.d.ts +12 -0
- package/dist/types/src/stories/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-blueprint.d.ts +14 -0
- package/dist/types/src/testing/test-blueprint.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +1 -1
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/tools/function.d.ts +4 -4
- package/dist/types/src/tools/function.d.ts.map +1 -1
- package/dist/types/src/tools/openapi.d.ts +3 -3
- package/dist/types/src/tools/openapi.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/chat.d.ts +18 -8
- package/dist/types/src/types/chat.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +96 -95
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/src/types/template.d.ts +52 -52
- package/dist/types/src/types/template.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +34 -23
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +79 -61
- package/src/AssistantPlugin.tsx +12 -11
- package/src/capabilities/ai-client.ts +5 -6
- package/src/capabilities/app-graph-builder.ts +173 -135
- package/src/capabilities/capabilities.ts +1 -1
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/intent-resolver.ts +10 -11
- package/src/capabilities/react-surface.tsx +88 -22
- package/src/capabilities/settings.ts +2 -2
- package/src/components/AmbientDialog/AmbientDialog.stories.tsx +2 -2
- package/src/components/AmbientDialog/AmbientDialog.tsx +27 -13
- package/src/components/AssistantDialog.tsx +1 -1
- package/src/components/AssistantSettings/AssistantSettings.tsx +29 -7
- package/src/components/BlueprintEditor/BlueprintEditor.stories.tsx +32 -0
- package/src/components/BlueprintEditor/BlueprintEditor.tsx +40 -0
- package/src/components/BlueprintEditor/index.ts +7 -0
- package/src/components/ChatContainer.tsx +6 -8
- package/src/components/Prompt/Prompt.stories.tsx +60 -52
- package/src/components/Prompt/Prompt.tsx +24 -10
- package/src/components/Prompt/PromptBar.stories.tsx +69 -0
- package/src/components/Prompt/PromptBar.tsx +82 -88
- package/src/components/Prompt/autocomplete.ts +14 -8
- package/src/components/Prompt/references.ts +3 -3
- package/src/components/PromptSettings.tsx +91 -0
- package/src/components/TemplateContainer.tsx +3 -79
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +4 -4
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +3 -3
- package/src/components/TemplateEditor/TemplateForm.tsx +2 -2
- package/src/components/Thread/Thread.stories.tsx +14 -17
- package/src/components/Thread/Thread.tsx +2 -2
- package/src/components/Thread/ThreadContainer.stories.tsx +83 -62
- package/src/components/Thread/ThreadContainer.tsx +26 -5
- package/src/components/Thread/ThreadMessage.tsx +49 -11
- package/src/components/Thread/ToolInvocations.tsx +9 -7
- package/src/components/Thread/reducer.ts +1 -1
- package/src/components/Toolbox/Toolbox.stories.tsx +4 -4
- package/src/components/Toolbox/Toolbox.tsx +5 -4
- package/src/components/index.ts +4 -1
- package/src/experimental/transcription/index.ts +3 -0
- package/src/hooks/index.ts +0 -1
- package/src/hooks/processor.ts +68 -8
- package/src/hooks/useChatProcessor.tsx +12 -11
- package/src/hooks/useContextProvider.ts +20 -17
- package/src/hooks/useMessageQueue.ts +5 -5
- package/src/meta.ts +2 -2
- package/src/parser/filter-generator.test.ts +32 -0
- package/src/parser/filter-generator.ts +81 -0
- package/src/parser/index.ts +7 -0
- package/src/parser/query-parser.test.ts +139 -0
- package/src/parser/query-parser.ts +199 -0
- package/src/parser/types.ts +34 -0
- package/src/shims.d.ts +8 -0
- package/src/stories/Prompt.stories.tsx +60 -0
- package/src/stories/Query.stories.tsx +515 -0
- package/src/stories/Research.stories.tsx +496 -0
- package/src/stories/test-data.ts +128 -0
- package/src/stories/testing.ts +60 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/test-blueprint.ts +50 -0
- package/src/testing/test-functions.ts +1 -1
- package/src/testing/test-services.ts +6 -6
- package/src/tools/function.ts +11 -12
- package/src/tools/openapi.test.ts +18 -19
- package/src/tools/openapi.ts +24 -17
- package/src/translations.ts +14 -6
- package/src/types/chat.ts +27 -4
- package/src/types/service.ts +39 -37
- package/src/types/template.ts +27 -25
- package/src/types/types.ts +24 -19
- package/dist/lib/browser/AssistantDialog-YSHMAHW5.mjs +0 -117
- package/dist/lib/browser/AssistantDialog-YSHMAHW5.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-V5GP7DYF.mjs +0 -33
- package/dist/lib/browser/ChatContainer-V5GP7DYF.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-K4EJNGIL.mjs +0 -78
- package/dist/lib/browser/TemplateContainer-K4EJNGIL.mjs.map +0 -7
- package/dist/lib/browser/ai-client-CDZLSNXE.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-MF5EVDWW.mjs +0 -209
- package/dist/lib/browser/app-graph-builder-MF5EVDWW.mjs.map +0 -7
- package/dist/lib/browser/chunk-FMB7RGMP.mjs.map +0 -7
- package/dist/lib/browser/chunk-IAMR2FAE.mjs +0 -183
- package/dist/lib/browser/chunk-IAMR2FAE.mjs.map +0 -7
- package/dist/lib/browser/chunk-KYMKVE6M.mjs +0 -128
- package/dist/lib/browser/chunk-KYMKVE6M.mjs.map +0 -7
- package/dist/lib/browser/chunk-NFUHCW2J.mjs +0 -81
- package/dist/lib/browser/chunk-TXJWGWJ7.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-WJGLKKVO.mjs +0 -46
- package/dist/lib/browser/intent-resolver-WJGLKKVO.mjs.map +0 -7
- package/dist/lib/browser/react-surface-57VRDOQT.mjs +0 -90
- package/dist/lib/browser/react-surface-57VRDOQT.mjs.map +0 -7
- package/dist/lib/browser/settings-U6UFQX32.mjs.map +0 -7
- package/dist/lib/node/AssistantDialog-YI2BSGSX.cjs +0 -141
- package/dist/lib/node/AssistantDialog-YI2BSGSX.cjs.map +0 -7
- package/dist/lib/node/ChatContainer-ZJ5JXF6A.cjs.map +0 -7
- package/dist/lib/node/TemplateContainer-XWFYJB4T.cjs +0 -104
- package/dist/lib/node/TemplateContainer-XWFYJB4T.cjs.map +0 -7
- package/dist/lib/node/ai-client-URCCYU6B.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-N5ZUUI2Z.cjs +0 -220
- package/dist/lib/node/app-graph-builder-N5ZUUI2Z.cjs.map +0 -7
- package/dist/lib/node/chunk-APRU3QWK.cjs +0 -206
- package/dist/lib/node/chunk-APRU3QWK.cjs.map +0 -7
- package/dist/lib/node/chunk-GBUNQ257.cjs.map +0 -7
- package/dist/lib/node/chunk-RPBKMP2E.cjs.map +0 -7
- package/dist/lib/node/chunk-ZKOC4ZFY.cjs +0 -152
- package/dist/lib/node/chunk-ZKOC4ZFY.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-R3OSTIMH.cjs.map +0 -7
- package/dist/lib/node/react-surface-NUQTM6MS.cjs +0 -106
- package/dist/lib/node/react-surface-NUQTM6MS.cjs.map +0 -7
- package/dist/lib/node/settings-TXGRCYAL.cjs.map +0 -7
- package/dist/lib/node-esm/AssistantDialog-U2FQX5TD.mjs +0 -118
- package/dist/lib/node-esm/AssistantDialog-U2FQX5TD.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-QW3OOXTT.mjs +0 -34
- package/dist/lib/node-esm/ChatContainer-QW3OOXTT.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-EUM2X65J.mjs +0 -79
- package/dist/lib/node-esm/TemplateContainer-EUM2X65J.mjs.map +0 -7
- package/dist/lib/node-esm/ai-client-WMHS5EGV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-DWBNIMHM.mjs +0 -210
- package/dist/lib/node-esm/app-graph-builder-DWBNIMHM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JK5HEUQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GBBXIW5F.mjs +0 -129
- package/dist/lib/node-esm/chunk-GBBXIW5F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MVDAY3CZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MXK2EANZ.mjs +0 -184
- package/dist/lib/node-esm/chunk-MXK2EANZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-H32TL4X6.mjs +0 -47
- package/dist/lib/node-esm/intent-resolver-H32TL4X6.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-JBVZF6CP.mjs +0 -91
- package/dist/lib/node-esm/react-surface-JBVZF6CP.mjs.map +0 -7
- package/dist/lib/node-esm/settings-DZU5PNXM.mjs.map +0 -7
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
- package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
- package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
- package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
- package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
- package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
- package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
- package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
- package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -49
- package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -76
- package/src/components/ServiceRegistry/index.ts +0 -5
- package/src/hooks/invocation-handler.ts +0 -107
- package/src/hooks/useLocalTriggerManager.ts +0 -82
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ReadonlySignal } from '@preact/signals-core';
|
|
6
6
|
|
|
7
|
+
import { type AIServiceClient } from '@dxos/ai';
|
|
7
8
|
import { defineCapability } from '@dxos/app-framework';
|
|
8
|
-
import { type AIServiceClient } from '@dxos/assistant';
|
|
9
9
|
|
|
10
10
|
import { ASSISTANT_PLUGIN } from '../meta';
|
|
11
11
|
|
|
@@ -8,6 +8,6 @@ export const AiClient = lazy(() => import('./ai-client'));
|
|
|
8
8
|
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
9
9
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
10
10
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
11
|
-
export const
|
|
11
|
+
export const Settings = lazy(() => import('./settings'));
|
|
12
12
|
|
|
13
13
|
export * from './capabilities';
|
|
@@ -3,23 +3,22 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes, createResolver } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { Blueprint } from '@dxos/assistant';
|
|
7
|
+
import { createQueueDxn } from '@dxos/echo-schema';
|
|
8
|
+
import { live, refFromDXN } from '@dxos/live-object';
|
|
9
9
|
|
|
10
|
-
import { AssistantAction, AIChatType
|
|
10
|
+
import { AssistantAction, AIChatType } from '../types';
|
|
11
11
|
|
|
12
12
|
export default () => [
|
|
13
13
|
contributes(
|
|
14
14
|
Capabilities.IntentResolver,
|
|
15
15
|
createResolver({
|
|
16
16
|
intent: AssistantAction.CreateChat,
|
|
17
|
-
resolve: ({
|
|
17
|
+
resolve: ({ space, name }) => ({
|
|
18
18
|
data: {
|
|
19
|
-
object:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
),
|
|
19
|
+
object: live(AIChatType, {
|
|
20
|
+
name,
|
|
21
|
+
queue: refFromDXN(createQueueDxn(space.id)),
|
|
23
22
|
}),
|
|
24
23
|
},
|
|
25
24
|
}),
|
|
@@ -28,10 +27,10 @@ export default () => [
|
|
|
28
27
|
contributes(
|
|
29
28
|
Capabilities.IntentResolver,
|
|
30
29
|
createResolver({
|
|
31
|
-
intent: AssistantAction.
|
|
30
|
+
intent: AssistantAction.CreateBlueprint,
|
|
32
31
|
resolve: ({ name }) => ({
|
|
33
32
|
data: {
|
|
34
|
-
object:
|
|
33
|
+
object: live(Blueprint, { name, steps: [] }),
|
|
35
34
|
},
|
|
36
35
|
}),
|
|
37
36
|
}),
|
|
@@ -2,17 +2,35 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { Effect } from 'effect';
|
|
6
|
+
import React, { useEffect, useMemo } from 'react';
|
|
6
7
|
|
|
7
|
-
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Capabilities, contributes, createIntent, createSurface, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
|
+
import { Blueprint } from '@dxos/assistant';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { Filter, isInstanceOf, Query } from '@dxos/echo-schema';
|
|
10
12
|
import { SettingsStore } from '@dxos/local-storage';
|
|
11
|
-
import {
|
|
13
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
14
|
+
import {
|
|
15
|
+
type AnyLiveObject,
|
|
16
|
+
fullyQualifiedId,
|
|
17
|
+
getSpace,
|
|
18
|
+
getTypename,
|
|
19
|
+
isEchoObject,
|
|
20
|
+
type SpaceId,
|
|
21
|
+
} from '@dxos/react-client/echo';
|
|
22
|
+
import { StackItem } from '@dxos/react-ui-stack';
|
|
12
23
|
|
|
13
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
AssistantDialog,
|
|
26
|
+
AssistantSettings,
|
|
27
|
+
BlueprintEditor,
|
|
28
|
+
ChatContainer,
|
|
29
|
+
PromptSettings,
|
|
30
|
+
TemplateContainer,
|
|
31
|
+
} from '../components';
|
|
14
32
|
import { ASSISTANT_PLUGIN, ASSISTANT_DIALOG } from '../meta';
|
|
15
|
-
import { AIChatType, type AssistantSettingsProps, TemplateType } from '../types';
|
|
33
|
+
import { AIChatType, AssistantAction, type AssistantSettingsProps, CompanionTo, TemplateType } from '../types';
|
|
16
34
|
|
|
17
35
|
export default () =>
|
|
18
36
|
contributes(Capabilities.ReactSurface, [
|
|
@@ -23,45 +41,93 @@ export default () =>
|
|
|
23
41
|
data.subject instanceof SettingsStore && data.subject.prefix === ASSISTANT_PLUGIN,
|
|
24
42
|
component: ({ data: { subject } }) => <AssistantSettings settings={subject.value} />,
|
|
25
43
|
}),
|
|
26
|
-
createSurface({
|
|
27
|
-
id: ASSISTANT_DIALOG,
|
|
28
|
-
role: 'dialog',
|
|
29
|
-
filter: (data): data is { props: { chat: AIChatType } } => data.component === ASSISTANT_DIALOG,
|
|
30
|
-
component: ({ data }) => <AssistantDialog {...data.props} />,
|
|
31
|
-
}),
|
|
32
44
|
createSurface({
|
|
33
45
|
id: `${ASSISTANT_PLUGIN}/chat`,
|
|
34
46
|
role: 'article',
|
|
35
47
|
filter: (data): data is { subject: AIChatType; variant: undefined } =>
|
|
36
|
-
|
|
48
|
+
Obj.instanceOf(AIChatType, data.subject) && data.variant !== 'assistant-chat',
|
|
37
49
|
component: ({ data, role }) => <ChatContainer role={role} chat={data.subject} />,
|
|
38
50
|
}),
|
|
39
51
|
createSurface({
|
|
40
52
|
id: `${ASSISTANT_PLUGIN}/object-chat`,
|
|
41
53
|
role: 'article',
|
|
42
|
-
filter: (data): data is { companionTo:
|
|
43
|
-
|
|
54
|
+
filter: (data): data is { companionTo: AnyLiveObject<any>; subject: AIChatType | 'assistant-chat' } =>
|
|
55
|
+
isEchoObject(data.companionTo) && (isInstanceOf(AIChatType, data.subject) || data.subject === 'assistant-chat'),
|
|
44
56
|
component: ({ data, role }) => {
|
|
57
|
+
const { dispatch } = useIntentDispatcher();
|
|
45
58
|
const associatedArtifact = useMemo(
|
|
46
59
|
() => ({
|
|
47
60
|
id: fullyQualifiedId(data.companionTo),
|
|
48
61
|
typename: getTypename(data.companionTo) ?? 'unknown',
|
|
62
|
+
spaceId: (getSpace(data.companionTo)?.id ?? 'unknown') as SpaceId,
|
|
49
63
|
}),
|
|
50
64
|
[data.companionTo],
|
|
51
65
|
);
|
|
52
|
-
|
|
66
|
+
|
|
67
|
+
// TODO(wittjosiah): Factor out to container.
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
const timeout = setTimeout(async () => {
|
|
70
|
+
const space = getSpace(data.companionTo);
|
|
71
|
+
if (space && data.subject === 'assistant-chat') {
|
|
72
|
+
const result = await space.db
|
|
73
|
+
.query(Query.select(Filter.ids(data.companionTo.id)).targetOf(CompanionTo).source())
|
|
74
|
+
.run();
|
|
75
|
+
if (result.objects.length > 0) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const program = Effect.gen(function* () {
|
|
80
|
+
const { object } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
|
|
81
|
+
yield* dispatch(createIntent(SpaceAction.AddObject, { object, target: space, hidden: true }));
|
|
82
|
+
yield* dispatch(
|
|
83
|
+
createIntent(SpaceAction.AddRelation, {
|
|
84
|
+
space,
|
|
85
|
+
schema: CompanionTo,
|
|
86
|
+
source: object,
|
|
87
|
+
target: data.companionTo,
|
|
88
|
+
}),
|
|
89
|
+
);
|
|
90
|
+
});
|
|
91
|
+
void Effect.runPromise(program);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return () => clearTimeout(timeout);
|
|
96
|
+
}, [data.subject]);
|
|
97
|
+
|
|
98
|
+
if (data.subject === 'assistant-chat') {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return <ChatContainer role={role} chat={data.subject} associatedArtifact={associatedArtifact} />;
|
|
53
103
|
},
|
|
54
104
|
}),
|
|
105
|
+
createSurface({
|
|
106
|
+
id: `${ASSISTANT_PLUGIN}/blueprint`,
|
|
107
|
+
role: 'article',
|
|
108
|
+
filter: (data): data is { subject: Blueprint } => Obj.instanceOf(Blueprint, data.subject),
|
|
109
|
+
component: ({ data, role }) => (
|
|
110
|
+
<StackItem.Content role={role}>
|
|
111
|
+
<BlueprintEditor blueprint={data.subject} />
|
|
112
|
+
</StackItem.Content>
|
|
113
|
+
),
|
|
114
|
+
}),
|
|
55
115
|
createSurface({
|
|
56
116
|
id: `${ASSISTANT_PLUGIN}/template`,
|
|
57
117
|
role: 'article',
|
|
58
|
-
filter: (data): data is { subject: TemplateType } =>
|
|
118
|
+
filter: (data): data is { subject: TemplateType } => Obj.instanceOf(TemplateType, data.subject),
|
|
59
119
|
component: ({ data, role }) => <TemplateContainer role={role} template={data.subject} />,
|
|
60
120
|
}),
|
|
61
121
|
createSurface({
|
|
62
|
-
id:
|
|
63
|
-
role: '
|
|
64
|
-
filter: (data): data is {
|
|
65
|
-
component: ({ data }) => <
|
|
122
|
+
id: ASSISTANT_DIALOG,
|
|
123
|
+
role: 'dialog',
|
|
124
|
+
filter: (data): data is { props: { chat: AIChatType } } => data.component === ASSISTANT_DIALOG,
|
|
125
|
+
component: ({ data }) => <AssistantDialog {...data.props} />,
|
|
126
|
+
}),
|
|
127
|
+
createSurface({
|
|
128
|
+
id: `${ASSISTANT_PLUGIN}/prompt-settings`,
|
|
129
|
+
role: 'object-settings',
|
|
130
|
+
filter: (data): data is { subject: TemplateType } => Obj.instanceOf(TemplateType, data.subject),
|
|
131
|
+
component: ({ data }) => <PromptSettings template={data.subject} />,
|
|
66
132
|
}),
|
|
67
133
|
]);
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import {
|
|
6
|
+
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
8
|
import { ASSISTANT_PLUGIN } from '../meta';
|
|
9
9
|
import { type AssistantSettingsProps, AssistantSettingsSchema } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () => {
|
|
12
|
-
const settings =
|
|
12
|
+
const settings = live<AssistantSettingsProps>({});
|
|
13
13
|
|
|
14
14
|
return contributes(Capabilities.Settings, {
|
|
15
15
|
schema: AssistantSettingsSchema,
|
|
@@ -19,7 +19,7 @@ import { AmbientDialog } from './AmbientDialog';
|
|
|
19
19
|
import translations from '../../translations';
|
|
20
20
|
|
|
21
21
|
const meta: Meta<typeof AmbientDialog> = {
|
|
22
|
-
title: 'plugins/plugin-
|
|
22
|
+
title: 'plugins/plugin-assistant/AmbientDialog',
|
|
23
23
|
component: AmbientDialog,
|
|
24
24
|
render: () => {
|
|
25
25
|
const [open, setOpen] = useState(true);
|
|
@@ -69,7 +69,7 @@ const meta: Meta<typeof AmbientDialog> = {
|
|
|
69
69
|
plugins: [IntentPlugin()],
|
|
70
70
|
}),
|
|
71
71
|
withTheme,
|
|
72
|
-
withLayout({ fullscreen: true
|
|
72
|
+
withLayout({ fullscreen: true }),
|
|
73
73
|
],
|
|
74
74
|
parameters: {
|
|
75
75
|
translations,
|
|
@@ -15,10 +15,19 @@ const minSize = 5;
|
|
|
15
15
|
export type AmbientDialogProps = PropsWithChildren<{
|
|
16
16
|
open?: boolean;
|
|
17
17
|
title?: string;
|
|
18
|
+
resizeable?: boolean;
|
|
18
19
|
onOpenChange?: (open: boolean) => void;
|
|
20
|
+
onEscape?: () => void;
|
|
19
21
|
}>;
|
|
20
22
|
|
|
21
|
-
export const AmbientDialog = ({
|
|
23
|
+
export const AmbientDialog = ({
|
|
24
|
+
children,
|
|
25
|
+
open: controlledOpen,
|
|
26
|
+
title,
|
|
27
|
+
resizeable = true,
|
|
28
|
+
onOpenChange,
|
|
29
|
+
onEscape,
|
|
30
|
+
}: AmbientDialogProps) => {
|
|
22
31
|
const [resizeKey, setReizeKey] = useState(0);
|
|
23
32
|
const [size, setSize] = useState<Size>('min-content');
|
|
24
33
|
const [open, setOpen] = useState(controlledOpen);
|
|
@@ -47,26 +56,31 @@ export const AmbientDialog = ({ children, open: controlledOpen, title, onOpenCha
|
|
|
47
56
|
return (
|
|
48
57
|
<div role='none' className='dx-dialog__overlay bg-transparent pointer-events-none' data-block-align='end'>
|
|
49
58
|
<Dialog.Content
|
|
50
|
-
classNames='relative box-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'
|
|
51
60
|
inOverlayLayout
|
|
52
61
|
{...resizeAttributes}
|
|
53
62
|
style={{
|
|
54
|
-
...sizeStyle(size, 'vertical', true),
|
|
63
|
+
...(resizeable ? sizeStyle(size, 'vertical', true) : {}),
|
|
55
64
|
maxBlockSize: 'calc(100dvh - env(safe-area-inset-bottom) - env(safe-area-inset-top) - 9rem)',
|
|
56
65
|
}}
|
|
66
|
+
onEscapeKeyDown={onEscape}
|
|
57
67
|
onInteractOutside={preventDefault}
|
|
58
68
|
>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
/>
|
|
68
80
|
|
|
69
|
-
|
|
81
|
+
<DialogHeader open={open} title={title} onToggle={handleToggle} />
|
|
82
|
+
</>
|
|
83
|
+
)) || <Dialog.Title srOnly />}
|
|
70
84
|
|
|
71
85
|
{children}
|
|
72
86
|
</Dialog.Content>
|
|
@@ -24,10 +24,10 @@ export const AssistantDialog: FC<{ chat?: AIChatType }> = ({ chat }) => {
|
|
|
24
24
|
return (
|
|
25
25
|
<AmbientDialog open={open} onOpenChange={setOpen} title={t('assistant dialog title')}>
|
|
26
26
|
<ThreadContainer
|
|
27
|
+
part={'dialog'}
|
|
27
28
|
chat={chat}
|
|
28
29
|
onOpenChange={setOpen}
|
|
29
30
|
settings={settings}
|
|
30
|
-
part={'dialog'}
|
|
31
31
|
transcription={transcription}
|
|
32
32
|
/>
|
|
33
33
|
</AmbientDialog>
|
|
@@ -4,16 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { DEFAULT_EDGE_MODELS, DEFAULT_OLLAMA_MODELS } from '@dxos/
|
|
7
|
+
import { DEFAULT_EDGE_MODELS, DEFAULT_OLLAMA_MODELS } from '@dxos/ai';
|
|
8
8
|
import { Input, Select, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
11
|
import { ASSISTANT_PLUGIN } from '../../meta';
|
|
12
|
-
import { type AssistantSettingsProps } from '../../types';
|
|
12
|
+
import { LLM_PROVIDERS, type AssistantSettingsProps } from '../../types';
|
|
13
13
|
|
|
14
|
-
// TODO(burdon): Factor out.
|
|
14
|
+
// TODO(burdon): Factor out default Selector.
|
|
15
15
|
const DEFAULT_VALUE = '__default';
|
|
16
16
|
|
|
17
|
+
const LLM_PROVIDER_LABELS = {
|
|
18
|
+
edge: 'DXOS',
|
|
19
|
+
ollama: 'Ollama',
|
|
20
|
+
lmstudio: 'LM Studio',
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
17
23
|
export const AssistantSettings = ({ settings }: { settings: AssistantSettingsProps }) => {
|
|
18
24
|
const { t } = useTranslation(ASSISTANT_PLUGIN);
|
|
19
25
|
|
|
@@ -27,10 +33,26 @@ export const AssistantSettings = ({ settings }: { settings: AssistantSettingsPro
|
|
|
27
33
|
</DeprecatedFormInput>
|
|
28
34
|
|
|
29
35
|
<DeprecatedFormInput label={t('settings llm provider label')}>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
<Select.Root
|
|
37
|
+
value={settings.llmProvider ?? 'edge'}
|
|
38
|
+
onValueChange={(value) => {
|
|
39
|
+
settings.llmProvider = value === DEFAULT_VALUE ? undefined : (value as any);
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
<Select.TriggerButton placeholder={t('settings llm provider label')} />
|
|
43
|
+
<Select.Portal>
|
|
44
|
+
<Select.Content>
|
|
45
|
+
<Select.Viewport>
|
|
46
|
+
<Select.Option value={DEFAULT_VALUE}>{t('settings default label')}</Select.Option>
|
|
47
|
+
{LLM_PROVIDERS.map((model) => (
|
|
48
|
+
<Select.Option key={model} value={model}>
|
|
49
|
+
{LLM_PROVIDER_LABELS[model]}
|
|
50
|
+
</Select.Option>
|
|
51
|
+
))}
|
|
52
|
+
</Select.Viewport>
|
|
53
|
+
</Select.Content>
|
|
54
|
+
</Select.Portal>
|
|
55
|
+
</Select.Root>
|
|
34
56
|
</DeprecatedFormInput>
|
|
35
57
|
|
|
36
58
|
<DeprecatedFormInput label={t('settings edge llm model label')}>
|
|
@@ -0,0 +1,32 @@
|
|
|
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 } 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,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Blueprint } from '@dxos/assistant';
|
|
8
|
+
import { toJsonSchema } from '@dxos/echo-schema';
|
|
9
|
+
import { useThemeContext, type ThemedClassName } from '@dxos/react-ui';
|
|
10
|
+
import {
|
|
11
|
+
createBasicExtensions,
|
|
12
|
+
createJsonExtensions,
|
|
13
|
+
createThemeExtensions,
|
|
14
|
+
editorMonospace,
|
|
15
|
+
useTextEditor,
|
|
16
|
+
} from '@dxos/react-ui-editor';
|
|
17
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
18
|
+
|
|
19
|
+
export type BlueprintEditorProps = ThemedClassName<{
|
|
20
|
+
blueprint: Blueprint;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
23
|
+
// TODO(burdon): Factor out JsonEditor.
|
|
24
|
+
// TODO(burdon): Make editable.
|
|
25
|
+
export const BlueprintEditor = ({ classNames, blueprint }: BlueprintEditorProps) => {
|
|
26
|
+
const { themeMode } = useThemeContext();
|
|
27
|
+
const { parentRef } = useTextEditor({
|
|
28
|
+
initialValue: JSON.stringify(blueprint, null, 2),
|
|
29
|
+
extensions: [
|
|
30
|
+
createBasicExtensions({ lineWrapping: false }),
|
|
31
|
+
createThemeExtensions({ themeMode, syntaxHighlighting: true }),
|
|
32
|
+
createJsonExtensions({ schema: toJsonSchema(Blueprint, { strict: true }) }),
|
|
33
|
+
editorMonospace,
|
|
34
|
+
],
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div ref={parentRef} className={mx('flex w-full pli-2 overflow-x-scroll border-x border-separator', classNames)} />
|
|
39
|
+
);
|
|
40
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { type FC } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, useCapabilities, useCapability } from '@dxos/app-framework';
|
|
8
8
|
import { type AssociatedArtifact } from '@dxos/artifact';
|
|
@@ -13,16 +13,14 @@ import { ThreadContainer } from './Thread';
|
|
|
13
13
|
import { ASSISTANT_PLUGIN } from '../meta';
|
|
14
14
|
import { type AssistantSettingsProps, type AIChatType } from '../types';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
export const ChatContainer = ({
|
|
18
|
-
role,
|
|
19
|
-
chat,
|
|
20
|
-
associatedArtifact,
|
|
21
|
-
}: {
|
|
16
|
+
export type ChatContainerProps = {
|
|
22
17
|
role: string;
|
|
23
18
|
chat: AIChatType;
|
|
24
19
|
associatedArtifact?: AssociatedArtifact;
|
|
25
|
-
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// TODO(burdon): Attention.
|
|
23
|
+
export const ChatContainer: FC<ChatContainerProps> = ({ role, chat, associatedArtifact }) => {
|
|
26
24
|
const transcription = useCapabilities(TranscriptionCapabilities.Transcriber).length > 0;
|
|
27
25
|
const settings = useCapability(Capabilities.SettingsStore).getStore<AssistantSettingsProps>(ASSISTANT_PLUGIN)?.value;
|
|
28
26
|
|
|
@@ -7,33 +7,82 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
|
|
10
|
+
import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
|
|
11
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
+
import { log } from '@dxos/log';
|
|
13
|
+
import { TranscriptionPlugin } from '@dxos/plugin-transcription';
|
|
10
14
|
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
11
15
|
|
|
12
16
|
import { Prompt } from './Prompt';
|
|
13
|
-
import { PromptBar } from './PromptBar';
|
|
17
|
+
import { PromptBar, type PromptBarProps } from './PromptBar';
|
|
14
18
|
import type { ReferenceData } from './references';
|
|
15
19
|
import translations from '../../translations';
|
|
16
20
|
|
|
21
|
+
const references: ReferenceData[] = [
|
|
22
|
+
{
|
|
23
|
+
uri: 'dxn:echo:@:AAAAAAAA',
|
|
24
|
+
label: 'Meeting Notes',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
uri: 'dxn:echo:@:BBBBBBBB',
|
|
28
|
+
label: 'Project Plan',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
uri: 'dxn:echo:@:CCCCCCCC',
|
|
32
|
+
label: 'Meeting Plan',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const DefaultStory = (props: PromptBarProps) => {
|
|
37
|
+
const [processing, setProcessing] = useState(false);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
let t: NodeJS.Timeout;
|
|
40
|
+
if (processing) {
|
|
41
|
+
t = setTimeout(() => setProcessing(false), 10_000);
|
|
42
|
+
}
|
|
43
|
+
return () => clearTimeout(t);
|
|
44
|
+
}, [processing]);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<PromptBar
|
|
48
|
+
classNames='w-[25rem] p-1 overflow-hidden border border-gray-200 rounded'
|
|
49
|
+
microphone
|
|
50
|
+
processing={processing}
|
|
51
|
+
onSubmit={() => setProcessing(true)}
|
|
52
|
+
onCancel={() => setProcessing(false)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
17
58
|
const meta: Meta<typeof Prompt> = {
|
|
18
|
-
title: 'plugins/plugin-
|
|
59
|
+
title: 'plugins/plugin-assistant/Prompt',
|
|
19
60
|
component: Prompt,
|
|
20
|
-
|
|
61
|
+
render: DefaultStory,
|
|
62
|
+
decorators: [
|
|
63
|
+
withPluginManager({
|
|
64
|
+
plugins: [IntentPlugin(), SettingsPlugin(), TranscriptionPlugin()],
|
|
65
|
+
}),
|
|
66
|
+
withTheme,
|
|
67
|
+
withLayout(),
|
|
68
|
+
],
|
|
21
69
|
parameters: {
|
|
22
70
|
layout: 'centered',
|
|
23
71
|
translations,
|
|
72
|
+
controls: { disable: true },
|
|
24
73
|
},
|
|
25
74
|
};
|
|
26
75
|
|
|
27
76
|
export default meta;
|
|
28
77
|
|
|
29
|
-
type Story = StoryObj<typeof
|
|
78
|
+
type Story = StoryObj<typeof DefaultStory>;
|
|
30
79
|
|
|
31
|
-
export const Default: Story = {
|
|
80
|
+
export const Default: Story = {};
|
|
81
|
+
|
|
82
|
+
export const WithSuggestions: Story = {
|
|
32
83
|
args: {
|
|
33
|
-
classNames: 'w-96 p-4 rounded outline outline-gray-200',
|
|
34
|
-
autoFocus: true,
|
|
35
84
|
onSubmit: (text) => {
|
|
36
|
-
|
|
85
|
+
log('onSubmit', { text });
|
|
37
86
|
},
|
|
38
87
|
onSuggest: (text) => {
|
|
39
88
|
const trimmed = text.trim().toLowerCase();
|
|
@@ -54,60 +103,19 @@ export const Default: Story = {
|
|
|
54
103
|
},
|
|
55
104
|
};
|
|
56
105
|
|
|
57
|
-
export const
|
|
58
|
-
render: (args) => {
|
|
59
|
-
const [processing, setProcessing] = useState(false);
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
let t: NodeJS.Timeout;
|
|
62
|
-
if (processing) {
|
|
63
|
-
t = setTimeout(() => setProcessing(false), 10_000);
|
|
64
|
-
}
|
|
65
|
-
return () => clearTimeout(t);
|
|
66
|
-
}, [processing]);
|
|
67
|
-
console.log('processing', processing);
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<PromptBar
|
|
71
|
-
classNames='w-[25rem] p-1 overflow-hidden border border-gray-200 rounded'
|
|
72
|
-
microphone
|
|
73
|
-
processing={processing}
|
|
74
|
-
onSubmit={() => setProcessing(true)}
|
|
75
|
-
onCancel={() => setProcessing(false)}
|
|
76
|
-
{...args}
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export const Includes: Story = {
|
|
106
|
+
export const WithReferences: Story = {
|
|
83
107
|
args: {
|
|
84
|
-
classNames: 'w-96 p-4 rounded outline outline-gray-200',
|
|
85
108
|
references: {
|
|
86
109
|
getReferences: async ({ query }) => {
|
|
87
110
|
const res = references.filter((i) => i.label.toLowerCase().startsWith(query.toLowerCase()));
|
|
88
|
-
|
|
111
|
+
log('getReferences', { query, res });
|
|
89
112
|
return res;
|
|
90
113
|
},
|
|
91
114
|
resolveReference: async ({ uri }) => {
|
|
92
115
|
const res = references.find((i) => i.uri === uri);
|
|
93
|
-
|
|
116
|
+
log('resolveReference', { uri, res });
|
|
94
117
|
return res ?? null;
|
|
95
118
|
},
|
|
96
119
|
},
|
|
97
120
|
},
|
|
98
121
|
};
|
|
99
|
-
|
|
100
|
-
const references: ReferenceData[] = [
|
|
101
|
-
{
|
|
102
|
-
uri: 'dxn:echo:@:AAAAAAAA',
|
|
103
|
-
label: 'Meeting Notes',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
uri: 'dxn:echo:@:BBBBBBBB',
|
|
107
|
-
label: 'Project Plan',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
uri: 'dxn:echo:@:CCCCCCCC',
|
|
111
|
-
label: 'Meeting Plan',
|
|
112
|
-
},
|
|
113
|
-
];
|