@dxos/plugin-assistant 0.8.4-main.67995b8 → 0.8.4-main.6fa680abb7

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 (611) hide show
  1. package/dist/lib/browser/AssistantSettings-PP6JSHWB.mjs +93 -0
  2. package/dist/lib/browser/AssistantSettings-PP6JSHWB.mjs.map +7 -0
  3. package/dist/lib/browser/BlueprintArticle-H6R33TZZ.mjs +35 -0
  4. package/dist/lib/browser/BlueprintArticle-H6R33TZZ.mjs.map +7 -0
  5. package/dist/lib/browser/ChatCompanion-GXS6DK4X.mjs +202 -0
  6. package/dist/lib/browser/ChatCompanion-GXS6DK4X.mjs.map +7 -0
  7. package/dist/lib/browser/ChatContainer-SMSZXEF5.mjs +12 -0
  8. package/dist/lib/browser/ChatContainer-SMSZXEF5.mjs.map +7 -0
  9. package/dist/lib/browser/ChatDialog-ZCVPPONM.mjs +85 -0
  10. package/dist/lib/browser/ChatDialog-ZCVPPONM.mjs.map +7 -0
  11. package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs +91 -0
  12. package/dist/lib/browser/ProjectArticle-QDBTIFNE.mjs.map +7 -0
  13. package/dist/lib/browser/ProjectSettings-L5MCDUXK.mjs +232 -0
  14. package/dist/lib/browser/ProjectSettings-L5MCDUXK.mjs.map +7 -0
  15. package/dist/lib/browser/PromptArticle-G5YSAEGK.mjs +71 -0
  16. package/dist/lib/browser/PromptArticle-G5YSAEGK.mjs.map +7 -0
  17. package/dist/lib/browser/TriggerStatus-X35WDCK5.mjs +112 -0
  18. package/dist/lib/browser/TriggerStatus-X35WDCK5.mjs.map +7 -0
  19. package/dist/lib/browser/ai-service-CY2BYPH6.mjs +22 -0
  20. package/dist/lib/browser/ai-service-CY2BYPH6.mjs.map +7 -0
  21. package/dist/lib/browser/app-graph-builder-ECQCWGCN.mjs +224 -0
  22. package/dist/lib/browser/app-graph-builder-ECQCWGCN.mjs.map +7 -0
  23. package/dist/lib/browser/blueprint-definition-CKG4TQ2J.mjs +35 -0
  24. package/dist/lib/browser/blueprint-definition-CKG4TQ2J.mjs.map +7 -0
  25. package/dist/lib/browser/blueprints/index.mjs +8 -0
  26. package/dist/lib/browser/blueprints/index.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-2VIEX4RA.mjs +23 -0
  28. package/dist/lib/browser/chunk-2VIEX4RA.mjs.map +7 -0
  29. package/dist/lib/browser/chunk-734CB3XG.mjs +230 -0
  30. package/dist/lib/browser/chunk-734CB3XG.mjs.map +7 -0
  31. package/dist/lib/browser/chunk-A346P45I.mjs +2125 -0
  32. package/dist/lib/browser/chunk-A346P45I.mjs.map +7 -0
  33. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  34. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  35. package/dist/lib/browser/chunk-JYY5AD65.mjs +286 -0
  36. package/dist/lib/browser/chunk-JYY5AD65.mjs.map +7 -0
  37. package/dist/lib/browser/chunk-WP4WY2Y6.mjs +69 -0
  38. package/dist/lib/browser/chunk-WP4WY2Y6.mjs.map +7 -0
  39. package/dist/lib/browser/chunk-ZZRRSIQQ.mjs +26 -0
  40. package/dist/lib/browser/chunk-ZZRRSIQQ.mjs.map +7 -0
  41. package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs +21 -0
  42. package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs.map +7 -0
  43. package/dist/lib/browser/index.mjs +295 -175
  44. package/dist/lib/browser/index.mjs.map +4 -4
  45. package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs +20 -0
  46. package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs.map +7 -0
  47. package/dist/lib/browser/meta.json +1 -1
  48. package/dist/lib/browser/operation-resolver-DYSWWNVG.mjs +123 -0
  49. package/dist/lib/browser/operation-resolver-DYSWWNVG.mjs.map +7 -0
  50. package/dist/lib/browser/react-surface-M3GSSFPC.mjs +142 -0
  51. package/dist/lib/browser/react-surface-M3GSSFPC.mjs.map +7 -0
  52. package/dist/lib/browser/settings-NC5DQWES.mjs +33 -0
  53. package/dist/lib/browser/settings-NC5DQWES.mjs.map +7 -0
  54. package/dist/lib/browser/state-EMIKHGYZ.mjs +26 -0
  55. package/dist/lib/browser/state-EMIKHGYZ.mjs.map +7 -0
  56. package/dist/lib/browser/toolkit-XRSBBB3L.mjs +16 -0
  57. package/dist/lib/browser/toolkit-XRSBBB3L.mjs.map +7 -0
  58. package/dist/lib/browser/types/index.mjs +11 -4
  59. package/dist/lib/node-esm/AssistantSettings-3MNGBQB2.mjs +94 -0
  60. package/dist/lib/node-esm/AssistantSettings-3MNGBQB2.mjs.map +7 -0
  61. package/dist/lib/node-esm/BlueprintArticle-2KYFUQKY.mjs +36 -0
  62. package/dist/lib/node-esm/BlueprintArticle-2KYFUQKY.mjs.map +7 -0
  63. package/dist/lib/node-esm/ChatCompanion-MPQGSWZB.mjs +203 -0
  64. package/dist/lib/node-esm/ChatCompanion-MPQGSWZB.mjs.map +7 -0
  65. package/dist/lib/node-esm/ChatContainer-DMOAYUUM.mjs +13 -0
  66. package/dist/lib/node-esm/ChatContainer-DMOAYUUM.mjs.map +7 -0
  67. package/dist/lib/node-esm/ChatDialog-PV2EU2XM.mjs +86 -0
  68. package/dist/lib/node-esm/ChatDialog-PV2EU2XM.mjs.map +7 -0
  69. package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs +92 -0
  70. package/dist/lib/node-esm/ProjectArticle-BCIBESJN.mjs.map +7 -0
  71. package/dist/lib/node-esm/ProjectSettings-K3YBQWDD.mjs +233 -0
  72. package/dist/lib/node-esm/ProjectSettings-K3YBQWDD.mjs.map +7 -0
  73. package/dist/lib/node-esm/PromptArticle-HAGZPZWV.mjs +72 -0
  74. package/dist/lib/node-esm/PromptArticle-HAGZPZWV.mjs.map +7 -0
  75. package/dist/lib/node-esm/TriggerStatus-V3QMIE7T.mjs +113 -0
  76. package/dist/lib/node-esm/TriggerStatus-V3QMIE7T.mjs.map +7 -0
  77. package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs +23 -0
  78. package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs.map +7 -0
  79. package/dist/lib/node-esm/app-graph-builder-YPHP6X6W.mjs +225 -0
  80. package/dist/lib/node-esm/app-graph-builder-YPHP6X6W.mjs.map +7 -0
  81. package/dist/lib/node-esm/blueprint-definition-UZWGSFBI.mjs +36 -0
  82. package/dist/lib/node-esm/blueprint-definition-UZWGSFBI.mjs.map +7 -0
  83. package/dist/lib/node-esm/blueprints/index.mjs +9 -0
  84. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  85. package/dist/lib/node-esm/chunk-5DLYAEBK.mjs +2126 -0
  86. package/dist/lib/node-esm/chunk-5DLYAEBK.mjs.map +7 -0
  87. package/dist/lib/node-esm/chunk-AK3JJ76X.mjs +28 -0
  88. package/dist/lib/node-esm/chunk-AK3JJ76X.mjs.map +7 -0
  89. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  90. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  91. package/dist/lib/node-esm/chunk-JMBYVUD6.mjs +288 -0
  92. package/dist/lib/node-esm/chunk-JMBYVUD6.mjs.map +7 -0
  93. package/dist/lib/node-esm/chunk-JQAXFBBU.mjs +231 -0
  94. package/dist/lib/node-esm/chunk-JQAXFBBU.mjs.map +7 -0
  95. package/dist/lib/node-esm/chunk-TEYTGR67.mjs +25 -0
  96. package/dist/lib/node-esm/chunk-TEYTGR67.mjs.map +7 -0
  97. package/dist/lib/node-esm/chunk-ZTL6HRDB.mjs +70 -0
  98. package/dist/lib/node-esm/chunk-ZTL6HRDB.mjs.map +7 -0
  99. package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs +22 -0
  100. package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs.map +7 -0
  101. package/dist/lib/node-esm/index.mjs +295 -175
  102. package/dist/lib/node-esm/index.mjs.map +4 -4
  103. package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs +21 -0
  104. package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs.map +7 -0
  105. package/dist/lib/node-esm/meta.json +1 -1
  106. package/dist/lib/node-esm/operation-resolver-EE4EBO2Y.mjs +124 -0
  107. package/dist/lib/node-esm/operation-resolver-EE4EBO2Y.mjs.map +7 -0
  108. package/dist/lib/node-esm/react-surface-U3PGFTKA.mjs +143 -0
  109. package/dist/lib/node-esm/react-surface-U3PGFTKA.mjs.map +7 -0
  110. package/dist/lib/node-esm/settings-OOAN5LAO.mjs +34 -0
  111. package/dist/lib/node-esm/settings-OOAN5LAO.mjs.map +7 -0
  112. package/dist/lib/node-esm/state-7A7QPQKK.mjs +27 -0
  113. package/dist/lib/node-esm/state-7A7QPQKK.mjs.map +7 -0
  114. package/dist/lib/node-esm/toolkit-5IWGLUF4.mjs +17 -0
  115. package/dist/lib/node-esm/toolkit-5IWGLUF4.mjs.map +7 -0
  116. package/dist/lib/node-esm/types/index.mjs +11 -4
  117. package/dist/types/src/AssistantPlugin.d.ts +2 -1
  118. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  119. package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
  120. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
  121. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
  122. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
  123. package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
  124. package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
  125. package/dist/types/src/blueprints/index.d.ts +2 -0
  126. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/ai-service/ai-service.d.ts +6 -0
  128. package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/ai-service/index.d.ts +3 -0
  130. package/dist/types/src/capabilities/ai-service/index.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  132. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  134. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  135. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
  136. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
  137. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
  138. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
  139. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +7 -0
  140. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +1 -0
  141. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +3 -0
  142. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +1 -0
  143. package/dist/types/src/capabilities/index.d.ts +10 -4
  144. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  145. package/dist/types/src/capabilities/local-model-resolver/index.d.ts +3 -0
  146. package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +1 -0
  147. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +13 -0
  148. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +1 -0
  149. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  150. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  151. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  152. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  153. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  154. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  155. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  156. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  157. package/dist/types/src/capabilities/settings/index.d.ts +15 -0
  158. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  159. package/dist/types/src/capabilities/settings/settings.d.ts +18 -0
  160. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  161. package/dist/types/src/capabilities/state/index.d.ts +11 -0
  162. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  163. package/dist/types/src/capabilities/state/state.d.ts +13 -0
  164. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  165. package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
  166. package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
  167. package/dist/types/src/capabilities/toolkit/toolkit.d.ts +6 -0
  168. package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
  169. package/dist/types/src/components/Chat/Chat.d.ts +39 -22
  170. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  171. package/dist/types/src/components/Chat/events.d.ts +10 -1
  172. package/dist/types/src/components/Chat/events.d.ts.map +1 -1
  173. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
  174. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
  175. package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
  176. package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
  177. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  178. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
  179. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
  180. package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
  181. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +5 -6
  182. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  183. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
  184. package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
  185. package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
  186. package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
  187. package/dist/types/src/components/ChatThread/ChatThread.d.ts +13 -11
  188. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  189. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +318 -56
  190. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  191. package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
  192. package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
  193. package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
  194. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
  195. package/dist/types/src/components/ChatThread/sync.d.ts +42 -0
  196. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
  197. package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
  198. package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
  199. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +2 -6
  200. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  201. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +437 -7
  202. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  203. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +12 -2
  204. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  205. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +434 -2
  206. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  207. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
  208. package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
  209. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
  210. package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
  211. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
  212. package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
  213. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +21 -0
  214. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
  215. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
  216. package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
  217. package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
  218. package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
  219. package/dist/types/src/components/Toolbox/Toolbox.d.ts +10 -16
  220. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  221. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +438 -5
  222. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  223. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +12 -0
  224. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -0
  225. package/dist/types/src/components/Typewriter/Typewriter.d.ts +11 -0
  226. package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -0
  227. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +7 -0
  228. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -0
  229. package/dist/types/src/components/Typewriter/assistant-extension.d.ts +5 -0
  230. package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +1 -0
  231. package/dist/types/src/components/Typewriter/index.d.ts +2 -0
  232. package/dist/types/src/components/Typewriter/index.d.ts.map +1 -0
  233. package/dist/types/src/components/index.d.ts +0 -8
  234. package/dist/types/src/components/index.d.ts.map +1 -1
  235. package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts +8 -0
  236. package/dist/types/src/containers/AssistantSettings/AssistantSettings.d.ts.map +1 -0
  237. package/dist/types/src/containers/AssistantSettings/index.d.ts +3 -0
  238. package/dist/types/src/containers/AssistantSettings/index.d.ts.map +1 -0
  239. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
  240. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
  241. package/dist/types/src/containers/BlueprintArticle/index.d.ts +3 -0
  242. package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
  243. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +12 -0
  244. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
  245. package/dist/types/src/containers/ChatCompanion/index.d.ts +3 -0
  246. package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
  247. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +19 -0
  248. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
  249. package/dist/types/src/containers/ChatContainer/index.d.ts +3 -0
  250. package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
  251. package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
  252. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
  253. package/dist/types/src/containers/ChatDialog/index.d.ts +3 -0
  254. package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
  255. package/dist/types/src/containers/Project/ProjectArticle.d.ts +7 -0
  256. package/dist/types/src/containers/Project/ProjectArticle.d.ts.map +1 -0
  257. package/dist/types/src/containers/Project/ProjectSettings.d.ts +6 -0
  258. package/dist/types/src/containers/Project/ProjectSettings.d.ts.map +1 -0
  259. package/dist/types/src/containers/Project/index.d.ts +7 -0
  260. package/dist/types/src/containers/Project/index.d.ts.map +1 -0
  261. package/dist/types/src/containers/Project/triggers.d.ts +6 -0
  262. package/dist/types/src/containers/Project/triggers.d.ts.map +1 -0
  263. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +6 -0
  264. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
  265. package/dist/types/src/containers/PromptArticle/index.d.ts +3 -0
  266. package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
  267. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +4 -0
  268. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
  269. package/dist/types/src/containers/TriggerStatus/index.d.ts +3 -0
  270. package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
  271. package/dist/types/src/containers/index.d.ts +10 -0
  272. package/dist/types/src/containers/index.d.ts.map +1 -0
  273. package/dist/types/src/hooks/index.d.ts +8 -3
  274. package/dist/types/src/hooks/index.d.ts.map +1 -1
  275. package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
  276. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
  277. package/dist/types/src/hooks/useChatProcessor.d.ts +10 -20
  278. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  279. package/dist/types/src/hooks/useChatServices.d.ts +7 -8
  280. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  281. package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
  282. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
  283. package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
  284. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
  285. package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
  286. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
  287. package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
  288. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
  289. package/dist/types/src/hooks/useFlush.d.ts +6 -0
  290. package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
  291. package/dist/types/src/hooks/useOnline.d.ts +3 -0
  292. package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
  293. package/dist/types/src/hooks/usePresets.d.ts +7 -0
  294. package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
  295. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  296. package/dist/types/src/index.d.ts +3 -1
  297. package/dist/types/src/index.d.ts.map +1 -1
  298. package/dist/types/src/meta.d.ts +3 -4
  299. package/dist/types/src/meta.d.ts.map +1 -1
  300. package/dist/types/src/processor/index.d.ts +4 -0
  301. package/dist/types/src/processor/index.d.ts.map +1 -0
  302. package/dist/types/src/{hooks → processor}/presets.d.ts +3 -3
  303. package/dist/types/src/processor/presets.d.ts.map +1 -0
  304. package/dist/types/src/processor/processor.d.ts +79 -0
  305. package/dist/types/src/processor/processor.d.ts.map +1 -0
  306. package/dist/types/src/processor/processor.test.d.ts +2 -0
  307. package/dist/types/src/processor/processor.test.d.ts.map +1 -0
  308. package/dist/types/src/processor/update-name.d.ts +10 -0
  309. package/dist/types/src/processor/update-name.d.ts.map +1 -0
  310. package/dist/types/src/queue-logger.d.ts.map +1 -1
  311. package/dist/types/src/testing/index.d.ts +1 -1
  312. package/dist/types/src/testing/index.d.ts.map +1 -1
  313. package/dist/types/src/testing/test-generator.d.ts +8 -0
  314. package/dist/types/src/testing/test-generator.d.ts.map +1 -0
  315. package/dist/types/src/testing/test-sequence.d.ts +0 -4
  316. package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
  317. package/dist/types/src/testing/test-services.d.ts +2 -2
  318. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  319. package/dist/types/src/translations.d.ts +382 -28
  320. package/dist/types/src/translations.d.ts.map +1 -1
  321. package/dist/types/src/types/Assistant.d.ts +20 -0
  322. package/dist/types/src/types/Assistant.d.ts.map +1 -0
  323. package/dist/types/src/types/AssistantAction.d.ts +93 -0
  324. package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
  325. package/dist/types/src/types/capabilities.d.ts +33 -0
  326. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  327. package/dist/types/src/types/defs.d.ts +2 -0
  328. package/dist/types/src/types/defs.d.ts.map +1 -0
  329. package/dist/types/src/types/events.d.ts +5 -0
  330. package/dist/types/src/types/events.d.ts.map +1 -0
  331. package/dist/types/src/types/index.d.ts +6 -1
  332. package/dist/types/src/types/index.d.ts.map +1 -1
  333. package/dist/types/src/types/service.d.ts +14 -213
  334. package/dist/types/src/types/service.d.ts.map +1 -1
  335. package/dist/types/tsconfig.tsbuildinfo +1 -1
  336. package/package.json +127 -100
  337. package/src/AssistantPlugin.tsx +153 -113
  338. package/src/blueprints/assistant/blueprint.conversations.json +1 -0
  339. package/src/blueprints/assistant/blueprint.test.ts +48 -0
  340. package/src/blueprints/assistant/blueprint.ts +27 -0
  341. package/src/blueprints/assistant/index.ts +5 -0
  342. package/src/{components/SequenceEditor → blueprints}/index.ts +1 -1
  343. package/src/capabilities/ai-service/ai-service.ts +30 -0
  344. package/src/capabilities/ai-service/index.ts +7 -0
  345. package/src/capabilities/app-graph-builder/app-graph-builder.ts +197 -0
  346. package/src/capabilities/app-graph-builder/index.ts +7 -0
  347. package/src/capabilities/blueprint-definition/blueprint-definition.ts +50 -0
  348. package/src/capabilities/blueprint-definition/index.ts +7 -0
  349. package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +33 -0
  350. package/src/capabilities/edge-model-resolver/index.ts +7 -0
  351. package/src/capabilities/index.ts +10 -6
  352. package/src/capabilities/local-model-resolver/index.ts +7 -0
  353. package/src/capabilities/local-model-resolver/local-model-resolver.ts +38 -0
  354. package/src/capabilities/operation-resolver/index.ts +7 -0
  355. package/src/capabilities/operation-resolver/operation-resolver.ts +113 -0
  356. package/src/capabilities/react-surface/index.ts +7 -0
  357. package/src/capabilities/react-surface/react-surface.tsx +119 -0
  358. package/src/capabilities/settings/index.ts +7 -0
  359. package/src/capabilities/settings/settings.ts +31 -0
  360. package/src/capabilities/state/index.ts +7 -0
  361. package/src/capabilities/state/state.ts +27 -0
  362. package/src/capabilities/toolkit/index.ts +7 -0
  363. package/src/capabilities/toolkit/toolkit.ts +15 -0
  364. package/src/components/Chat/Chat.tsx +278 -198
  365. package/src/components/Chat/events.ts +14 -1
  366. package/src/components/ChatProgress/ChatProgress.tsx +53 -0
  367. package/src/components/ChatProgress/index.ts +5 -0
  368. package/src/components/ChatPrompt/ChatActions.tsx +20 -28
  369. package/src/components/ChatPrompt/ChatOptions.tsx +258 -0
  370. package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
  371. package/src/components/ChatPrompt/ChatReferences.tsx +42 -38
  372. package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
  373. package/src/components/ChatPrompt/index.ts +1 -1
  374. package/src/components/ChatThread/ChatThread.stories.tsx +123 -116
  375. package/src/components/ChatThread/ChatThread.tsx +75 -36
  376. package/src/components/ChatThread/Link.tsx +26 -0
  377. package/src/components/ChatThread/registry.tsx +207 -0
  378. package/src/components/ChatThread/sync.test.ts +99 -0
  379. package/src/components/ChatThread/sync.ts +160 -0
  380. package/src/components/ChatThread/testing/thread.md +37 -0
  381. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +39 -18
  382. package/src/components/TemplateEditor/TemplateEditor.tsx +33 -54
  383. package/src/components/TemplateEditor/TemplateForm.stories.tsx +28 -15
  384. package/src/components/TemplateEditor/TemplateForm.tsx +84 -36
  385. package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
  386. package/src/components/TemplateEditor/extensions/index.ts +6 -0
  387. package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
  388. package/src/components/ToolBlock/ToolBlock.tsx +143 -0
  389. package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
  390. package/src/components/ToolBlock/index.ts +6 -0
  391. package/src/components/Toolbox/Toolbox.stories.tsx +19 -29
  392. package/src/components/Toolbox/Toolbox.tsx +74 -104
  393. package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
  394. package/src/components/Typewriter/Typewriter.stories.tsx +86 -0
  395. package/src/components/Typewriter/Typewriter.tsx +54 -0
  396. package/src/components/Typewriter/assistant-extension.tsx +142 -0
  397. package/src/components/Typewriter/index.ts +5 -0
  398. package/src/components/index.ts +0 -13
  399. package/src/containers/AssistantSettings/AssistantSettings.tsx +120 -0
  400. package/src/containers/AssistantSettings/index.ts +7 -0
  401. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
  402. package/src/containers/BlueprintArticle/index.ts +7 -0
  403. package/src/containers/ChatCompanion/ChatCompanion.tsx +225 -0
  404. package/src/containers/ChatCompanion/index.ts +7 -0
  405. package/src/containers/ChatContainer/ChatContainer.tsx +69 -0
  406. package/src/containers/ChatContainer/index.ts +7 -0
  407. package/src/containers/ChatDialog/ChatDialog.tsx +72 -0
  408. package/src/containers/ChatDialog/index.ts +7 -0
  409. package/src/containers/Project/ProjectArticle.tsx +117 -0
  410. package/src/containers/Project/ProjectSettings.tsx +134 -0
  411. package/src/containers/Project/index.ts +16 -0
  412. package/src/containers/Project/triggers.ts +149 -0
  413. package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
  414. package/src/containers/PromptArticle/index.ts +7 -0
  415. package/src/containers/TriggerStatus/TriggerStatus.tsx +140 -0
  416. package/src/containers/TriggerStatus/index.ts +7 -0
  417. package/src/containers/index.ts +15 -0
  418. package/src/hooks/index.ts +8 -4
  419. package/src/hooks/useBlueprintRegistry.ts +108 -0
  420. package/src/hooks/useChatProcessor.ts +40 -105
  421. package/src/hooks/useChatServices.ts +31 -51
  422. package/src/hooks/useChatToolbarActions.ts +122 -0
  423. package/src/hooks/useContextBinder.ts +32 -0
  424. package/src/hooks/useContextObjects.ts +46 -0
  425. package/src/hooks/useFilteredTypes.ts +37 -0
  426. package/src/hooks/useFlush.ts +35 -0
  427. package/src/hooks/useOnline.ts +10 -0
  428. package/src/hooks/usePresets.ts +44 -0
  429. package/src/hooks/useReferencesProvider.ts +12 -13
  430. package/src/index.ts +3 -1
  431. package/src/meta.ts +11 -8
  432. package/src/processor/index.ts +7 -0
  433. package/src/{hooks → processor}/presets.ts +16 -8
  434. package/src/processor/processor.test.ts +73 -0
  435. package/src/processor/processor.ts +296 -0
  436. package/src/processor/update-name.ts +58 -0
  437. package/src/queue-logger.ts +17 -18
  438. package/src/testing/index.ts +1 -1
  439. package/src/testing/test-generator.ts +262 -0
  440. package/src/testing/test-sequence.ts +5 -30
  441. package/src/testing/test-services.ts +10 -14
  442. package/src/translations.ts +77 -20
  443. package/src/types/Assistant.ts +28 -0
  444. package/src/types/AssistantAction.ts +76 -0
  445. package/src/types/capabilities.ts +27 -0
  446. package/src/types/defs.ts +5 -0
  447. package/src/types/events.ts +11 -0
  448. package/src/types/index.ts +9 -1
  449. package/src/types/service.ts +27 -16
  450. package/src/vite-env.d.ts +30 -0
  451. package/dist/lib/browser/BlueprintContainer-IZ4AK5EO.mjs +0 -28
  452. package/dist/lib/browser/BlueprintContainer-IZ4AK5EO.mjs.map +0 -7
  453. package/dist/lib/browser/ChatContainer-RP3QEXYX.mjs +0 -54
  454. package/dist/lib/browser/ChatContainer-RP3QEXYX.mjs.map +0 -7
  455. package/dist/lib/browser/ChatDialog-ZVLXFHEY.mjs +0 -72
  456. package/dist/lib/browser/ChatDialog-ZVLXFHEY.mjs.map +0 -7
  457. package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs +0 -162
  458. package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
  459. package/dist/lib/browser/app-graph-builder-XSEOKJLG.mjs +0 -164
  460. package/dist/lib/browser/app-graph-builder-XSEOKJLG.mjs.map +0 -7
  461. package/dist/lib/browser/chunk-63GG6U6D.mjs +0 -2226
  462. package/dist/lib/browser/chunk-63GG6U6D.mjs.map +0 -7
  463. package/dist/lib/browser/chunk-7W7LHTRH.mjs +0 -171
  464. package/dist/lib/browser/chunk-7W7LHTRH.mjs.map +0 -7
  465. package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
  466. package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
  467. package/dist/lib/browser/chunk-KFXSBNZR.mjs +0 -89
  468. package/dist/lib/browser/chunk-KFXSBNZR.mjs.map +0 -7
  469. package/dist/lib/browser/chunk-LERGF5YG.mjs +0 -108
  470. package/dist/lib/browser/chunk-LERGF5YG.mjs.map +0 -7
  471. package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs +0 -75
  472. package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs.map +0 -7
  473. package/dist/lib/browser/react-surface-3GYEHQRP.mjs +0 -150
  474. package/dist/lib/browser/react-surface-3GYEHQRP.mjs.map +0 -7
  475. package/dist/lib/browser/settings-5GTTCVGD.mjs +0 -22
  476. package/dist/lib/browser/settings-5GTTCVGD.mjs.map +0 -7
  477. package/dist/lib/node-esm/BlueprintContainer-RGTMNLNX.mjs +0 -29
  478. package/dist/lib/node-esm/BlueprintContainer-RGTMNLNX.mjs.map +0 -7
  479. package/dist/lib/node-esm/ChatContainer-W3W6FWV3.mjs +0 -55
  480. package/dist/lib/node-esm/ChatContainer-W3W6FWV3.mjs.map +0 -7
  481. package/dist/lib/node-esm/ChatDialog-QW4JRKVO.mjs +0 -73
  482. package/dist/lib/node-esm/ChatDialog-QW4JRKVO.mjs.map +0 -7
  483. package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs +0 -163
  484. package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
  485. package/dist/lib/node-esm/app-graph-builder-PANCJUHV.mjs +0 -165
  486. package/dist/lib/node-esm/app-graph-builder-PANCJUHV.mjs.map +0 -7
  487. package/dist/lib/node-esm/chunk-BFO3KHYL.mjs +0 -2227
  488. package/dist/lib/node-esm/chunk-BFO3KHYL.mjs.map +0 -7
  489. package/dist/lib/node-esm/chunk-MS3PJARN.mjs +0 -109
  490. package/dist/lib/node-esm/chunk-MS3PJARN.mjs.map +0 -7
  491. package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
  492. package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
  493. package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs +0 -90
  494. package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs.map +0 -7
  495. package/dist/lib/node-esm/chunk-Z7PUODRT.mjs +0 -172
  496. package/dist/lib/node-esm/chunk-Z7PUODRT.mjs.map +0 -7
  497. package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs +0 -76
  498. package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs.map +0 -7
  499. package/dist/lib/node-esm/react-surface-QDQWJ7FZ.mjs +0 -151
  500. package/dist/lib/node-esm/react-surface-QDQWJ7FZ.mjs.map +0 -7
  501. package/dist/lib/node-esm/settings-J2EXEM5H.mjs +0 -23
  502. package/dist/lib/node-esm/settings-J2EXEM5H.mjs.map +0 -7
  503. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  504. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  505. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  506. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  507. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  508. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  509. package/dist/types/src/capabilities/settings.d.ts +0 -4
  510. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  511. package/dist/types/src/capability-definitions.d.ts +0 -7
  512. package/dist/types/src/capability-definitions.d.ts.map +0 -1
  513. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +0 -6
  514. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +0 -1
  515. package/dist/types/src/components/AssistantSettings/index.d.ts +0 -2
  516. package/dist/types/src/components/AssistantSettings/index.d.ts.map +0 -1
  517. package/dist/types/src/components/BlueprintContainer.d.ts +0 -8
  518. package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
  519. package/dist/types/src/components/ChatContainer.d.ts +0 -11
  520. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  521. package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
  522. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
  523. package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
  524. package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
  525. package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
  526. package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
  527. package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
  528. package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
  529. package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
  530. package/dist/types/src/components/PromptSettings.d.ts +0 -6
  531. package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
  532. package/dist/types/src/components/SequenceContainer.d.ts +0 -8
  533. package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
  534. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
  535. package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
  536. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -8
  537. package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
  538. package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
  539. package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
  540. package/dist/types/src/events.d.ts +0 -4
  541. package/dist/types/src/events.d.ts.map +0 -1
  542. package/dist/types/src/hooks/chat-processor.d.ts +0 -86
  543. package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
  544. package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
  545. package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
  546. package/dist/types/src/hooks/presets.d.ts.map +0 -1
  547. package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
  548. package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
  549. package/dist/types/src/parser/filter-generator.d.ts +0 -4
  550. package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
  551. package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
  552. package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
  553. package/dist/types/src/parser/index.d.ts +0 -4
  554. package/dist/types/src/parser/index.d.ts.map +0 -1
  555. package/dist/types/src/parser/query-parser.d.ts +0 -15
  556. package/dist/types/src/parser/query-parser.d.ts.map +0 -1
  557. package/dist/types/src/parser/query-parser.test.d.ts +0 -2
  558. package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
  559. package/dist/types/src/parser/types.d.ts +0 -24
  560. package/dist/types/src/parser/types.d.ts.map +0 -1
  561. package/dist/types/src/stories/Chat.stories.d.ts +0 -207
  562. package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
  563. package/dist/types/src/testing/test-functions.d.ts +0 -3
  564. package/dist/types/src/testing/test-functions.d.ts.map +0 -1
  565. package/dist/types/src/tools/function.d.ts +0 -5
  566. package/dist/types/src/tools/function.d.ts.map +0 -1
  567. package/dist/types/src/tools/index.d.ts +0 -3
  568. package/dist/types/src/tools/index.d.ts.map +0 -1
  569. package/dist/types/src/tools/openapi.d.ts +0 -10
  570. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  571. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  572. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  573. package/dist/types/src/types/schema.d.ts +0 -120
  574. package/dist/types/src/types/schema.d.ts.map +0 -1
  575. package/src/capabilities/app-graph-builder.ts +0 -169
  576. package/src/capabilities/intent-resolver.ts +0 -72
  577. package/src/capabilities/react-surface.tsx +0 -138
  578. package/src/capabilities/settings.ts +0 -19
  579. package/src/capability-definitions.ts +0 -15
  580. package/src/components/AssistantSettings/AssistantSettings.tsx +0 -105
  581. package/src/components/AssistantSettings/index.ts +0 -5
  582. package/src/components/BlueprintContainer.tsx +0 -24
  583. package/src/components/ChatContainer.tsx +0 -45
  584. package/src/components/ChatDialog.tsx +0 -64
  585. package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
  586. package/src/components/ChatThread/ChatMessage.tsx +0 -268
  587. package/src/components/ChatThread/ToolBlock.tsx +0 -121
  588. package/src/components/ChatThread/reducer.ts +0 -52
  589. package/src/components/PromptSettings.tsx +0 -89
  590. package/src/components/SequenceContainer.tsx +0 -132
  591. package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -32
  592. package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
  593. package/src/events.ts +0 -11
  594. package/src/hooks/chat-processor.test.ts +0 -16
  595. package/src/hooks/chat-processor.ts +0 -314
  596. package/src/hooks/useBlueprints.ts +0 -57
  597. package/src/parser/filter-generator.test.ts +0 -32
  598. package/src/parser/filter-generator.ts +0 -81
  599. package/src/parser/index.ts +0 -7
  600. package/src/parser/query-parser.test.ts +0 -139
  601. package/src/parser/query-parser.ts +0 -199
  602. package/src/parser/types.ts +0 -34
  603. package/src/shims.d.ts +0 -8
  604. package/src/stories/Chat.stories.tsx +0 -371
  605. package/src/testing/test-functions.ts +0 -11
  606. package/src/tools/function.ts +0 -46
  607. package/src/tools/index.ts +0 -6
  608. package/src/tools/openapi.test.ts +0 -217
  609. package/src/tools/openapi.ts +0 -338
  610. package/src/types/schema.ts +0 -108
  611. package/src/typings.d.ts +0 -9
@@ -2,62 +2,97 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type Schema } from 'effect';
6
- import React, { Fragment, useEffect } from 'react';
5
+ import type * as Schema from 'effect/Schema';
6
+ import React, { Fragment, useCallback, useEffect } from 'react';
7
7
 
8
8
  import { type Template } from '@dxos/blueprints';
9
+ import { type Obj } from '@dxos/echo';
9
10
  import { Input, Select, useTranslation } from '@dxos/react-ui';
10
- import { attentionSurface, groupBorder, mx } from '@dxos/react-ui-theme';
11
11
  import { isNonNullable } from '@dxos/util';
12
12
 
13
- import { TemplateEditor } from './TemplateEditor';
14
13
  import { meta } from '../../meta';
15
14
 
15
+ import { TemplateEditor } from './TemplateEditor';
16
+
17
+ /**
18
+ * Callback type for mutating template within a parent object's Obj.change context.
19
+ */
20
+ export type TemplateChangeCallback = (mutate: (template: Obj.Mutable<Template.Template>) => void) => void;
21
+
16
22
  export type TemplateFormProps = {
17
23
  id: string;
18
24
  template: Template.Template;
19
25
  schema?: Schema.Schema<any, any, any>;
20
26
  commandEditable?: boolean;
27
+ /**
28
+ * Callback to mutate the template. Should wrap mutations in parent's Obj.change.
29
+ * If not provided, the component is read-only.
30
+ */
31
+ onChange?: TemplateChangeCallback;
21
32
  };
22
33
 
23
- export const TemplateForm = ({ id, template, commandEditable = true }: TemplateFormProps) => {
34
+ export const TemplateForm = ({ id, template, commandEditable = true, onChange }: TemplateFormProps) => {
24
35
  const { t } = useTranslation(meta.id);
25
- usePromptInputs(template);
36
+ usePromptInputs(template, onChange);
37
+
38
+ const handleInputKindChange = useCallback(
39
+ (inputName: string, kind: Template.InputKind) => {
40
+ onChange?.((t) => {
41
+ const input = t.inputs?.find((i) => i?.name === inputName);
42
+ if (input) {
43
+ input.kind = kind;
44
+ }
45
+ });
46
+ },
47
+ [onChange],
48
+ );
49
+
50
+ const handleInputDefaultChange = useCallback(
51
+ (inputName: string, value: string) => {
52
+ onChange?.((t) => {
53
+ const input = t.inputs?.find((i) => i?.name === inputName);
54
+ if (input) {
55
+ input.default = value;
56
+ }
57
+ });
58
+ },
59
+ [onChange],
60
+ );
26
61
 
27
62
  return (
28
- <div className={mx('flex flex-col w-full overflow-hidden gap-4', groupBorder)}>
63
+ <div className='flex flex-col w-full overflow-hidden gap-4'>
29
64
  {/* {commandEditable && (
30
65
  <div className='flex items-center pl-4'>
31
66
  <span className='text-neutral-500'>/</span>
32
67
  <Input.Root>
33
68
  <Input.TextInput
34
69
  placeholder={t('command placeholder')}
35
- classNames='is-full bg-transparent m-2'
70
+ classNames='w-full bg-transparent m-2'
36
71
  value={template.command ?? ''}
37
72
  onChange={(event) => {
38
- template.command = event.target.value.replace(/\w/g, '');
73
+ onChange?.((t) => {
74
+ t.command = event.target.value.replace(/\w/g, '');
75
+ });
39
76
  }}
40
77
  />
41
78
  </Input.Root>
42
79
  </div>
43
80
  )} */}
44
81
 
45
- <TemplateEditor id={id} template={template} classNames={[attentionSurface, 'min-h-[120px]']} />
82
+ <TemplateEditor id={id} template={template} classNames='bg-base-surface min-h-[120px]' />
46
83
 
47
84
  {(template.inputs?.length ?? 0) > 0 && (
48
85
  <div className='grid grid-cols-[10rem_10rem_1fr] gap-1 items-center'>
49
86
  {template.inputs?.filter(isNonNullable).map((input) => (
50
87
  <Fragment key={input.name}>
51
- <div className='pis-3 text-blueText'>{input.name}</div>
88
+ <div className='ps-3 text-blue-text'>{input.name}</div>
52
89
 
53
90
  <Input.Root>
54
91
  <Select.Root
55
92
  value={input.kind}
56
- onValueChange={(kind) => {
57
- input.kind = kind as Template.InputKind;
58
- }}
93
+ onValueChange={(kind) => handleInputKindChange(input.name, kind as Template.InputKind)}
59
94
  >
60
- <Select.TriggerButton placeholder='Type' classNames='is-full' />
95
+ <Select.TriggerButton placeholder='Type' classNames='w-full' />
61
96
  <Select.Portal>
62
97
  <Select.Content>
63
98
  <Select.Viewport>
@@ -67,6 +102,7 @@ export const TemplateForm = ({ id, template, commandEditable = true }: TemplateF
67
102
  </Select.Option>
68
103
  ))}
69
104
  </Select.Viewport>
105
+ <Select.Arrow />
70
106
  </Select.Content>
71
107
  </Select.Portal>
72
108
  </Select.Root>
@@ -78,11 +114,9 @@ export const TemplateForm = ({ id, template, commandEditable = true }: TemplateF
78
114
  <Input.Root>
79
115
  <Input.TextInput
80
116
  placeholder={t('command placeholder')}
81
- classNames='is-full bg-transparent'
117
+ classNames='w-full bg-transparent'
82
118
  value={input.default ?? ''}
83
- onChange={(event) => {
84
- input.default = event.target.value;
85
- }}
119
+ onChange={(event) => handleInputDefaultChange(input.name, event.target.value)}
86
120
  />
87
121
  </Input.Root>
88
122
  </div>
@@ -134,13 +168,14 @@ const inputs: { kind: Template.InputKind; label: string }[] = [
134
168
 
135
169
  export const NAME_REGEXP = /\{\{([\w-]+)\}\}/;
136
170
 
137
- const usePromptInputs = (template: Template.Template) => {
171
+ const usePromptInputs = (template: Template.Template, onChange?: TemplateChangeCallback) => {
138
172
  useEffect(() => {
139
- const text = template.source ?? '';
140
- if (!template.inputs) {
141
- template.inputs = []; // TODO(burdon): Required?
173
+ if (!onChange) {
174
+ return;
142
175
  }
143
176
 
177
+ const text = template.source ?? '';
178
+
144
179
  const regex = new RegExp(NAME_REGEXP, 'g');
145
180
  const variables = new Set<string>([...(text.target?.content.matchAll(regex) ?? [])].map((m) => m[1]));
146
181
 
@@ -159,19 +194,32 @@ const usePromptInputs = (template: Template.Template) => {
159
194
 
160
195
  // Match or create new inputs.
161
196
  const values = unclaimed.values();
162
- missing.forEach((name) => {
163
- const next = values.next().value;
164
- if (next) {
165
- next.name = name;
166
- } else {
167
- template.inputs?.push({ name });
197
+ onChange((t) => {
198
+ if (!t.inputs) {
199
+ t.inputs = [];
168
200
  }
169
- });
170
201
 
171
- // Remove unclaimed (deleted) inputs.
172
- // TODO(burdon): If user types incorrect name value, it will be deleted. Garbage collect?
173
- for (const input of values) {
174
- template.inputs.splice(template.inputs.indexOf(input), 1);
175
- }
176
- }, [template.source]);
202
+ missing.forEach((name) => {
203
+ const next = values.next().value;
204
+ if (next) {
205
+ // Find the input in the mutable draft and update it.
206
+ const inputIndex = t.inputs!.findIndex((i) => i?.name === next.name);
207
+ if (inputIndex !== -1) {
208
+ t.inputs![inputIndex].name = name;
209
+ }
210
+ } else {
211
+ t.inputs!.push({ name });
212
+ }
213
+ });
214
+
215
+ // Remove unclaimed (deleted) inputs.
216
+ // TODO(burdon): If user types incorrect name value, it will be deleted. Garbage collect?
217
+ for (const input of values) {
218
+ const inputIndex = t.inputs!.findIndex((i) => i?.name === input.name);
219
+ if (inputIndex !== -1) {
220
+ t.inputs!.splice(inputIndex, 1);
221
+ }
222
+ }
223
+ });
224
+ }, [template.source, onChange]);
177
225
  };
@@ -0,0 +1,274 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import {
6
+ type CompletionContext,
7
+ type CompletionResult,
8
+ autocompletion,
9
+ completionKeymap,
10
+ } from '@codemirror/autocomplete';
11
+ import { type Extension, RangeSetBuilder } from '@codemirror/state';
12
+ import {
13
+ Decoration,
14
+ type DecorationSet,
15
+ type EditorView,
16
+ ViewPlugin,
17
+ type ViewUpdate,
18
+ WidgetType,
19
+ keymap,
20
+ } from '@codemirror/view';
21
+
22
+ import { Domino, mx } from '@dxos/ui';
23
+
24
+ export type HandlebarsOptions = {};
25
+
26
+ /**
27
+ * Simple Handlebars plugin for CodeMirror.
28
+ * Supports:
29
+ * - Comments: {{! comment }}
30
+ * - Commands: {{#command}} {{/command}}
31
+ * - Variables: {{var}}
32
+ * - Commands with variables: {{#each items}} {{/each}}
33
+ */
34
+ export const handlebars = (_: HandlebarsOptions = {}): Extension => {
35
+ return [
36
+ handlebarsHighlightPlugin,
37
+ autocompletion({
38
+ activateOnTyping: true,
39
+ aboveCursor: true,
40
+ closeOnBlur: true,
41
+ override: [handlebarsCompletions],
42
+ }),
43
+ keymap.of(completionKeymap),
44
+ ];
45
+ };
46
+
47
+ const regex = {
48
+ // {{! comment }}
49
+ comment: /\{\{!\s*[^}]*\}\}/g,
50
+
51
+ // {{var}}
52
+ brackets: /\{\{[^}]*\}\}/g,
53
+
54
+ // {{#command}} {{/command}}
55
+ command: /\{\{[#/]([^}]+)\}\}/g,
56
+
57
+ // {{var}}
58
+ var: /\{\{(?!\s*!)(\w[^}]*)\}\}/g,
59
+
60
+ // @dxn:queue:data:xxx
61
+ dxn: /@?dxn:[\w@:]+/g,
62
+
63
+ // dxos.org/type/xxx
64
+ url: /[\w.-]+\.[\w.-]+\/[\w/]+/g,
65
+ };
66
+
67
+ const tagPadding = 'mx-0.5 px-1 rounded-xs';
68
+
69
+ /**
70
+ * ViewPlugin that decorates Handlebars syntax.
71
+ */
72
+ const handlebarsHighlightPlugin = ViewPlugin.fromClass(
73
+ class {
74
+ decorations: DecorationSet;
75
+
76
+ constructor(view: EditorView) {
77
+ this.decorations = this.buildDecorations(view);
78
+ }
79
+
80
+ update(update: ViewUpdate) {
81
+ if (update.docChanged || update.viewportChanged || update.selectionSet) {
82
+ this.decorations = this.buildDecorations(update.view);
83
+ }
84
+ }
85
+
86
+ // NOTE: Decorations may clash with other extensions (e.g., markdown).
87
+ buildDecorations(view: EditorView) {
88
+ const selection = view.state.selection.main;
89
+ const decorations: Array<{
90
+ from: number;
91
+ to: number;
92
+ decoration: Decoration;
93
+ }> = [];
94
+
95
+ for (const { from, to } of view.visibleRanges) {
96
+ const text = view.state.doc.sliceString(from, to);
97
+
98
+ // Match DXN.
99
+ {
100
+ let match;
101
+ while ((match = regex.dxn.exec(text)) !== null) {
102
+ const start = from + match.index;
103
+ const end = start + match[0].length;
104
+ // Only show widget if selection doesn't overlap with the match range.
105
+ const overlaps = selection.to > start && selection.from <= end;
106
+ if (!overlaps) {
107
+ decorations.push({
108
+ from: start,
109
+ to: end,
110
+ decoration: Decoration.widget({
111
+ widget: new DXNWidget(match[0]),
112
+ }),
113
+ });
114
+ }
115
+ }
116
+ }
117
+
118
+ // Match URLs.
119
+ {
120
+ let match;
121
+ while ((match = regex.url.exec(text)) !== null) {
122
+ const start = from + match.index;
123
+ const end = start + match[0].length;
124
+ decorations.push({
125
+ from: start,
126
+ to: end,
127
+ decoration: Decoration.mark({
128
+ class: mx('dx-tag--blue', tagPadding),
129
+ }),
130
+ });
131
+ }
132
+ }
133
+
134
+ // Match brackets: {{ and }}.
135
+ {
136
+ let match;
137
+ while ((match = regex.brackets.exec(text)) !== null) {
138
+ const start = from + match.index;
139
+ const end = start + match[0].length;
140
+ decorations.push({
141
+ from: start,
142
+ to: end,
143
+ decoration: Decoration.mark({ class: 'text-subdued' }),
144
+ });
145
+ }
146
+ }
147
+
148
+ // Match commands: {{#command}} and {{/command}}.
149
+ {
150
+ let match;
151
+ while ((match = regex.command.exec(text)) !== null) {
152
+ const start = from + match.index + 2;
153
+ let end = start + match[0].length - 4;
154
+ const text = view.state.doc.sliceString(start, end);
155
+ const parts = text.split(/\s+/);
156
+ if (parts.length > 1) {
157
+ const idx = start + parts[0].length;
158
+ decorations.push({
159
+ from: idx,
160
+ to: end,
161
+ decoration: Decoration.mark({ class: 'text-green-text' }),
162
+ });
163
+ end = idx;
164
+ }
165
+ decorations.push({
166
+ from: start,
167
+ to: end,
168
+ decoration: Decoration.mark({ class: 'text-blue-text' }),
169
+ });
170
+ }
171
+ }
172
+
173
+ // Match variables: {{var}}.
174
+ {
175
+ let match;
176
+ while ((match = regex.var.exec(text)) !== null) {
177
+ const start = from + match.index + 2;
178
+ const end = start + match[0].length - 4;
179
+ decorations.push({
180
+ from: start,
181
+ to: end,
182
+ decoration: Decoration.mark({ class: 'text-green-text' }),
183
+ });
184
+ }
185
+ }
186
+ }
187
+
188
+ // Sort decorations by position to satisfy RangeSetBuilder requirements.
189
+ decorations.sort((a, b) => a.from - b.from || a.to - b.to);
190
+
191
+ // Add sorted decorations to builder.
192
+ const builder = new RangeSetBuilder<Decoration>();
193
+ for (const { from, to, decoration } of decorations) {
194
+ builder.add(from, to, decoration);
195
+ }
196
+
197
+ return builder.finish();
198
+ }
199
+ },
200
+ {
201
+ decorations: (v) => v.decorations,
202
+ },
203
+ );
204
+
205
+ class DXNWidget extends WidgetType {
206
+ constructor(private readonly _identifier: string) {
207
+ super();
208
+ }
209
+
210
+ override ignoreEvent() {
211
+ return false;
212
+ }
213
+
214
+ override eq(other: this) {
215
+ return this._identifier === other._identifier;
216
+ }
217
+
218
+ override toDOM() {
219
+ const text = this._identifier
220
+ .split(':')
221
+ .map((part) => {
222
+ const len = 16;
223
+ const plen = 4;
224
+ if (part.length > len) {
225
+ return `[${part.slice(0, plen)}…${part.slice(-plen)}]`;
226
+ }
227
+ return part;
228
+ })
229
+ .join(':');
230
+ return Domino.of('span').classNames(mx('font-mono dx-tag--blue', tagPadding)).text(text).root;
231
+ }
232
+ }
233
+
234
+ // TODO(burdon): Pass in variables.
235
+ const variables = ['this'];
236
+ const commands = ['this', 'each', 'if', 'unless', 'with'];
237
+
238
+ /**
239
+ * Provides completions for Handlebars variables.
240
+ */
241
+ function handlebarsCompletions(context: CompletionContext): CompletionResult | null {
242
+ const match = context.matchBefore(/\{\{[^}]*/);
243
+ if (!match || match.from === match.to) {
244
+ return null;
245
+ }
246
+
247
+ let type = 'variable';
248
+ let text = match.text.slice(2);
249
+ let from = match.from + 2;
250
+ let matches = [];
251
+ if (text.startsWith('#') || text.startsWith('/')) {
252
+ const idx = text.lastIndexOf(' ');
253
+ if (idx !== -1) {
254
+ type = 'variable';
255
+ matches = variables;
256
+ text = text.slice(idx + 1);
257
+ from += idx + 1;
258
+ } else {
259
+ type = 'command';
260
+ text = text.slice(1);
261
+ matches = commands;
262
+ from += 1;
263
+ }
264
+ } else {
265
+ type = 'variable';
266
+ matches = variables;
267
+ }
268
+
269
+ const options = matches.filter((name) => name.startsWith(text)).map((name) => ({ type, label: name }));
270
+ return {
271
+ from,
272
+ options,
273
+ };
274
+ }
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './handlebars-extension';
6
+ export * from './xml-extension';
@@ -0,0 +1,64 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { syntaxTree } from '@codemirror/language';
6
+ import { type Extension, RangeSetBuilder } from '@codemirror/state';
7
+ import { Decoration, type DecorationSet, type EditorView, ViewPlugin, type ViewUpdate } from '@codemirror/view';
8
+
9
+ export type XmlOptions = {};
10
+
11
+ /**
12
+ * XML decorator plugin for CodeMirror.
13
+ * Decorates XML tags with monospace font using the XML language grammar.
14
+ */
15
+ export const xmlDecorator = (_: XmlOptions = {}): Extension => {
16
+ return [xmlDecoratorPlugin];
17
+ };
18
+
19
+ /**
20
+ * ViewPlugin that decorates XML tags using syntax tree.
21
+ */
22
+ const xmlDecoratorPlugin = ViewPlugin.fromClass(
23
+ class {
24
+ decorations: DecorationSet;
25
+
26
+ constructor(view: EditorView) {
27
+ this.decorations = this.buildDecorations(view);
28
+ }
29
+
30
+ update(update: ViewUpdate) {
31
+ if (update.docChanged || update.viewportChanged) {
32
+ this.decorations = this.buildDecorations(update.view);
33
+ }
34
+ }
35
+
36
+ buildDecorations(view: EditorView) {
37
+ const builder = new RangeSetBuilder<Decoration>();
38
+
39
+ for (const { from, to } of view.visibleRanges) {
40
+ syntaxTree(view.state).iterate({
41
+ from,
42
+ to,
43
+ enter: (node) => {
44
+ // Decorate XML elements (opening tags, closing tags, self-closing tags).
45
+ if (
46
+ node.name === 'HTMLTag' ||
47
+ node.name === 'OpenTag' ||
48
+ node.name === 'CloseTag' ||
49
+ node.name === 'SelfClosingTag' ||
50
+ node.name === 'Element'
51
+ ) {
52
+ builder.add(node.from, node.to, Decoration.mark({ class: 'font-mono text-subdued' }));
53
+ }
54
+ },
55
+ });
56
+ }
57
+
58
+ return builder.finish();
59
+ }
60
+ },
61
+ {
62
+ decorations: (v) => v.decorations,
63
+ },
64
+ );
@@ -0,0 +1,143 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import type * as Tool from '@effect/ai/Tool';
6
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
+
8
+ import { useTranslation } from '@dxos/react-ui';
9
+ import { NumericTabs, TextCrawl, TogglePanel, type TogglePanelRootProps } from '@dxos/react-ui-components';
10
+ import { Json } from '@dxos/react-ui-syntax-highlighter';
11
+ import { type ContentBlock, type Message } from '@dxos/types';
12
+ import { type XmlWidgetProps } from '@dxos/ui-editor';
13
+ import { isNonNullable, safeParseJson } from '@dxos/util';
14
+
15
+ import { meta } from '../../meta';
16
+
17
+ export const isToolMessage = (message: Message.Message) => {
18
+ return message.blocks.some((block: ContentBlock.Any) => block._tag === 'toolCall' || block._tag === 'toolResult');
19
+ };
20
+
21
+ export type ToolBlockProps = XmlWidgetProps<{
22
+ blocks: ContentBlock.Any[];
23
+ }>;
24
+
25
+ export const ToolBlock = ({ view, blocks = [] }: ToolBlockProps) => {
26
+ const { t } = useTranslation(meta.id);
27
+
28
+ const items = useMemo<ToolPanelProps['items']>(() => {
29
+ let lastToolCall: { tool: Tool.Any | undefined; block: ContentBlock.ToolCall } | undefined;
30
+ // TODO(burdon): Get from context?
31
+ const tools: Tool.Any[] = []; //processor.conversation.toolkit?.tools ?? [];
32
+ return blocks
33
+ .filter((block) => block._tag === 'toolCall' || block._tag === 'toolResult' || block._tag === 'stats')
34
+ .map((block) => {
35
+ switch (block._tag) {
36
+ case 'toolCall': {
37
+ if (block.pending && lastToolCall?.block.toolCallId === block.toolCallId) {
38
+ return null;
39
+ }
40
+
41
+ const tool = tools.find((tool) => tool.name === block.name);
42
+ lastToolCall = { tool, block };
43
+ return {
44
+ title: tool?.description ?? [t('tool call label'), tool?.name].join(' '),
45
+ content: {
46
+ ...block,
47
+ input: safeParseJson(block.input),
48
+ },
49
+ };
50
+ }
51
+
52
+ case 'toolResult': {
53
+ // TODO(burdon): Parse error type.
54
+ if (block.error) {
55
+ return {
56
+ title: t('tool error label'),
57
+ content: block,
58
+ };
59
+ }
60
+
61
+ const title =
62
+ lastToolCall?.tool?.description ?? [t('tool result label'), lastToolCall?.tool?.name].join(' ');
63
+ lastToolCall = undefined;
64
+ return {
65
+ title,
66
+ content: {
67
+ ...block,
68
+ result: safeParseJson(block.result),
69
+ },
70
+ };
71
+ }
72
+
73
+ case 'stats': {
74
+ if (!lastToolCall) {
75
+ return null;
76
+ }
77
+
78
+ return {
79
+ title: t('stats label'),
80
+ content: block,
81
+ };
82
+ }
83
+ }
84
+ })
85
+ .filter(isNonNullable);
86
+ }, [blocks]);
87
+
88
+ const handleChangeOpen = useCallback(() => {
89
+ setTimeout(() => {
90
+ // Measure after animation.
91
+ view?.requestMeasure();
92
+ }, 1_000);
93
+ }, [view]);
94
+
95
+ if (!items.length) {
96
+ return null;
97
+ }
98
+
99
+ return <ToolPanel items={items} onChangeOpen={handleChangeOpen} />;
100
+ };
101
+
102
+ ToolBlock.displayName = 'ToolBlock';
103
+
104
+ type ToolPanelProps = {
105
+ items: { title: string; content: any }[];
106
+ } & Pick<TogglePanelRootProps, 'onChangeOpen'>;
107
+
108
+ export const ToolPanel = ({ items, onChangeOpen }: ToolPanelProps) => {
109
+ const tabsRef = useRef<HTMLDivElement>(null);
110
+ const [selected, setSelected] = useState(0);
111
+ const [open, setOpen] = useState(false);
112
+
113
+ useEffect(() => {
114
+ onChangeOpen?.(open);
115
+ if (open) {
116
+ tabsRef.current?.focus();
117
+ }
118
+ }, [open, onChangeOpen]);
119
+
120
+ const handleSelect = useCallback((index: number) => {
121
+ setSelected(index);
122
+ }, []);
123
+
124
+ return (
125
+ <TogglePanel.Root classNames='mt-2 w-full rounded-xs' open={open} onChangeOpen={setOpen}>
126
+ <TogglePanel.Header classNames='text-sm text-placeholder'>
127
+ <TextCrawl key='status-roll' lines={items.map((item) => item.title)} autoAdvance greedy />
128
+ </TogglePanel.Header>
129
+ <TogglePanel.Content classNames='grid grid-cols-[32px_1fr]'>
130
+ <NumericTabs ref={tabsRef} classNames='p-1' length={items.length} selected={selected} onSelect={handleSelect} />
131
+ <Json
132
+ data={items[selected]?.content}
133
+ classNames='p-1 text-xs bg-transparent'
134
+ replacer={{
135
+ maxDepth: 3,
136
+ maxArrayLen: 10,
137
+ maxStringLen: 128,
138
+ }}
139
+ />
140
+ </TogglePanel.Content>
141
+ </TogglePanel.Root>
142
+ );
143
+ };
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export const ToolBlockWidget = () => {};
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './ToolBlock';
6
+ export * from './ToolBlockWidget';