@dxos/plugin-assistant 0.8.4-main.ae835ea → 0.8.4-main.bcb3aa67d6

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.
Files changed (554) hide show
  1. package/dist/lib/browser/AssistantSettings-PTNCDWC6.mjs +100 -0
  2. package/dist/lib/browser/AssistantSettings-PTNCDWC6.mjs.map +7 -0
  3. package/dist/lib/browser/blueprints/index.mjs +8 -0
  4. package/dist/lib/browser/chunk-EZRS3J25.mjs +30 -0
  5. package/dist/lib/browser/chunk-EZRS3J25.mjs.map +7 -0
  6. package/dist/lib/browser/chunk-OWBVGFDF.mjs +345 -0
  7. package/dist/lib/browser/chunk-OWBVGFDF.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-RUV2WOQH.mjs +154 -0
  9. package/dist/lib/browser/chunk-RUV2WOQH.mjs.map +7 -0
  10. package/dist/lib/browser/chunk-YD4JTOO5.mjs +173 -0
  11. package/dist/lib/browser/chunk-YD4JTOO5.mjs.map +7 -0
  12. package/dist/lib/browser/create-chat-6G6WROW2.mjs +89 -0
  13. package/dist/lib/browser/create-chat-6G6WROW2.mjs.map +7 -0
  14. package/dist/lib/browser/ensure-companion-chat-F46BGW2T.mjs +65 -0
  15. package/dist/lib/browser/ensure-companion-chat-F46BGW2T.mjs.map +7 -0
  16. package/dist/lib/browser/index.mjs +2511 -311
  17. package/dist/lib/browser/index.mjs.map +4 -4
  18. package/dist/lib/browser/meta.json +1 -1
  19. package/dist/lib/browser/on-create-space-F5HHB3GI.mjs +22 -0
  20. package/dist/lib/browser/on-create-space-F5HHB3GI.mjs.map +7 -0
  21. package/dist/lib/browser/operations/index.mjs +13 -0
  22. package/dist/lib/browser/operations/index.mjs.map +7 -0
  23. package/dist/lib/browser/resolve-navigation-targets-5Y7FT4CQ.mjs +22 -0
  24. package/dist/lib/browser/resolve-navigation-targets-5Y7FT4CQ.mjs.map +7 -0
  25. package/dist/lib/browser/run-prompt-in-new-chat-XSPRWOSR.mjs +144 -0
  26. package/dist/lib/browser/run-prompt-in-new-chat-XSPRWOSR.mjs.map +7 -0
  27. package/dist/lib/browser/set-current-chat-JPWBMS7N.mjs +35 -0
  28. package/dist/lib/browser/set-current-chat-JPWBMS7N.mjs.map +7 -0
  29. package/dist/lib/browser/types/index.mjs +5 -4
  30. package/dist/lib/browser/update-chat-name-AEMFSIJX.mjs +60 -0
  31. package/dist/lib/browser/update-chat-name-AEMFSIJX.mjs.map +7 -0
  32. package/dist/lib/node-esm/AssistantSettings-Z5ZZWWSN.mjs +101 -0
  33. package/dist/lib/node-esm/AssistantSettings-Z5ZZWWSN.mjs.map +7 -0
  34. package/dist/lib/node-esm/blueprints/index.mjs +9 -0
  35. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +32 -0
  36. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-POJO5MTX.mjs +347 -0
  38. package/dist/lib/node-esm/chunk-POJO5MTX.mjs.map +7 -0
  39. package/dist/lib/node-esm/chunk-PY4X6FJT.mjs +155 -0
  40. package/dist/lib/node-esm/chunk-PY4X6FJT.mjs.map +7 -0
  41. package/dist/lib/node-esm/chunk-QHPGS4A4.mjs +174 -0
  42. package/dist/lib/node-esm/chunk-QHPGS4A4.mjs.map +7 -0
  43. package/dist/lib/node-esm/create-chat-EEMDTQRE.mjs +90 -0
  44. package/dist/lib/node-esm/create-chat-EEMDTQRE.mjs.map +7 -0
  45. package/dist/lib/node-esm/ensure-companion-chat-YAKJY7TB.mjs +66 -0
  46. package/dist/lib/node-esm/ensure-companion-chat-YAKJY7TB.mjs.map +7 -0
  47. package/dist/lib/node-esm/index.mjs +2511 -311
  48. package/dist/lib/node-esm/index.mjs.map +4 -4
  49. package/dist/lib/node-esm/meta.json +1 -1
  50. package/dist/lib/node-esm/on-create-space-YE5NQ3D2.mjs +23 -0
  51. package/dist/lib/node-esm/on-create-space-YE5NQ3D2.mjs.map +7 -0
  52. package/dist/lib/node-esm/operations/index.mjs +14 -0
  53. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  54. package/dist/lib/node-esm/resolve-navigation-targets-W3GTFXDD.mjs +23 -0
  55. package/dist/lib/node-esm/resolve-navigation-targets-W3GTFXDD.mjs.map +7 -0
  56. package/dist/lib/node-esm/run-prompt-in-new-chat-Q2CLUUM4.mjs +145 -0
  57. package/dist/lib/node-esm/run-prompt-in-new-chat-Q2CLUUM4.mjs.map +7 -0
  58. package/dist/lib/node-esm/set-current-chat-ZBEFWS6P.mjs +36 -0
  59. package/dist/lib/node-esm/set-current-chat-ZBEFWS6P.mjs.map +7 -0
  60. package/dist/lib/node-esm/types/index.mjs +5 -4
  61. package/dist/lib/node-esm/update-chat-name-6F7COUGR.mjs +61 -0
  62. package/dist/lib/node-esm/update-chat-name-6F7COUGR.mjs.map +7 -0
  63. package/dist/types/src/AssistantPlugin.d.ts +2 -1
  64. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  65. package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
  66. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
  67. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
  68. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
  69. package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
  70. package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
  71. package/dist/types/src/blueprints/index.d.ts +2 -0
  72. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  73. package/dist/types/src/capabilities/ai-service.d.ts +4 -2
  74. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  76. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  77. package/dist/types/src/capabilities/blueprint-definition.d.ts +4 -6
  78. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
  80. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/edge-model-resolver.d.ts +6 -3
  82. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/index.d.ts +41 -12
  84. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/local-model-resolver.d.ts +6 -3
  86. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/markdown.d.ts +5 -0
  88. package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  90. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  92. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  94. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/settings.d.ts +16 -2
  96. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/state.d.ts +19 -2
  98. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/toolkit.d.ts +4 -2
  100. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
  101. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -4
  102. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  103. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +511 -0
  104. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
  105. package/dist/types/src/components/AssistantSettings/index.d.ts +2 -1
  106. package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
  107. package/dist/types/src/components/Chat/Chat.d.ts +36 -15
  108. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  109. package/dist/types/src/components/Chat/events.d.ts +5 -1
  110. package/dist/types/src/components/Chat/events.d.ts.map +1 -1
  111. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +6 -3
  112. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -1
  113. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  114. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +3 -3
  115. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
  116. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
  117. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  118. package/dist/types/src/components/ChatThread/ChatThread.d.ts +7 -10
  119. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  120. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +504 -257
  121. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  122. package/dist/types/src/components/ChatThread/registry.d.ts +1 -1
  123. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
  124. package/dist/types/src/components/ChatThread/sync.d.ts +12 -6
  125. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
  126. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +14 -0
  127. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
  128. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +8 -0
  129. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
  130. package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
  131. package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
  132. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +9 -4
  133. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  134. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +488 -244
  135. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  136. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +11 -1
  137. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  138. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +489 -245
  139. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  140. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
  141. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
  142. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
  143. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
  144. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
  145. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +10 -8
  146. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
  147. package/dist/types/src/components/Toolbox/Toolbox.d.ts +17 -12
  148. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  149. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +488 -244
  150. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  151. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +12 -0
  152. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -0
  153. package/dist/types/src/components/Typewriter/Typewriter.d.ts +11 -0
  154. package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -0
  155. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +7 -0
  156. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -0
  157. package/dist/types/src/components/Typewriter/assistant-extension.d.ts +5 -0
  158. package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +1 -0
  159. package/dist/types/src/components/Typewriter/index.d.ts +2 -0
  160. package/dist/types/src/components/Typewriter/index.d.ts.map +1 -0
  161. package/dist/types/src/components/index.d.ts +3 -7
  162. package/dist/types/src/components/index.d.ts.map +1 -1
  163. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
  164. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
  165. package/dist/types/src/containers/BlueprintArticle/index.d.ts +3 -0
  166. package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
  167. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +14 -0
  168. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
  169. package/dist/types/src/containers/ChatCompanion/index.d.ts +3 -0
  170. package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
  171. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +20 -0
  172. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
  173. package/dist/types/src/containers/ChatContainer/index.d.ts +3 -0
  174. package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
  175. package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
  176. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
  177. package/dist/types/src/containers/ChatDialog/index.d.ts +3 -0
  178. package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
  179. package/dist/types/src/containers/ProjectArticle/ProjectArticle.d.ts +6 -0
  180. package/dist/types/src/containers/ProjectArticle/ProjectArticle.d.ts.map +1 -0
  181. package/dist/types/src/containers/ProjectArticle/index.d.ts +3 -0
  182. package/dist/types/src/containers/ProjectArticle/index.d.ts.map +1 -0
  183. package/dist/types/src/containers/ProjectSettings/ProjectSettings.d.ts +6 -0
  184. package/dist/types/src/containers/ProjectSettings/ProjectSettings.d.ts.map +1 -0
  185. package/dist/types/src/containers/ProjectSettings/index.d.ts +3 -0
  186. package/dist/types/src/containers/ProjectSettings/index.d.ts.map +1 -0
  187. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +6 -0
  188. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
  189. package/dist/types/src/containers/PromptArticle/index.d.ts +3 -0
  190. package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
  191. package/dist/types/src/containers/PromptList/PromptList.d.ts +6 -0
  192. package/dist/types/src/containers/PromptList/PromptList.d.ts.map +1 -0
  193. package/dist/types/src/containers/PromptList/PromptList.stories.d.ts +517 -0
  194. package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +1 -0
  195. package/dist/types/src/containers/PromptList/index.d.ts +3 -0
  196. package/dist/types/src/containers/PromptList/index.d.ts.map +1 -0
  197. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +6 -0
  198. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
  199. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
  200. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
  201. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
  202. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
  203. package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
  204. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
  205. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +4 -0
  206. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
  207. package/dist/types/src/containers/TriggerStatus/index.d.ts +3 -0
  208. package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
  209. package/dist/types/src/containers/index.d.ts +12 -0
  210. package/dist/types/src/containers/index.d.ts.map +1 -0
  211. package/dist/types/src/extensions/index.d.ts +2 -0
  212. package/dist/types/src/extensions/index.d.ts.map +1 -0
  213. package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
  214. package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
  215. package/dist/types/src/hooks/index.d.ts +2 -1
  216. package/dist/types/src/hooks/index.d.ts.map +1 -1
  217. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +5 -5
  218. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
  219. package/dist/types/src/hooks/useChatProcessor.d.ts +9 -6
  220. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  221. package/dist/types/src/hooks/useChatServices.d.ts +5 -8
  222. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  223. package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
  224. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
  225. package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
  226. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
  227. package/dist/types/src/hooks/useContextObjects.d.ts +7 -7
  228. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
  229. package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
  230. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
  231. package/dist/types/src/hooks/usePresets.d.ts +1 -1
  232. package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
  233. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  234. package/dist/types/src/index.d.ts +1 -2
  235. package/dist/types/src/index.d.ts.map +1 -1
  236. package/dist/types/src/meta.d.ts +4 -2
  237. package/dist/types/src/meta.d.ts.map +1 -1
  238. package/dist/types/src/operations/create-chat.d.ts +5 -0
  239. package/dist/types/src/operations/create-chat.d.ts.map +1 -0
  240. package/dist/types/src/operations/definitions.d.ts +134 -0
  241. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  242. package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
  243. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
  244. package/dist/types/src/operations/index.d.ts +4 -0
  245. package/dist/types/src/operations/index.d.ts.map +1 -0
  246. package/dist/types/src/operations/on-create-space.d.ts +5 -0
  247. package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
  248. package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
  249. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
  250. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
  251. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
  252. package/dist/types/src/operations/set-current-chat.d.ts +5 -0
  253. package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
  254. package/dist/types/src/operations/update-chat-name.d.ts +5 -0
  255. package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
  256. package/dist/types/src/processor/processor.d.ts +34 -34
  257. package/dist/types/src/processor/processor.d.ts.map +1 -1
  258. package/dist/types/src/processor/update-name.d.ts +2 -2
  259. package/dist/types/src/processor/update-name.d.ts.map +1 -1
  260. package/dist/types/src/queue-logger.d.ts.map +1 -1
  261. package/dist/types/src/testing/test-generator.d.ts +5 -4
  262. package/dist/types/src/testing/test-generator.d.ts.map +1 -1
  263. package/dist/types/src/testing/test-services.d.ts +1 -1
  264. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  265. package/dist/types/src/translations.d.ts +492 -83
  266. package/dist/types/src/translations.d.ts.map +1 -1
  267. package/dist/types/src/types/Assistant.d.ts +18 -46
  268. package/dist/types/src/types/Assistant.d.ts.map +1 -1
  269. package/dist/types/src/types/Settings.d.ts +10 -0
  270. package/dist/types/src/types/Settings.d.ts.map +1 -0
  271. package/dist/types/src/types/capabilities.d.ts +44 -0
  272. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  273. package/dist/types/src/types/events.d.ts +5 -0
  274. package/dist/types/src/types/events.d.ts.map +1 -0
  275. package/dist/types/src/types/index.d.ts +3 -1
  276. package/dist/types/src/types/index.d.ts.map +1 -1
  277. package/dist/types/src/types/service.d.ts +10 -212
  278. package/dist/types/src/types/service.d.ts.map +1 -1
  279. package/dist/types/tsconfig.tsbuildinfo +1 -1
  280. package/package.json +139 -91
  281. package/src/AssistantPlugin.tsx +186 -123
  282. package/src/blueprints/assistant/blueprint.conversations.json +1 -0
  283. package/src/blueprints/assistant/blueprint.test.ts +46 -0
  284. package/src/blueprints/assistant/blueprint.ts +31 -0
  285. package/src/blueprints/assistant/index.ts +5 -0
  286. package/src/{components/ChatToolbar → blueprints}/index.ts +1 -1
  287. package/src/capabilities/ai-service.ts +20 -17
  288. package/src/capabilities/app-graph-builder.ts +184 -170
  289. package/src/capabilities/blueprint-definition.ts +47 -55
  290. package/src/capabilities/companion-chat-provisioner.ts +165 -0
  291. package/src/capabilities/edge-model-resolver.ts +22 -14
  292. package/src/capabilities/index.ts +21 -14
  293. package/src/capabilities/local-model-resolver.ts +21 -13
  294. package/src/capabilities/markdown.ts +39 -0
  295. package/src/capabilities/migrations.ts +34 -0
  296. package/src/capabilities/operation-handler.ts +16 -0
  297. package/src/capabilities/react-surface.tsx +141 -59
  298. package/src/capabilities/settings.ts +24 -12
  299. package/src/capabilities/state.ts +27 -12
  300. package/src/capabilities/toolkit.ts +7 -13
  301. package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
  302. package/src/components/AssistantSettings/AssistantSettings.tsx +105 -85
  303. package/src/components/AssistantSettings/index.ts +4 -2
  304. package/src/components/Chat/Chat.tsx +201 -136
  305. package/src/components/Chat/events.ts +7 -1
  306. package/src/components/ChatProgress/ChatProgress.tsx +11 -22
  307. package/src/components/ChatPrompt/ChatActions.tsx +13 -7
  308. package/src/components/ChatPrompt/ChatOptions.tsx +117 -90
  309. package/src/components/ChatPrompt/ChatReferences.tsx +23 -14
  310. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
  311. package/src/components/ChatThread/ChatThread.stories.tsx +59 -38
  312. package/src/components/ChatThread/ChatThread.tsx +41 -38
  313. package/src/components/ChatThread/Link.tsx +4 -4
  314. package/src/components/ChatThread/registry.tsx +74 -51
  315. package/src/components/ChatThread/sync.test.ts +36 -18
  316. package/src/components/ChatThread/sync.ts +61 -14
  317. package/src/components/ChatThread/testing/thread.md +37 -0
  318. package/src/components/ProcessTree/ProcessTree.stories.tsx +109 -0
  319. package/src/components/ProcessTree/ProcessTree.tsx +85 -0
  320. package/src/components/ProcessTree/index.ts +5 -0
  321. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +15 -11
  322. package/src/components/TemplateEditor/TemplateEditor.tsx +54 -42
  323. package/src/components/TemplateEditor/TemplateForm.stories.tsx +19 -9
  324. package/src/components/TemplateEditor/TemplateForm.tsx +83 -37
  325. package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
  326. package/src/components/TemplateEditor/extensions/index.ts +6 -0
  327. package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
  328. package/src/components/ToolBlock/ToolBlock.tsx +44 -53
  329. package/src/components/Toolbox/Toolbox.stories.tsx +11 -13
  330. package/src/components/Toolbox/Toolbox.tsx +69 -65
  331. package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
  332. package/src/components/Typewriter/Typewriter.stories.tsx +86 -0
  333. package/src/components/Typewriter/Typewriter.tsx +50 -0
  334. package/src/components/Typewriter/assistant-extension.tsx +141 -0
  335. package/src/components/Typewriter/index.ts +5 -0
  336. package/src/components/index.ts +3 -8
  337. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
  338. package/src/containers/BlueprintArticle/index.ts +7 -0
  339. package/src/containers/ChatCompanion/ChatCompanion.tsx +143 -0
  340. package/src/containers/ChatCompanion/index.ts +7 -0
  341. package/src/containers/ChatContainer/ChatContainer.tsx +95 -0
  342. package/src/containers/ChatContainer/index.ts +7 -0
  343. package/src/{components → containers/ChatDialog}/ChatDialog.tsx +19 -15
  344. package/src/containers/ChatDialog/index.ts +7 -0
  345. package/src/containers/ProjectArticle/ProjectArticle.tsx +127 -0
  346. package/src/containers/ProjectArticle/index.ts +7 -0
  347. package/src/containers/ProjectSettings/ProjectSettings.tsx +139 -0
  348. package/src/containers/ProjectSettings/index.ts +7 -0
  349. package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
  350. package/src/containers/PromptArticle/index.ts +7 -0
  351. package/src/containers/PromptList/PromptList.stories.tsx +130 -0
  352. package/src/containers/PromptList/PromptList.tsx +49 -0
  353. package/src/containers/PromptList/index.ts +7 -0
  354. package/src/containers/TracePanel/TracePanel.tsx +258 -0
  355. package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
  356. package/src/containers/TracePanel/dxn-extractor.ts +178 -0
  357. package/src/containers/TracePanel/index.ts +9 -0
  358. package/src/containers/TriggerStatus/TriggerStatus.tsx +144 -0
  359. package/src/containers/TriggerStatus/index.ts +7 -0
  360. package/src/containers/index.ts +16 -0
  361. package/src/extensions/index.ts +5 -0
  362. package/src/extensions/prompt-extension.ts +111 -0
  363. package/src/hooks/index.ts +2 -1
  364. package/src/hooks/useBlueprintRegistry.ts +36 -21
  365. package/src/hooks/useChatProcessor.ts +32 -23
  366. package/src/hooks/useChatServices.ts +9 -31
  367. package/src/hooks/useChatToolbarActions.ts +122 -0
  368. package/src/hooks/useContextBinder.ts +9 -7
  369. package/src/hooks/useContextObjects.ts +16 -24
  370. package/src/hooks/useFilteredTypes.ts +37 -0
  371. package/src/hooks/usePresets.ts +1 -1
  372. package/src/hooks/useReferencesProvider.ts +5 -8
  373. package/src/index.ts +1 -2
  374. package/src/meta.ts +7 -4
  375. package/src/operations/create-chat.ts +79 -0
  376. package/src/operations/definitions.ts +126 -0
  377. package/src/operations/ensure-companion-chat.ts +59 -0
  378. package/src/operations/index.ts +17 -0
  379. package/src/operations/on-create-space.ts +24 -0
  380. package/src/operations/resolve-navigation-targets.ts +26 -0
  381. package/src/operations/run-prompt-in-new-chat.ts +114 -0
  382. package/src/operations/set-current-chat.ts +35 -0
  383. package/src/operations/update-chat-name.ts +55 -0
  384. package/src/processor/presets.ts +1 -1
  385. package/src/processor/processor.test.ts +21 -63
  386. package/src/processor/processor.ts +168 -139
  387. package/src/processor/update-name.ts +6 -5
  388. package/src/queue-logger.ts +8 -9
  389. package/src/testing/test-generator.ts +14 -13
  390. package/src/testing/test-sequence.ts +3 -3
  391. package/src/testing/test-services.ts +9 -7
  392. package/src/translations.ts +129 -76
  393. package/src/types/Assistant.ts +8 -57
  394. package/src/types/Settings.ts +21 -0
  395. package/src/types/capabilities.ts +35 -0
  396. package/src/types/events.ts +11 -0
  397. package/src/types/index.ts +5 -1
  398. package/src/types/service.ts +14 -11
  399. package/dist/lib/browser/BlueprintContainer-GMSYKGSO.mjs +0 -36
  400. package/dist/lib/browser/BlueprintContainer-GMSYKGSO.mjs.map +0 -7
  401. package/dist/lib/browser/ChatCompanion-M3FDKTQM.mjs +0 -151
  402. package/dist/lib/browser/ChatCompanion-M3FDKTQM.mjs.map +0 -7
  403. package/dist/lib/browser/ChatContainer-KAH7XITI.mjs +0 -74
  404. package/dist/lib/browser/ChatContainer-KAH7XITI.mjs.map +0 -7
  405. package/dist/lib/browser/ChatDialog-ZWRGABW6.mjs +0 -87
  406. package/dist/lib/browser/ChatDialog-ZWRGABW6.mjs.map +0 -7
  407. package/dist/lib/browser/ai-service-ERTZBTP3.mjs +0 -19
  408. package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +0 -7
  409. package/dist/lib/browser/app-graph-builder-R5T7BJPC.mjs +0 -183
  410. package/dist/lib/browser/app-graph-builder-R5T7BJPC.mjs.map +0 -7
  411. package/dist/lib/browser/blueprint-definition-AGTDXTXO.mjs +0 -13
  412. package/dist/lib/browser/chunk-357IHWQL.mjs +0 -1519
  413. package/dist/lib/browser/chunk-357IHWQL.mjs.map +0 -7
  414. package/dist/lib/browser/chunk-A2NVNXPL.mjs +0 -170
  415. package/dist/lib/browser/chunk-A2NVNXPL.mjs.map +0 -7
  416. package/dist/lib/browser/chunk-CQW6UPJM.mjs +0 -199
  417. package/dist/lib/browser/chunk-CQW6UPJM.mjs.map +0 -7
  418. package/dist/lib/browser/chunk-GNI6HL6G.mjs +0 -219
  419. package/dist/lib/browser/chunk-GNI6HL6G.mjs.map +0 -7
  420. package/dist/lib/browser/chunk-GXHZTOWJ.mjs +0 -378
  421. package/dist/lib/browser/chunk-GXHZTOWJ.mjs.map +0 -7
  422. package/dist/lib/browser/chunk-L5OA5OGS.mjs +0 -262
  423. package/dist/lib/browser/chunk-L5OA5OGS.mjs.map +0 -7
  424. package/dist/lib/browser/chunk-MEN5WTLA.mjs +0 -182
  425. package/dist/lib/browser/chunk-MEN5WTLA.mjs.map +0 -7
  426. package/dist/lib/browser/chunk-PUG24BEC.mjs +0 -277
  427. package/dist/lib/browser/chunk-PUG24BEC.mjs.map +0 -7
  428. package/dist/lib/browser/chunk-SJJV3HEX.mjs +0 -16
  429. package/dist/lib/browser/chunk-SJJV3HEX.mjs.map +0 -7
  430. package/dist/lib/browser/chunk-WBG5PTSX.mjs +0 -23
  431. package/dist/lib/browser/chunk-WBG5PTSX.mjs.map +0 -7
  432. package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +0 -18
  433. package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +0 -7
  434. package/dist/lib/browser/intent-resolver-3C5TABOX.mjs +0 -136
  435. package/dist/lib/browser/intent-resolver-3C5TABOX.mjs.map +0 -7
  436. package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +0 -17
  437. package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +0 -7
  438. package/dist/lib/browser/react-surface-EYKA5IFU.mjs +0 -90
  439. package/dist/lib/browser/react-surface-EYKA5IFU.mjs.map +0 -7
  440. package/dist/lib/browser/settings-VMVBYZLN.mjs +0 -23
  441. package/dist/lib/browser/settings-VMVBYZLN.mjs.map +0 -7
  442. package/dist/lib/browser/state-CFREPBB6.mjs +0 -21
  443. package/dist/lib/browser/state-CFREPBB6.mjs.map +0 -7
  444. package/dist/lib/browser/toolkit-F3NQ7TSI.mjs +0 -21
  445. package/dist/lib/browser/toolkit-F3NQ7TSI.mjs.map +0 -7
  446. package/dist/lib/node-esm/BlueprintContainer-6GBLMK4Z.mjs +0 -37
  447. package/dist/lib/node-esm/BlueprintContainer-6GBLMK4Z.mjs.map +0 -7
  448. package/dist/lib/node-esm/ChatCompanion-OV426GCP.mjs +0 -152
  449. package/dist/lib/node-esm/ChatCompanion-OV426GCP.mjs.map +0 -7
  450. package/dist/lib/node-esm/ChatContainer-UKY7NHFY.mjs +0 -75
  451. package/dist/lib/node-esm/ChatContainer-UKY7NHFY.mjs.map +0 -7
  452. package/dist/lib/node-esm/ChatDialog-2BDQIEXH.mjs +0 -88
  453. package/dist/lib/node-esm/ChatDialog-2BDQIEXH.mjs.map +0 -7
  454. package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +0 -20
  455. package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +0 -7
  456. package/dist/lib/node-esm/app-graph-builder-I52RYVWH.mjs +0 -184
  457. package/dist/lib/node-esm/app-graph-builder-I52RYVWH.mjs.map +0 -7
  458. package/dist/lib/node-esm/blueprint-definition-CFCUD2VC.mjs +0 -14
  459. package/dist/lib/node-esm/chunk-2CAETDW2.mjs +0 -183
  460. package/dist/lib/node-esm/chunk-2CAETDW2.mjs.map +0 -7
  461. package/dist/lib/node-esm/chunk-4J5FYNNM.mjs +0 -171
  462. package/dist/lib/node-esm/chunk-4J5FYNNM.mjs.map +0 -7
  463. package/dist/lib/node-esm/chunk-5ARE4R2I.mjs +0 -220
  464. package/dist/lib/node-esm/chunk-5ARE4R2I.mjs.map +0 -7
  465. package/dist/lib/node-esm/chunk-7ZYOYW7F.mjs +0 -264
  466. package/dist/lib/node-esm/chunk-7ZYOYW7F.mjs.map +0 -7
  467. package/dist/lib/node-esm/chunk-HJPIYMWD.mjs +0 -1520
  468. package/dist/lib/node-esm/chunk-HJPIYMWD.mjs.map +0 -7
  469. package/dist/lib/node-esm/chunk-O36P4LN5.mjs +0 -200
  470. package/dist/lib/node-esm/chunk-O36P4LN5.mjs.map +0 -7
  471. package/dist/lib/node-esm/chunk-WE6KTH72.mjs +0 -25
  472. package/dist/lib/node-esm/chunk-WE6KTH72.mjs.map +0 -7
  473. package/dist/lib/node-esm/chunk-XM4BVQQR.mjs +0 -278
  474. package/dist/lib/node-esm/chunk-XM4BVQQR.mjs.map +0 -7
  475. package/dist/lib/node-esm/chunk-XQBL2SBL.mjs +0 -17
  476. package/dist/lib/node-esm/chunk-XQBL2SBL.mjs.map +0 -7
  477. package/dist/lib/node-esm/chunk-YIO5MEPR.mjs +0 -380
  478. package/dist/lib/node-esm/chunk-YIO5MEPR.mjs.map +0 -7
  479. package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +0 -19
  480. package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +0 -7
  481. package/dist/lib/node-esm/intent-resolver-HQ27YALS.mjs +0 -137
  482. package/dist/lib/node-esm/intent-resolver-HQ27YALS.mjs.map +0 -7
  483. package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +0 -18
  484. package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +0 -7
  485. package/dist/lib/node-esm/react-surface-UOC3CBPH.mjs +0 -91
  486. package/dist/lib/node-esm/react-surface-UOC3CBPH.mjs.map +0 -7
  487. package/dist/lib/node-esm/settings-7AUVNDM2.mjs +0 -24
  488. package/dist/lib/node-esm/settings-7AUVNDM2.mjs.map +0 -7
  489. package/dist/lib/node-esm/state-XXND44OW.mjs +0 -22
  490. package/dist/lib/node-esm/state-XXND44OW.mjs.map +0 -7
  491. package/dist/lib/node-esm/toolkit-7CH5UNSQ.mjs +0 -22
  492. package/dist/lib/node-esm/toolkit-7CH5UNSQ.mjs.map +0 -7
  493. package/dist/types/src/capabilities/capabilities.d.ts +0 -11
  494. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  495. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  496. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  497. package/dist/types/src/components/BlueprintContainer.d.ts +0 -8
  498. package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
  499. package/dist/types/src/components/ChatCompanion.d.ts +0 -13
  500. package/dist/types/src/components/ChatCompanion.d.ts.map +0 -1
  501. package/dist/types/src/components/ChatContainer.d.ts +0 -11
  502. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  503. package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
  504. package/dist/types/src/components/ChatThread/reducers.d.ts +0 -40
  505. package/dist/types/src/components/ChatThread/reducers.d.ts.map +0 -1
  506. package/dist/types/src/components/ChatToolbar/ChatToolbar.d.ts +0 -6
  507. package/dist/types/src/components/ChatToolbar/ChatToolbar.d.ts.map +0 -1
  508. package/dist/types/src/components/ChatToolbar/index.d.ts +0 -2
  509. package/dist/types/src/components/ChatToolbar/index.d.ts.map +0 -1
  510. package/dist/types/src/components/ChatToolbar/useChatToolbarActions.d.ts +0 -9
  511. package/dist/types/src/components/ChatToolbar/useChatToolbarActions.d.ts.map +0 -1
  512. package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +0 -1
  513. package/dist/types/src/events.d.ts +0 -4
  514. package/dist/types/src/events.d.ts.map +0 -1
  515. package/dist/types/src/functions/analysis.d.ts +0 -5
  516. package/dist/types/src/functions/analysis.d.ts.map +0 -1
  517. package/dist/types/src/functions/index.d.ts +0 -4
  518. package/dist/types/src/functions/index.d.ts.map +0 -1
  519. package/dist/types/src/functions/object-list.d.ts +0 -10
  520. package/dist/types/src/functions/object-list.d.ts.map +0 -1
  521. package/dist/types/src/functions/object-load.d.ts +0 -8
  522. package/dist/types/src/functions/object-load.d.ts.map +0 -1
  523. package/dist/types/src/hooks/useItemTypes.d.ts +0 -4
  524. package/dist/types/src/hooks/useItemTypes.d.ts.map +0 -1
  525. package/dist/types/src/toolkits/AssistantToolkit.d.ts +0 -21
  526. package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +0 -1
  527. package/dist/types/src/toolkits/SystemToolkit.d.ts +0 -69
  528. package/dist/types/src/toolkits/SystemToolkit.d.ts.map +0 -1
  529. package/dist/types/src/toolkits/index.d.ts +0 -3
  530. package/dist/types/src/toolkits/index.d.ts.map +0 -1
  531. package/dist/types/src/types/AssistantAction.d.ts +0 -119
  532. package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
  533. package/src/capabilities/capabilities.ts +0 -18
  534. package/src/capabilities/intent-resolver.ts +0 -121
  535. package/src/components/BlueprintContainer.tsx +0 -30
  536. package/src/components/ChatCompanion.tsx +0 -136
  537. package/src/components/ChatContainer.tsx +0 -51
  538. package/src/components/ChatThread/reducers.ts +0 -151
  539. package/src/components/ChatToolbar/ChatToolbar.tsx +0 -23
  540. package/src/components/ChatToolbar/useChatToolbarActions.ts +0 -126
  541. package/src/components/TemplateEditor/handlebars-extension.ts +0 -166
  542. package/src/events.ts +0 -11
  543. package/src/functions/analysis.ts +0 -22
  544. package/src/functions/index.ts +0 -7
  545. package/src/functions/object-list.ts +0 -48
  546. package/src/functions/object-load.ts +0 -45
  547. package/src/hooks/useItemTypes.ts +0 -37
  548. package/src/toolkits/AssistantToolkit.ts +0 -55
  549. package/src/toolkits/SystemToolkit.ts +0 -292
  550. package/src/toolkits/index.ts +0 -6
  551. package/src/types/AssistantAction.ts +0 -70
  552. /package/dist/lib/browser/{blueprint-definition-AGTDXTXO.mjs.map → blueprints/index.mjs.map} +0 -0
  553. /package/dist/lib/node-esm/{blueprint-definition-CFCUD2VC.mjs.map → blueprints/index.mjs.map} +0 -0
  554. /package/dist/types/src/components/TemplateEditor/{handlebars-extension.d.ts → extensions/handlebars-extension.d.ts} +0 -0
@@ -1,119 +0,0 @@
1
- import * as Schema from 'effect/Schema';
2
- declare const onCreateSpace_base: Schema.TaggedClass<onCreateSpace, `${string}/on-space-created`, {
3
- readonly _tag: Schema.tag<`${string}/on-space-created`>;
4
- } & {
5
- input: Schema.Struct<{
6
- space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
7
- rootCollection: import("@dxos/echo/Type").obj<Schema.Struct<{
8
- name: Schema.optional<typeof Schema.String>;
9
- objects: Schema.mutable<Schema.Array$<import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo/Type").Expando, {
10
- [x: string]: any;
11
- id: string;
12
- }, never>>>>;
13
- }>>;
14
- }>;
15
- output: typeof Schema.Void;
16
- }>;
17
- export declare class onCreateSpace extends onCreateSpace_base {
18
- }
19
- declare const CreateChat_base: Schema.TaggedClass<CreateChat, `${string}/action/create-chat`, {
20
- readonly _tag: Schema.tag<`${string}/action/create-chat`>;
21
- } & {
22
- input: Schema.Struct<{
23
- space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
24
- name: Schema.optional<typeof Schema.String>;
25
- }>;
26
- output: Schema.Struct<{
27
- object: import("@dxos/echo/Type").obj<Schema.Struct<{
28
- name: Schema.optional<typeof Schema.String>;
29
- queue: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>;
30
- traceQueue: Schema.optional<import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>>;
31
- }>>;
32
- }>;
33
- }>;
34
- export declare class CreateChat extends CreateChat_base {
35
- }
36
- declare const UpdateChatName_base: Schema.TaggedClass<UpdateChatName, `${string}/action/update-name`, {
37
- readonly _tag: Schema.tag<`${string}/action/update-name`>;
38
- } & {
39
- input: Schema.Struct<{
40
- chat: import("@dxos/echo/Type").obj<Schema.Struct<{
41
- name: Schema.optional<typeof Schema.String>;
42
- queue: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>;
43
- traceQueue: Schema.optional<import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>>;
44
- }>>;
45
- }>;
46
- output: typeof Schema.Void;
47
- }>;
48
- export declare class UpdateChatName extends UpdateChatName_base {
49
- }
50
- export declare const BlueprintForm: Schema.Struct<{
51
- key: typeof Schema.String;
52
- name: typeof Schema.String;
53
- description: Schema.optional<typeof Schema.String>;
54
- }>;
55
- declare const CreateBlueprint_base: Schema.TaggedClass<CreateBlueprint, `${string}/action/create-blueprint`, {
56
- readonly _tag: Schema.tag<`${string}/action/create-blueprint`>;
57
- } & {
58
- input: Schema.Struct<{
59
- key: typeof Schema.String;
60
- name: typeof Schema.String;
61
- description: Schema.optional<typeof Schema.String>;
62
- }>;
63
- output: Schema.Struct<{
64
- object: import("@dxos/echo/Type").obj<Schema.Struct<{
65
- key: Schema.SchemaClass<string, string, never>;
66
- name: Schema.SchemaClass<string, string, never>;
67
- description: Schema.optional<typeof Schema.String>;
68
- instructions: Schema.mutable<Schema.Struct<{
69
- source: Schema.SchemaClass<import("@dxos/echo/internal").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
70
- content: string;
71
- }>, import("@dxos/echo-protocol").EncodedReference, never>;
72
- inputs: Schema.optional<Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
73
- name: typeof Schema.String;
74
- kind: Schema.optional<Schema.Literal<["value", "pass-through", "retriever", "function", "query", "resolver", "context", "schema"]>>;
75
- default: Schema.optional<typeof Schema.Any>;
76
- }>>>>>;
77
- }>>;
78
- tools: Schema.Array$<Schema.brand<typeof Schema.String, "ToolId">>;
79
- }>>;
80
- }>;
81
- }>;
82
- export declare class CreateBlueprint extends CreateBlueprint_base {
83
- }
84
- declare const CreateSequence_base: Schema.TaggedClass<CreateSequence, `${string}/action/create-sequence`, {
85
- readonly _tag: Schema.tag<`${string}/action/create-sequence`>;
86
- } & {
87
- input: Schema.Struct<{
88
- name: Schema.optional<typeof Schema.String>;
89
- }>;
90
- output: Schema.Struct<{
91
- object: import("@dxos/echo/Type").obj<Schema.Struct<{
92
- name: Schema.optional<typeof Schema.String>;
93
- steps: Schema.Array$<Schema.Struct<{
94
- id: import("@dxos/keys").ObjectIdClass;
95
- instructions: typeof Schema.String;
96
- tools: Schema.optional<Schema.Array$<Schema.brand<typeof Schema.String, "ToolId">>>;
97
- }>>;
98
- }>>;
99
- }>;
100
- }>;
101
- export declare class CreateSequence extends CreateSequence_base {
102
- }
103
- declare const SetCurrentChat_base: Schema.TaggedClass<SetCurrentChat, `${string}/action/set-current-chat`, {
104
- readonly _tag: Schema.tag<`${string}/action/set-current-chat`>;
105
- } & {
106
- input: Schema.Struct<{
107
- companionTo: Schema.Schema<any, any, never>;
108
- chat: import("@dxos/echo/Type").obj<Schema.Struct<{
109
- name: Schema.optional<typeof Schema.String>;
110
- queue: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>;
111
- traceQueue: Schema.optional<import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>>;
112
- }>>;
113
- }>;
114
- output: typeof Schema.Void;
115
- }>;
116
- export declare class SetCurrentChat extends SetCurrentChat_base {
117
- }
118
- export {};
119
- //# sourceMappingURL=AssistantAction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssistantAction.d.ts","sourceRoot":"","sources":["../../../../src/types/AssistantAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;AAYxC,qBAAa,aAAc,SAAQ,kBAMjC;CAAG;;;;;;;;;;;;;;;;AAEL,qBAAa,UAAW,SAAQ,eAQ9B;CAAG;;;;;;;;;;;;;AAEL,qBAAa,cAAe,SAAQ,mBAKlC;CAAG;AAEL,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qBAAa,eAAgB,SAAQ,oBAKnC;CAAG;;;;;;;;;;;;;;;;;;AAEL,qBAAa,cAAe,SAAQ,mBAOlC;CAAG;;;;;;;;;;;;;;AAEL,qBAAa,cAAe,SAAQ,mBAMlC;CAAG"}
@@ -1,18 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { defineCapability } from '@dxos/app-framework';
6
- import { type DeepReadonly } from '@dxos/util';
7
-
8
- import { meta } from '../meta';
9
- import { type Assistant } from '../types';
10
-
11
- export namespace AssistantCapabilities {
12
- export type AssistantState = {
13
- /** Map of primary object fq id to current chat. */
14
- currentChat: Record<string, Assistant.Chat>;
15
- };
16
- export const State = defineCapability<DeepReadonly<AssistantState>>(`${meta.id}/capability/state`);
17
- export const MutableState = defineCapability<AssistantState>(`${meta.id}/capability/state`);
18
- }
@@ -1,121 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Effect from 'effect/Effect';
6
-
7
- import { Capabilities, type PluginContext, contributes, createIntent, createResolver } from '@dxos/app-framework';
8
- import { AiContextBinder, AiConversation } from '@dxos/assistant';
9
- import { Blueprint, Template } from '@dxos/blueprints';
10
- import { fullyQualifiedId } from '@dxos/client/echo';
11
- import { type Queue } from '@dxos/client/echo';
12
- import { Sequence } from '@dxos/conductor';
13
- import { Filter, Key, Obj, Ref } from '@dxos/echo';
14
- import { TracingService } from '@dxos/functions';
15
- import { AutomationCapabilities } from '@dxos/plugin-automation';
16
- import { CollectionAction } from '@dxos/plugin-space/types';
17
- import { getSpace } from '@dxos/react-client/echo';
18
- import { type DataType } from '@dxos/schema';
19
-
20
- import { type AiChatServices, updateName } from '../processor';
21
- import { Assistant, AssistantAction } from '../types';
22
-
23
- import { ASSISTANT_BLUEPRINT_KEY, createBlueprint } from './blueprint-definition';
24
- import { AssistantCapabilities } from './capabilities';
25
-
26
- export default (context: PluginContext) => [
27
- contributes(Capabilities.IntentResolver, [
28
- createResolver({
29
- intent: AssistantAction.onCreateSpace,
30
- resolve: ({ space, rootCollection }) =>
31
- Effect.gen(function* () {
32
- const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
33
- const { object: chatCollection } = yield* dispatch(
34
- createIntent(CollectionAction.CreateQueryCollection, { typename: Assistant.Chat.typename }),
35
- );
36
- const { object: blueprintCollection } = yield* dispatch(
37
- createIntent(CollectionAction.CreateQueryCollection, { typename: Blueprint.Blueprint.typename }),
38
- );
39
- rootCollection.objects.push(Ref.make(chatCollection), Ref.make(blueprintCollection));
40
-
41
- // Create default chat.
42
- const { object: chat } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
43
- space.db.add(chat);
44
- }),
45
- }),
46
- createResolver({
47
- intent: AssistantAction.CreateChat,
48
- resolve: async ({ space, name }) => {
49
- const queue = space.queues.create();
50
- const chat = Assistant.makeChat({ name, queue });
51
- const { objects: blueprints } = await space.db.query(Filter.type(Blueprint.Blueprint)).run();
52
- // TODO(wittjosiah): This should be a space-level setting.
53
- // TODO(burdon): Clone when activated. Copy-on-write for template.
54
- let defaultBlueprint = blueprints.find((blueprint) => blueprint.key === ASSISTANT_BLUEPRINT_KEY);
55
- if (!defaultBlueprint) {
56
- defaultBlueprint = space.db.add(createBlueprint());
57
- }
58
-
59
- const binder = new AiContextBinder(queue);
60
- await binder.open();
61
- await binder.bind({ blueprints: [Ref.make(defaultBlueprint)] });
62
- await binder.close();
63
-
64
- return {
65
- data: { object: chat },
66
- };
67
- },
68
- }),
69
- createResolver({
70
- intent: AssistantAction.UpdateChatName,
71
- resolve: async ({ chat }) => {
72
- const space = getSpace(chat);
73
- const queue = chat.queue.target as Queue<DataType.Message>;
74
- if (!space || !queue) {
75
- return;
76
- }
77
-
78
- const runtimeResolver = context.getCapability(AutomationCapabilities.ComputeRuntime);
79
- const runtime = await runtimeResolver.getRuntime(space.id).runPromise(
80
- Effect.gen(function* () {
81
- return yield* Effect.runtime<AiChatServices>().pipe(Effect.provide(TracingService.layerNoop));
82
- }),
83
- );
84
-
85
- await new AiConversation(queue).use(async (conversation) => updateName(runtime, conversation, chat));
86
- },
87
- }),
88
- createResolver({
89
- intent: AssistantAction.CreateBlueprint,
90
- resolve: ({ key, name, description }) => ({
91
- data: {
92
- object: Blueprint.make({ key, name, description, instructions: Template.make({ source: '' }) }),
93
- },
94
- }),
95
- }),
96
- createResolver({
97
- intent: AssistantAction.CreateSequence,
98
- resolve: ({ name }) => ({
99
- data: {
100
- object: Obj.make(Sequence, {
101
- name,
102
- steps: [
103
- {
104
- id: Key.ObjectId.random(),
105
- instructions: 'You are a helpful assistant.',
106
- },
107
- ],
108
- }),
109
- },
110
- }),
111
- }),
112
- createResolver({
113
- intent: AssistantAction.SetCurrentChat,
114
- resolve: ({ companionTo, chat }) =>
115
- Effect.gen(function* () {
116
- const state = context.getCapability(AssistantCapabilities.MutableState);
117
- state.currentChat[fullyQualifiedId(companionTo)] = chat;
118
- }),
119
- }),
120
- ]),
121
- ];
@@ -1,30 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { type Blueprint } from '@dxos/blueprints';
8
- import { fullyQualifiedId } from '@dxos/react-client/echo';
9
- import { Toolbar } from '@dxos/react-ui';
10
- import { useAttention } from '@dxos/react-ui-attention';
11
- import { StackItem } from '@dxos/react-ui-stack';
12
-
13
- import { TemplateEditor } from './TemplateEditor';
14
-
15
- export type BlueprintContainerProps = {
16
- blueprint: Blueprint.Blueprint;
17
- };
18
-
19
- export const BlueprintContainer = ({ blueprint }: BlueprintContainerProps) => {
20
- const { hasAttention } = useAttention(fullyQualifiedId(blueprint));
21
-
22
- return (
23
- <StackItem.Content toolbar>
24
- <Toolbar.Root disabled={!hasAttention} />
25
- <TemplateEditor id={blueprint.id} template={blueprint.instructions} classNames='container-max-width' />
26
- </StackItem.Content>
27
- );
28
- };
29
-
30
- export default BlueprintContainer;
@@ -1,136 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import * as Array from 'effect/Array';
6
- import * as Effect from 'effect/Effect';
7
- import * as Function from 'effect/Function';
8
- import * as Option from 'effect/Option';
9
- import React, { useMemo } from 'react';
10
-
11
- import { Capabilities, createIntent, useCapabilities, useIntentDispatcher } from '@dxos/app-framework';
12
- import { Blueprint } from '@dxos/blueprints';
13
- import { getSpace } from '@dxos/client/echo';
14
- import { Filter, Obj, Query, Ref } from '@dxos/echo';
15
- import { DatabaseService } from '@dxos/functions';
16
- import { SpaceAction } from '@dxos/plugin-space/types';
17
- import { useQuery } from '@dxos/react-client/echo';
18
- import { useAsyncEffect } from '@dxos/react-ui';
19
-
20
- import { ChatContainer } from '../components';
21
- import { useBlueprintRegistry, useContextBinder } from '../hooks';
22
- import { Assistant, AssistantAction } from '../types';
23
-
24
- export type ChatCompanionProps = {
25
- role?: string;
26
- data: { companionTo: Obj.Any; subject: Assistant.Chat | 'assistant-chat' };
27
- };
28
-
29
- export const ChatCompanion = ({ role, data }: ChatCompanionProps) => {
30
- const companionTo = data.companionTo;
31
- const space = getSpace(companionTo);
32
- const chat = data.subject === 'assistant-chat' ? undefined : data.subject;
33
- const blueprintRegistry = useBlueprintRegistry();
34
- const binder = useContextBinder(chat);
35
- const { dispatch } = useIntentDispatcher();
36
-
37
- // Initialize companion chat if it doesn't exist.
38
- useAsyncEffect(async () => {
39
- if (chat || !space) {
40
- return;
41
- }
42
-
43
- // TODO(burdon): Garbage collection of queues?
44
- // TODO(wittjosiah): Figure out how to prevent companion chats from showing up in the navtree.
45
- await Effect.gen(function* () {
46
- const { objects } = yield* DatabaseService.runQuery(
47
- Query.select(Filter.ids(companionTo.id)).targetOf(Assistant.CompanionTo).source(),
48
- );
49
-
50
- // TODO(wittjosiah): This should be the default sort order.
51
- let nextChat = objects.toSorted((a, b) => a.id.localeCompare(b.id)).at(-1);
52
- if (!nextChat) {
53
- const { object } = yield* dispatch(createIntent(AssistantAction.CreateChat, { space }));
54
- nextChat = object;
55
- yield* dispatch(createIntent(SpaceAction.AddObject, { object: nextChat, target: space, hidden: true }));
56
- yield* dispatch(
57
- createIntent(SpaceAction.AddRelation, {
58
- space,
59
- schema: Assistant.CompanionTo,
60
- source: nextChat,
61
- target: data.companionTo,
62
- }),
63
- );
64
- }
65
-
66
- yield* dispatch(createIntent(AssistantAction.SetCurrentChat, { companionTo, chat: nextChat }));
67
- }).pipe(Effect.provide(DatabaseService.layer(space.db)), Effect.runPromise);
68
- }, [space, chat, companionTo]);
69
-
70
- const metadata = useCapabilities(Capabilities.Metadata);
71
- const blueprintKeys = useMemo(
72
- () =>
73
- Function.pipe(
74
- metadata,
75
- Array.findFirst(
76
- (capability): capability is { id: string; metadata: { blueprints?: string[] } } =>
77
- capability.id === Obj.getTypename(companionTo),
78
- ),
79
- Option.flatMap((c) => Option.fromNullable(c.metadata.blueprints)),
80
- Option.getOrElse(() => [] as string[]),
81
- ),
82
- [metadata, companionTo],
83
- );
84
- const existingBlueprints = useQuery(space, Filter.type(Blueprint.Blueprint));
85
- const pluginBlueprints = useMemo(
86
- () => existingBlueprints.filter((blueprint) => blueprintKeys.includes(blueprint.key)),
87
- [existingBlueprints, blueprintKeys],
88
- );
89
-
90
- // Initialize related blueprints that are not already in the space.
91
- useAsyncEffect(async () => {
92
- if (!space) {
93
- return;
94
- }
95
-
96
- // NOTE: This must be run instead of using the useQuery result to avoid duplicates.
97
- const { objects: existingBlueprints } = await space.db.query(Filter.type(Blueprint.Blueprint)).run();
98
- for (const key of blueprintKeys) {
99
- const existingBlueprint = existingBlueprints.find((blueprint) => blueprint.key === key);
100
- if (existingBlueprint) {
101
- continue;
102
- }
103
-
104
- const blueprint = blueprintRegistry.getByKey(key);
105
- if (!blueprint) {
106
- continue;
107
- }
108
-
109
- space.db.add(Obj.clone(blueprint));
110
- }
111
- }, [space, blueprintRegistry, blueprintKeys]);
112
-
113
- useAsyncEffect(async () => {
114
- if (!binder) {
115
- return;
116
- }
117
-
118
- if (pluginBlueprints.length > 0) {
119
- await binder.bind({ blueprints: pluginBlueprints.map((blueprint) => Ref.make(blueprint)) });
120
- }
121
-
122
- if (Obj.instanceOf(Blueprint.Blueprint, companionTo)) {
123
- await binder.bind({ blueprints: [Ref.make(companionTo)] });
124
- } else {
125
- await binder.bind({ objects: [Ref.make(companionTo)] });
126
- }
127
- }, [binder, companionTo, pluginBlueprints]);
128
-
129
- if (!chat) {
130
- return null;
131
- }
132
-
133
- return <ChatContainer role={role} chat={chat} companionTo={companionTo} />;
134
- };
135
-
136
- export default ChatCompanion;
@@ -1,51 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { Capabilities, useCapability } from '@dxos/app-framework';
8
- import { getSpace } from '@dxos/client/echo';
9
- import { type Obj } from '@dxos/echo';
10
- import { StackItem } from '@dxos/react-ui-stack';
11
-
12
- import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../hooks';
13
- import { meta } from '../meta';
14
- import { type Assistant } from '../types';
15
-
16
- import { Chat } from './Chat';
17
- import { ChatToolbar } from './ChatToolbar';
18
-
19
- export type ChatContainerProps = {
20
- chat: Assistant.Chat;
21
- companionTo?: Obj.Any;
22
- role?: string;
23
- };
24
-
25
- export const ChatContainer = ({ chat, companionTo }: ChatContainerProps) => {
26
- const space = getSpace(chat);
27
- const settings = useCapability(Capabilities.SettingsStore).getStore<Assistant.Settings>(meta.id)?.value;
28
- const services = useChatServices({ space, chat });
29
- const [online, setOnline] = useOnline();
30
- const { preset, ...chatProps } = usePresets(online);
31
- const blueprintRegistry = useBlueprintRegistry();
32
- const processor = useChatProcessor({ chat, preset, services, blueprintRegistry, settings });
33
-
34
- if (!processor) {
35
- return null;
36
- }
37
-
38
- return (
39
- <StackItem.Content toolbar>
40
- <ChatToolbar chat={chat} companionTo={companionTo} />
41
- <Chat.Root classNames='container-max-width' chat={chat} processor={processor}>
42
- <Chat.Thread />
43
- <div className='p-2'>
44
- <Chat.Prompt {...chatProps} outline preset={preset?.id} online={online} onOnlineChange={setOnline} />
45
- </div>
46
- </Chat.Root>
47
- </StackItem.Content>
48
- );
49
- };
50
-
51
- export default ChatContainer;
@@ -1,151 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import { type ContentBlock, type DataType } from '@dxos/schema';
6
-
7
- type Reducer<R, I> = (acc: R, value: I, idx: number) => R;
8
-
9
- /**
10
- * Reducer that collapses related message blocks into single messages.
11
- * For example, combines tool request/response pairs into a single message.
12
- *
13
- * Typical order:
14
- * - message 0
15
- * - text
16
- * - message 1
17
- * - text
18
- * - toolCall
19
- * - summary
20
- * - message 2
21
- * - toolResult
22
- * - message 3
23
- * - text
24
- * - summary
25
- *
26
- * Coverts to:
27
- * - message 0
28
- * - text
29
- * - message 1
30
- * - text
31
- * - message 2
32
- * - toolCall
33
- * - toolResult
34
- * - summary
35
- * - message 3
36
- * - text
37
- * - summary
38
- */
39
- export const reduceMessages: Reducer<
40
- {
41
- messages: DataType.Message[];
42
- current?: DataType.Message;
43
- toolBlock?: boolean;
44
- assistantMessages?: DataType.Message[];
45
- },
46
- DataType.Message
47
- > = ({ messages, current, toolBlock, assistantMessages = [] }, message) => {
48
- // Treat tool calls as assistant messages.
49
- let assistant = message?.sender.role === 'assistant';
50
- let i = 0;
51
- for (const block of message.blocks) {
52
- switch (block._tag) {
53
- // TODO(burdon): Preserve call tool title.
54
- case 'toolCall': {
55
- assistant = true;
56
- if (!toolBlock) {
57
- current = {
58
- ...message,
59
- id: [message.id, i++].join('_'),
60
- blocks: [block],
61
- };
62
- messages.push(current);
63
- toolBlock = true;
64
- } else {
65
- current!.blocks.push(block);
66
- }
67
- break;
68
- }
69
-
70
- case 'toolResult': {
71
- assistant = true;
72
- if (toolBlock) {
73
- current!.blocks.push(block);
74
- }
75
- break;
76
- }
77
-
78
- case 'summary': {
79
- assistant = true;
80
- if (toolBlock) {
81
- current!.blocks.push(block);
82
- } else {
83
- const summary = reduceSummary([...assistantMessages, message]);
84
- current!.blocks.push(summary);
85
- }
86
- break;
87
- }
88
-
89
- default: {
90
- assistant = message.sender.role === 'assistant';
91
- current = {
92
- ...message,
93
- id: [message.id, i++].join('_'),
94
- blocks: [block],
95
- };
96
- messages.push(current);
97
- toolBlock = false;
98
- break;
99
- }
100
- }
101
- }
102
-
103
- return {
104
- messages,
105
- current,
106
- toolBlock,
107
- assistantMessages: assistant ? [...assistantMessages, message] : undefined,
108
- };
109
- };
110
-
111
- /**
112
- * Accumulate token counts from all summary blocks in pending messages.
113
- */
114
- const reduceSummary = (messages: DataType.Message[]): ContentBlock.Summary => {
115
- let start: number | undefined;
116
- return messages.reduce<ContentBlock.Summary>(
117
- (acc, msg) => {
118
- const time = new Date(msg.created).getTime();
119
- if (!start) {
120
- start = time;
121
- }
122
- msg.blocks.forEach((block) => {
123
- switch (block._tag) {
124
- case 'toolCall': {
125
- acc.toolCalls = (acc.toolCalls ?? 0) + 1;
126
- break;
127
- }
128
- case 'summary': {
129
- acc.model = block.model;
130
- if (block.usage) {
131
- acc.message = block.message;
132
- acc.usage = {
133
- inputTokens: (acc.usage?.inputTokens ?? 0) + (block.usage.inputTokens ?? 0),
134
- outputTokens: (acc.usage?.outputTokens ?? 0) + (block.usage.outputTokens ?? 0),
135
- totalTokens: (acc.usage?.totalTokens ?? 0) + (block.usage.totalTokens ?? 0),
136
- };
137
- acc.duration = time - (start ?? time);
138
- }
139
- break;
140
- }
141
- }
142
- });
143
-
144
- return acc;
145
- },
146
- {
147
- _tag: 'summary',
148
- duration: 0,
149
- } satisfies ContentBlock.Summary,
150
- );
151
- };
@@ -1,23 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React from 'react';
6
-
7
- import { fullyQualifiedId } from '@dxos/react-client/echo';
8
- import { type ThemedClassName } from '@dxos/react-ui';
9
- import { MenuProvider, ToolbarMenu } from '@dxos/react-ui-menu';
10
-
11
- import { type ChatToolbarActionsProps, useChatToolbarActions } from './useChatToolbarActions';
12
-
13
- export type ChatToolbarProps = ThemedClassName<ChatToolbarActionsProps>;
14
-
15
- export const ChatToolbar = ({ chat, companionTo, onReset, classNames }: ChatToolbarProps) => {
16
- const menu = useChatToolbarActions({ chat, companionTo, onReset });
17
-
18
- return (
19
- <MenuProvider {...menu} attendableId={companionTo ? fullyQualifiedId(companionTo) : fullyQualifiedId(chat)}>
20
- <ToolbarMenu classNames={classNames} textBlockWidth />
21
- </MenuProvider>
22
- );
23
- };