@dxos/plugin-assistant 0.8.4-main.937b3ca → 0.8.4-main.9be5663bfe

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 (607) hide show
  1. package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs +97 -0
  2. package/dist/lib/browser/AssistantSettings-7QMO3LGF.mjs.map +7 -0
  3. package/dist/lib/browser/blueprints/index.mjs +3 -7
  4. package/dist/lib/browser/chunk-ATHYBVGN.mjs +176 -0
  5. package/dist/lib/browser/chunk-ATHYBVGN.mjs.map +7 -0
  6. package/dist/lib/browser/chunk-EZRS3J25.mjs +30 -0
  7. package/dist/lib/browser/chunk-EZRS3J25.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/create-chat-LBZHGVSN.mjs +82 -0
  11. package/dist/lib/browser/create-chat-LBZHGVSN.mjs.map +7 -0
  12. package/dist/lib/browser/ensure-companion-chat-FR4AWZ2P.mjs +65 -0
  13. package/dist/lib/browser/ensure-companion-chat-FR4AWZ2P.mjs.map +7 -0
  14. package/dist/lib/browser/index.mjs +3163 -245
  15. package/dist/lib/browser/index.mjs.map +4 -4
  16. package/dist/lib/browser/meta.json +1 -1
  17. package/dist/lib/browser/on-create-space-54RNX5JI.mjs +22 -0
  18. package/dist/lib/browser/on-create-space-54RNX5JI.mjs.map +7 -0
  19. package/dist/lib/browser/operations/index.mjs +13 -0
  20. package/dist/lib/browser/operations/index.mjs.map +7 -0
  21. package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs +22 -0
  22. package/dist/lib/browser/resolve-navigation-targets-NZOD66NY.mjs.map +7 -0
  23. package/dist/lib/browser/run-prompt-in-new-chat-4YQ37XIS.mjs +136 -0
  24. package/dist/lib/browser/run-prompt-in-new-chat-4YQ37XIS.mjs.map +7 -0
  25. package/dist/lib/browser/set-current-chat-WJI3WAVM.mjs +54 -0
  26. package/dist/lib/browser/set-current-chat-WJI3WAVM.mjs.map +7 -0
  27. package/dist/lib/browser/types/index.mjs +1 -4
  28. package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs +71 -0
  29. package/dist/lib/browser/update-chat-name-3Y36KFAS.mjs.map +7 -0
  30. package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs +98 -0
  31. package/dist/lib/node-esm/AssistantSettings-UVUTKO7E.mjs.map +7 -0
  32. package/dist/lib/node-esm/blueprints/index.mjs +3 -7
  33. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +32 -0
  34. package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs +177 -0
  36. package/dist/lib/node-esm/chunk-PXAJSTGZ.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-PY4X6FJT.mjs +155 -0
  38. package/dist/lib/node-esm/chunk-PY4X6FJT.mjs.map +7 -0
  39. package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs +83 -0
  40. package/dist/lib/node-esm/create-chat-3BEG4R6J.mjs.map +7 -0
  41. package/dist/lib/node-esm/ensure-companion-chat-BLP7NT32.mjs +66 -0
  42. package/dist/lib/node-esm/ensure-companion-chat-BLP7NT32.mjs.map +7 -0
  43. package/dist/lib/node-esm/index.mjs +3163 -245
  44. package/dist/lib/node-esm/index.mjs.map +4 -4
  45. package/dist/lib/node-esm/meta.json +1 -1
  46. package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs +23 -0
  47. package/dist/lib/node-esm/on-create-space-YRPZ6HZY.mjs.map +7 -0
  48. package/dist/lib/node-esm/operations/index.mjs +14 -0
  49. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  50. package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs +23 -0
  51. package/dist/lib/node-esm/resolve-navigation-targets-3PPK7XLH.mjs.map +7 -0
  52. package/dist/lib/node-esm/run-prompt-in-new-chat-2IJBSDTM.mjs +137 -0
  53. package/dist/lib/node-esm/run-prompt-in-new-chat-2IJBSDTM.mjs.map +7 -0
  54. package/dist/lib/node-esm/set-current-chat-KBMMZULR.mjs +55 -0
  55. package/dist/lib/node-esm/set-current-chat-KBMMZULR.mjs.map +7 -0
  56. package/dist/lib/node-esm/types/index.mjs +1 -4
  57. package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs +72 -0
  58. package/dist/lib/node-esm/update-chat-name-HM2P4NSI.mjs.map +7 -0
  59. package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
  60. package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
  61. package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
  62. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
  63. package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
  64. package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
  65. package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
  66. package/dist/types/src/blueprints/index.d.ts +1 -6
  67. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  68. package/dist/types/src/capabilities/ai-service.d.ts +6 -0
  69. package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
  70. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  71. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  72. package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
  73. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  74. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
  75. package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
  76. package/dist/types/src/capabilities/edge-model-resolver.d.ts +7 -0
  77. package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
  78. package/dist/types/src/capabilities/index.d.ts +41 -11
  79. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  80. package/dist/types/src/capabilities/local-model-resolver.d.ts +13 -0
  81. package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
  82. package/dist/types/src/capabilities/markdown.d.ts +5 -0
  83. package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
  84. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  85. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  86. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  87. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  88. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  89. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  90. package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +4 -3
  91. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  92. package/dist/types/src/capabilities/state.d.ts +21 -0
  93. package/dist/types/src/capabilities/state.d.ts.map +1 -0
  94. package/dist/types/src/capabilities/toolkit.d.ts +6 -0
  95. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  96. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -6
  97. package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
  98. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +553 -0
  99. package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
  100. package/dist/types/src/components/AssistantSettings/index.d.ts +1 -1
  101. package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
  102. package/dist/types/src/components/Chat/Chat.d.ts +15 -11
  103. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
  104. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +6 -3
  105. package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -1
  106. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts +2 -1
  107. package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
  108. package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
  109. package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
  110. package/dist/types/src/components/ChatThread/ChatThread.d.ts +3 -3
  111. package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
  112. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +535 -303
  113. package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
  114. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts +573 -0
  115. package/dist/types/src/components/ChatThread/MarkdownStream.stories.d.ts.map +1 -0
  116. package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
  117. package/dist/types/src/components/ChatThread/sync.d.ts +6 -5
  118. package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
  119. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts +18 -0
  120. package/dist/types/src/components/ChatThread/tool-widget-state.d.ts.map +1 -0
  121. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts +2 -0
  122. package/dist/types/src/components/ChatThread/tool-widget-state.test.d.ts.map +1 -0
  123. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts +8 -0
  124. package/dist/types/src/components/ChatThread/widgets/FallbackWidget.d.ts.map +1 -0
  125. package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts +14 -0
  126. package/dist/types/src/components/ChatThread/widgets/PromptWidget.d.ts.map +1 -0
  127. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts +25 -0
  128. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.d.ts.map +1 -0
  129. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts +18 -0
  130. package/dist/types/src/components/ChatThread/widgets/ReasoningWidget.stories.d.ts.map +1 -0
  131. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts +9 -0
  132. package/dist/types/src/components/ChatThread/widgets/ReferenceWidget.d.ts.map +1 -0
  133. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts +14 -0
  134. package/dist/types/src/components/ChatThread/widgets/SelectWidget.d.ts.map +1 -0
  135. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts +12 -0
  136. package/dist/types/src/components/ChatThread/widgets/StatsWidget.d.ts.map +1 -0
  137. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts +25 -0
  138. package/dist/types/src/components/ChatThread/widgets/StatusWidget.d.ts.map +1 -0
  139. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts +11 -0
  140. package/dist/types/src/components/ChatThread/widgets/SuggestionWidget.d.ts.map +1 -0
  141. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts +5 -0
  142. package/dist/types/src/components/ChatThread/widgets/SummaryWidget.d.ts.map +1 -0
  143. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts +9 -0
  144. package/dist/types/src/components/ChatThread/widgets/ToolWidget.d.ts.map +1 -0
  145. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts +553 -0
  146. package/dist/types/src/components/ChatThread/widgets/ToolWidget.stories.d.ts.map +1 -0
  147. package/dist/types/src/components/ChatThread/widgets/index.d.ts +11 -0
  148. package/dist/types/src/components/ChatThread/widgets/index.d.ts.map +1 -0
  149. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +10 -0
  150. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
  151. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +8 -0
  152. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
  153. package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
  154. package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
  155. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +5 -4
  156. package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
  157. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +529 -295
  158. package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
  159. package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
  160. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +529 -295
  161. package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
  162. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +0 -9
  163. package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
  164. package/dist/types/src/components/Toolbox/Toolbox.d.ts +10 -8
  165. package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
  166. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +529 -295
  167. package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
  168. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +2 -2
  169. package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -1
  170. package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -1
  171. package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -1
  172. package/dist/types/src/components/index.d.ts +3 -12
  173. package/dist/types/src/components/index.d.ts.map +1 -1
  174. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts +6 -0
  175. package/dist/types/src/containers/AgentArticle/AgentArticle.d.ts.map +1 -0
  176. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts +554 -0
  177. package/dist/types/src/containers/AgentArticle/AgentArticle.stories.d.ts.map +1 -0
  178. package/dist/types/src/containers/AgentArticle/index.d.ts +2 -0
  179. package/dist/types/src/containers/AgentArticle/index.d.ts.map +1 -0
  180. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts +6 -0
  181. package/dist/types/src/containers/AgentProperties/AgentProperties.d.ts.map +1 -0
  182. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts +554 -0
  183. package/dist/types/src/containers/AgentProperties/AgentProperties.stories.d.ts.map +1 -0
  184. package/dist/types/src/containers/AgentProperties/index.d.ts +2 -0
  185. package/dist/types/src/containers/AgentProperties/index.d.ts.map +1 -0
  186. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
  187. package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
  188. package/dist/types/src/containers/BlueprintArticle/index.d.ts +2 -0
  189. package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
  190. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +18 -0
  191. package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
  192. package/dist/types/src/containers/ChatCompanion/index.d.ts +2 -0
  193. package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
  194. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +12 -0
  195. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
  196. package/dist/types/src/containers/ChatContainer/index.d.ts +2 -0
  197. package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
  198. package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
  199. package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
  200. package/dist/types/src/containers/ChatDialog/index.d.ts +2 -0
  201. package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
  202. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +6 -0
  203. package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
  204. package/dist/types/src/containers/PromptArticle/index.d.ts +2 -0
  205. package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
  206. package/dist/types/src/containers/PromptList/PromptList.d.ts +6 -0
  207. package/dist/types/src/containers/PromptList/PromptList.d.ts.map +1 -0
  208. package/dist/types/src/containers/PromptList/PromptList.stories.d.ts +559 -0
  209. package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +1 -0
  210. package/dist/types/src/containers/PromptList/index.d.ts +2 -0
  211. package/dist/types/src/containers/PromptList/index.d.ts.map +1 -0
  212. package/dist/types/src/containers/TracePanel/TracePanel.d.ts +6 -0
  213. package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
  214. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
  215. package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
  216. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
  217. package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
  218. package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
  219. package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
  220. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +4 -0
  221. package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
  222. package/dist/types/src/containers/TriggerStatus/index.d.ts +2 -0
  223. package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
  224. package/dist/types/src/containers/index.d.ts +12 -0
  225. package/dist/types/src/containers/index.d.ts.map +1 -0
  226. package/dist/types/src/extensions/index.d.ts +2 -0
  227. package/dist/types/src/extensions/index.d.ts.map +1 -0
  228. package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
  229. package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
  230. package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
  231. package/dist/types/src/hooks/useChatProcessor.d.ts +7 -6
  232. package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
  233. package/dist/types/src/hooks/useChatServices.d.ts +3 -6
  234. package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
  235. package/dist/types/src/hooks/useChatToolbarActions.d.ts +2 -2
  236. package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -1
  237. package/dist/types/src/hooks/useContextBinder.d.ts +3 -2
  238. package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
  239. package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
  240. package/dist/types/src/hooks/useFilteredTypes.d.ts +1 -1
  241. package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -1
  242. package/dist/types/src/hooks/usePresets.d.ts +1 -1
  243. package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
  244. package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
  245. package/dist/types/src/index.d.ts +1 -1
  246. package/dist/types/src/index.d.ts.map +1 -1
  247. package/dist/types/src/meta.d.ts +2 -0
  248. package/dist/types/src/meta.d.ts.map +1 -1
  249. package/dist/types/src/operations/create-chat.d.ts +5 -0
  250. package/dist/types/src/operations/create-chat.d.ts.map +1 -0
  251. package/dist/types/src/operations/definitions.d.ts +135 -0
  252. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  253. package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
  254. package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
  255. package/dist/types/src/operations/index.d.ts +4 -0
  256. package/dist/types/src/operations/index.d.ts.map +1 -0
  257. package/dist/types/src/operations/on-create-space.d.ts +5 -0
  258. package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
  259. package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
  260. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
  261. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
  262. package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
  263. package/dist/types/src/operations/set-current-chat.d.ts +5 -0
  264. package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
  265. package/dist/types/src/operations/update-chat-name.d.ts +5 -0
  266. package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
  267. package/dist/types/src/processor/index.d.ts +0 -1
  268. package/dist/types/src/processor/index.d.ts.map +1 -1
  269. package/dist/types/src/processor/processor.d.ts +33 -28
  270. package/dist/types/src/processor/processor.d.ts.map +1 -1
  271. package/dist/types/src/testing/test-generator.d.ts.map +1 -1
  272. package/dist/types/src/testing/test-services.d.ts +1 -1
  273. package/dist/types/src/testing/test-services.d.ts.map +1 -1
  274. package/dist/types/src/translations.d.ts +529 -295
  275. package/dist/types/src/translations.d.ts.map +1 -1
  276. package/dist/types/src/types/Assistant.d.ts +17 -39
  277. package/dist/types/src/types/Assistant.d.ts.map +1 -1
  278. package/dist/types/src/types/Settings.d.ts +10 -0
  279. package/dist/types/src/types/Settings.d.ts.map +1 -0
  280. package/dist/types/src/types/capabilities.d.ts +11 -0
  281. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  282. package/dist/types/src/types/index.d.ts +1 -1
  283. package/dist/types/src/types/index.d.ts.map +1 -1
  284. package/dist/types/src/types/service.d.ts.map +1 -1
  285. package/dist/types/tsconfig.tsbuildinfo +1 -1
  286. package/package.json +120 -92
  287. package/src/AssistantPlugin.tsx +148 -52
  288. package/src/blueprints/assistant/blueprint.conversations.json +1 -0
  289. package/src/blueprints/assistant/blueprint.test.ts +46 -0
  290. package/src/blueprints/assistant/blueprint.ts +31 -0
  291. package/src/blueprints/assistant/index.ts +5 -0
  292. package/src/blueprints/index.ts +1 -8
  293. package/src/capabilities/{ai-service/ai-service.ts → ai-service.ts} +4 -3
  294. package/src/capabilities/app-graph-builder.ts +217 -0
  295. package/src/capabilities/blueprint-definition.ts +58 -0
  296. package/src/capabilities/companion-chat-provisioner.ts +164 -0
  297. package/src/capabilities/{edge-model-resolver/edge-model-resolver.ts → edge-model-resolver.ts} +4 -3
  298. package/src/capabilities/index.ts +22 -11
  299. package/src/capabilities/{local-model-resolver/local-model-resolver.ts → local-model-resolver.ts} +4 -3
  300. package/src/capabilities/markdown.ts +40 -0
  301. package/src/capabilities/migrations.ts +34 -0
  302. package/src/capabilities/operation-handler.ts +16 -0
  303. package/src/capabilities/react-surface.tsx +157 -0
  304. package/src/capabilities/{settings/settings.ts → settings.ts} +5 -4
  305. package/src/capabilities/{state/state.ts → state.ts} +11 -3
  306. package/src/capabilities/toolkit.ts +13 -0
  307. package/src/components/AssistantSettings/AssistantSettings.stories.tsx +34 -0
  308. package/src/components/AssistantSettings/AssistantSettings.tsx +104 -92
  309. package/src/components/AssistantSettings/index.ts +2 -2
  310. package/src/components/Chat/Chat.tsx +88 -45
  311. package/src/components/ChatProgress/ChatProgress.tsx +9 -7
  312. package/src/components/ChatPrompt/ChatActions.tsx +25 -5
  313. package/src/components/ChatPrompt/ChatOptions.tsx +43 -29
  314. package/src/components/ChatPrompt/ChatReferences.tsx +18 -8
  315. package/src/components/ChatThread/ChatThread.stories.tsx +31 -48
  316. package/src/components/ChatThread/ChatThread.tsx +28 -17
  317. package/src/components/ChatThread/Link.tsx +1 -1
  318. package/src/components/ChatThread/MarkdownStream.stories.tsx +243 -0
  319. package/src/components/ChatThread/registry.tsx +107 -43
  320. package/src/components/ChatThread/sync.test.ts +13 -10
  321. package/src/components/ChatThread/sync.ts +43 -32
  322. package/src/components/ChatThread/testing/thinking.md +21 -0
  323. package/src/components/ChatThread/testing/thread-1.md +30 -0
  324. package/src/components/ChatThread/testing/{thread.md → thread-2.md} +19 -0
  325. package/src/components/ChatThread/testing/thread-widgets.md +79 -0
  326. package/src/components/ChatThread/tool-widget-state.test.ts +34 -0
  327. package/src/components/ChatThread/tool-widget-state.ts +48 -0
  328. package/src/components/ChatThread/widgets/FallbackWidget.tsx +26 -0
  329. package/src/components/ChatThread/widgets/PromptWidget.ts +28 -0
  330. package/src/components/ChatThread/widgets/ReasoningWidget.stories.tsx +68 -0
  331. package/src/components/ChatThread/widgets/ReasoningWidget.ts +133 -0
  332. package/src/components/ChatThread/widgets/ReferenceWidget.ts +31 -0
  333. package/src/components/ChatThread/widgets/SelectWidget.ts +37 -0
  334. package/src/components/ChatThread/widgets/StatsWidget.ts +29 -0
  335. package/src/components/ChatThread/widgets/StatusWidget.ts +133 -0
  336. package/src/components/ChatThread/widgets/SuggestionWidget.ts +41 -0
  337. package/src/components/ChatThread/widgets/SummaryWidget.tsx +28 -0
  338. package/src/components/ChatThread/widgets/ToolWidget.stories.tsx +54 -0
  339. package/src/components/ChatThread/widgets/ToolWidget.tsx +156 -0
  340. package/src/components/ChatThread/widgets/index.ts +14 -0
  341. package/src/components/ProcessTree/ProcessTree.stories.tsx +109 -0
  342. package/src/components/ProcessTree/ProcessTree.tsx +85 -0
  343. package/src/components/ProcessTree/index.ts +5 -0
  344. package/src/components/TemplateEditor/TemplateEditor.stories.tsx +4 -9
  345. package/src/components/TemplateEditor/TemplateEditor.tsx +50 -42
  346. package/src/components/TemplateEditor/TemplateForm.stories.tsx +7 -6
  347. package/src/components/TemplateEditor/TemplateForm.tsx +9 -10
  348. package/src/components/TemplateEditor/extensions/handlebars-extension.ts +4 -4
  349. package/src/components/ToolBlock/ToolBlock.tsx +21 -20
  350. package/src/components/Toolbox/Toolbox.stories.tsx +4 -6
  351. package/src/components/Toolbox/Toolbox.tsx +66 -60
  352. package/src/components/Typewriter/AssistantToolbar.tsx +7 -7
  353. package/src/components/Typewriter/Typewriter.stories.tsx +18 -15
  354. package/src/components/Typewriter/Typewriter.tsx +6 -10
  355. package/src/components/Typewriter/assistant-extension.tsx +5 -8
  356. package/src/components/index.ts +3 -7
  357. package/src/containers/AgentArticle/AgentArticle.stories.tsx +105 -0
  358. package/src/containers/AgentArticle/AgentArticle.tsx +157 -0
  359. package/src/containers/AgentArticle/index.ts +5 -0
  360. package/src/containers/AgentProperties/AgentProperties.stories.tsx +91 -0
  361. package/src/containers/AgentProperties/AgentProperties.tsx +169 -0
  362. package/src/containers/AgentProperties/index.ts +5 -0
  363. package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
  364. package/src/containers/BlueprintArticle/index.ts +5 -0
  365. package/src/{components → containers/ChatCompanion}/ChatCompanion.tsx +23 -44
  366. package/src/containers/ChatCompanion/index.ts +5 -0
  367. package/src/containers/ChatContainer/ChatContainer.tsx +95 -0
  368. package/src/containers/ChatContainer/index.ts +5 -0
  369. package/src/{components → containers/ChatDialog}/ChatDialog.tsx +10 -12
  370. package/src/containers/ChatDialog/index.ts +5 -0
  371. package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
  372. package/src/containers/PromptArticle/index.ts +5 -0
  373. package/src/containers/PromptList/PromptList.stories.tsx +129 -0
  374. package/src/containers/PromptList/PromptList.tsx +49 -0
  375. package/src/containers/PromptList/index.ts +5 -0
  376. package/src/containers/TracePanel/TracePanel.tsx +361 -0
  377. package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
  378. package/src/containers/TracePanel/dxn-extractor.ts +178 -0
  379. package/src/containers/TracePanel/index.ts +9 -0
  380. package/src/containers/TriggerStatus/TriggerStatus.tsx +144 -0
  381. package/src/containers/TriggerStatus/index.ts +5 -0
  382. package/src/containers/index.ts +16 -0
  383. package/src/extensions/index.ts +5 -0
  384. package/src/extensions/prompt-extension.ts +111 -0
  385. package/src/hooks/useBlueprintRegistry.ts +8 -4
  386. package/src/hooks/useChatProcessor.ts +30 -17
  387. package/src/hooks/useChatServices.ts +7 -28
  388. package/src/hooks/useChatToolbarActions.ts +13 -12
  389. package/src/hooks/useContextBinder.ts +17 -6
  390. package/src/hooks/useContextObjects.ts +8 -4
  391. package/src/hooks/useFilteredTypes.ts +3 -3
  392. package/src/hooks/usePresets.ts +2 -1
  393. package/src/hooks/useReferencesProvider.ts +1 -5
  394. package/src/index.ts +1 -1
  395. package/src/meta.ts +6 -3
  396. package/src/operations/create-chat.ts +80 -0
  397. package/src/operations/definitions.ts +127 -0
  398. package/src/operations/ensure-companion-chat.ts +61 -0
  399. package/src/operations/index.ts +17 -0
  400. package/src/operations/on-create-space.ts +24 -0
  401. package/src/operations/resolve-navigation-targets.ts +26 -0
  402. package/src/operations/run-prompt-in-new-chat.ts +113 -0
  403. package/src/operations/set-current-chat.ts +50 -0
  404. package/src/operations/update-chat-name.ts +61 -0
  405. package/src/processor/index.ts +0 -1
  406. package/src/processor/presets.ts +2 -2
  407. package/src/processor/processor.test.ts +18 -50
  408. package/src/processor/processor.ts +190 -129
  409. package/src/queue-logger.ts +2 -2
  410. package/src/testing/test-generator.ts +45 -14
  411. package/src/testing/test-sequence.ts +3 -3
  412. package/src/testing/test-services.ts +2 -2
  413. package/src/translations.ts +134 -83
  414. package/src/types/Assistant.ts +8 -56
  415. package/src/types/Settings.ts +21 -0
  416. package/src/types/capabilities.ts +11 -3
  417. package/src/types/events.ts +2 -2
  418. package/src/types/index.ts +3 -1
  419. package/src/types/service.ts +5 -5
  420. package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs +0 -31
  421. package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs.map +0 -7
  422. package/dist/lib/browser/ChatCompanion-GFSJZTOT.mjs +0 -153
  423. package/dist/lib/browser/ChatCompanion-GFSJZTOT.mjs.map +0 -7
  424. package/dist/lib/browser/ChatContainer-IHAPBIZE.mjs +0 -72
  425. package/dist/lib/browser/ChatContainer-IHAPBIZE.mjs.map +0 -7
  426. package/dist/lib/browser/ChatDialog-EGRMPCTL.mjs +0 -85
  427. package/dist/lib/browser/ChatDialog-EGRMPCTL.mjs.map +0 -7
  428. package/dist/lib/browser/PromptArticle-K362ZPAE.mjs +0 -53
  429. package/dist/lib/browser/PromptArticle-K362ZPAE.mjs.map +0 -7
  430. package/dist/lib/browser/ai-service-5GUDOEWF.mjs +0 -21
  431. package/dist/lib/browser/ai-service-5GUDOEWF.mjs.map +0 -7
  432. package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs +0 -212
  433. package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs.map +0 -7
  434. package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs +0 -14
  435. package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs.map +0 -7
  436. package/dist/lib/browser/chunk-A75V4MOQ.mjs +0 -1832
  437. package/dist/lib/browser/chunk-A75V4MOQ.mjs.map +0 -7
  438. package/dist/lib/browser/chunk-DKQMSMBN.mjs +0 -326
  439. package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +0 -7
  440. package/dist/lib/browser/chunk-EXVT7D4B.mjs +0 -23
  441. package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +0 -7
  442. package/dist/lib/browser/chunk-ML3QCFKA.mjs +0 -265
  443. package/dist/lib/browser/chunk-ML3QCFKA.mjs.map +0 -7
  444. package/dist/lib/browser/chunk-MRJVYGLU.mjs +0 -208
  445. package/dist/lib/browser/chunk-MRJVYGLU.mjs.map +0 -7
  446. package/dist/lib/browser/chunk-V772AMZM.mjs +0 -250
  447. package/dist/lib/browser/chunk-V772AMZM.mjs.map +0 -7
  448. package/dist/lib/browser/chunk-WGQTU6UJ.mjs +0 -41
  449. package/dist/lib/browser/chunk-WGQTU6UJ.mjs.map +0 -7
  450. package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs +0 -20
  451. package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs.map +0 -7
  452. package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs +0 -19
  453. package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs.map +0 -7
  454. package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs +0 -132
  455. package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs.map +0 -7
  456. package/dist/lib/browser/react-surface-S7SBFOSW.mjs +0 -109
  457. package/dist/lib/browser/react-surface-S7SBFOSW.mjs.map +0 -7
  458. package/dist/lib/browser/repair-6QGAKOVM.mjs +0 -54
  459. package/dist/lib/browser/repair-6QGAKOVM.mjs.map +0 -7
  460. package/dist/lib/browser/settings-4ZDLUMYE.mjs +0 -32
  461. package/dist/lib/browser/settings-4ZDLUMYE.mjs.map +0 -7
  462. package/dist/lib/browser/state-AN6336ZX.mjs +0 -26
  463. package/dist/lib/browser/state-AN6336ZX.mjs.map +0 -7
  464. package/dist/lib/browser/toolkit-7AVTEPMA.mjs +0 -18
  465. package/dist/lib/browser/toolkit-7AVTEPMA.mjs.map +0 -7
  466. package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs +0 -32
  467. package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs.map +0 -7
  468. package/dist/lib/node-esm/ChatCompanion-UR7DXZ54.mjs +0 -154
  469. package/dist/lib/node-esm/ChatCompanion-UR7DXZ54.mjs.map +0 -7
  470. package/dist/lib/node-esm/ChatContainer-YMLLGOZK.mjs +0 -73
  471. package/dist/lib/node-esm/ChatContainer-YMLLGOZK.mjs.map +0 -7
  472. package/dist/lib/node-esm/ChatDialog-D24WJPK4.mjs +0 -86
  473. package/dist/lib/node-esm/ChatDialog-D24WJPK4.mjs.map +0 -7
  474. package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs +0 -54
  475. package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs.map +0 -7
  476. package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs +0 -22
  477. package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs.map +0 -7
  478. package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs +0 -213
  479. package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs.map +0 -7
  480. package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs +0 -15
  481. package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs.map +0 -7
  482. package/dist/lib/node-esm/chunk-355W5B27.mjs +0 -251
  483. package/dist/lib/node-esm/chunk-355W5B27.mjs.map +0 -7
  484. package/dist/lib/node-esm/chunk-4BERCIES.mjs +0 -1833
  485. package/dist/lib/node-esm/chunk-4BERCIES.mjs.map +0 -7
  486. package/dist/lib/node-esm/chunk-75PHXBN3.mjs +0 -327
  487. package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +0 -7
  488. package/dist/lib/node-esm/chunk-DCA5QWQT.mjs +0 -209
  489. package/dist/lib/node-esm/chunk-DCA5QWQT.mjs.map +0 -7
  490. package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs +0 -42
  491. package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs.map +0 -7
  492. package/dist/lib/node-esm/chunk-POWB2BPC.mjs +0 -25
  493. package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +0 -7
  494. package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs +0 -267
  495. package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs.map +0 -7
  496. package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs +0 -21
  497. package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs.map +0 -7
  498. package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs +0 -20
  499. package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs.map +0 -7
  500. package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs +0 -133
  501. package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs.map +0 -7
  502. package/dist/lib/node-esm/react-surface-ZR6FXGLF.mjs +0 -110
  503. package/dist/lib/node-esm/react-surface-ZR6FXGLF.mjs.map +0 -7
  504. package/dist/lib/node-esm/repair-QJ7CQDKU.mjs +0 -55
  505. package/dist/lib/node-esm/repair-QJ7CQDKU.mjs.map +0 -7
  506. package/dist/lib/node-esm/settings-CQEOHR3R.mjs +0 -33
  507. package/dist/lib/node-esm/settings-CQEOHR3R.mjs.map +0 -7
  508. package/dist/lib/node-esm/state-HDON4REW.mjs +0 -27
  509. package/dist/lib/node-esm/state-HDON4REW.mjs.map +0 -7
  510. package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs +0 -19
  511. package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs.map +0 -7
  512. package/dist/types/src/blueprints/assistant-blueprint.d.ts +0 -209
  513. package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +0 -1
  514. package/dist/types/src/capabilities/ai-service/ai-service.d.ts +0 -5
  515. package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +0 -1
  516. package/dist/types/src/capabilities/ai-service/index.d.ts +0 -3
  517. package/dist/types/src/capabilities/ai-service/index.d.ts.map +0 -1
  518. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
  519. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  520. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  521. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  522. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -21
  523. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  524. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -4
  525. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  526. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +0 -6
  527. package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +0 -1
  528. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +0 -3
  529. package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +0 -1
  530. package/dist/types/src/capabilities/local-model-resolver/index.d.ts +0 -3
  531. package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +0 -1
  532. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +0 -12
  533. package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +0 -1
  534. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  535. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  536. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  537. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  538. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  539. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  540. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
  541. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  542. package/dist/types/src/capabilities/repair/index.d.ts +0 -3
  543. package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
  544. package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
  545. package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
  546. package/dist/types/src/capabilities/settings/index.d.ts +0 -15
  547. package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
  548. package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
  549. package/dist/types/src/capabilities/state/index.d.ts +0 -11
  550. package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
  551. package/dist/types/src/capabilities/state/state.d.ts +0 -13
  552. package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
  553. package/dist/types/src/capabilities/toolkit/index.d.ts +0 -3
  554. package/dist/types/src/capabilities/toolkit/index.d.ts.map +0 -1
  555. package/dist/types/src/capabilities/toolkit/toolkit.d.ts +0 -5
  556. package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +0 -1
  557. package/dist/types/src/components/BlueprintArticle.d.ts +0 -7
  558. package/dist/types/src/components/BlueprintArticle.d.ts.map +0 -1
  559. package/dist/types/src/components/ChatCompanion.d.ts +0 -13
  560. package/dist/types/src/components/ChatCompanion.d.ts.map +0 -1
  561. package/dist/types/src/components/ChatContainer.d.ts +0 -19
  562. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  563. package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
  564. package/dist/types/src/components/ChatThread/reducers.d.ts +0 -40
  565. package/dist/types/src/components/ChatThread/reducers.d.ts.map +0 -1
  566. package/dist/types/src/components/PromptArticle.d.ts +0 -7
  567. package/dist/types/src/components/PromptArticle.d.ts.map +0 -1
  568. package/dist/types/src/functions/index.d.ts +0 -4
  569. package/dist/types/src/functions/index.d.ts.map +0 -1
  570. package/dist/types/src/functions/object-list.d.ts +0 -10
  571. package/dist/types/src/functions/object-list.d.ts.map +0 -1
  572. package/dist/types/src/functions/object-load.d.ts +0 -8
  573. package/dist/types/src/functions/object-load.d.ts.map +0 -1
  574. package/dist/types/src/functions/object-search.d.ts +0 -10
  575. package/dist/types/src/functions/object-search.d.ts.map +0 -1
  576. package/dist/types/src/processor/update-name.d.ts +0 -10
  577. package/dist/types/src/processor/update-name.d.ts.map +0 -1
  578. package/dist/types/src/types/AssistantAction.d.ts +0 -95
  579. package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
  580. package/src/blueprints/assistant-blueprint.ts +0 -62
  581. package/src/capabilities/ai-service/index.ts +0 -7
  582. package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -180
  583. package/src/capabilities/app-graph-builder/index.ts +0 -7
  584. package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -60
  585. package/src/capabilities/blueprint-definition/index.ts +0 -8
  586. package/src/capabilities/edge-model-resolver/index.ts +0 -7
  587. package/src/capabilities/local-model-resolver/index.ts +0 -7
  588. package/src/capabilities/operation-resolver/index.ts +0 -7
  589. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -110
  590. package/src/capabilities/react-surface/index.ts +0 -7
  591. package/src/capabilities/react-surface/react-surface.tsx +0 -95
  592. package/src/capabilities/repair/index.ts +0 -7
  593. package/src/capabilities/repair/repair.ts +0 -63
  594. package/src/capabilities/settings/index.ts +0 -7
  595. package/src/capabilities/state/index.ts +0 -7
  596. package/src/capabilities/toolkit/index.ts +0 -7
  597. package/src/capabilities/toolkit/toolkit.ts +0 -26
  598. package/src/components/BlueprintArticle.tsx +0 -29
  599. package/src/components/ChatContainer.tsx +0 -61
  600. package/src/components/ChatThread/reducers.ts +0 -151
  601. package/src/components/PromptArticle.tsx +0 -50
  602. package/src/functions/index.ts +0 -7
  603. package/src/functions/object-list.ts +0 -49
  604. package/src/functions/object-load.ts +0 -47
  605. package/src/functions/object-search.ts +0 -46
  606. package/src/processor/update-name.ts +0 -59
  607. package/src/types/AssistantAction.ts +0 -75
@@ -0,0 +1,48 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { type ContentBlock, type Message } from '@dxos/types';
6
+ import { type StateDispatch } from '@dxos/ui-editor';
7
+
8
+ /**
9
+ * Minimal surface used to push tool call / result blocks into {@link MarkdownStreamController} widget state.
10
+ */
11
+ export type ToolWidgetStateSink = {
12
+ updateWidget<T>(id: string, value: StateDispatch<T>): void;
13
+ };
14
+
15
+ /**
16
+ * Mirrors tool-related branches of {@link blockToMarkdown} so widget props stay in sync with message blocks.
17
+ */
18
+ export const applyToolBlockToWidgetState = (context: ToolWidgetStateSink, block: ContentBlock.Any): void => {
19
+ switch (block._tag) {
20
+ case 'toolCall': {
21
+ context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, {
22
+ blocks: [block],
23
+ });
24
+ break;
25
+ }
26
+ case 'toolResult': {
27
+ context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, ({ blocks = [] } = { blocks: [] }) => ({
28
+ blocks: [...blocks, block],
29
+ }));
30
+ break;
31
+ }
32
+ default: {
33
+ break;
34
+ }
35
+ }
36
+ };
37
+
38
+ /**
39
+ * Re-applies tool widget state after a full document replace (e.g. {@link MarkdownStreamController.setContent}),
40
+ * which clears accumulated widget props via `xmlTagResetEffect`.
41
+ */
42
+ export const rehydrateToolWidgetsFromMessages = (context: ToolWidgetStateSink, messages: Message.Message[]): void => {
43
+ for (const message of messages) {
44
+ for (const block of message.blocks) {
45
+ applyToolBlockToWidgetState(context, block);
46
+ }
47
+ }
48
+ };
@@ -0,0 +1,26 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { TogglePanel } from '@dxos/react-ui-components';
8
+ import { Json } from '@dxos/react-ui-syntax-highlighter';
9
+ import { type XmlWidgetProps } from '@dxos/ui-editor';
10
+
11
+ import { type MessageThreadContext } from '../sync';
12
+
13
+ export const FallbackWidget = ({ _tag, ...props }: XmlWidgetProps<MessageThreadContext>) => {
14
+ return (
15
+ <TogglePanel.Root>
16
+ <TogglePanel.Header classNames='bg-group-surface'>{_tag}</TogglePanel.Header>
17
+ <TogglePanel.Content classNames='bg-modal-surface'>
18
+ <TogglePanel.Viewport>
19
+ <Json.Data classNames='p-2! text-sm' data={props} />
20
+ </TogglePanel.Viewport>
21
+ </TogglePanel.Content>
22
+ </TogglePanel.Root>
23
+ );
24
+ };
25
+
26
+ FallbackWidget.displayName = 'Fallback';
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { WidgetType } from '@codemirror/view';
6
+
7
+ import { Domino } from '@dxos/ui';
8
+
9
+ /**
10
+ * Simple prompt widget.
11
+ */
12
+ export class PromptWidget extends WidgetType {
13
+ constructor(private text: string) {
14
+ super();
15
+ }
16
+
17
+ override eq(other: this) {
18
+ return this.text === other.text;
19
+ }
20
+
21
+ /**
22
+ * NOTE: Container must set var based on user's identity.
23
+ */
24
+ override toDOM() {
25
+ const inner = Domino.of('div').classNames('px-3 py-1.5 bg-(--user-fill) rounded-xs').text(this.text);
26
+ return Domino.of('div').classNames('flex justify-end my-2').append(inner).root;
27
+ }
28
+ }
@@ -0,0 +1,68 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React, { useEffect, useRef } from 'react';
7
+
8
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
9
+
10
+ import { ReasoningWidget } from './ReasoningWidget';
11
+
12
+ export type DefaultStoryProps = {
13
+ text: string;
14
+ };
15
+
16
+ // TODO(burdon): Generalize factory for DOM widgets.
17
+ const DefaultStory = ({ text }: DefaultStoryProps) => {
18
+ const hostRef = useRef<HTMLDivElement>(null);
19
+ useEffect(() => {
20
+ const host = hostRef.current;
21
+ if (!host) {
22
+ return;
23
+ }
24
+
25
+ host.replaceChildren();
26
+ const widget = new ReasoningWidget(text, 0);
27
+ const dom = widget.toDOM();
28
+ host.appendChild(dom);
29
+ widget.updateDOM(dom);
30
+ return () => {
31
+ widget.destroy(dom);
32
+ host.replaceChildren();
33
+ };
34
+ }, [text]);
35
+
36
+ return <div ref={hostRef} />;
37
+ };
38
+
39
+ const meta = {
40
+ title: 'plugins/plugin-assistant/components/ChatThread/widgets/ReasoningWidget',
41
+ component: DefaultStory,
42
+ decorators: [withTheme(), withLayout({ layout: 'column' })],
43
+ parameters: {
44
+ layout: 'fullscreen',
45
+ },
46
+ } satisfies Meta<typeof DefaultStory>;
47
+
48
+ export default meta;
49
+
50
+ type Story = StoryObj<typeof meta>;
51
+
52
+ export const Default: Story = {
53
+ args: {
54
+ text: 'The user is asking about nested flex layouts and overflow. I should mention min-height 0 and grid track sizing.',
55
+ },
56
+ };
57
+
58
+ export const LongText: Story = {
59
+ args: {
60
+ text: [
61
+ 'Step 1: Identify the scroll container and ensure it participates in a definite height chain.',
62
+ 'Step 2: Apply min-h-0 to flex children that should shrink and scroll.',
63
+ 'Step 3: Prefer overflow-y-auto on the leaf viewport, not on every ancestor.',
64
+ 'Step 4: Use min-h-0 on the scroll container to ensure it participates in a definite height chain.',
65
+ 'Step 5: Use min-w-0 on the scroll container to ensure it participates in a definite width chain.',
66
+ ].join('\n\n'),
67
+ },
68
+ };
@@ -0,0 +1,133 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { WidgetType } from '@codemirror/view';
6
+
7
+ import { Domino } from '@dxos/ui';
8
+
9
+ /**
10
+ * Props used to derive a stable key for a reasoning block across CodeMirror widget rebuilds.
11
+ * CodeMirror does not assign persistent IDs to widgets; streaming re-runs the factory each tick.
12
+ */
13
+ export type ReasoningWidgetBlockIdProps = {
14
+ id?: string;
15
+ range?: { from: number; to: number };
16
+ };
17
+
18
+ /**
19
+ * AI reasoning widget.
20
+ */
21
+ export class ReasoningWidget extends WidgetType {
22
+ readonly #pos: string;
23
+ /** The timer id last registered for this instance (may differ from the map if superseded). */
24
+ #ownedTimerId: ReturnType<typeof setTimeout> | null = null;
25
+
26
+ constructor(
27
+ private readonly text: string,
28
+ pos: string | number | undefined,
29
+ ) {
30
+ super();
31
+ this.#pos = pos === undefined || pos === '' ? 'reasoning' : String(pos);
32
+ }
33
+
34
+ override eq(other: this) {
35
+ return this.text === other.text && this.#pos === other.#pos;
36
+ }
37
+
38
+ override toDOM() {
39
+ const root = Domino.of('div')
40
+ .classNames('pt-2 pb-2')
41
+ .append(
42
+ Domino.of('div')
43
+ .classNames('relative overflow-hidden p-px rounded-sm border border-subdued-separator')
44
+ .attributes({ 'data-trail-container': '' })
45
+ .append(
46
+ Domino.of('div')
47
+ .classNames('relative z-10 bg-base-surface rounded-sm text-sm text-description px-2 py-1')
48
+ .append(
49
+ Domino.of('div')
50
+ .classNames('max-h-[5lh] overflow-y-auto')
51
+ .text(this.text)
52
+ .attributes({ 'data-reasoning-text': '' }),
53
+ ),
54
+ Domino.of('div').attributes({ 'data-id': this.#pos }),
55
+ ),
56
+ ).root;
57
+
58
+ return root;
59
+ }
60
+
61
+ override updateDOM(dom: HTMLElement) {
62
+ // Update only the text leaf; `dom` may be wrapped in an outer shell, and the trail host is a
63
+ // sibling of the text node inside the bordered container — setting `textContent` on the wrong
64
+ // ancestor would remove `[data-id]`.
65
+ dom.querySelector<HTMLElement>('[data-reasoning-text]')?.replaceChildren(this.text);
66
+
67
+ // Recreate trail host if it was removed by a prior timeout (streaming paused > TRAIL_REMOVAL_DELAY_MS).
68
+ const container = dom.querySelector<HTMLElement>('[data-trail-container]');
69
+ let trailHost = container?.querySelector<HTMLElement>('[data-id]');
70
+ if (container && !trailHost) {
71
+ trailHost = Domino.of('div').attributes({ 'data-id': this.#pos }).root;
72
+ container.append(trailHost);
73
+ }
74
+ if (trailHost?.childElementCount === 0) {
75
+ trailHost.append(...createTrailLayers());
76
+ }
77
+
78
+ this.#scheduleTrailRemoval(dom);
79
+ return true;
80
+ }
81
+
82
+ override destroy(_dom: HTMLElement) {
83
+ this.#clearOwnedTrailTimer();
84
+ }
85
+
86
+ #scheduleTrailRemoval(dom: HTMLElement) {
87
+ const previous = trailRemovalTimers.get(this.#pos);
88
+ if (previous !== undefined) {
89
+ clearTimeout(previous);
90
+ }
91
+
92
+ const timerId = setTimeout(() => {
93
+ if (trailRemovalTimers.get(this.#pos) !== timerId) {
94
+ return;
95
+ }
96
+ trailRemovalTimers.delete(this.#pos);
97
+ this.#ownedTimerId = null;
98
+ dom.querySelector<HTMLElement>('[data-id]')?.remove();
99
+ }, TRAIL_REMOVAL_DELAY_MS);
100
+
101
+ trailRemovalTimers.set(this.#pos, timerId);
102
+ this.#ownedTimerId = timerId;
103
+ }
104
+
105
+ #clearOwnedTrailTimer() {
106
+ const active = trailRemovalTimers.get(this.#pos);
107
+ if (active !== undefined && active === this.#ownedTimerId) {
108
+ clearTimeout(active);
109
+ trailRemovalTimers.delete(this.#pos);
110
+ }
111
+ this.#ownedTimerId = null;
112
+ }
113
+ }
114
+
115
+ const trail = [
116
+ 'absolute z-0 aspect-[2/1] w-16',
117
+ 'bg-[radial-gradient(at_100%_50%,_theme(colors.green.700),_transparent_80%)]',
118
+ '[offset-anchor:100%_50%] [offset-path:border-box]',
119
+ ];
120
+
121
+ /** Delay after the last content update before hiding the trail. */
122
+ const TRAIL_REMOVAL_DELAY_MS = 1_000;
123
+
124
+ /**
125
+ * One pending removal timer per logical block. Streaming creates a new widget instance each tick;
126
+ * `destroy` may run after the next instance has already scheduled, so we must not clear a newer timer.
127
+ */
128
+ const trailRemovalTimers = new Map<string, ReturnType<typeof setTimeout>>();
129
+
130
+ const createTrailLayers = (): [HTMLElement, HTMLElement] => [
131
+ Domino.of('div').classNames(...trail, 'animate-trail').root,
132
+ Domino.of('div').classNames(...trail, 'animate-trail-offset').root,
133
+ ];
@@ -0,0 +1,31 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { WidgetType } from '@codemirror/view';
6
+
7
+ import { Domino } from '@dxos/ui';
8
+
9
+ export class ReferenceWidget extends WidgetType {
10
+ constructor(
11
+ private text: string,
12
+ private dxn: string,
13
+ ) {
14
+ super();
15
+ }
16
+
17
+ override eq(other: this) {
18
+ return this.dxn === other.dxn;
19
+ }
20
+
21
+ override toDOM() {
22
+ return Domino.of('div')
23
+ .classNames('pt-2 pb-2')
24
+ .append(
25
+ Domino.of('dx-anchor' as any)
26
+ .classNames('dx-tag--anchor')
27
+ .attributes({ dxn: this.dxn })
28
+ .text(this.text),
29
+ ).root;
30
+ }
31
+ }
@@ -0,0 +1,37 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { WidgetType } from '@codemirror/view';
6
+
7
+ import { Domino } from '@dxos/ui';
8
+
9
+ /**
10
+ * Simple prompt widget.
11
+ */
12
+ export class SelectWidget extends WidgetType {
13
+ constructor(private options: string[]) {
14
+ super();
15
+ }
16
+
17
+ override eq(other: this) {
18
+ return JSON.stringify(this.options) === JSON.stringify(other.options);
19
+ }
20
+
21
+ /**
22
+ * NOTE: Container must set var based on user's identity.
23
+ */
24
+ override toDOM() {
25
+ return Domino.of('div')
26
+ .attributes({ role: 'group' })
27
+ .classNames('flex flex-wrap pt-2 pb-2 gap-1')
28
+ .append(
29
+ ...this.options.map((option) =>
30
+ Domino.of('button')
31
+ .classNames('dx-button inline-block max-w-[100cqi]')
32
+ .attributes({ 'data-action': 'submit', 'data-value': option, 'data-density': 'fine' })
33
+ .text(option),
34
+ ),
35
+ ).root;
36
+ }
37
+ }
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { WidgetType } from '@codemirror/view';
6
+
7
+ import { Domino } from '@dxos/ui';
8
+
9
+ /**
10
+ * Simple stats widget.
11
+ */
12
+ export class StatsWidget extends WidgetType {
13
+ constructor(private text: string) {
14
+ super();
15
+ }
16
+
17
+ override eq(other: this) {
18
+ return this.text === other.text;
19
+ }
20
+
21
+ override toDOM() {
22
+ return Domino.of('div').classNames('pt-2 pb-4 text-sm text-placeholder').text(this.text).root;
23
+ }
24
+
25
+ override updateDOM(dom: HTMLElement) {
26
+ dom.textContent = this.text;
27
+ return true;
28
+ }
29
+ }
@@ -0,0 +1,133 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { WidgetType } from '@codemirror/view';
6
+
7
+ import { Domino } from '@dxos/ui';
8
+ import { XML_WIDGET_DATA_ATTR } from '@dxos/ui-editor';
9
+
10
+ /**
11
+ * Props used to derive a stable key for a reasoning block across CodeMirror widget rebuilds.
12
+ * CodeMirror does not assign persistent IDs to widgets; streaming re-runs the factory each tick.
13
+ */
14
+ export type StatusWidgetBlockIdProps = {
15
+ id?: string;
16
+ range?: { from: number; to: number };
17
+ };
18
+
19
+ /**
20
+ * AI reasoning widget.
21
+ */
22
+ export class StatusWidget extends WidgetType {
23
+ readonly #pos: string;
24
+ /** The timer id last registered for this instance (may differ from the map if superseded). */
25
+ #ownedTimerId: ReturnType<typeof setTimeout> | null = null;
26
+
27
+ constructor(
28
+ private readonly text: string,
29
+ pos: string | number | undefined,
30
+ ) {
31
+ super();
32
+ this.#pos = pos === undefined || pos === '' ? 'status' : String(pos);
33
+ }
34
+
35
+ override eq(other: this) {
36
+ return this.text === other.text && this.#pos === other.#pos;
37
+ }
38
+
39
+ override toDOM() {
40
+ return Domino.of('div')
41
+ .classNames('py-0.5')
42
+ .attributes({ [XML_WIDGET_DATA_ATTR]: '' })
43
+ .append(
44
+ Domino.of('div')
45
+ .classNames('relative overflow-hidden rounded-sm')
46
+ .append(
47
+ Domino.of('div')
48
+ .classNames('grid grid-cols-[24px_1fr] gap-x-0.5 gap-y-0 items-start px-0.5 py-0.5 text-placeholder')
49
+ .append(
50
+ Domino.of('div')
51
+ .classNames('flex h-5 w-full shrink-0 items-center justify-center self-start')
52
+ .append(Domino.of('span').classNames('block size-1.5 shrink-0 rounded-full bg-current opacity-45')),
53
+ Domino.of('div')
54
+ .classNames('relative min-w-0')
55
+ .append(
56
+ Domino.of('div')
57
+ .classNames('relative z-10 rounded-sm text-sm leading-5')
58
+ .attributes({ 'data-status-text': '' })
59
+ .text(this.text),
60
+ Domino.of('div').attributes({ 'data-id': this.#pos }),
61
+ ),
62
+ ),
63
+ ),
64
+ ).root;
65
+ }
66
+
67
+ override updateDOM(dom: HTMLElement) {
68
+ // Update only the text leaf; `dom` may be wrapped in an outer shell, and the trail host is a
69
+ // sibling of the text node inside the wrapper — setting `textContent` on the wrong
70
+ // ancestor would remove `[data-id]`.
71
+ dom.querySelector<HTMLElement>('[data-status-text]')?.replaceChildren(this.text);
72
+
73
+ const trailHost = dom.querySelector<HTMLElement>('[data-id]');
74
+ if (trailHost?.childElementCount === 0) {
75
+ trailHost.append(...createTrailLayers());
76
+ }
77
+
78
+ this.#scheduleTrailRemoval(dom);
79
+ return true;
80
+ }
81
+
82
+ override destroy(_dom: HTMLElement) {
83
+ this.#clearOwnedTrailTimer();
84
+ }
85
+
86
+ #scheduleTrailRemoval(dom: HTMLElement) {
87
+ const previous = trailRemovalTimers.get(this.#pos);
88
+ if (previous !== undefined) {
89
+ clearTimeout(previous);
90
+ }
91
+
92
+ const timerId = setTimeout(() => {
93
+ if (trailRemovalTimers.get(this.#pos) !== timerId) {
94
+ return;
95
+ }
96
+ trailRemovalTimers.delete(this.#pos);
97
+ this.#ownedTimerId = null;
98
+ dom.querySelector<HTMLElement>('[data-id]')?.remove();
99
+ }, TRAIL_REMOVAL_DELAY_MS);
100
+
101
+ trailRemovalTimers.set(this.#pos, timerId);
102
+ this.#ownedTimerId = timerId;
103
+ }
104
+
105
+ #clearOwnedTrailTimer() {
106
+ const active = trailRemovalTimers.get(this.#pos);
107
+ if (active !== undefined && active === this.#ownedTimerId) {
108
+ clearTimeout(active);
109
+ trailRemovalTimers.delete(this.#pos);
110
+ }
111
+ this.#ownedTimerId = null;
112
+ }
113
+ }
114
+
115
+ const trail = [
116
+ 'absolute z-0 aspect-[2/1] w-16',
117
+ 'bg-[radial-gradient(at_100%_50%,_theme(colors.green.700),_transparent_80%)]',
118
+ '[offset-anchor:100%_50%] [offset-path:border-box]',
119
+ ];
120
+
121
+ /** Delay after the last content update before hiding the trail. */
122
+ const TRAIL_REMOVAL_DELAY_MS = 1_000;
123
+
124
+ /**
125
+ * One pending removal timer per logical block. Streaming creates a new widget instance each tick;
126
+ * `destroy` may run after the next instance has already scheduled, so we must not clear a newer timer.
127
+ */
128
+ const trailRemovalTimers = new Map<string, ReturnType<typeof setTimeout>>();
129
+
130
+ const createTrailLayers = (): [HTMLElement, HTMLElement] => [
131
+ Domino.of('div').classNames(...trail, 'animate-trail').root,
132
+ Domino.of('div').classNames(...trail, 'animate-trail-offset').root,
133
+ ];
@@ -0,0 +1,41 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { WidgetType } from '@codemirror/view';
6
+
7
+ import { Domino, mx } from '@dxos/ui';
8
+
9
+ /**
10
+ * Simple prompt widget.
11
+ */
12
+ export class SuggestionWidget extends WidgetType {
13
+ constructor(private text: string) {
14
+ super();
15
+ }
16
+
17
+ override eq(other: this) {
18
+ return this.text === other.text;
19
+ }
20
+
21
+ override toDOM() {
22
+ // NOTE: Container must have `dx-size-container` to support cqi.
23
+ return Domino.of('span')
24
+ .classNames(mx('inline-flex max-w-[calc(100cqi-8px)] my-1 pe-2 overflow-hidden'))
25
+ .append(
26
+ Domino.of('button')
27
+ .attributes({
28
+ 'data-action': 'submit',
29
+ 'data-density': 'fine',
30
+ 'data-value': this.text,
31
+ })
32
+ .classNames(mx('dx-button gap-2 w-full overflow-hidden'))
33
+ .append(
34
+ Domino.of('dx-icon' as any).attributes({
35
+ icon: 'ph--lightning--regular',
36
+ }),
37
+ Domino.of('span').classNames('flex-1 truncate min-w-0').text(this.text),
38
+ ),
39
+ ).root;
40
+ }
41
+ }
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { useTranslation } from '@dxos/react-ui';
8
+ import { TogglePanel } from '@dxos/react-ui-components';
9
+ import { type XmlWidgetProps } from '@dxos/ui-editor';
10
+
11
+ import { meta } from '#meta';
12
+
13
+ import { MessageThreadContext } from '../sync';
14
+
15
+ export const SummaryWidget = ({ children }: XmlWidgetProps<MessageThreadContext>) => {
16
+ const { t } = useTranslation(meta.id);
17
+
18
+ return (
19
+ <TogglePanel.Root classNames='border border-separator rounded-sm'>
20
+ <TogglePanel.Header classNames='text-sm bg-group-surface'>{t('summary.label')}</TogglePanel.Header>
21
+ <TogglePanel.Content>
22
+ <div role='none' className='p-1 text-sm text-description'>
23
+ {children}
24
+ </div>
25
+ </TogglePanel.Content>
26
+ </TogglePanel.Root>
27
+ );
28
+ };
@@ -0,0 +1,54 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+
7
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
8
+ import { type ContentBlock } from '@dxos/types';
9
+
10
+ import { translations } from '../../../translations';
11
+ import { ToolWidget, type ToolWidgetProps } from './ToolWidget';
12
+
13
+ const baseWidgetProps = {
14
+ _tag: 'toolCall',
15
+ range: { from: 0, to: 1 },
16
+ } satisfies Pick<ToolWidgetProps, '_tag' | 'range'>;
17
+
18
+ const toolCallAndResult: ContentBlock.Any[] = [
19
+ {
20
+ _tag: 'toolCall',
21
+ toolCallId: 'tc-story-1',
22
+ name: 'example_tool',
23
+ input: JSON.stringify({ query: 'status', limit: 10 }),
24
+ providerExecuted: false,
25
+ },
26
+ {
27
+ _tag: 'toolResult',
28
+ toolCallId: 'tc-story-1',
29
+ name: 'example_tool',
30
+ result: JSON.stringify({ ok: true, rows: [{ id: 1 }, { id: 2 }] }),
31
+ providerExecuted: false,
32
+ },
33
+ ];
34
+
35
+ const meta = {
36
+ title: 'plugins/plugin-assistant/components/ChatThread/widgets/ToolWidget',
37
+ component: ToolWidget,
38
+ decorators: [withTheme(), withLayout({ layout: 'column' })],
39
+ parameters: {
40
+ layout: 'fullscreen',
41
+ translations,
42
+ },
43
+ } satisfies Meta<typeof ToolWidget>;
44
+
45
+ export default meta;
46
+
47
+ type Story = StoryObj<typeof meta>;
48
+
49
+ export const Default: Story = {
50
+ args: {
51
+ ...baseWidgetProps,
52
+ blocks: toolCallAndResult,
53
+ },
54
+ };