@vertesia/ui 1.5.0-dev.20260722.120446Z → 1.5.0-dev.20260804.124748Z

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 (415) hide show
  1. package/lib/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
  2. package/lib/core/components/shadcn/filters/filterBar.js +1 -1
  3. package/lib/core/components/shadcn/filters/filterBar.js.map +1 -1
  4. package/lib/core/components/shadcn/modal/dialog.d.ts +1 -1
  5. package/lib/core/components/shadcn/modal/dialog.d.ts.map +1 -1
  6. package/lib/core/components/shadcn/modal/dialog.js +2 -0
  7. package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
  8. package/lib/core/components/shadcn/tabs.d.ts +12 -1
  9. package/lib/core/components/shadcn/tabs.d.ts.map +1 -1
  10. package/lib/core/components/shadcn/tabs.js +12 -4
  11. package/lib/core/components/shadcn/tabs.js.map +1 -1
  12. package/lib/core/hooks/useScrollableSearch.d.ts +1 -1
  13. package/lib/core/hooks/useScrollableSearch.d.ts.map +1 -1
  14. package/lib/core/hooks/useScrollableSearch.js +15 -2
  15. package/lib/core/hooks/useScrollableSearch.js.map +1 -1
  16. package/lib/env/index.d.ts +4 -0
  17. package/lib/env/index.d.ts.map +1 -1
  18. package/lib/env/index.js.map +1 -1
  19. package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +1 -1
  20. package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
  21. package/lib/features/agent/chat/AgentRequestInputOverlay.js +3 -8
  22. package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
  23. package/lib/features/agent/chat/AgentRightPanel.d.ts +5 -1
  24. package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
  25. package/lib/features/agent/chat/AgentRightPanel.js +2 -2
  26. package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
  27. package/lib/features/agent/chat/ArtifactsTab.d.ts +5 -1
  28. package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
  29. package/lib/features/agent/chat/ArtifactsTab.js +48 -11
  30. package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
  31. package/lib/features/agent/chat/DocumentEditingActionCard.d.ts +6 -0
  32. package/lib/features/agent/chat/DocumentEditingActionCard.d.ts.map +1 -0
  33. package/lib/features/agent/chat/DocumentEditingActionCard.js +129 -0
  34. package/lib/features/agent/chat/DocumentEditingActionCard.js.map +1 -0
  35. package/lib/features/agent/chat/ModernAgentConversation.d.ts +27 -2
  36. package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  37. package/lib/features/agent/chat/ModernAgentConversation.js +174 -40
  38. package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
  39. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts +2 -1
  40. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -1
  41. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +25 -10
  42. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -1
  43. package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.d.ts +45 -0
  44. package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.d.ts.map +1 -0
  45. package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.js +40 -0
  46. package/lib/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.js.map +1 -0
  47. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
  48. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  49. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +118 -58
  50. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  51. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts +2 -1
  52. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
  53. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +23 -7
  54. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
  55. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts +25 -0
  56. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.d.ts.map +1 -0
  57. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js +33 -0
  58. package/lib/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.js.map +1 -0
  59. package/lib/features/agent/chat/ModernAgentOutput/Header.js +2 -2
  60. package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
  61. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +2 -1
  62. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
  63. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +2 -2
  64. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
  65. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +3 -1
  66. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
  67. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +23 -25
  68. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
  69. package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.d.ts +14 -0
  70. package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.d.ts.map +1 -0
  71. package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.js +21 -0
  72. package/lib/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.js.map +1 -0
  73. package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.d.ts +30 -0
  74. package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.d.ts.map +1 -0
  75. package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.js +53 -0
  76. package/lib/features/agent/chat/ModernAgentOutput/ResourceChip.js.map +1 -0
  77. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.d.ts.map +1 -1
  78. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js +21 -2
  79. package/lib/features/agent/chat/ModernAgentOutput/ToolCallGroup.js.map +1 -1
  80. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +9 -1
  81. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
  82. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +97 -2
  83. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
  84. package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.d.ts +6 -0
  85. package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.d.ts.map +1 -0
  86. package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.js +29 -0
  87. package/lib/features/agent/chat/ModernAgentOutput/resourceLinks.js.map +1 -0
  88. package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.d.ts +33 -0
  89. package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.d.ts.map +1 -0
  90. package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.js +129 -0
  91. package/lib/features/agent/chat/ModernAgentOutput/resourceSummary.js.map +1 -0
  92. package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts +7 -0
  93. package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
  94. package/lib/features/agent/chat/ModernAgentOutput/utils.js +11 -1
  95. package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
  96. package/lib/features/agent/chat/hooks/useAgentStream.d.ts +1 -1
  97. package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
  98. package/lib/features/agent/chat/hooks/useAgentStream.js +34 -10
  99. package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
  100. package/lib/features/agent/chat/index.d.ts +2 -1
  101. package/lib/features/agent/chat/index.d.ts.map +1 -1
  102. package/lib/features/agent/chat/index.js +3 -0
  103. package/lib/features/agent/chat/index.js.map +1 -1
  104. package/lib/features/facets/PromptsFacetsNav.d.ts +8 -6
  105. package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
  106. package/lib/features/facets/PromptsFacetsNav.js +8 -3
  107. package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
  108. package/lib/features/store/objects/DocumentSearchResults.js +2 -2
  109. package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
  110. package/lib/features/store/objects/components/ContentOverview.d.ts +2 -1
  111. package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
  112. package/lib/features/store/objects/components/ContentOverview.js +90 -16
  113. package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
  114. package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.d.ts +16 -0
  115. package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.d.ts.map +1 -0
  116. package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.js +116 -0
  117. package/lib/features/store/objects/components/DocumentEditingConfigurationSelector.js.map +1 -0
  118. package/lib/features/store/objects/components/DocumentEditingLockStatus.d.ts +7 -0
  119. package/lib/features/store/objects/components/DocumentEditingLockStatus.d.ts.map +1 -0
  120. package/lib/features/store/objects/components/DocumentEditingLockStatus.js +13 -0
  121. package/lib/features/store/objects/components/DocumentEditingLockStatus.js.map +1 -0
  122. package/lib/features/store/objects/components/DocumentEditingPanel.d.ts +48 -0
  123. package/lib/features/store/objects/components/DocumentEditingPanel.d.ts.map +1 -0
  124. package/lib/features/store/objects/components/DocumentEditingPanel.js +720 -0
  125. package/lib/features/store/objects/components/DocumentEditingPanel.js.map +1 -0
  126. package/lib/features/store/objects/components/TextEditorPanel.d.ts.map +1 -1
  127. package/lib/features/store/objects/components/TextEditorPanel.js +22 -9
  128. package/lib/features/store/objects/components/TextEditorPanel.js.map +1 -1
  129. package/lib/features/store/objects/components/documentArtifactRefs.d.ts +26 -0
  130. package/lib/features/store/objects/components/documentArtifactRefs.d.ts.map +1 -0
  131. package/lib/features/store/objects/components/documentArtifactRefs.js +52 -0
  132. package/lib/features/store/objects/components/documentArtifactRefs.js.map +1 -0
  133. package/lib/features/store/objects/components/documentEditingAgentConfig.d.ts +4 -0
  134. package/lib/features/store/objects/components/documentEditingAgentConfig.d.ts.map +1 -0
  135. package/lib/features/store/objects/components/documentEditingAgentConfig.js +40 -0
  136. package/lib/features/store/objects/components/documentEditingAgentConfig.js.map +1 -0
  137. package/lib/features/store/objects/components/documentEditingPrompts.d.ts +3 -0
  138. package/lib/features/store/objects/components/documentEditingPrompts.d.ts.map +1 -0
  139. package/lib/features/store/objects/components/documentEditingPrompts.js +13 -0
  140. package/lib/features/store/objects/components/documentEditingPrompts.js.map +1 -0
  141. package/lib/features/store/objects/components/documentEditingRun.d.ts +27 -0
  142. package/lib/features/store/objects/components/documentEditingRun.d.ts.map +1 -0
  143. package/lib/features/store/objects/components/documentEditingRun.js +126 -0
  144. package/lib/features/store/objects/components/documentEditingRun.js.map +1 -0
  145. package/lib/features/store/objects/components/documentEditingTarget.d.ts +20 -0
  146. package/lib/features/store/objects/components/documentEditingTarget.d.ts.map +1 -0
  147. package/lib/features/store/objects/components/documentEditingTarget.js +40 -0
  148. package/lib/features/store/objects/components/documentEditingTarget.js.map +1 -0
  149. package/lib/features/store/objects/components/index.d.ts +1 -0
  150. package/lib/features/store/objects/components/index.d.ts.map +1 -1
  151. package/lib/features/store/objects/components/index.js +1 -0
  152. package/lib/features/store/objects/components/index.js.map +1 -1
  153. package/lib/features/store/objects/components/useContentPanelHooks.d.ts +36 -4
  154. package/lib/features/store/objects/components/useContentPanelHooks.d.ts.map +1 -1
  155. package/lib/features/store/objects/components/useContentPanelHooks.js +53 -29
  156. package/lib/features/store/objects/components/useContentPanelHooks.js.map +1 -1
  157. package/lib/features/store/objects/components/useDownloadFile.d.ts +2 -1
  158. package/lib/features/store/objects/components/useDownloadFile.d.ts.map +1 -1
  159. package/lib/features/store/objects/components/useDownloadFile.js +3 -0
  160. package/lib/features/store/objects/components/useDownloadFile.js.map +1 -1
  161. package/lib/features/store/objects/search/DocumentSearchContext.d.ts +128 -6
  162. package/lib/features/store/objects/search/DocumentSearchContext.d.ts.map +1 -1
  163. package/lib/features/store/objects/selection/ObjectsActionContext.d.ts +2 -2
  164. package/lib/features/store/objects/selection/ObjectsActionContext.d.ts.map +1 -1
  165. package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts +2 -2
  166. package/lib/features/store/objects/selection/ObjectsActionSpec.d.ts.map +1 -1
  167. package/lib/features/store/objects/selection/SelectionActions.d.ts +2 -2
  168. package/lib/features/store/objects/selection/SelectionActions.d.ts.map +1 -1
  169. package/lib/features/store/objects/selection/actions/StartWorkflowButton.js +1 -1
  170. package/lib/features/store/objects/selection/actions/StartWorkflowButton.js.map +1 -1
  171. package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
  172. package/lib/features/store/types/IntakePolicyEditor.d.ts +2 -2
  173. package/lib/features/store/types/IntakePolicyEditor.d.ts.map +1 -1
  174. package/lib/features/store/types/IntakePolicyEditor.js +5 -1
  175. package/lib/features/store/types/IntakePolicyEditor.js.map +1 -1
  176. package/lib/features/store/types/IntakePolicyForm.d.ts.map +1 -1
  177. package/lib/features/store/types/IntakePolicyForm.js +2 -2
  178. package/lib/features/store/types/IntakePolicyForm.js.map +1 -1
  179. package/lib/features/store/types/ObjectSchemaEditor.d.ts +2 -2
  180. package/lib/features/store/types/ObjectSchemaEditor.d.ts.map +1 -1
  181. package/lib/features/store/types/SelectContentType.d.ts +2 -2
  182. package/lib/features/store/types/SelectContentType.d.ts.map +1 -1
  183. package/lib/features/store/types/SelectContentType.js.map +1 -1
  184. package/lib/features/store/types/SelectContentTypeModal.d.ts +2 -2
  185. package/lib/features/store/types/SelectContentTypeModal.d.ts.map +1 -1
  186. package/lib/features/store/types/SelectContentTypeModal.js.map +1 -1
  187. package/lib/features/store/types/TableLayoutEditor.d.ts +2 -2
  188. package/lib/features/store/types/TableLayoutEditor.d.ts.map +1 -1
  189. package/lib/features/store/types/TypeRegistry.d.ts +1267 -6
  190. package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
  191. package/lib/features/store/types/TypeRegistry.js +5 -0
  192. package/lib/features/store/types/TypeRegistry.js.map +1 -1
  193. package/lib/features/store/types/intake-policy-editor.logic.d.ts +9 -1
  194. package/lib/features/store/types/intake-policy-editor.logic.d.ts.map +1 -1
  195. package/lib/features/store/types/intake-policy-editor.logic.js +9 -1
  196. package/lib/features/store/types/intake-policy-editor.logic.js.map +1 -1
  197. package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +1251 -1
  198. package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
  199. package/lib/features/store/types/typeCatalogCache.d.ts +2 -2
  200. package/lib/features/store/types/typeCatalogCache.d.ts.map +1 -1
  201. package/lib/features/store/types/typeCatalogCache.js +4 -0
  202. package/lib/features/store/types/typeCatalogCache.js.map +1 -1
  203. package/lib/features/user/UserInfo.d.ts +118 -7
  204. package/lib/features/user/UserInfo.d.ts.map +1 -1
  205. package/lib/i18n/locales/ar.json +120 -2
  206. package/lib/i18n/locales/de.json +120 -2
  207. package/lib/i18n/locales/en.json +123 -1
  208. package/lib/i18n/locales/es.json +120 -2
  209. package/lib/i18n/locales/fr.json +120 -2
  210. package/lib/i18n/locales/it.json +120 -2
  211. package/lib/i18n/locales/ja.json +120 -2
  212. package/lib/i18n/locales/ko.json +120 -2
  213. package/lib/i18n/locales/pt.json +120 -2
  214. package/lib/i18n/locales/ru.json +120 -2
  215. package/lib/i18n/locales/tr.json +120 -2
  216. package/lib/i18n/locales/zh-TW.json +120 -2
  217. package/lib/i18n/locales/zh.json +120 -2
  218. package/lib/rich-text/EditorToolbar.d.ts +37 -0
  219. package/lib/rich-text/EditorToolbar.d.ts.map +1 -0
  220. package/lib/rich-text/EditorToolbar.js +215 -0
  221. package/lib/rich-text/EditorToolbar.js.map +1 -0
  222. package/lib/rich-text/VertesiaRichTextEditor.d.ts +26 -0
  223. package/lib/rich-text/VertesiaRichTextEditor.d.ts.map +1 -0
  224. package/lib/rich-text/VertesiaRichTextEditor.js +67 -0
  225. package/lib/rich-text/VertesiaRichTextEditor.js.map +1 -0
  226. package/lib/rich-text/index.d.ts +2 -0
  227. package/lib/rich-text/index.d.ts.map +1 -0
  228. package/lib/rich-text/index.js +2 -0
  229. package/lib/rich-text/index.js.map +1 -0
  230. package/lib/session/UserSession.d.ts +18 -4
  231. package/lib/session/UserSession.d.ts.map +1 -1
  232. package/lib/shell/apps/AppInstallationProvider.d.ts +222 -2
  233. package/lib/shell/apps/AppInstallationProvider.d.ts.map +1 -1
  234. package/lib/shell/login/InviteAcceptModal.js.map +1 -1
  235. package/lib/vertesia-ui-core.js +3 -3
  236. package/lib/vertesia-ui-core.js.map +1 -1
  237. package/lib/vertesia-ui-features.js +35 -30
  238. package/lib/vertesia-ui-features.js.map +1 -1
  239. package/lib/vertesia-ui-i18n.js +14 -14
  240. package/lib/vertesia-ui-i18n.js.map +1 -1
  241. package/lib/vertesia-ui-rich-text.js +5 -0
  242. package/lib/vertesia-ui-rich-text.js.map +1 -0
  243. package/lib/vertesia-ui-widgets.js +25 -7
  244. package/lib/vertesia-ui-widgets.js.map +1 -1
  245. package/lib/widgets/markdown/AgentResourceResolver.d.ts +31 -0
  246. package/lib/widgets/markdown/AgentResourceResolver.d.ts.map +1 -0
  247. package/lib/widgets/markdown/AgentResourceResolver.js +39 -0
  248. package/lib/widgets/markdown/AgentResourceResolver.js.map +1 -0
  249. package/lib/widgets/markdown/ArtifactEditingSurface.d.ts +63 -0
  250. package/lib/widgets/markdown/ArtifactEditingSurface.d.ts.map +1 -0
  251. package/lib/widgets/markdown/ArtifactEditingSurface.js +582 -0
  252. package/lib/widgets/markdown/ArtifactEditingSurface.js.map +1 -0
  253. package/lib/widgets/markdown/CollaborativeMarkdownRenderer.d.ts +69 -0
  254. package/lib/widgets/markdown/CollaborativeMarkdownRenderer.d.ts.map +1 -0
  255. package/lib/widgets/markdown/CollaborativeMarkdownRenderer.js +374 -0
  256. package/lib/widgets/markdown/CollaborativeMarkdownRenderer.js.map +1 -0
  257. package/lib/widgets/markdown/MarkdownLink.d.ts +3 -1
  258. package/lib/widgets/markdown/MarkdownLink.d.ts.map +1 -1
  259. package/lib/widgets/markdown/MarkdownLink.js +41 -14
  260. package/lib/widgets/markdown/MarkdownLink.js.map +1 -1
  261. package/lib/widgets/markdown/MarkdownRenderer.d.ts +8 -1
  262. package/lib/widgets/markdown/MarkdownRenderer.d.ts.map +1 -1
  263. package/lib/widgets/markdown/MarkdownRenderer.js +20 -4
  264. package/lib/widgets/markdown/MarkdownRenderer.js.map +1 -1
  265. package/lib/widgets/markdown/index.d.ts +5 -1
  266. package/lib/widgets/markdown/index.d.ts.map +1 -1
  267. package/lib/widgets/markdown/index.js +5 -1
  268. package/lib/widgets/markdown/index.js.map +1 -1
  269. package/lib/widgets/markdown/normalizeCustomSchemeLinks.d.ts.map +1 -1
  270. package/lib/widgets/markdown/normalizeCustomSchemeLinks.js +14 -2
  271. package/lib/widgets/markdown/normalizeCustomSchemeLinks.js.map +1 -1
  272. package/lib/widgets/markdown/textDiff.d.ts +52 -0
  273. package/lib/widgets/markdown/textDiff.d.ts.map +1 -0
  274. package/lib/widgets/markdown/textDiff.js +362 -0
  275. package/lib/widgets/markdown/textDiff.js.map +1 -0
  276. package/lib/widgets/markdown/useArtifactContent.d.ts +5 -3
  277. package/lib/widgets/markdown/useArtifactContent.d.ts.map +1 -1
  278. package/lib/widgets/markdown/useArtifactContent.js +6 -3
  279. package/lib/widgets/markdown/useArtifactContent.js.map +1 -1
  280. package/lib/widgets/markdown/useResolvedUrl.d.ts +1 -5
  281. package/lib/widgets/markdown/useResolvedUrl.d.ts.map +1 -1
  282. package/lib/widgets/markdown/useResolvedUrl.js +19 -31
  283. package/lib/widgets/markdown/useResolvedUrl.js.map +1 -1
  284. package/lib/widgets/monacoEditor/MonacoEditor.d.ts +7 -1
  285. package/lib/widgets/monacoEditor/MonacoEditor.d.ts.map +1 -1
  286. package/lib/widgets/monacoEditor/MonacoEditor.js +62 -6
  287. package/lib/widgets/monacoEditor/MonacoEditor.js.map +1 -1
  288. package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts +9 -0
  289. package/lib/widgets/xml-viewer/hooks/useXMLViewer.d.ts.map +1 -1
  290. package/lib/widgets/xml-viewer/hooks/useXMLViewer.js +20 -17
  291. package/lib/widgets/xml-viewer/hooks/useXMLViewer.js.map +1 -1
  292. package/package.json +36 -32
  293. package/src/__tests__/a11y.test.tsx +4 -1
  294. package/src/__tests__/axe-helper.ts +17 -7
  295. package/src/__tests__/setup.ts +25 -0
  296. package/src/core/components/shadcn/filters/filterBar.tsx +1 -0
  297. package/src/core/components/shadcn/modal/dialog.tsx +3 -1
  298. package/src/core/components/shadcn/tabs.test.tsx +65 -0
  299. package/src/core/components/shadcn/tabs.tsx +25 -3
  300. package/src/core/hooks/useScrollableSearch.test.tsx +139 -0
  301. package/src/core/hooks/useScrollableSearch.tsx +17 -3
  302. package/src/env/index.ts +2 -0
  303. package/src/features/agent/chat/AgentChatPlaybackControls.test.tsx +2 -0
  304. package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +51 -6
  305. package/src/features/agent/chat/AgentRequestInputOverlay.tsx +5 -7
  306. package/src/features/agent/chat/AgentRightPanel.tsx +16 -1
  307. package/src/features/agent/chat/ArtifactsTab.test.tsx +55 -0
  308. package/src/features/agent/chat/ArtifactsTab.tsx +203 -52
  309. package/src/features/agent/chat/DocumentEditingActionCard.test.tsx +105 -0
  310. package/src/features/agent/chat/DocumentEditingActionCard.tsx +210 -0
  311. package/src/features/agent/chat/ModernAgentConversation.test.tsx +432 -43
  312. package/src/features/agent/chat/ModernAgentConversation.tsx +352 -96
  313. package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +75 -20
  314. package/src/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.test.tsx +79 -0
  315. package/src/features/agent/chat/ModernAgentOutput/AgentMarkdownAnchor.tsx +94 -0
  316. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +369 -34
  317. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +279 -115
  318. package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +53 -4
  319. package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.test.tsx +44 -0
  320. package/src/features/agent/chat/ModernAgentOutput/CollapsibleAgentMarkdown.tsx +88 -0
  321. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +2 -2
  322. package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +71 -0
  323. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +3 -1
  324. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +48 -50
  325. package/src/features/agent/chat/ModernAgentOutput/ResourceChangeSummary.tsx +40 -0
  326. package/src/features/agent/chat/ModernAgentOutput/ResourceChip.test.tsx +148 -0
  327. package/src/features/agent/chat/ModernAgentOutput/ResourceChip.tsx +141 -0
  328. package/src/features/agent/chat/ModernAgentOutput/ToolCallGroup.tsx +33 -1
  329. package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.test.ts +95 -0
  330. package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +111 -1
  331. package/src/features/agent/chat/ModernAgentOutput/resourceLinks.tsx +43 -0
  332. package/src/features/agent/chat/ModernAgentOutput/resourceSummary.test.ts +229 -0
  333. package/src/features/agent/chat/ModernAgentOutput/resourceSummary.ts +152 -0
  334. package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +17 -0
  335. package/src/features/agent/chat/ModernAgentOutput/utils.ts +14 -1
  336. package/src/features/agent/chat/hooks/useAgentStream.test.tsx +245 -0
  337. package/src/features/agent/chat/hooks/useAgentStream.ts +38 -9
  338. package/src/features/agent/chat/index.ts +12 -0
  339. package/src/features/facets/PromptsFacetsNav.tsx +17 -9
  340. package/src/features/store/objects/DocumentSearchResults.tsx +2 -2
  341. package/src/features/store/objects/components/ContentOverview.tsx +220 -66
  342. package/src/features/store/objects/components/DocumentEditingConfigurationSelector.test.ts +34 -0
  343. package/src/features/store/objects/components/DocumentEditingConfigurationSelector.tsx +211 -0
  344. package/src/features/store/objects/components/DocumentEditingLockStatus.test.tsx +32 -0
  345. package/src/features/store/objects/components/DocumentEditingLockStatus.tsx +45 -0
  346. package/src/features/store/objects/components/DocumentEditingPanel.test.tsx +336 -0
  347. package/src/features/store/objects/components/DocumentEditingPanel.tsx +1236 -0
  348. package/src/features/store/objects/components/TextEditorPanel.test.tsx +48 -0
  349. package/src/features/store/objects/components/TextEditorPanel.tsx +41 -20
  350. package/src/features/store/objects/components/documentArtifactRefs.test.ts +65 -0
  351. package/src/features/store/objects/components/documentArtifactRefs.ts +72 -0
  352. package/src/features/store/objects/components/documentEditingAgentConfig.test.ts +28 -0
  353. package/src/features/store/objects/components/documentEditingAgentConfig.ts +41 -0
  354. package/src/features/store/objects/components/documentEditingPrompts.test.ts +26 -0
  355. package/src/features/store/objects/components/documentEditingPrompts.ts +12 -0
  356. package/src/features/store/objects/components/documentEditingRun.test.ts +176 -0
  357. package/src/features/store/objects/components/documentEditingRun.ts +184 -0
  358. package/src/features/store/objects/components/documentEditingTarget.test.ts +96 -0
  359. package/src/features/store/objects/components/documentEditingTarget.ts +63 -0
  360. package/src/features/store/objects/components/index.ts +1 -0
  361. package/src/features/store/objects/components/useContentPanelHooks.ts +52 -27
  362. package/src/features/store/objects/components/useDownloadFile.test.ts +20 -0
  363. package/src/features/store/objects/components/useDownloadFile.ts +5 -1
  364. package/src/features/store/objects/selection/ObjectsActionContext.tsx +2 -2
  365. package/src/features/store/objects/selection/ObjectsActionSpec.ts +2 -2
  366. package/src/features/store/objects/selection/SelectionActions.tsx +2 -2
  367. package/src/features/store/objects/selection/actions/StartWorkflowButton.tsx +2 -2
  368. package/src/features/store/objects/upload/DocumentUploadModal.tsx +2 -2
  369. package/src/features/store/types/IntakePolicyEditor.tsx +12 -4
  370. package/src/features/store/types/IntakePolicyForm.tsx +25 -0
  371. package/src/features/store/types/ObjectSchemaEditor.tsx +2 -2
  372. package/src/features/store/types/SelectContentType.tsx +9 -9
  373. package/src/features/store/types/SelectContentTypeModal.tsx +5 -5
  374. package/src/features/store/types/TableLayoutEditor.tsx +2 -2
  375. package/src/features/store/types/TypeRegistry.ts +8 -3
  376. package/src/features/store/types/intake-policy-editor.logic.ts +10 -2
  377. package/src/features/store/types/typeCatalogCache.ts +10 -3
  378. package/src/i18n/locales/ar.json +120 -2
  379. package/src/i18n/locales/de.json +120 -2
  380. package/src/i18n/locales/en.json +123 -1
  381. package/src/i18n/locales/es.json +120 -2
  382. package/src/i18n/locales/fr.json +120 -2
  383. package/src/i18n/locales/it.json +120 -2
  384. package/src/i18n/locales/ja.json +120 -2
  385. package/src/i18n/locales/ko.json +120 -2
  386. package/src/i18n/locales/pt.json +120 -2
  387. package/src/i18n/locales/ru.json +120 -2
  388. package/src/i18n/locales/tr.json +120 -2
  389. package/src/i18n/locales/zh-TW.json +120 -2
  390. package/src/i18n/locales/zh.json +120 -2
  391. package/src/rich-text/EditorToolbar.tsx +708 -0
  392. package/src/rich-text/VertesiaRichTextEditor.test.tsx +211 -0
  393. package/src/rich-text/VertesiaRichTextEditor.tsx +241 -0
  394. package/src/rich-text/index.ts +9 -0
  395. package/src/session/UserSession.test.ts +11 -11
  396. package/src/shell/login/InviteAcceptModal.tsx +4 -4
  397. package/src/widgets/markdown/AgentResourceResolver.test.ts +24 -0
  398. package/src/widgets/markdown/AgentResourceResolver.tsx +70 -0
  399. package/src/widgets/markdown/ArtifactEditingSurface.test.tsx +541 -0
  400. package/src/widgets/markdown/ArtifactEditingSurface.tsx +878 -0
  401. package/src/widgets/markdown/CollaborativeMarkdownRenderer.test.tsx +484 -0
  402. package/src/widgets/markdown/CollaborativeMarkdownRenderer.tsx +825 -0
  403. package/src/widgets/markdown/MarkdownLink.test.tsx +122 -0
  404. package/src/widgets/markdown/MarkdownLink.tsx +102 -17
  405. package/src/widgets/markdown/MarkdownRenderer.tsx +30 -3
  406. package/src/widgets/markdown/index.ts +39 -1
  407. package/src/widgets/markdown/normalizeCustomSchemeLinks.ts +15 -2
  408. package/src/widgets/markdown/textDiff.test.ts +156 -0
  409. package/src/widgets/markdown/textDiff.ts +399 -0
  410. package/src/widgets/markdown/useArtifactContent.ts +9 -3
  411. package/src/widgets/markdown/useResolvedUrl.test.ts +29 -40
  412. package/src/widgets/markdown/useResolvedUrl.ts +33 -35
  413. package/src/widgets/monacoEditor/MonacoEditor.tsx +83 -7
  414. package/src/widgets/xml-viewer/hooks/useXMLViewer.test.ts +26 -0
  415. package/src/widgets/xml-viewer/hooks/useXMLViewer.ts +23 -18
@@ -30,7 +30,12 @@ import {
30
30
  } from '@vertesia/ui/core';
31
31
  import { useUITranslation } from '@vertesia/ui/i18n';
32
32
  import { useUserSession } from '@vertesia/ui/session';
33
- import { ArrowUpIcon, Bot, CheckCircle, Cpu, FileTextIcon, UploadIcon, XIcon } from 'lucide-react';
33
+ import {
34
+ type AgentResourceResolver,
35
+ AgentResourceResolverProvider,
36
+ isArtifactRefreshEvent,
37
+ } from '@vertesia/ui/widgets';
38
+ import { ArrowUpIcon, Bot, CheckCircle, ChevronDown, Cpu, FileTextIcon, UploadIcon, XIcon } from 'lucide-react';
34
39
  import type React from 'react';
35
40
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
36
41
  import { McpConnectionsActionMenu } from '../../oauth/McpConnectionsButton.js';
@@ -60,7 +65,14 @@ import MessageInput, {
60
65
  type UploadedFile,
61
66
  } from './ModernAgentOutput/MessageInput';
62
67
  import type { MessageItemClassNames } from './ModernAgentOutput/MessageItem';
63
- import { getPendingRequestInputMessage } from './ModernAgentOutput/requestInputMessages';
68
+ import {
69
+ clearRequestInputIdAnsweredForSession,
70
+ getPendingRequestInputMessage,
71
+ getRequestInputResolutionKey,
72
+ getRequestInputResponseIdFromMetadata,
73
+ isRequestInputAnsweredForSession,
74
+ markRequestInputIdAnsweredForSession,
75
+ } from './ModernAgentOutput/requestInputMessages';
64
76
  import type { StreamingMessageClassNames } from './ModernAgentOutput/StreamingMessage';
65
77
  import type { ToolCallGroupClassNames } from './ModernAgentOutput/ToolCallGroup';
66
78
  import {
@@ -69,6 +81,7 @@ import {
69
81
  getConversationUrl,
70
82
  getWorkstreamId,
71
83
  isInProgress,
84
+ isPassiveArtifactUpdate,
72
85
  } from './ModernAgentOutput/utils';
73
86
  import {
74
87
  type AgentChatPlaybackCursor,
@@ -92,12 +105,18 @@ export interface StartWorkflowOptions {
92
105
  tool_approval_mode?: AgentToolApprovalMode;
93
106
  }
94
107
 
108
+ /** Controls whether a persisted message is included in the rendered conversation transcript. */
109
+ export type AgentMessageFilter = (message: AgentMessage) => boolean;
110
+
95
111
  export type StartWorkflowFn = (
96
112
  initialMessage?: string,
97
113
  options?: StartWorkflowOptions,
98
114
  ) => Promise<{ agent_run_id: string } | undefined>;
99
115
 
116
+ export type SendAgentMessageFn = (message: string, inputMetadata?: Record<string, unknown>) => void;
117
+
100
118
  const EMPTY_STREAMING_MESSAGES = new Map<string, never>();
119
+ const COLLAPSED_STAGED_FILE_COUNT = 3;
101
120
 
102
121
  function getTimestampMs(timestamp: number | string | undefined): number {
103
122
  if (typeof timestamp === 'number') return timestamp;
@@ -129,8 +148,13 @@ function toContextWindowUsage(messages: AgentMessage[]): ContextWindowUsage | un
129
148
  const details = messages[index].details;
130
149
  if (!details) continue;
131
150
 
132
- const tokenUsage = details.token_usage as { total?: unknown } | undefined;
133
- const usedTokens = getNumberDetail(tokenUsage?.total);
151
+ const tokenUsage = details.token_usage as { prompt?: unknown; total?: unknown } | undefined;
152
+ // Mirror the server's checkpoint trigger (getContextPressureTokens):
153
+ // the last call's prompt size is the actual context; `total` includes
154
+ // reasoning output that never re-enters context and would overstate
155
+ // pressure on reasoning models. Fall back to total when no breakdown.
156
+ const promptTokens = getNumberDetail(tokenUsage?.prompt);
157
+ const usedTokens = promptTokens && promptTokens > 0 ? promptTokens : getNumberDetail(tokenUsage?.total);
134
158
  const checkpointTokens =
135
159
  getNumberDetail(details.checkpoint_threshold) ?? getNumberDetail(details.checkpoint_at);
136
160
 
@@ -533,6 +557,12 @@ function downloadJsonFile(filename: string, payload: unknown) {
533
557
  export interface ModernAgentConversationProps {
534
558
  /** Stable AgentRun ID — the primary identifier for all runtime operations. */
535
559
  agentRunId?: string;
560
+ /**
561
+ * Optional override for mapping agent resource references (documents, collections, interactions,
562
+ * ...) to navigation or activation targets in the chat. This overrides an inherited
563
+ * AgentResourceResolverProvider; without either, resources remain non-interactive.
564
+ */
565
+ resourceResolver?: AgentResourceResolver;
536
566
  title?: string;
537
567
  interactive?: boolean;
538
568
  onClose?: () => void;
@@ -567,6 +597,12 @@ export interface ModernAgentConversationProps {
567
597
 
568
598
  /** Ref populated with the internal file upload handler for external triggering */
569
599
  fileUploadRef?: React.MutableRefObject<((files: File[]) => void) | null>;
600
+ /** Ref populated with the internal message sender for document or artifact collaboration controls. */
601
+ sendMessageRef?: React.MutableRefObject<SendAgentMessageFn | null>;
602
+ /** Called for each live message delivered after the conversation stream connects. */
603
+ onMessage?: (message: AgentMessage) => void;
604
+ /** Called when the main agent turn starts or reaches an idle/terminal state. */
605
+ onAgentWorkingChange?: (isWorking: boolean) => void;
570
606
  /** Called when processingFiles state changes (for external progress display) */
571
607
  onProcessingFilesChange?: (files: Map<string, ConversationFile>) => void;
572
608
  /** Processing files to display in the right panel Uploads tab */
@@ -607,6 +643,8 @@ export interface ModernAgentConversationProps {
607
643
  hideHeader?: boolean;
608
644
  /** Header density. Use compact when the surrounding page already identifies the run. */
609
645
  headerVariant?: 'full' | 'compact';
646
+ /** Start-screen layout. Compact removes empty history; expanded-composer gives that space to the first input. */
647
+ startViewVariant?: 'default' | 'compact' | 'expanded-composer';
610
648
  /** Hide the internal message input (for apps that render their own) */
611
649
  hideMessageInput?: boolean;
612
650
  /** Custom action shown in place of the input box when the run status is FAILED.
@@ -626,6 +664,11 @@ export interface ModernAgentConversationProps {
626
664
  hideDocumentPanel?: boolean;
627
665
  /** Message types to exclude from the conversation view */
628
666
  hiddenMessageTypes?: AgentMessageType[];
667
+ /**
668
+ * Optional presentation-only predicate for transcript messages. Returning false hides the message without
669
+ * changing the underlying conversation stream, workflow state, plans, or pending input.
670
+ */
671
+ messageFilter?: AgentMessageFilter;
629
672
 
630
673
  // Callback to get attached documents when sending messages
631
674
  // Returns array of { id, name } to include in message metadata and display
@@ -643,6 +686,8 @@ export interface ModernAgentConversationProps {
643
686
  inputContainerClassName?: string;
644
687
  /** Additional className for the input field */
645
688
  inputClassName?: string;
689
+ /** Read-only context rendered immediately above the live conversation composer. */
690
+ composerContext?: React.ReactNode;
646
691
 
647
692
  /** Additional className for the root container */
648
693
  className?: string;
@@ -703,19 +748,24 @@ export interface ModernAgentConversationProps {
703
748
  initialToolApprovalMode?: AgentToolApprovalMode;
704
749
  /** Force display playback controls on or off. When omitted, local playback can be toggled from the header. */
705
750
  enablePlayback?: boolean;
706
- /** Show a local toggle for display playback controls in the conversation action rail. */
751
+ /** Show the Debug button for local playback controls. Defaults to true; set to false to hide it. */
707
752
  showPlaybackToggle?: boolean;
708
753
  }
709
754
 
710
755
  export function ModernAgentConversation(props: ModernAgentConversationProps) {
711
- const { agentRunId, startWorkflow } = props;
756
+ const { agentRunId, startWorkflow, resourceResolver } = props;
712
757
 
713
758
  if (agentRunId) {
714
- return (
759
+ const conversation = (
715
760
  <SkillWidgetProvider>
716
761
  <ModernAgentConversationInner {...props} agentRunId={agentRunId} />
717
762
  </SkillWidgetProvider>
718
763
  );
764
+ return resourceResolver ? (
765
+ <AgentResourceResolverProvider value={resourceResolver}>{conversation}</AgentResourceResolverProvider>
766
+ ) : (
767
+ conversation
768
+ );
719
769
  } else if (startWorkflow) {
720
770
  // If we have startWorkflow capability but no agentRunId yet
721
771
  return <StartWorkflowView {...props} />;
@@ -758,13 +808,17 @@ function StartWorkflowView({
758
808
  hideFileUpload = false,
759
809
  hideObjectLinking,
760
810
  headerVariant,
811
+ startViewVariant = 'default',
761
812
  inputContainerClassName,
762
813
  inputClassName,
763
814
  className,
764
815
  allowWorkflowControl,
765
816
  initialToolApprovalMode,
817
+ onAgentWorkingChange,
766
818
  }: ModernAgentConversationProps) {
767
819
  const { t } = useUITranslation();
820
+ const isCompactStartView = startViewVariant !== 'default';
821
+ const isExpandedStartComposer = startViewVariant === 'expanded-composer';
768
822
  const canStageFiles = !hideFileUpload;
769
823
  const resolvedPlaceholder = placeholder ?? t('agent.typeYourMessage');
770
824
  const resolvedStartButtonText = startButtonText ?? t('agent.startAgent');
@@ -784,6 +838,13 @@ function StartWorkflowView({
784
838
 
785
839
  // Staged files - stored locally until workflow starts
786
840
  const [stagedFiles, setStagedFiles] = useState<File[]>([]);
841
+ const [areStagedFilesExpanded, setAreStagedFilesExpanded] = useState(false);
842
+ const visibleStagedFiles = areStagedFilesExpanded ? stagedFiles : stagedFiles.slice(0, COLLAPSED_STAGED_FILE_COUNT);
843
+ const hiddenStagedFileCount = stagedFiles.length - COLLAPSED_STAGED_FILE_COUNT;
844
+
845
+ useEffect(() => {
846
+ onAgentWorkingChange?.(isSending);
847
+ }, [isSending, onAgentWorkingChange]);
787
848
 
788
849
  // Drag and drop state
789
850
  const [isDragOver, setIsDragOver] = useState(false);
@@ -877,6 +938,12 @@ function StartWorkflowView({
877
938
  setStagedFiles((prev) => prev.filter((_, i) => i !== index));
878
939
  }, []);
879
940
 
941
+ useEffect(() => {
942
+ if (stagedFiles.length <= COLLAPSED_STAGED_FILE_COUNT) {
943
+ setAreStagedFilesExpanded(false);
944
+ }
945
+ }, [stagedFiles.length]);
946
+
880
947
  useEffect(() => {
881
948
  // Focus the input field when component mounts
882
949
  if (inputRef.current) {
@@ -1021,10 +1088,14 @@ function StartWorkflowView({
1021
1088
  const adjustTextareaHeight = useCallback(() => {
1022
1089
  const textarea = inputRef.current;
1023
1090
  if (textarea) {
1091
+ if (isExpandedStartComposer) {
1092
+ textarea.style.height = '100%';
1093
+ return;
1094
+ }
1024
1095
  textarea.style.height = 'auto';
1025
1096
  textarea.style.height = `${Math.min(textarea.scrollHeight, 200)}px`;
1026
1097
  }
1027
- }, []);
1098
+ }, [isExpandedStartComposer]);
1028
1099
 
1029
1100
  useEffect(() => {
1030
1101
  void inputValue;
@@ -1049,6 +1120,7 @@ function StartWorkflowView({
1049
1120
  inputClassName,
1050
1121
  className,
1051
1122
  allowWorkflowControl,
1123
+ onAgentWorkingChange,
1052
1124
  }}
1053
1125
  agentRunId={startedAgentRunId}
1054
1126
  title={title}
@@ -1060,11 +1132,18 @@ function StartWorkflowView({
1060
1132
  }
1061
1133
 
1062
1134
  return (
1063
- <div className={cn('flex h-full flex-col items-center bg-background', className)}>
1135
+ <div
1136
+ className={cn(
1137
+ 'flex flex-col items-center bg-background',
1138
+ isCompactStartView && !isExpandedStartComposer ? '' : 'h-full',
1139
+ className,
1140
+ )}
1141
+ >
1064
1142
  {/* biome-ignore lint/a11y/noStaticElementInteractions: drag/drop target only; file selection is also exposed via the upload button. */}
1065
1143
  <div
1066
1144
  className={cn(
1067
- 'relative flex h-full w-full flex-col overflow-hidden border-0',
1145
+ 'relative flex w-full flex-col overflow-hidden border-0',
1146
+ isCompactStartView && !isExpandedStartComposer ? '' : 'h-full',
1068
1147
  fullWidth ? '' : 'max-w-4xl',
1069
1148
  )}
1070
1149
  onDragEnter={canStageFiles ? handleDragEnter : undefined}
@@ -1120,11 +1199,21 @@ function StartWorkflowView({
1120
1199
  )}
1121
1200
 
1122
1201
  {/* Empty conversation area with instructions */}
1123
- <div className="flex flex-1 flex-col items-center justify-end overflow-y-auto bg-background px-4">
1202
+ <div
1203
+ className={cn(
1204
+ 'flex flex-col items-center justify-end bg-background px-4',
1205
+ isCompactStartView ? 'shrink-0 pt-3' : 'flex-1 overflow-y-auto',
1206
+ )}
1207
+ >
1124
1208
  {pendingStartMessage && pendingStartTimestamp ? (
1125
1209
  <PendingStartConversation message={pendingStartMessage} startedAt={pendingStartTimestamp} />
1126
1210
  ) : (
1127
- <div className="mx-auto flex min-h-full w-full max-w-3xl flex-col justify-end py-8">
1211
+ <div
1212
+ className={cn(
1213
+ 'mx-auto flex w-full max-w-3xl flex-col justify-end',
1214
+ isCompactStartView ? '' : 'min-h-full py-8',
1215
+ )}
1216
+ >
1128
1217
  {initialMessage && (
1129
1218
  <div className="text-[15px] leading-relaxed text-foreground/80">{initialMessage}</div>
1130
1219
  )}
@@ -1133,17 +1222,23 @@ function StartWorkflowView({
1133
1222
  </div>
1134
1223
 
1135
1224
  {/* Input Area */}
1136
- <div className="shrink-0 bg-background px-4 pb-safe-area-4 pt-2">
1225
+ <div
1226
+ className={cn(
1227
+ 'bg-background px-4 pb-safe-area-4 pt-2',
1228
+ isExpandedStartComposer ? 'flex min-h-0 flex-1 flex-col' : 'shrink-0',
1229
+ )}
1230
+ >
1137
1231
  <div
1138
1232
  className={cn(
1139
1233
  'mx-auto flex max-w-3xl flex-col gap-3 rounded-2xl border border-border/70 bg-mixer-muted/15 p-3 shadow-lg shadow-black/5',
1234
+ isExpandedStartComposer && 'min-h-0 w-full flex-1',
1140
1235
  inputContainerClassName,
1141
1236
  )}
1142
1237
  >
1143
1238
  {/* Staged files display */}
1144
1239
  {canStageFiles && stagedFiles.length > 0 && (
1145
1240
  <div className="flex flex-wrap gap-2">
1146
- {stagedFiles.map((file, index) => (
1241
+ {visibleStagedFiles.map((file, index) => (
1147
1242
  <div
1148
1243
  key={`${file.name}-${file.size}-${file.lastModified}`}
1149
1244
  className="flex items-center gap-1.5 rounded-md bg-attention/10 px-2 py-1 text-sm text-attention"
@@ -1162,6 +1257,26 @@ function StartWorkflowView({
1162
1257
  </Button>
1163
1258
  </div>
1164
1259
  ))}
1260
+ {stagedFiles.length > COLLAPSED_STAGED_FILE_COUNT && (
1261
+ <Button
1262
+ type="button"
1263
+ variant="ghost"
1264
+ size="sm"
1265
+ aria-expanded={areStagedFilesExpanded}
1266
+ onClick={() => setAreStagedFilesExpanded((expanded) => !expanded)}
1267
+ className="h-8 shrink-0 gap-1 rounded-xl px-2.5 text-xs text-muted"
1268
+ >
1269
+ {!areStagedFilesExpanded && <span>+{hiddenStagedFileCount}</span>}
1270
+ {areStagedFilesExpanded ? t('agent.showLess') : t('agent.showMore')}
1271
+ <ChevronDown
1272
+ className={cn(
1273
+ 'size-3.5 transition-transform',
1274
+ areStagedFilesExpanded && 'rotate-180',
1275
+ )}
1276
+ aria-hidden="true"
1277
+ />
1278
+ </Button>
1279
+ )}
1165
1280
  </div>
1166
1281
  )}
1167
1282
 
@@ -1176,9 +1291,14 @@ function StartWorkflowView({
1176
1291
  rows={2}
1177
1292
  className={cn(
1178
1293
  'min-h-[72px] resize-none overflow-hidden border-0 bg-transparent px-0 py-0 text-sm leading-6 shadow-none focus-visible:ring-0',
1294
+ isExpandedStartComposer && 'min-h-0 flex-1',
1179
1295
  inputClassName,
1180
1296
  )}
1181
- style={{ minHeight: '72px', maxHeight: '200px' }}
1297
+ style={
1298
+ isExpandedStartComposer
1299
+ ? { minHeight: '72px', maxHeight: 'none' }
1300
+ : { minHeight: '72px', maxHeight: '200px' }
1301
+ }
1182
1302
  />
1183
1303
 
1184
1304
  <div className="flex items-center justify-between gap-3">
@@ -1274,10 +1394,14 @@ function ModernAgentConversationInner({
1274
1394
  className,
1275
1395
  inputContainerClassName,
1276
1396
  inputClassName,
1397
+ composerContext,
1277
1398
  // Fusion fragment data
1278
1399
  fusionData,
1279
1400
  // External file upload API
1280
1401
  fileUploadRef,
1402
+ sendMessageRef,
1403
+ onMessage,
1404
+ onAgentWorkingChange,
1281
1405
  onProcessingFilesChange,
1282
1406
  processingFiles: processingFilesProp,
1283
1407
  // External plan panel API
@@ -1318,6 +1442,7 @@ function ModernAgentConversationInner({
1318
1442
  initialToolApprovalMode,
1319
1443
  enablePlayback,
1320
1444
  showPlaybackToggle = true,
1445
+ messageFilter,
1321
1446
  }: ModernAgentConversationProps & { agentRunId: string }) {
1322
1447
  const { t } = useUITranslation();
1323
1448
  const { client } = useUserSession();
@@ -1338,7 +1463,7 @@ function ModernAgentConversationInner({
1338
1463
  agentRunStatus,
1339
1464
  workflowRunId,
1340
1465
  serverFileUpdates,
1341
- } = useAgentStream(client, agentRunId);
1466
+ } = useAgentStream(client, agentRunId, onMessage);
1342
1467
 
1343
1468
  const {
1344
1469
  plans,
@@ -1547,12 +1672,16 @@ function ModernAgentConversationInner({
1547
1672
 
1548
1673
  const canShowPlaybackToggle = showPlaybackToggle && enablePlayback === undefined && isAgentChatPlaybackAvailable();
1549
1674
  const isPlaybackEnabled = enablePlayback ?? (isAgentChatPlaybackEnabled() || isPlaybackToggleEnabled);
1550
- const playbackSourceMessages = useMemo(() => {
1551
- const visibleMessages = hiddenMessageTypes?.length
1552
- ? messages.filter((message) => !hiddenMessageTypes.includes(message.type))
1553
- : messages;
1554
- return filterMessagesForActiveWorkstream(visibleMessages, activeWorkstream);
1555
- }, [activeWorkstream, hiddenMessageTypes, messages]);
1675
+ const transcriptSourceMessages = useMemo(() => {
1676
+ // Passive artifact autosaves are surfaced by the editor's own save indicator, not the chat.
1677
+ return messages.filter(
1678
+ (message) => !isPassiveArtifactUpdate(message) && !(hiddenMessageTypes?.includes(message.type) ?? false),
1679
+ );
1680
+ }, [hiddenMessageTypes, messages]);
1681
+ const playbackSourceMessages = useMemo(
1682
+ () => filterMessagesForActiveWorkstream(transcriptSourceMessages, activeWorkstream),
1683
+ [activeWorkstream, transcriptSourceMessages],
1684
+ );
1556
1685
  const playbackState = useMemo(
1557
1686
  () => createPlaybackState(playbackSourceMessages, playbackCursor, isPlaybackEnabled),
1558
1687
  [isPlaybackEnabled, playbackCursor, playbackSourceMessages],
@@ -1562,6 +1691,17 @@ function ModernAgentConversationInner({
1562
1691
  const isPlaybackAtLatest =
1563
1692
  isPlaybackEnabled && !isPlaybackLive && playbackState.cursorIndex === playbackSourceMessages.length - 1;
1564
1693
  const displayedMessages = playbackState.displayedMessages;
1694
+ const renderedMessages = useMemo(
1695
+ () => (messageFilter ? displayedMessages.filter((message) => messageFilter(message)) : displayedMessages),
1696
+ [displayedMessages, messageFilter],
1697
+ );
1698
+ const renderedWorkstreamSourceMessages = useMemo(
1699
+ () =>
1700
+ messageFilter
1701
+ ? transcriptSourceMessages.filter((message) => messageFilter(message))
1702
+ : transcriptSourceMessages,
1703
+ [messageFilter, transcriptSourceMessages],
1704
+ );
1565
1705
  const displayedStreamingMessages = isPlaybackLive ? streamingMessages : EMPTY_STREAMING_MESSAGES;
1566
1706
  const playbackDerivedWorkstreams = useMemo(
1567
1707
  () => deriveWorkstreamsFromMessages(displayedMessages),
@@ -1573,11 +1713,25 @@ function ModernAgentConversationInner({
1573
1713
  );
1574
1714
  const effectiveIsCompleted = useMemo(() => isCompleted || !isInProgress(messages), [isCompleted, messages]);
1575
1715
  const displayedIsCompleted = isPlaybackLive || isPlaybackAtLatest ? effectiveIsCompleted : false;
1576
- const pendingRequestInputMessage = useMemo(
1577
- () => getPendingRequestInputMessage(displayedMessages),
1578
- [displayedMessages],
1579
- );
1580
- const shouldShowRequestInputOverlay = Boolean(pendingRequestInputMessage) && !isFailed;
1716
+ const isAgentWorking = !effectiveIsCompleted && !isWorkflowTerminal;
1717
+
1718
+ useEffect(() => {
1719
+ onAgentWorkingChange?.(isAgentWorking);
1720
+ }, [isAgentWorking, onAgentWorkingChange]);
1721
+ const pendingRequestInputMessage = useMemo(() => {
1722
+ const answeredRequestInputKeys = new Set<string>();
1723
+ for (const message of displayedMessages) {
1724
+ if (isRequestInputAnsweredForSession(agentRunId, message)) {
1725
+ answeredRequestInputKeys.add(getRequestInputResolutionKey(message));
1726
+ }
1727
+ }
1728
+ return getPendingRequestInputMessage(displayedMessages, 'main', answeredRequestInputKeys);
1729
+ }, [agentRunId, displayedMessages]);
1730
+ // A terminal run silently drops user input unless it can be continued (see the guard in
1731
+ // handleSendMessage), so never surface an actionable question overlay in that state —
1732
+ // the terminal status box renders instead.
1733
+ const shouldShowRequestInputOverlay =
1734
+ Boolean(pendingRequestInputMessage) && !isFailed && (!isWorkflowTerminal || canContinueConversation);
1581
1735
  const isViewingPlaybackHistory = isPlaybackEnabled && !isPlaybackLive;
1582
1736
  const shouldRenderLiveMessageInputArea = shouldRenderMessageInputArea && !isViewingPlaybackHistory;
1583
1737
  const contextWindowUsage = useMemo(() => toContextWindowUsage(messages), [messages]);
@@ -1591,7 +1745,7 @@ function ModernAgentConversationInner({
1591
1745
  agentRunId,
1592
1746
  messageCount: messages.length,
1593
1747
  playbackMessageCount: playbackSourceMessages.length,
1594
- displayedMessageCount: displayedMessages.length,
1748
+ displayedMessageCount: renderedMessages.length,
1595
1749
  streamingCount: streamingMessages.size,
1596
1750
  displayedStreamingCount: displayedStreamingMessages.size,
1597
1751
  initialHistoryStatus,
@@ -1615,7 +1769,7 @@ function ModernAgentConversationInner({
1615
1769
  agentRunStatus,
1616
1770
  clampedPlaybackCursor,
1617
1771
  displayedIsCompleted,
1618
- displayedMessages.length,
1772
+ renderedMessages.length,
1619
1773
  displayedStreamingMessages.size,
1620
1774
  effectiveIsCompleted,
1621
1775
  effectiveWorkflowStatus,
@@ -1672,15 +1826,6 @@ function ModernAgentConversationInner({
1672
1826
  // ────────────────────────────────────────────
1673
1827
  // Stable callbacks
1674
1828
  // ────────────────────────────────────────────
1675
- const handleTogglePlanPanel = useCallback(() => {
1676
- setShowSlidingPanel((prev: boolean) => {
1677
- if (!prev) {
1678
- sessionStorage.setItem('plan-panel-shown', 'true');
1679
- }
1680
- return !prev;
1681
- });
1682
- }, [setShowSlidingPanel]);
1683
-
1684
1829
  const handleChangePlan = useCallback(
1685
1830
  (index: number) => {
1686
1831
  setActivePlanIndex(index);
@@ -1695,17 +1840,44 @@ function ModernAgentConversationInner({
1695
1840
  const [rightPanelTab, setRightPanelTab] = useState<RightPanelTab>(
1696
1841
  conversationContent || conversationTab ? 'conversation' : 'plan',
1697
1842
  );
1843
+ const [selectedArtifactPath, setSelectedArtifactPath] = useState<string | null>(null);
1698
1844
  const [rightPanelWidth, setRightPanelWidth] = useState(400);
1699
1845
  const [isRightPanelResizing, setIsRightPanelResizing] = useState(false);
1846
+ // Master override for the "Toggle right sidebar" control. `showSlidingPanel` only tracks the
1847
+ // plan; open documents/workstreams keep the panel visible on their own, so without this the
1848
+ // toggle can't hide the panel while a document is open. Explicit reveals (opening an artifact
1849
+ // or document) clear it again.
1850
+ const [rightPanelManuallyClosed, setRightPanelManuallyClosed] = useState(false);
1700
1851
 
1701
1852
  const isRightPanelVisible =
1702
1853
  showRightPanelProp &&
1854
+ !rightPanelManuallyClosed &&
1703
1855
  (showSlidingPanel ||
1704
1856
  isDocPanelOpen ||
1705
1857
  (!hideWorkstreamTabs && panelWorkstreams.length > 0) ||
1706
1858
  !!conversationContent ||
1707
1859
  conversationTab);
1708
1860
 
1861
+ // A newly opened document should reveal the panel even if the user had manually collapsed it.
1862
+ const previousDocPanelOpenRef = useRef(isDocPanelOpen);
1863
+ useEffect(() => {
1864
+ if (isDocPanelOpen && !previousDocPanelOpenRef.current) {
1865
+ setRightPanelManuallyClosed(false);
1866
+ }
1867
+ previousDocPanelOpenRef.current = isDocPanelOpen;
1868
+ }, [isDocPanelOpen]);
1869
+
1870
+ const handleTogglePlanPanel = useCallback(() => {
1871
+ if (isRightPanelVisible) {
1872
+ setRightPanelManuallyClosed(true);
1873
+ setShowSlidingPanel(false);
1874
+ } else {
1875
+ setRightPanelManuallyClosed(false);
1876
+ setShowSlidingPanel(true);
1877
+ sessionStorage.setItem('plan-panel-shown', 'true');
1878
+ }
1879
+ }, [isRightPanelVisible, setShowSlidingPanel]);
1880
+
1709
1881
  useEffect(() => {
1710
1882
  if (!isRightPanelVisible && isRightPanelResizing) {
1711
1883
  setIsRightPanelResizing(false);
@@ -1747,10 +1919,44 @@ function ModernAgentConversationInner({
1747
1919
  }, [isRightPanelResizing]);
1748
1920
 
1749
1921
  const handleCloseRightPanel = useCallback(() => {
1922
+ setRightPanelManuallyClosed(true);
1750
1923
  setShowSlidingPanel(false);
1751
1924
  handleCloseDocPanel();
1752
1925
  }, [setShowSlidingPanel, handleCloseDocPanel]);
1753
1926
 
1927
+ const handleOpenArtifact = useCallback(
1928
+ (path: string) => {
1929
+ if (!/\.md$/i.test(path)) return;
1930
+ setRightPanelManuallyClosed(false);
1931
+ setSelectedArtifactPath(path);
1932
+ setRightPanelTab('artifacts');
1933
+ setShowSlidingPanel(true);
1934
+ },
1935
+ [setShowSlidingPanel],
1936
+ );
1937
+
1938
+ // The `display_artifact` tool emits a `display_artifact` stream event asking the UI
1939
+ // to reveal a text artifact in the editor. Act on the latest such event, once per
1940
+ // distinct occurrence so the user can still close the panel without it snapping back.
1941
+ const displayedArtifactMarkerRef = useRef<string | null>(null);
1942
+ useEffect(() => {
1943
+ let target: string | undefined;
1944
+ let marker: string | undefined;
1945
+ for (const message of messages) {
1946
+ const details = message.details as Record<string, unknown> | undefined;
1947
+ if (details?.event_class === 'display_artifact' && typeof details.path === 'string') {
1948
+ target = details.path;
1949
+ marker = `${message.timestamp ?? ''}:${details.path}`;
1950
+ }
1951
+ }
1952
+ if (!target || !marker || marker === displayedArtifactMarkerRef.current) return;
1953
+ displayedArtifactMarkerRef.current = marker;
1954
+ setRightPanelManuallyClosed(false);
1955
+ setSelectedArtifactPath(target);
1956
+ setRightPanelTab('artifacts');
1957
+ setShowSlidingPanel(true);
1958
+ }, [messages, setShowSlidingPanel]);
1959
+
1754
1960
  // Default StoreLinkComponent that opens documents in the panel
1755
1961
  const internalStoreLinkComponent = useCallback(
1756
1962
  ({ href, documentId, children }: { href: string; documentId: string; children: React.ReactNode }) => (
@@ -1801,6 +2007,7 @@ function ModernAgentConversationInner({
1801
2007
 
1802
2008
  useEffect(() => {
1803
2009
  void agentRunId;
2010
+ setSelectedArtifactPath(null);
1804
2011
  workstreamFetchFailedRef.current = false;
1805
2012
  setIsWorkstreamQueryUnavailable(false);
1806
2013
  setQueriedActiveWorkstreams([]);
@@ -1941,6 +2148,7 @@ function ModernAgentConversationInner({
1941
2148
  return;
1942
2149
  }
1943
2150
 
2151
+ const requestInputId = getRequestInputResponseIdFromMetadata(inputMetadata);
1944
2152
  setIsSending(true);
1945
2153
 
1946
2154
  const attachedDocs = getAttachedDocs?.() || [];
@@ -1978,7 +2186,15 @@ function ModernAgentConversationInner({
1978
2186
  type: AgentMessageType.QUESTION,
1979
2187
  message: messageContent,
1980
2188
  workstream_id: 'main',
1981
- details: { _optimistic: true, _messageId: messageId, _deliveryStatus: 'sending' },
2189
+ details: {
2190
+ _optimistic: true,
2191
+ _messageId: messageId,
2192
+ _deliveryStatus: 'sending',
2193
+ ...(inputMetadata?.editing_action ? { editing_action: inputMetadata.editing_action } : {}),
2194
+ ...(inputMetadata?.request_input_response
2195
+ ? { request_input_response: inputMetadata.request_input_response }
2196
+ : {}),
2197
+ },
1982
2198
  };
1983
2199
 
1984
2200
  addOptimisticMessage(optimisticMessage);
@@ -2009,6 +2225,9 @@ function ModernAgentConversationInner({
2009
2225
  // buffers the signal until the new run is ready to receive it. We reconnect
2010
2226
  // the stream in place (rather than remounting via onRestart) so the existing
2011
2227
  // timeline is preserved and the new exchange appends seamlessly at the bottom.
2228
+ if (requestInputId) {
2229
+ markRequestInputIdAnsweredForSession(agentRunId, requestInputId);
2230
+ }
2012
2231
  const deliver = (async () => {
2013
2232
  await waitForPendingToolApprovalModeChange();
2014
2233
  if (isWorkflowTerminalRef.current) {
@@ -2021,6 +2240,9 @@ function ModernAgentConversationInner({
2021
2240
 
2022
2241
  deliver
2023
2242
  .catch((err) => {
2243
+ if (requestInputId) {
2244
+ clearRequestInputIdAnsweredForSession(agentRunId, requestInputId);
2245
+ }
2024
2246
  updateOptimisticMessageStatus(messageId, 'failed');
2025
2247
  toast({
2026
2248
  status: 'error',
@@ -2049,11 +2271,18 @@ function ModernAgentConversationInner({
2049
2271
  ],
2050
2272
  );
2051
2273
 
2274
+ useEffect(() => {
2275
+ if (sendMessageRef) sendMessageRef.current = handleSendMessage;
2276
+ return () => {
2277
+ if (sendMessageRef?.current === handleSendMessage) sendMessageRef.current = null;
2278
+ };
2279
+ }, [handleSendMessage, sendMessageRef]);
2280
+
2052
2281
  // After the user connects an MCP server requested via request_mcp_connection, flag the
2053
2282
  // conversation for tool re-discovery and resume it with a confirmation message so the agent
2054
2283
  // continues automatically with the newly-available tools.
2055
2284
  const handleMcpConnected = useCallback(
2056
- async (cfg: McpConnectUxConfig) => {
2285
+ async (cfg: McpConnectUxConfig, metadata?: Record<string, unknown>) => {
2057
2286
  // Await the dirty-flag signal BEFORE sending the follow-up message so Temporal records
2058
2287
  // McpConfigChanged ahead of the UserInput. Otherwise the resume turn could run before
2059
2288
  // the flag is set and use the stale tool catalog. An omitted disabled list preserves
@@ -2063,7 +2292,7 @@ function ModernAgentConversationInner({
2063
2292
  } catch (err: unknown) {
2064
2293
  console.error('Failed to signal MCP config change', err);
2065
2294
  }
2066
- handleSendMessage(t('agent.mcpConnectedMessage', { name: cfg.name }));
2295
+ handleSendMessage(t('agent.mcpConnectedMessage', { name: cfg.name }), metadata);
2067
2296
  },
2068
2297
  [client, agentRunId, handleSendMessage, t],
2069
2298
  );
@@ -2382,6 +2611,21 @@ function ModernAgentConversationInner({
2382
2611
  return false;
2383
2612
  }).length;
2384
2613
  }, [messages]);
2614
+ const selectedArtifactRefresh = useMemo(() => {
2615
+ if (!selectedArtifactPath) return { key: artifactRefreshKey, details: undefined };
2616
+
2617
+ let key = 0;
2618
+ let details: Record<string, unknown> | undefined;
2619
+ for (const message of messages) {
2620
+ const candidate = message.details as Record<string, unknown> | undefined;
2621
+ if (!isArtifactRefreshEvent(candidate, selectedArtifactPath)) continue;
2622
+ key++;
2623
+ details = candidate;
2624
+ }
2625
+ return { key, details };
2626
+ }, [artifactRefreshKey, messages, selectedArtifactPath]);
2627
+ const canCollaborateWithArtifacts =
2628
+ interactive && isPlaybackLive && effectiveWorkflowStatus?.toUpperCase() === 'RUNNING';
2385
2629
 
2386
2630
  // PERFORMANCE: Memoize taskLabels to prevent AllMessagesMixed re-renders
2387
2631
  const taskLabels = useMemo(
@@ -2405,7 +2649,7 @@ function ModernAgentConversationInner({
2405
2649
  workflowRunId={workflowRunId || ''}
2406
2650
  viewMode={viewMode}
2407
2651
  onViewModeChange={handleViewModeChange}
2408
- showPlanPanel={showRightPanelProp && showSlidingPanel}
2652
+ showPlanPanel={isRightPanelVisible}
2409
2653
  hasPlan={showRightPanelProp && plans.length > 0}
2410
2654
  showPlanButton={showRightPanelProp && !conversationTab}
2411
2655
  onTogglePlanPanel={handleTogglePlanPanel}
@@ -2430,7 +2674,7 @@ function ModernAgentConversationInner({
2430
2674
  data-agent-playback-enabled={isPlaybackEnabled || undefined}
2431
2675
  data-agent-playback-cursor={isPlaybackEnabled ? clampedPlaybackCursor : undefined}
2432
2676
  data-agent-live-message-count={messages.length}
2433
- data-agent-rendered-message-count={displayedMessages.length}
2677
+ data-agent-rendered-message-count={renderedMessages.length}
2434
2678
  className={cn(
2435
2679
  'flex flex-col min-h-0 min-w-0 border-0',
2436
2680
  conversationTab
@@ -2465,8 +2709,8 @@ function ModernAgentConversationInner({
2465
2709
  <PendingStartConversation message={pendingStartMessage} startedAt={pendingStartTimestamp} />
2466
2710
  ) : (
2467
2711
  <AllMessagesMixed
2468
- messages={displayedMessages}
2469
- workstreamSourceMessages={messages}
2712
+ messages={renderedMessages}
2713
+ workstreamSourceMessages={renderedWorkstreamSourceMessages}
2470
2714
  bottomRef={bottomRef as React.RefObject<HTMLDivElement>}
2471
2715
  isCompleted={displayedIsCompleted}
2472
2716
  plan={getActivePlan.plan}
@@ -2479,6 +2723,7 @@ function ModernAgentConversationInner({
2479
2723
  taskLabels={taskLabels}
2480
2724
  streamingMessages={displayedStreamingMessages}
2481
2725
  onSendMessage={isPlaybackLive ? handleSendMessage : undefined}
2726
+ onOpenArtifact={showArtifacts ? handleOpenArtifact : undefined}
2482
2727
  messageItemClassNames={messageItemClassNames}
2483
2728
  messageStyleOverrides={messageStyleOverrides}
2484
2729
  toolCallGroupClassNames={toolCallGroupClassNames}
@@ -2516,7 +2761,10 @@ function ModernAgentConversationInner({
2516
2761
  />
2517
2762
  ) : isViewingPlaybackHistory && playbackActiveWorkstreams.length > 0 ? (
2518
2763
  <div className="flex-shrink-0 pb-safe-area">
2519
- <ActiveWorkstreamsSummary activeWorkstreams={playbackActiveWorkstreams} />
2764
+ <ActiveWorkstreamsSummary
2765
+ activeWorkstreams={playbackActiveWorkstreams}
2766
+ onSelectWorkstream={setActiveWorkstream}
2767
+ />
2520
2768
  </div>
2521
2769
  ) : (
2522
2770
  shouldRenderLiveMessageInputArea && (
@@ -2551,56 +2799,60 @@ function ModernAgentConversationInner({
2551
2799
  )
2552
2800
  ) : (
2553
2801
  (showInput || canContinueConversation) && (
2554
- <MessageInput
2555
- onSend={handleSendMessage}
2556
- onStop={allowWorkflowControl ? handleStopWorkflow : undefined}
2557
- approvalModeSlot={
2558
- interactive && toolApprovalMode ? (
2559
- <AgentApprovalModeSelector
2560
- mode={toolApprovalMode}
2561
- onChange={handleToolApprovalModeChange}
2562
- disabled={
2563
- !isPlaybackLive || isWorkflowTerminal || !allowWorkflowControl
2564
- }
2802
+ <>
2803
+ {composerContext}
2804
+ <MessageInput
2805
+ onSend={handleSendMessage}
2806
+ onStop={allowWorkflowControl ? handleStopWorkflow : undefined}
2807
+ approvalModeSlot={
2808
+ interactive && toolApprovalMode ? (
2809
+ <AgentApprovalModeSelector
2810
+ mode={toolApprovalMode}
2811
+ onChange={handleToolApprovalModeChange}
2812
+ disabled={
2813
+ !isPlaybackLive || isWorkflowTerminal || !allowWorkflowControl
2814
+ }
2815
+ />
2816
+ ) : undefined
2817
+ }
2818
+ mcpSlot={
2819
+ <McpConnectionsActionMenu
2820
+ disabledCollections={mcpDisabled}
2821
+ onChange={handleMcpDisabledChange}
2822
+ onConnectionChange={handleMcpConnectionChange}
2565
2823
  />
2566
- ) : undefined
2567
- }
2568
- mcpSlot={
2569
- <McpConnectionsActionMenu
2570
- disabledCollections={mcpDisabled}
2571
- onChange={handleMcpDisabledChange}
2572
- onConnectionChange={handleMcpConnectionChange}
2573
- />
2574
- }
2575
- disabled={isUploading || !isPlaybackLive}
2576
- isSending={isSending || isUploading}
2577
- isStopping={isStopping}
2578
- isStreaming={!effectiveIsCompleted}
2579
- isCompleted={effectiveIsCompleted}
2580
- contextWindowUsage={canCompactContext ? contextWindowUsage : undefined}
2581
- onCompactContext={canCompactContext ? handleCompactContext : undefined}
2582
- isCompactingContext={isCompactingContext}
2583
- activeTaskCount={activeTaskCount}
2584
- activeWorkstreams={composerActiveWorkstreams}
2585
- placeholder={composerPlaceholder}
2586
- onFilesSelected={canUploadFiles ? handleFileUpload : undefined}
2587
- uploadedFiles={uploadedFiles}
2588
- onRemoveFile={onRemoveFile}
2589
- onRemoveProcessingFile={handleRemoveProcessingFile}
2590
- acceptedFileTypes={acceptedFileTypes}
2591
- maxFiles={maxFiles}
2592
- processingFiles={processingFiles}
2593
- artifactRunId={agentRunId}
2594
- hasProcessingFiles={hasProcessingFiles}
2595
- renderDocumentSearch={renderDocumentSearch}
2596
- selectedDocuments={selectedDocuments}
2597
- onRemoveDocument={onRemoveDocument}
2598
- hideObjectLinking={hideObjectLinking}
2599
- hideFileUpload={!canUploadFiles}
2600
- disableDropZone={canUploadFiles}
2601
- className={inputContainerClassName}
2602
- inputClassName={inputClassName}
2603
- />
2824
+ }
2825
+ disabled={isUploading || !isPlaybackLive}
2826
+ isSending={isSending || isUploading}
2827
+ isStopping={isStopping}
2828
+ isStreaming={!effectiveIsCompleted}
2829
+ isCompleted={effectiveIsCompleted}
2830
+ contextWindowUsage={canCompactContext ? contextWindowUsage : undefined}
2831
+ onCompactContext={canCompactContext ? handleCompactContext : undefined}
2832
+ isCompactingContext={isCompactingContext}
2833
+ activeTaskCount={activeTaskCount}
2834
+ activeWorkstreams={composerActiveWorkstreams}
2835
+ onSelectWorkstream={setActiveWorkstream}
2836
+ placeholder={composerPlaceholder}
2837
+ onFilesSelected={canUploadFiles ? handleFileUpload : undefined}
2838
+ uploadedFiles={uploadedFiles}
2839
+ onRemoveFile={onRemoveFile}
2840
+ onRemoveProcessingFile={handleRemoveProcessingFile}
2841
+ acceptedFileTypes={acceptedFileTypes}
2842
+ maxFiles={maxFiles}
2843
+ processingFiles={processingFiles}
2844
+ artifactRunId={agentRunId}
2845
+ hasProcessingFiles={hasProcessingFiles}
2846
+ renderDocumentSearch={renderDocumentSearch}
2847
+ selectedDocuments={selectedDocuments}
2848
+ onRemoveDocument={onRemoveDocument}
2849
+ hideObjectLinking={hideObjectLinking}
2850
+ hideFileUpload={!canUploadFiles}
2851
+ disableDropZone={canUploadFiles}
2852
+ className={inputContainerClassName}
2853
+ inputClassName={inputClassName}
2854
+ />
2855
+ </>
2604
2856
  )
2605
2857
  )}
2606
2858
  </div>
@@ -2717,7 +2969,11 @@ function ModernAgentConversationInner({
2717
2969
  processingFiles={processingFilesProp ?? processingFiles}
2718
2970
  // Artifacts
2719
2971
  showArtifacts={showArtifacts}
2720
- artifactRefreshKey={artifactRefreshKey}
2972
+ artifactRefreshKey={selectedArtifactRefresh.key}
2973
+ artifactRefreshDetails={selectedArtifactRefresh.details}
2974
+ selectedArtifactPath={selectedArtifactPath}
2975
+ onSelectedArtifactPathChange={setSelectedArtifactPath}
2976
+ onSendMessage={canCollaborateWithArtifacts ? handleSendMessage : undefined}
2721
2977
  // Messages (for workstreams tab context)
2722
2978
  messages={messages}
2723
2979
  // Payload content