@dxos/plugin-assistant 0.8.2-main.fbd8ed0 → 0.8.2-staging.42af850
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-K6POM23O.mjs +46 -0
- package/dist/lib/browser/AssistantDialog-K6POM23O.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-QTO4LE2C.mjs +39 -0
- package/dist/lib/{node-esm/ChatContainer-FAYGNMQW.mjs.map → browser/ChatContainer-QTO4LE2C.mjs.map} +1 -1
- package/dist/lib/browser/TemplateContainer-AKUYL4AV.mjs +28 -0
- package/dist/lib/{node-esm/TemplateContainer-3LEBT5ZC.mjs.map → browser/TemplateContainer-AKUYL4AV.mjs.map} +1 -1
- package/dist/lib/browser/{ai-client-5PRCXI7N.mjs → ai-client-COXVUC6V.mjs} +4 -4
- package/dist/lib/browser/ai-client-COXVUC6V.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-HTK3HFGM.mjs → app-graph-builder-YH4EGNBC.mjs} +45 -28
- package/dist/lib/browser/app-graph-builder-YH4EGNBC.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-IHEBFO5O.mjs +205 -0
- package/dist/lib/browser/chunk-IHEBFO5O.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-Q6UZ4F3H.mjs +96 -0
- package/dist/lib/browser/chunk-Q6UZ4F3H.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OWZHLWW5.mjs → chunk-QTW7KVDO.mjs} +1595 -1452
- package/dist/lib/browser/chunk-QTW7KVDO.mjs.map +7 -0
- package/dist/lib/browser/chunk-USJBRB3H.mjs +155 -0
- package/dist/lib/browser/chunk-USJBRB3H.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 +24 -10
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-QV5AAVJZ.mjs → intent-resolver-63EAHENI.mjs} +6 -5
- package/dist/lib/browser/intent-resolver-63EAHENI.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-XCV6NR75.mjs +131 -0
- package/dist/lib/browser/react-surface-XCV6NR75.mjs.map +7 -0
- package/dist/lib/browser/{settings-OZX7J65A.mjs → settings-SHNQ4XXP.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +4 -2
- package/dist/lib/node/AssistantDialog-FDATKYE5.cjs +72 -0
- package/dist/lib/node/AssistantDialog-FDATKYE5.cjs.map +7 -0
- package/dist/lib/node/{ChatContainer-WVAAOEOH.cjs → ChatContainer-5CLHJOIQ.cjs} +25 -19
- package/dist/lib/node/{ChatContainer-WVAAOEOH.cjs.map → ChatContainer-5CLHJOIQ.cjs.map} +1 -1
- package/dist/lib/node/{TemplateContainer-EQXKHWTF.cjs → TemplateContainer-CTG2MB4W.cjs} +18 -12
- package/dist/lib/node/{TemplateContainer-EQXKHWTF.cjs.map → TemplateContainer-CTG2MB4W.cjs.map} +1 -1
- package/dist/lib/node/{ai-client-OUPSRQT7.cjs → ai-client-R2CGEYZW.cjs} +12 -12
- package/dist/lib/node/ai-client-R2CGEYZW.cjs.map +7 -0
- package/dist/lib/node/{app-graph-builder-LEO63CZZ.cjs → app-graph-builder-PSHIOW3Q.cjs} +62 -46
- package/dist/lib/node/app-graph-builder-PSHIOW3Q.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-FLJWJ35M.cjs +181 -0
- package/dist/lib/node/chunk-FLJWJ35M.cjs.map +7 -0
- package/dist/lib/node/{chunk-OOHFSPWR.cjs → chunk-H4A42LNR.cjs} +1126 -983
- package/dist/lib/node/chunk-H4A42LNR.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-RXPA2C2A.cjs +230 -0
- package/dist/lib/node/chunk-RXPA2C2A.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/index.cjs +72 -59
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-QDGZMWLY.cjs → intent-resolver-66F7WLW6.cjs} +13 -12
- package/dist/lib/node/intent-resolver-66F7WLW6.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-TASAPRPQ.cjs +145 -0
- package/dist/lib/node/react-surface-TASAPRPQ.cjs.map +7 -0
- package/dist/lib/node/{settings-WLTC7XO5.cjs → settings-ERKLO6IO.cjs} +8 -8
- package/dist/lib/node/types/index.cjs +16 -14
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/AssistantDialog-PIMYK774.mjs +47 -0
- package/dist/lib/node-esm/AssistantDialog-PIMYK774.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-QTC5NYE2.mjs +40 -0
- package/dist/lib/{browser/ChatContainer-ZNKENYKZ.mjs.map → node-esm/ChatContainer-QTC5NYE2.mjs.map} +1 -1
- package/dist/lib/node-esm/TemplateContainer-IVDQ4XQG.mjs +29 -0
- package/dist/lib/{browser/TemplateContainer-WKU5XFSO.mjs.map → node-esm/TemplateContainer-IVDQ4XQG.mjs.map} +1 -1
- package/dist/lib/node-esm/{ai-client-RZQWEDUX.mjs → ai-client-I5LXHMOZ.mjs} +4 -4
- package/dist/lib/node-esm/ai-client-I5LXHMOZ.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-WXJNZDYB.mjs → app-graph-builder-Z3GMMJMD.mjs} +45 -28
- package/dist/lib/node-esm/app-graph-builder-Z3GMMJMD.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-6JK5HEUQ.mjs → chunk-HLPGKJ7N.mjs} +3 -3
- package/dist/lib/node-esm/chunk-HLPGKJ7N.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-QU626JMR.mjs +156 -0
- package/dist/lib/node-esm/chunk-QU626JMR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ED55ZE4G.mjs → chunk-SI5LOQEO.mjs} +1595 -1452
- package/dist/lib/node-esm/chunk-SI5LOQEO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZKBACPIW.mjs +206 -0
- package/dist/lib/node-esm/chunk-ZKBACPIW.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +24 -10
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-Q3I6S6HN.mjs → intent-resolver-X3PWH7KM.mjs} +6 -5
- package/dist/lib/node-esm/intent-resolver-X3PWH7KM.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-QMIQCXUM.mjs +132 -0
- package/dist/lib/node-esm/react-surface-QMIQCXUM.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-CLE57WEP.mjs → settings-IVQRZUCU.mjs} +3 -3
- package/dist/lib/node-esm/types/index.mjs +4 -2
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-client.d.ts +1 -1
- package/dist/types/src/capabilities/ai-client.d.ts.map +1 -1
- 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 +1 -1
- 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/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 +2 -0
- package/dist/types/src/components/BlueprintEditor/index.d.ts.map +1 -0
- 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/Thread/Thread.d.ts +2 -2
- package/dist/types/src/components/Thread/Thread.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 +2 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -0
- 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/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/useMessageQueue.d.ts +11 -7
- package/dist/types/src/hooks/useMessageQueue.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/blueprint.d.ts +7 -0
- package/dist/types/src/testing/blueprint.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-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 +63 -6
- 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/types.d.ts +6 -3
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +73 -61
- package/src/AssistantPlugin.tsx +5 -4
- package/src/capabilities/ai-client.ts +1 -1
- package/src/capabilities/app-graph-builder.ts +34 -24
- package/src/capabilities/capabilities.ts +1 -1
- package/src/capabilities/intent-resolver.ts +3 -2
- package/src/capabilities/react-surface.tsx +58 -13
- package/src/components/AmbientDialog/AmbientDialog.stories.tsx +1 -1
- package/src/components/AmbientDialog/AmbientDialog.tsx +27 -13
- package/src/components/AssistantDialog.tsx +1 -1
- package/src/components/AssistantSettings/AssistantSettings.tsx +1 -1
- package/src/components/BlueprintEditor/BlueprintEditor.stories.tsx +32 -0
- package/src/components/BlueprintEditor/BlueprintEditor.tsx +41 -0
- package/src/components/BlueprintEditor/index.ts +5 -0
- package/src/components/Prompt/Prompt.stories.tsx +59 -52
- package/src/components/Prompt/Prompt.tsx +24 -10
- package/src/components/Prompt/PromptBar.stories.tsx +68 -0
- package/src/components/Prompt/PromptBar.tsx +82 -80
- package/src/components/Prompt/autocomplete.ts +14 -8
- package/src/components/Prompt/references.ts +3 -3
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +2 -2
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +1 -1
- package/src/components/Thread/Thread.stories.tsx +2 -2
- package/src/components/Thread/Thread.tsx +2 -2
- package/src/components/Thread/ThreadContainer.stories.tsx +77 -47
- package/src/components/Thread/ThreadContainer.tsx +8 -9
- package/src/components/Thread/ThreadMessage.tsx +43 -8
- package/src/components/Thread/ToolInvocations.tsx +9 -7
- package/src/components/Thread/reducer.ts +1 -1
- package/src/components/Toolbox/Toolbox.stories.tsx +1 -1
- package/src/components/Toolbox/Toolbox.tsx +2 -1
- package/src/components/index.ts +2 -0
- package/src/experimental/transcription/index.ts +3 -0
- package/src/hooks/processor.ts +65 -27
- package/src/hooks/useChatProcessor.tsx +4 -4
- package/src/hooks/useContextProvider.ts +6 -6
- package/src/hooks/useMessageQueue.ts +4 -4
- 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 +59 -0
- package/src/stories/Query.stories.tsx +448 -0
- package/src/stories/Research.stories.tsx +495 -0
- package/src/stories/test-data.ts +128 -0
- package/src/stories/testing.ts +64 -0
- package/src/testing/blueprint.ts +47 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/test-functions.ts +1 -1
- package/src/tools/function.ts +8 -7
- package/src/tools/openapi.test.ts +18 -19
- package/src/tools/openapi.ts +20 -14
- package/src/translations.ts +4 -2
- package/src/types/chat.ts +27 -4
- package/src/types/types.ts +3 -1
- package/dist/lib/browser/AssistantDialog-DTWVEQBB.mjs +0 -117
- package/dist/lib/browser/AssistantDialog-DTWVEQBB.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-ZNKENYKZ.mjs +0 -33
- package/dist/lib/browser/TemplateContainer-WKU5XFSO.mjs +0 -22
- package/dist/lib/browser/ai-client-5PRCXI7N.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-HTK3HFGM.mjs.map +0 -7
- package/dist/lib/browser/chunk-5P7U35RJ.mjs +0 -192
- package/dist/lib/browser/chunk-5P7U35RJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-7VDZP5WX.mjs +0 -143
- package/dist/lib/browser/chunk-7VDZP5WX.mjs.map +0 -7
- package/dist/lib/browser/chunk-NFUHCW2J.mjs +0 -81
- package/dist/lib/browser/chunk-OWZHLWW5.mjs.map +0 -7
- package/dist/lib/browser/chunk-TXJWGWJ7.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-QV5AAVJZ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-JJPYWEIN.mjs +0 -90
- package/dist/lib/browser/react-surface-JJPYWEIN.mjs.map +0 -7
- package/dist/lib/node/AssistantDialog-RJJHZI63.cjs +0 -141
- package/dist/lib/node/AssistantDialog-RJJHZI63.cjs.map +0 -7
- package/dist/lib/node/ai-client-OUPSRQT7.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-LEO63CZZ.cjs.map +0 -7
- package/dist/lib/node/chunk-GBUNQ257.cjs.map +0 -7
- package/dist/lib/node/chunk-GQ3XS5FZ.cjs +0 -169
- package/dist/lib/node/chunk-GQ3XS5FZ.cjs.map +0 -7
- package/dist/lib/node/chunk-OOHFSPWR.cjs.map +0 -7
- package/dist/lib/node/chunk-VG2UQY4S.cjs +0 -216
- package/dist/lib/node/chunk-VG2UQY4S.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-QDGZMWLY.cjs.map +0 -7
- package/dist/lib/node/react-surface-XNEIJJYJ.cjs +0 -106
- package/dist/lib/node/react-surface-XNEIJJYJ.cjs.map +0 -7
- package/dist/lib/node-esm/AssistantDialog-D33WZUGR.mjs +0 -118
- package/dist/lib/node-esm/AssistantDialog-D33WZUGR.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-FAYGNMQW.mjs +0 -34
- package/dist/lib/node-esm/TemplateContainer-3LEBT5ZC.mjs +0 -23
- package/dist/lib/node-esm/ai-client-RZQWEDUX.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-WXJNZDYB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JK5HEUQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-74GFINWJ.mjs +0 -144
- package/dist/lib/node-esm/chunk-74GFINWJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ED55ZE4G.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UZWYXNR5.mjs +0 -193
- package/dist/lib/node-esm/chunk-UZWYXNR5.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-Q3I6S6HN.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RI3JONQY.mjs +0 -91
- package/dist/lib/node-esm/react-surface-RI3JONQY.mjs.map +0 -7
- /package/dist/lib/browser/{settings-OZX7J65A.mjs.map → settings-SHNQ4XXP.mjs.map} +0 -0
- /package/dist/lib/node/{settings-WLTC7XO5.cjs.map → settings-ERKLO6IO.cjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-CLE57WEP.mjs.map → settings-IVQRZUCU.mjs.map} +0 -0
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Prec } from '@codemirror/state';
|
|
5
|
+
import { type Extension, Prec } from '@codemirror/state';
|
|
6
6
|
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
7
7
|
|
|
8
8
|
import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
|
|
9
9
|
import {
|
|
10
|
-
type BasicExtensionsOptions,
|
|
11
10
|
createBasicExtensions,
|
|
12
11
|
createThemeExtensions,
|
|
13
12
|
keymap,
|
|
14
13
|
useTextEditor,
|
|
14
|
+
type BasicExtensionsOptions,
|
|
15
15
|
type UseTextEditorProps,
|
|
16
16
|
} from '@dxos/react-ui-editor';
|
|
17
17
|
import { mx } from '@dxos/react-ui-theme';
|
|
18
|
+
import { isNonNullable } from '@dxos/util';
|
|
18
19
|
|
|
19
|
-
import {
|
|
20
|
+
import { autocompleteExtension, type AutocompleteOptions } from './autocomplete';
|
|
20
21
|
import { promptReferences, type ReferencesProvider } from './references';
|
|
21
22
|
|
|
22
23
|
// TODO(burdon): Handle object references.
|
|
@@ -28,8 +29,9 @@ export interface PromptController {
|
|
|
28
29
|
|
|
29
30
|
export type PromptProps = ThemedClassName<
|
|
30
31
|
{
|
|
31
|
-
|
|
32
|
+
extensions?: Extension;
|
|
32
33
|
references?: ReferencesProvider;
|
|
34
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
35
|
} & AutocompleteOptions &
|
|
34
36
|
Pick<UseTextEditorProps, 'autoFocus'> &
|
|
35
37
|
Pick<BasicExtensionsOptions, 'lineWrapping' | 'placeholder'>
|
|
@@ -37,7 +39,18 @@ export type PromptProps = ThemedClassName<
|
|
|
37
39
|
|
|
38
40
|
export const Prompt = forwardRef<PromptController, PromptProps>(
|
|
39
41
|
(
|
|
40
|
-
{
|
|
42
|
+
{
|
|
43
|
+
classNames,
|
|
44
|
+
extensions,
|
|
45
|
+
references,
|
|
46
|
+
autoFocus,
|
|
47
|
+
lineWrapping = false,
|
|
48
|
+
placeholder,
|
|
49
|
+
onSubmit,
|
|
50
|
+
onSuggest,
|
|
51
|
+
onCancel,
|
|
52
|
+
onOpenChange,
|
|
53
|
+
},
|
|
41
54
|
forwardRef,
|
|
42
55
|
) => {
|
|
43
56
|
const { themeMode } = useThemeContext();
|
|
@@ -46,6 +59,7 @@ export const Prompt = forwardRef<PromptController, PromptProps>(
|
|
|
46
59
|
debug: true,
|
|
47
60
|
autoFocus,
|
|
48
61
|
extensions: [
|
|
62
|
+
autocompleteExtension({ onSubmit, onSuggest, onCancel }),
|
|
49
63
|
createBasicExtensions({
|
|
50
64
|
bracketMatching: false,
|
|
51
65
|
lineWrapping,
|
|
@@ -53,13 +67,12 @@ export const Prompt = forwardRef<PromptController, PromptProps>(
|
|
|
53
67
|
}),
|
|
54
68
|
createThemeExtensions({ themeMode }),
|
|
55
69
|
references ? promptReferences({ provider: references }) : [],
|
|
56
|
-
createAutocompleteExtension({ onSubmit, onSuggest }),
|
|
57
70
|
Prec.highest(
|
|
58
71
|
keymap.of([
|
|
59
72
|
{
|
|
60
73
|
key: 'cmd-ArrowUp',
|
|
61
74
|
preventDefault: true,
|
|
62
|
-
run: (
|
|
75
|
+
run: () => {
|
|
63
76
|
onOpenChange?.(true);
|
|
64
77
|
return true;
|
|
65
78
|
},
|
|
@@ -67,16 +80,17 @@ export const Prompt = forwardRef<PromptController, PromptProps>(
|
|
|
67
80
|
{
|
|
68
81
|
key: 'cmd-ArrowDown',
|
|
69
82
|
preventDefault: true,
|
|
70
|
-
run: (
|
|
83
|
+
run: () => {
|
|
71
84
|
onOpenChange?.(false);
|
|
72
85
|
return true;
|
|
73
86
|
},
|
|
74
87
|
},
|
|
75
88
|
]),
|
|
76
89
|
),
|
|
77
|
-
|
|
90
|
+
extensions,
|
|
91
|
+
].filter(isNonNullable),
|
|
78
92
|
},
|
|
79
|
-
[themeMode, onSubmit, onSuggest],
|
|
93
|
+
[themeMode, extensions, onSubmit, onSuggest],
|
|
80
94
|
);
|
|
81
95
|
|
|
82
96
|
// Expose editor view.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxos-theme';
|
|
6
|
+
|
|
7
|
+
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
|
+
import React, { useEffect, useState } from 'react';
|
|
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';
|
|
14
|
+
import { withTheme, withLayout } from '@dxos/storybook-utils';
|
|
15
|
+
|
|
16
|
+
import { PromptBar } from './PromptBar';
|
|
17
|
+
import translations from '../../translations';
|
|
18
|
+
|
|
19
|
+
const meta: Meta<typeof PromptBar> = {
|
|
20
|
+
title: 'plugins/plugin-assistant/PromptBar',
|
|
21
|
+
component: PromptBar,
|
|
22
|
+
decorators: [
|
|
23
|
+
withPluginManager({
|
|
24
|
+
plugins: [IntentPlugin(), SettingsPlugin(), TranscriptionPlugin()],
|
|
25
|
+
}),
|
|
26
|
+
withTheme,
|
|
27
|
+
withLayout(),
|
|
28
|
+
],
|
|
29
|
+
parameters: {
|
|
30
|
+
layout: 'centered',
|
|
31
|
+
translations,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
type Story = StoryObj<typeof PromptBar>;
|
|
38
|
+
|
|
39
|
+
export const Default: Story = {
|
|
40
|
+
// args: {
|
|
41
|
+
// classNames: 'w-96 p-4 rounded outline outline-gray-200',
|
|
42
|
+
// },
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const Toolbar: Story = {
|
|
46
|
+
render: (args) => {
|
|
47
|
+
const [processing, setProcessing] = useState(false);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
let t: NodeJS.Timeout;
|
|
50
|
+
if (processing) {
|
|
51
|
+
t = setTimeout(() => setProcessing(false), 10_000);
|
|
52
|
+
}
|
|
53
|
+
return () => clearTimeout(t);
|
|
54
|
+
}, [processing]);
|
|
55
|
+
log.info('processing', { processing });
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<PromptBar
|
|
59
|
+
classNames='w-[25rem] p-1 overflow-hidden border border-gray-200 rounded'
|
|
60
|
+
microphone
|
|
61
|
+
processing={processing}
|
|
62
|
+
onSubmit={() => setProcessing(true)}
|
|
63
|
+
onCancel={() => setProcessing(false)}
|
|
64
|
+
{...args}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
},
|
|
68
|
+
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { forwardRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useVoiceInput } from '@dxos/plugin-transcription';
|
|
8
|
-
import { Icon, IconButton, type ThemedClassName, Tooltip, useTranslation } from '@dxos/react-ui';
|
|
8
|
+
import { Icon, IconButton, type ThemedClassName, Tooltip, useForwardedRef, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { Spinner } from '@dxos/react-ui-sfx';
|
|
10
10
|
import { errorText, mx } from '@dxos/react-ui-theme';
|
|
11
11
|
|
|
@@ -13,91 +13,93 @@ import { Prompt, type PromptController, type PromptProps } from './Prompt';
|
|
|
13
13
|
import { ASSISTANT_PLUGIN } from '../../meta';
|
|
14
14
|
|
|
15
15
|
export type PromptBarProps = ThemedClassName<
|
|
16
|
-
Pick<
|
|
16
|
+
Pick<
|
|
17
|
+
PromptProps,
|
|
18
|
+
| 'extensions'
|
|
19
|
+
| 'references'
|
|
20
|
+
| 'placeholder'
|
|
21
|
+
| 'lineWrapping'
|
|
22
|
+
| 'onSubmit'
|
|
23
|
+
| 'onSuggest'
|
|
24
|
+
| 'onCancel'
|
|
25
|
+
| 'onOpenChange'
|
|
26
|
+
> & {
|
|
17
27
|
processing?: boolean;
|
|
18
28
|
error?: Error;
|
|
19
29
|
microphone?: boolean;
|
|
20
|
-
onCancel?: () => void;
|
|
21
30
|
}
|
|
22
31
|
>;
|
|
23
32
|
|
|
24
|
-
export const PromptBar = (
|
|
25
|
-
classNames,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
microphone,
|
|
30
|
-
onCancel,
|
|
31
|
-
references,
|
|
32
|
-
...props
|
|
33
|
-
}: PromptBarProps) => {
|
|
34
|
-
const { t } = useTranslation(ASSISTANT_PLUGIN);
|
|
33
|
+
export const PromptBar = forwardRef<PromptController, PromptBarProps>(
|
|
34
|
+
({ classNames, placeholder, processing, error, microphone, references, onCancel, ...props }, forwardedRef) => {
|
|
35
|
+
const { t } = useTranslation(ASSISTANT_PLUGIN);
|
|
36
|
+
const promptRef = useForwardedRef<PromptController>(forwardedRef);
|
|
37
|
+
const [active, setActive] = useState(false);
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
// TODO(burdon): Configure capability in TranscriptionPlugin.
|
|
40
|
+
const { recording } = useVoiceInput({
|
|
41
|
+
active,
|
|
42
|
+
onUpdate: (text) => {
|
|
43
|
+
promptRef.current?.setText(text);
|
|
44
|
+
promptRef.current?.focus();
|
|
45
|
+
},
|
|
46
|
+
});
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<div
|
|
50
|
-
className={mx(
|
|
51
|
-
'shrink-0 w-full grid grid-cols-[var(--rail-action)_1fr_var(--rail-action)] overflow-hidden',
|
|
52
|
-
classNames,
|
|
53
|
-
)}
|
|
54
|
-
>
|
|
55
|
-
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
56
|
-
{(error && (
|
|
57
|
-
<Tooltip.Trigger content={error.message} delayDuration={0}>
|
|
58
|
-
<Icon icon='ph--warning-circle--regular' classNames={errorText} size={5} />
|
|
59
|
-
</Tooltip.Trigger>
|
|
60
|
-
)) || <Spinner active={processing} />}
|
|
61
|
-
</div>
|
|
62
|
-
<Prompt
|
|
63
|
-
ref={promptRef}
|
|
64
|
-
autoFocus
|
|
65
|
-
classNames='pbs-2'
|
|
66
|
-
lineWrapping={true}
|
|
67
|
-
placeholder={placeholder ?? t('prompt placeholder')}
|
|
68
|
-
references={references}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
{(onCancel || microphone) && (
|
|
48
|
+
return (
|
|
49
|
+
<div
|
|
50
|
+
className={mx(
|
|
51
|
+
'shrink-0 w-full grid grid-cols-[var(--rail-action)_1fr_var(--rail-action)] overflow-hidden',
|
|
52
|
+
classNames,
|
|
53
|
+
)}
|
|
54
|
+
>
|
|
72
55
|
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
73
|
-
{
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
icon='ph--x--regular'
|
|
79
|
-
iconOnly
|
|
80
|
-
label={t('cancel processing button')}
|
|
81
|
-
onClick={onCancel}
|
|
82
|
-
/>
|
|
83
|
-
)}
|
|
84
|
-
{!processing && microphone && (
|
|
85
|
-
<IconButton
|
|
86
|
-
classNames={mx('px-1.5', recording && 'bg-primary-500')}
|
|
87
|
-
variant='ghost'
|
|
88
|
-
size={5}
|
|
89
|
-
icon='ph--microphone--regular'
|
|
90
|
-
iconOnly
|
|
91
|
-
noTooltip
|
|
92
|
-
label={t('microphone button')}
|
|
93
|
-
onMouseDown={() => setActive(true)}
|
|
94
|
-
onMouseUp={() => setActive(false)}
|
|
95
|
-
onTouchStart={() => setActive(true)}
|
|
96
|
-
onTouchEnd={() => setActive(false)}
|
|
97
|
-
/>
|
|
98
|
-
)}
|
|
56
|
+
{(error && (
|
|
57
|
+
<Tooltip.Trigger content={error.message} delayDuration={0}>
|
|
58
|
+
<Icon icon='ph--warning-circle--regular' classNames={errorText} size={5} />
|
|
59
|
+
</Tooltip.Trigger>
|
|
60
|
+
)) || <Spinner active={processing} />}
|
|
99
61
|
</div>
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
62
|
+
<Prompt
|
|
63
|
+
ref={promptRef}
|
|
64
|
+
autoFocus
|
|
65
|
+
classNames='pbs-2'
|
|
66
|
+
lineWrapping={true}
|
|
67
|
+
placeholder={placeholder ?? t('prompt placeholder')}
|
|
68
|
+
references={references}
|
|
69
|
+
onCancel={onCancel}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
{(onCancel || microphone) && (
|
|
73
|
+
<div className='flex w-[--rail-action] h-[--rail-action] items-center justify-center'>
|
|
74
|
+
{processing && onCancel && (
|
|
75
|
+
<IconButton
|
|
76
|
+
classNames='px-1.5'
|
|
77
|
+
variant='ghost'
|
|
78
|
+
size={5}
|
|
79
|
+
icon='ph--x--regular'
|
|
80
|
+
iconOnly
|
|
81
|
+
label={t('cancel processing button')}
|
|
82
|
+
onClick={onCancel}
|
|
83
|
+
/>
|
|
84
|
+
)}
|
|
85
|
+
{!processing && microphone && (
|
|
86
|
+
<IconButton
|
|
87
|
+
classNames={mx('px-1.5', recording && 'bg-primary-500')}
|
|
88
|
+
variant='ghost'
|
|
89
|
+
size={5}
|
|
90
|
+
icon='ph--microphone--regular'
|
|
91
|
+
iconOnly
|
|
92
|
+
noTooltip
|
|
93
|
+
label={t('microphone button')}
|
|
94
|
+
onMouseDown={() => setActive(true)}
|
|
95
|
+
onMouseUp={() => setActive(false)}
|
|
96
|
+
onTouchStart={() => setActive(true)}
|
|
97
|
+
onTouchEnd={() => setActive(false)}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
},
|
|
105
|
+
);
|
|
@@ -27,14 +27,20 @@ export type AutocompleteOptions = {
|
|
|
27
27
|
* @returns Array of suggestion strings
|
|
28
28
|
*/
|
|
29
29
|
onSuggest?: (text: string) => string[];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* ESC pressed.
|
|
33
|
+
*/
|
|
34
|
+
onCancel?: () => void;
|
|
30
35
|
};
|
|
31
36
|
|
|
32
37
|
/**
|
|
33
38
|
* Creates an autocomplete extension that shows inline suggestions.
|
|
34
39
|
* Pressing Tab will complete the suggestion.
|
|
35
40
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
// TODO(burdon): Move to react-ui-editor.
|
|
42
|
+
export const autocompleteExtension = ({ onSubmit, onSuggest, onCancel }: AutocompleteOptions): Extension => {
|
|
43
|
+
const suggest = ViewPlugin.fromClass(
|
|
38
44
|
class {
|
|
39
45
|
_decorations: DecorationSet;
|
|
40
46
|
_currentSuggestion: string | null = null;
|
|
@@ -103,21 +109,20 @@ export const createAutocompleteExtension = ({ onSubmit, onSuggest }: Autocomplet
|
|
|
103
109
|
);
|
|
104
110
|
|
|
105
111
|
return [
|
|
106
|
-
|
|
112
|
+
suggest,
|
|
107
113
|
EditorView.theme({
|
|
108
114
|
'.cm-inline-suggestion': {
|
|
109
115
|
opacity: 0.4,
|
|
110
116
|
},
|
|
111
117
|
}),
|
|
112
118
|
|
|
113
|
-
// Accept the current suggestion.
|
|
114
119
|
Prec.highest(
|
|
115
120
|
keymap.of([
|
|
116
121
|
{
|
|
117
122
|
key: 'Tab',
|
|
118
123
|
preventDefault: true,
|
|
119
124
|
run: (view) => {
|
|
120
|
-
const plugin = view.plugin(
|
|
125
|
+
const plugin = view.plugin(suggest);
|
|
121
126
|
return plugin?.completeSuggestion(view) ?? false;
|
|
122
127
|
},
|
|
123
128
|
},
|
|
@@ -130,7 +135,7 @@ export const createAutocompleteExtension = ({ onSubmit, onSuggest }: Autocomplet
|
|
|
130
135
|
return false;
|
|
131
136
|
}
|
|
132
137
|
|
|
133
|
-
const plugin = view.plugin(
|
|
138
|
+
const plugin = view.plugin(suggest);
|
|
134
139
|
return plugin?.completeSuggestion(view) ?? false;
|
|
135
140
|
},
|
|
136
141
|
},
|
|
@@ -186,6 +191,7 @@ export const createAutocompleteExtension = ({ onSubmit, onSuggest }: Autocomplet
|
|
|
186
191
|
insert: '',
|
|
187
192
|
},
|
|
188
193
|
});
|
|
194
|
+
onCancel?.();
|
|
189
195
|
return true;
|
|
190
196
|
},
|
|
191
197
|
},
|
|
@@ -199,14 +205,14 @@ class InlineSuggestionWidget extends WidgetType {
|
|
|
199
205
|
super();
|
|
200
206
|
}
|
|
201
207
|
|
|
202
|
-
override toDOM() {
|
|
208
|
+
override toDOM(): HTMLSpanElement {
|
|
203
209
|
const span = document.createElement('span');
|
|
204
210
|
span.textContent = this.suffix;
|
|
205
211
|
span.className = 'cm-inline-suggestion';
|
|
206
212
|
return span;
|
|
207
213
|
}
|
|
208
214
|
|
|
209
|
-
override eq(other: InlineSuggestionWidget) {
|
|
215
|
+
override eq(other: InlineSuggestionWidget): boolean {
|
|
210
216
|
return other.suffix === this.suffix;
|
|
211
217
|
}
|
|
212
218
|
}
|
|
@@ -163,18 +163,18 @@ class ReferenceWidget extends WidgetType {
|
|
|
163
163
|
super();
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
override toDOM() {
|
|
166
|
+
override toDOM(): HTMLSpanElement {
|
|
167
167
|
const span = document.createElement('span');
|
|
168
168
|
span.textContent = `@ ${this.data.label}`;
|
|
169
169
|
span.className = 'cm-reference-pill';
|
|
170
170
|
return span;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
override eq(other: ReferenceWidget) {
|
|
173
|
+
override eq(other: ReferenceWidget): boolean {
|
|
174
174
|
return other.data.uri === this.data.uri;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
override ignoreEvent() {
|
|
177
|
+
override ignoreEvent(): boolean {
|
|
178
178
|
return true;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
@@ -42,14 +42,14 @@ const DefaultStory = ({ text }: TemplateEditorProps & { text: string }) => {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
return (
|
|
45
|
-
<div role='none' className='flex w-[
|
|
45
|
+
<div role='none' className='flex w-[50rem] overflow-hidden border-x border-separator'>
|
|
46
46
|
<TemplateEditor template={template} />
|
|
47
47
|
</div>
|
|
48
48
|
);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
const meta: Meta<typeof DefaultStory> = {
|
|
52
|
-
title: 'plugins/plugin-
|
|
52
|
+
title: 'plugins/plugin-assistant/TemplateEditor',
|
|
53
53
|
component: TemplateEditor,
|
|
54
54
|
render: DefaultStory,
|
|
55
55
|
decorators: [
|
|
@@ -7,9 +7,9 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type StoryObj, type Meta } from '@storybook/react';
|
|
8
8
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
9
9
|
|
|
10
|
+
import { type Message } from '@dxos/ai';
|
|
10
11
|
import { IntentPlugin } from '@dxos/app-framework';
|
|
11
12
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
-
import { type Message } from '@dxos/artifact';
|
|
13
13
|
import { Type } from '@dxos/echo';
|
|
14
14
|
import { faker } from '@dxos/random';
|
|
15
15
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
@@ -69,7 +69,7 @@ const DefaultStory = ({ messages: _messages, ...props }: ThreadProps) => {
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
const meta: Meta<ThreadProps> = {
|
|
72
|
-
title: 'plugins/plugin-
|
|
72
|
+
title: 'plugins/plugin-assistant/Thread',
|
|
73
73
|
render: DefaultStory,
|
|
74
74
|
component: Thread,
|
|
75
75
|
decorators: [
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type CSSProperties, useCallback, useMemo, useRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type Message } from '@dxos/
|
|
7
|
+
import { type Message } from '@dxos/ai';
|
|
8
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
9
9
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
10
10
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
@@ -32,7 +32,7 @@ export type ThreadProps = ThemedClassName<{
|
|
|
32
32
|
contextProvider?: ContextProvider;
|
|
33
33
|
}> &
|
|
34
34
|
Pick<PromptBarProps, 'processing' | 'error' | 'onSubmit' | 'onSuggest' | 'onCancel'> &
|
|
35
|
-
Pick<ThreadMessageProps, 'debug' | 'tools' | 'onPrompt' | 'onDelete'>;
|
|
35
|
+
Pick<ThreadMessageProps, 'debug' | 'tools' | 'onPrompt' | 'onDelete' | 'onAddToGraph'>;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Chat thread component.
|