@vertesia/ui 1.4.0-dev.20260615.051508Z → 1.4.0

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 (337) hide show
  1. package/lib/core/components/shadcn/dropdown.d.ts.map +1 -1
  2. package/lib/core/components/shadcn/dropdown.js +6 -2
  3. package/lib/core/components/shadcn/dropdown.js.map +1 -1
  4. package/lib/core/components/shadcn/filters/filterBar.d.ts.map +1 -1
  5. package/lib/core/components/shadcn/filters/filterBar.js +9 -2
  6. package/lib/core/components/shadcn/filters/filterBar.js.map +1 -1
  7. package/lib/core/components/shadcn/modal/ConfirmModal.d.ts +16 -1
  8. package/lib/core/components/shadcn/modal/ConfirmModal.d.ts.map +1 -1
  9. package/lib/core/components/shadcn/modal/ConfirmModal.js +25 -3
  10. package/lib/core/components/shadcn/modal/ConfirmModal.js.map +1 -1
  11. package/lib/core/components/shadcn/modal/dialog.js +1 -1
  12. package/lib/core/components/shadcn/modal/dialog.js.map +1 -1
  13. package/lib/core/components/shadcn/popover.d.ts.map +1 -1
  14. package/lib/core/components/shadcn/popover.js +3 -1
  15. package/lib/core/components/shadcn/popover.js.map +1 -1
  16. package/lib/core/components/shadcn/switch.js +3 -3
  17. package/lib/core/components/shadcn/switch.js.map +1 -1
  18. package/lib/core/components/shadcn/tabs.js +1 -1
  19. package/lib/core/components/shadcn/tabs.js.map +1 -1
  20. package/lib/core/components/shadcn/tooltip.d.ts.map +1 -1
  21. package/lib/core/components/shadcn/tooltip.js +3 -1
  22. package/lib/core/components/shadcn/tooltip.js.map +1 -1
  23. package/lib/env/index.d.ts +0 -19
  24. package/lib/env/index.d.ts.map +1 -1
  25. package/lib/env/index.js +0 -6
  26. package/lib/env/index.js.map +1 -1
  27. package/lib/features/agent/PayloadBuilder.d.ts +4 -0
  28. package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
  29. package/lib/features/agent/PayloadBuilder.js +16 -0
  30. package/lib/features/agent/PayloadBuilder.js.map +1 -1
  31. package/lib/features/agent/chat/AgentApprovalModeSelector.d.ts +10 -0
  32. package/lib/features/agent/chat/AgentApprovalModeSelector.d.ts.map +1 -0
  33. package/lib/features/agent/chat/AgentApprovalModeSelector.js +50 -0
  34. package/lib/features/agent/chat/AgentApprovalModeSelector.js.map +1 -0
  35. package/lib/features/agent/chat/AgentChatFixtureReplay.d.ts +2 -1
  36. package/lib/features/agent/chat/AgentChatFixtureReplay.d.ts.map +1 -1
  37. package/lib/features/agent/chat/AgentChatFixtureReplay.js +3 -3
  38. package/lib/features/agent/chat/AgentChatFixtureReplay.js.map +1 -1
  39. package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts +5 -2
  40. package/lib/features/agent/chat/AgentRequestInputOverlay.d.ts.map +1 -1
  41. package/lib/features/agent/chat/AgentRequestInputOverlay.js +41 -7
  42. package/lib/features/agent/chat/AgentRequestInputOverlay.js.map +1 -1
  43. package/lib/features/agent/chat/AgentRightPanel.d.ts.map +1 -1
  44. package/lib/features/agent/chat/AgentRightPanel.js +133 -12
  45. package/lib/features/agent/chat/AgentRightPanel.js.map +1 -1
  46. package/lib/features/agent/chat/AnimatedThinkingDots.js +1 -1
  47. package/lib/features/agent/chat/AnimatedThinkingDots.js.map +1 -1
  48. package/lib/features/agent/chat/ArtifactsTab.d.ts.map +1 -1
  49. package/lib/features/agent/chat/ArtifactsTab.js +11 -65
  50. package/lib/features/agent/chat/ArtifactsTab.js.map +1 -1
  51. package/lib/features/agent/chat/AskUserWidget.d.ts +3 -1
  52. package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
  53. package/lib/features/agent/chat/AskUserWidget.js +4 -3
  54. package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
  55. package/lib/features/agent/chat/ModernAgentConversation.d.ts +10 -2
  56. package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
  57. package/lib/features/agent/chat/ModernAgentConversation.js +526 -117
  58. package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
  59. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts +8 -0
  60. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.d.ts.map +1 -0
  61. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js +19 -0
  62. package/lib/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.js.map +1 -0
  63. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +8 -2
  64. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
  65. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +551 -92
  66. package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
  67. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.d.ts.map +1 -1
  68. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js +7 -6
  69. package/lib/features/agent/chat/ModernAgentOutput/AttachmentPreview.js.map +1 -1
  70. package/lib/features/agent/chat/ModernAgentOutput/Header.js +2 -2
  71. package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
  72. package/lib/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.d.ts +8 -0
  73. package/lib/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.d.ts.map +1 -0
  74. package/lib/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.js +61 -0
  75. package/lib/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.js.map +1 -0
  76. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +15 -2
  77. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.d.ts.map +1 -1
  78. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js +28 -38
  79. package/lib/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -1
  80. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +1 -1
  81. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
  82. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +3 -2
  83. package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
  84. package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js +2 -1
  85. package/lib/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -1
  86. package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js +1 -1
  87. package/lib/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -1
  88. package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts +5 -0
  89. package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
  90. package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +59 -4
  91. package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
  92. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +2 -2
  93. package/lib/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -1
  94. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts +9 -0
  95. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.d.ts.map +1 -1
  96. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js +180 -0
  97. package/lib/features/agent/chat/ModernAgentOutput/requestInputMessages.js.map +1 -1
  98. package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts +6 -0
  99. package/lib/features/agent/chat/ModernAgentOutput/utils.d.ts.map +1 -1
  100. package/lib/features/agent/chat/ModernAgentOutput/utils.js +92 -2
  101. package/lib/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
  102. package/lib/features/agent/chat/clipboardFiles.d.ts +15 -0
  103. package/lib/features/agent/chat/clipboardFiles.d.ts.map +1 -0
  104. package/lib/features/agent/chat/clipboardFiles.js +35 -0
  105. package/lib/features/agent/chat/clipboardFiles.js.map +1 -0
  106. package/lib/features/agent/chat/hooks/useAgentStream.d.ts +6 -0
  107. package/lib/features/agent/chat/hooks/useAgentStream.d.ts.map +1 -1
  108. package/lib/features/agent/chat/hooks/useAgentStream.js +218 -37
  109. package/lib/features/agent/chat/hooks/useAgentStream.js.map +1 -1
  110. package/lib/features/agent/chat/hooks/useArtifacts.d.ts +1 -8
  111. package/lib/features/agent/chat/hooks/useArtifacts.d.ts.map +1 -1
  112. package/lib/features/agent/chat/hooks/useArtifacts.js +10 -28
  113. package/lib/features/agent/chat/hooks/useArtifacts.js.map +1 -1
  114. package/lib/features/agent/chat/index.d.ts +2 -1
  115. package/lib/features/agent/chat/index.d.ts.map +1 -1
  116. package/lib/features/agent/chat/index.js +2 -1
  117. package/lib/features/agent/chat/index.js.map +1 -1
  118. package/lib/features/agent/chat/workstreams.d.ts +1 -0
  119. package/lib/features/agent/chat/workstreams.d.ts.map +1 -1
  120. package/lib/features/agent/chat/workstreams.js +28 -0
  121. package/lib/features/agent/chat/workstreams.js.map +1 -1
  122. package/lib/features/facets/AgentRunnerFacetsNav.d.ts +10 -1
  123. package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
  124. package/lib/features/facets/AgentRunnerFacetsNav.js +6 -3
  125. package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
  126. package/lib/features/facets/CollectionsFacetsNav.d.ts +10 -1
  127. package/lib/features/facets/CollectionsFacetsNav.d.ts.map +1 -1
  128. package/lib/features/facets/CollectionsFacetsNav.js +14 -5
  129. package/lib/features/facets/CollectionsFacetsNav.js.map +1 -1
  130. package/lib/features/facets/PromptsFacetsNav.d.ts +10 -1
  131. package/lib/features/facets/PromptsFacetsNav.d.ts.map +1 -1
  132. package/lib/features/facets/PromptsFacetsNav.js +14 -5
  133. package/lib/features/facets/PromptsFacetsNav.js.map +1 -1
  134. package/lib/features/facets/RunsFacetsNav.d.ts +10 -1
  135. package/lib/features/facets/RunsFacetsNav.d.ts.map +1 -1
  136. package/lib/features/facets/RunsFacetsNav.js +14 -5
  137. package/lib/features/facets/RunsFacetsNav.js.map +1 -1
  138. package/lib/features/index.d.ts +0 -1
  139. package/lib/features/index.d.ts.map +1 -1
  140. package/lib/features/index.js +0 -1
  141. package/lib/features/index.js.map +1 -1
  142. package/lib/features/oauth/McpConnectionsButton.d.ts +30 -0
  143. package/lib/features/oauth/McpConnectionsButton.d.ts.map +1 -0
  144. package/lib/features/oauth/McpConnectionsButton.js +70 -0
  145. package/lib/features/oauth/McpConnectionsButton.js.map +1 -0
  146. package/lib/features/oauth/McpConnectionsDialog.d.ts +25 -0
  147. package/lib/features/oauth/McpConnectionsDialog.d.ts.map +1 -0
  148. package/lib/features/oauth/McpConnectionsDialog.js +26 -0
  149. package/lib/features/oauth/McpConnectionsDialog.js.map +1 -0
  150. package/lib/features/oauth/RemoteMcpConnectionButton.d.ts.map +1 -1
  151. package/lib/features/oauth/RemoteMcpConnectionButton.js +14 -6
  152. package/lib/features/oauth/RemoteMcpConnectionButton.js.map +1 -1
  153. package/lib/features/oauth/index.d.ts +3 -0
  154. package/lib/features/oauth/index.d.ts.map +1 -1
  155. package/lib/features/oauth/index.js +3 -0
  156. package/lib/features/oauth/index.js.map +1 -1
  157. package/lib/features/oauth/useMcpConnections.d.ts +44 -0
  158. package/lib/features/oauth/useMcpConnections.d.ts.map +1 -0
  159. package/lib/features/oauth/useMcpConnections.js +168 -0
  160. package/lib/features/oauth/useMcpConnections.js.map +1 -0
  161. package/lib/features/permissions/UserPermissionsProvider.d.ts +4 -6
  162. package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
  163. package/lib/features/permissions/UserPermissionsProvider.js +40 -42
  164. package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
  165. package/lib/features/store/objects/DocumentPreviewPanel.d.ts.map +1 -1
  166. package/lib/features/store/objects/DocumentPreviewPanel.js +2 -1
  167. package/lib/features/store/objects/DocumentPreviewPanel.js.map +1 -1
  168. package/lib/features/store/objects/DocumentQuickFilter.d.ts +23 -0
  169. package/lib/features/store/objects/DocumentQuickFilter.d.ts.map +1 -0
  170. package/lib/features/store/objects/DocumentQuickFilter.js +30 -0
  171. package/lib/features/store/objects/DocumentQuickFilter.js.map +1 -0
  172. package/lib/features/store/objects/DocumentSearchResults.d.ts.map +1 -1
  173. package/lib/features/store/objects/DocumentSearchResults.js +17 -1
  174. package/lib/features/store/objects/DocumentSearchResults.js.map +1 -1
  175. package/lib/features/store/objects/components/ContentOverview.d.ts.map +1 -1
  176. package/lib/features/store/objects/components/ContentOverview.js +17 -74
  177. package/lib/features/store/objects/components/ContentOverview.js.map +1 -1
  178. package/lib/features/store/objects/layout/DocumentTableColumn.d.ts +7 -1
  179. package/lib/features/store/objects/layout/DocumentTableColumn.d.ts.map +1 -1
  180. package/lib/features/store/objects/layout/DocumentTableColumn.js +27 -3
  181. package/lib/features/store/objects/layout/DocumentTableColumn.js.map +1 -1
  182. package/lib/features/store/objects/layout/documentLayout.js +1 -1
  183. package/lib/features/store/objects/layout/renderers.d.ts +2 -1
  184. package/lib/features/store/objects/layout/renderers.d.ts.map +1 -1
  185. package/lib/features/store/objects/layout/renderers.js +27 -20
  186. package/lib/features/store/objects/layout/renderers.js.map +1 -1
  187. package/lib/features/store/types/ContentObjectTypesSearch.d.ts.map +1 -1
  188. package/lib/features/store/types/ContentObjectTypesSearch.js +4 -1
  189. package/lib/features/store/types/ContentObjectTypesSearch.js.map +1 -1
  190. package/lib/features/store/types/ContentObjectTypesTable.d.ts +2 -1
  191. package/lib/features/store/types/ContentObjectTypesTable.d.ts.map +1 -1
  192. package/lib/features/store/types/ContentObjectTypesTable.js +8 -3
  193. package/lib/features/store/types/ContentObjectTypesTable.js.map +1 -1
  194. package/lib/i18n/instance.d.ts.map +1 -1
  195. package/lib/i18n/instance.js +1 -0
  196. package/lib/i18n/instance.js.map +1 -1
  197. package/lib/i18n/locales/ar.json +72 -45
  198. package/lib/i18n/locales/de.json +65 -34
  199. package/lib/i18n/locales/en.json +63 -47
  200. package/lib/i18n/locales/es.json +65 -35
  201. package/lib/i18n/locales/fr.json +65 -35
  202. package/lib/i18n/locales/it.json +72 -42
  203. package/lib/i18n/locales/ja.json +72 -41
  204. package/lib/i18n/locales/ko.json +72 -41
  205. package/lib/i18n/locales/pt.json +72 -42
  206. package/lib/i18n/locales/ru.json +72 -43
  207. package/lib/i18n/locales/tr.json +72 -41
  208. package/lib/i18n/locales/zh-TW.json +72 -41
  209. package/lib/i18n/locales/zh.json +72 -41
  210. package/lib/session/UserSession.d.ts +0 -6
  211. package/lib/session/UserSession.d.ts.map +1 -1
  212. package/lib/session/UserSession.js +0 -15
  213. package/lib/session/UserSession.js.map +1 -1
  214. package/lib/session/UserSessionProvider.d.ts.map +1 -1
  215. package/lib/session/UserSessionProvider.js +39 -98
  216. package/lib/session/UserSessionProvider.js.map +1 -1
  217. package/lib/session/auth/composable.d.ts.map +1 -1
  218. package/lib/session/auth/composable.js +3 -33
  219. package/lib/session/auth/composable.js.map +1 -1
  220. package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
  221. package/lib/shell/login/SignInPrimitives.js +3 -2
  222. package/lib/shell/login/SignInPrimitives.js.map +1 -1
  223. package/lib/vertesia-ui-core.js +1 -1
  224. package/lib/vertesia-ui-core.js.map +1 -1
  225. package/lib/vertesia-ui-env.js +1 -1
  226. package/lib/vertesia-ui-env.js.map +1 -1
  227. package/lib/vertesia-ui-features.js +1 -1
  228. package/lib/vertesia-ui-features.js.map +1 -1
  229. package/lib/vertesia-ui-i18n.js +1 -1
  230. package/lib/vertesia-ui-i18n.js.map +1 -1
  231. package/lib/vertesia-ui-session.js +1 -1
  232. package/lib/vertesia-ui-session.js.map +1 -1
  233. package/lib/vertesia-ui-shell.js +1 -1
  234. package/lib/vertesia-ui-shell.js.map +1 -1
  235. package/lib/vertesia-ui-widgets.js +1 -1
  236. package/lib/vertesia-ui-widgets.js.map +1 -1
  237. package/lib/widgets/schema-editor/editor/Editable.js +1 -1
  238. package/lib/widgets/schema-editor/editor/Editable.js.map +1 -1
  239. package/llms.txt +70 -70
  240. package/package.json +35 -32
  241. package/src/core/components/shadcn/dropdown.tsx +2 -0
  242. package/src/core/components/shadcn/filters/filterBar.tsx +9 -2
  243. package/src/core/components/shadcn/modal/ConfirmModal.tsx +65 -3
  244. package/src/core/components/shadcn/modal/dialog.tsx +1 -1
  245. package/src/core/components/shadcn/popover.tsx +1 -0
  246. package/src/core/components/shadcn/switch.tsx +4 -4
  247. package/src/core/components/shadcn/tabs.tsx +1 -1
  248. package/src/core/components/shadcn/tooltip.tsx +1 -0
  249. package/src/env/index.ts +0 -24
  250. package/src/features/agent/PayloadBuilder.tsx +18 -0
  251. package/src/features/agent/chat/AgentApprovalModeSelector.tsx +130 -0
  252. package/src/features/agent/chat/AgentChatFixtureReplay.test.tsx +22 -2
  253. package/src/features/agent/chat/AgentChatFixtureReplay.tsx +33 -27
  254. package/src/features/agent/chat/AgentRequestInputOverlay.test.tsx +122 -0
  255. package/src/features/agent/chat/AgentRequestInputOverlay.tsx +91 -17
  256. package/src/features/agent/chat/AgentRightPanel.tsx +238 -50
  257. package/src/features/agent/chat/AnimatedThinkingDots.tsx +1 -1
  258. package/src/features/agent/chat/ArtifactsTab.tsx +21 -155
  259. package/src/features/agent/chat/AskUserWidget.tsx +6 -2
  260. package/src/features/agent/chat/ModernAgentConversation.test.tsx +1157 -47
  261. package/src/features/agent/chat/ModernAgentConversation.tsx +703 -136
  262. package/src/features/agent/chat/ModernAgentOutput/ActiveWorkstreamsSummary.tsx +74 -0
  263. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +1420 -126
  264. package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +934 -111
  265. package/src/features/agent/chat/ModernAgentOutput/AttachmentPreview.tsx +31 -40
  266. package/src/features/agent/chat/ModernAgentOutput/Header.tsx +28 -28
  267. package/src/features/agent/chat/ModernAgentOutput/MessageDeliveryStatus.tsx +83 -0
  268. package/src/features/agent/chat/ModernAgentOutput/MessageInput.test.tsx +38 -2
  269. package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +121 -98
  270. package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +7 -1
  271. package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +3 -3
  272. package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +1 -1
  273. package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +82 -2
  274. package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +2 -2
  275. package/src/features/agent/chat/ModernAgentOutput/requestInputMessages.ts +216 -0
  276. package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +149 -0
  277. package/src/features/agent/chat/ModernAgentOutput/utils.ts +103 -2
  278. package/src/features/agent/chat/clipboardFiles.ts +33 -0
  279. package/src/features/agent/chat/hooks/useAgentStream.test.tsx +355 -4
  280. package/src/features/agent/chat/hooks/useAgentStream.ts +270 -43
  281. package/src/features/agent/chat/hooks/useArtifacts.ts +11 -44
  282. package/src/features/agent/chat/index.ts +10 -1
  283. package/src/features/agent/chat/workstreams.ts +42 -0
  284. package/src/features/facets/AgentRunnerFacetsNav.tsx +23 -3
  285. package/src/features/facets/CollectionsFacetsNav.tsx +30 -5
  286. package/src/features/facets/PromptsFacetsNav.tsx +30 -5
  287. package/src/features/facets/RunsFacetsNav.tsx +32 -5
  288. package/src/features/index.ts +0 -1
  289. package/src/features/oauth/McpConnectionsButton.test.tsx +248 -0
  290. package/src/features/oauth/McpConnectionsButton.tsx +269 -0
  291. package/src/features/oauth/McpConnectionsDialog.tsx +142 -0
  292. package/src/features/oauth/RemoteMcpConnectionButton.tsx +37 -14
  293. package/src/features/oauth/index.ts +3 -0
  294. package/src/features/oauth/useMcpConnections.test.ts +94 -0
  295. package/src/features/oauth/useMcpConnections.ts +210 -0
  296. package/src/features/permissions/UserPermissionsProvider.tsx +41 -59
  297. package/src/features/store/objects/DocumentPreviewPanel.tsx +4 -2
  298. package/src/features/store/objects/DocumentQuickFilter.tsx +72 -0
  299. package/src/features/store/objects/DocumentSearchResults.tsx +30 -11
  300. package/src/features/store/objects/components/ContentOverview.tsx +30 -99
  301. package/src/features/store/objects/layout/DocumentTableColumn.tsx +29 -4
  302. package/src/features/store/objects/layout/documentLayout.tsx +1 -1
  303. package/src/features/store/objects/layout/renderers.tsx +80 -20
  304. package/src/features/store/types/ContentObjectTypesSearch.tsx +7 -1
  305. package/src/features/store/types/ContentObjectTypesTable.tsx +34 -4
  306. package/src/i18n/instance.ts +1 -0
  307. package/src/i18n/locales/ar.json +72 -45
  308. package/src/i18n/locales/de.json +65 -34
  309. package/src/i18n/locales/en.json +63 -47
  310. package/src/i18n/locales/es.json +65 -35
  311. package/src/i18n/locales/fr.json +65 -35
  312. package/src/i18n/locales/it.json +72 -42
  313. package/src/i18n/locales/ja.json +72 -41
  314. package/src/i18n/locales/ko.json +72 -41
  315. package/src/i18n/locales/pt.json +72 -42
  316. package/src/i18n/locales/ru.json +72 -43
  317. package/src/i18n/locales/tr.json +72 -41
  318. package/src/i18n/locales/zh-TW.json +72 -41
  319. package/src/i18n/locales/zh.json +72 -41
  320. package/src/i18n/rtl.test.ts +57 -1
  321. package/src/session/UserSession.ts +0 -16
  322. package/src/session/UserSessionProvider.tsx +51 -123
  323. package/src/session/auth/composable.ts +3 -34
  324. package/src/shell/login/SignInPrimitives.tsx +3 -2
  325. package/src/widgets/schema-editor/editor/Editable.tsx +1 -1
  326. package/lib/features/document-viewer/UniversalDocumentViewer.d.ts +0 -73
  327. package/lib/features/document-viewer/UniversalDocumentViewer.d.ts.map +0 -1
  328. package/lib/features/document-viewer/UniversalDocumentViewer.js +0 -415
  329. package/lib/features/document-viewer/UniversalDocumentViewer.js.map +0 -1
  330. package/lib/features/document-viewer/index.d.ts +0 -2
  331. package/lib/features/document-viewer/index.d.ts.map +0 -1
  332. package/lib/features/document-viewer/index.js +0 -2
  333. package/lib/features/document-viewer/index.js.map +0 -1
  334. package/src/features/document-viewer/UniversalDocumentViewer.test.tsx +0 -123
  335. package/src/features/document-viewer/UniversalDocumentViewer.tsx +0 -746
  336. package/src/features/document-viewer/index.ts +0 -1
  337. package/src/session/auth/composable.test.ts +0 -79
@@ -18,8 +18,7 @@ import { useUITranslation } from '@vertesia/ui/i18n';
18
18
  import { useUserSession } from '@vertesia/ui/session';
19
19
  import {
20
20
  CheckCircleIcon,
21
- CheckIcon,
22
- ChevronsUpDownIcon,
21
+ ChevronDownIcon,
23
22
  ClipboardCopyIcon,
24
23
  DownloadCloudIcon,
25
24
  FileTextIcon,
@@ -28,7 +27,7 @@ import {
28
27
  XCircleIcon,
29
28
  XIcon,
30
29
  } from 'lucide-react';
31
- import React, { useCallback, useMemo, useState } from 'react';
30
+ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
32
31
  import { ArtifactsTab } from './ArtifactsTab.js';
33
32
  import { BrowserUseWidget, getLatestBrowserUseByWorkstream } from './BrowserUseWidget.js';
34
33
  import { DocumentPanel } from './DocumentPanel.js';
@@ -350,66 +349,257 @@ function WorkstreamsTab({ workstreams, messages, runId }: WorkstreamsTabProps) {
350
349
  }
351
350
 
352
351
  // ---------------------------------------------------------------------------
353
- // Right panel tabs
352
+ // Overflow tab bar
354
353
  // ---------------------------------------------------------------------------
355
354
 
356
- type RightPanelTab = 'plan' | 'workstreams' | 'documents' | 'uploads' | 'artifacts' | 'payload' | 'conversation';
355
+ // Tab-item styling, matching core's TabsTrigger underline tabs.
356
+ const TAB_ITEM_BASE =
357
+ 'flex items-center border-b-2 px-2 py-1.5 text-sm font-medium whitespace-nowrap cursor-pointer shrink-0';
358
+ const TAB_ITEM_INACTIVE = 'border-transparent text-muted-foreground hover:border-border hover:text-foreground';
359
+ const TAB_ITEM_ACTIVE = 'border-primary text-primary';
360
+ const TAB_GAP_PX = 4; // matches the `gap-1` between tab items
357
361
 
358
- function RightPanelTabSelect({
359
- tabs,
360
- activeTab,
361
- onChange,
362
- ariaLabel,
363
- }: {
362
+ interface OverflowMoreMenuProps {
363
+ /** The overflowed tabs to list inside the menu. */
364
364
  tabs: TabDefinition[];
365
- activeTab: RightPanelTab;
366
- onChange: (tab: RightPanelTab) => void;
367
- ariaLabel: string;
368
- }) {
365
+ current: string;
366
+ onTabChange: (name: string) => void;
367
+ label: string;
368
+ /** Whether the active tab is one of the overflowed tabs. */
369
+ active: boolean;
370
+ }
371
+
372
+ /** Trailing "More" dropdown of overflowed tabs; opens on hover, click, or keyboard. */
373
+ function OverflowMoreMenu({ tabs, current, onTabChange, label, active }: OverflowMoreMenuProps) {
369
374
  const [open, setOpen] = useState(false);
370
- const currentTab = tabs.find((tab) => tab.name === activeTab) ?? tabs[0];
375
+ const closeTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
376
+ const openedByHover = useRef(false);
377
+
378
+ const cancelClose = () => {
379
+ if (closeTimer.current) {
380
+ clearTimeout(closeTimer.current);
381
+ closeTimer.current = null;
382
+ }
383
+ };
384
+ const openOnHover = () => {
385
+ cancelClose();
386
+ openedByHover.current = true;
387
+ setOpen(true);
388
+ };
389
+ // Delay the close so the pointer can travel across the gap onto the menu.
390
+ const closeAfterDelay = () => {
391
+ cancelClose();
392
+ closeTimer.current = setTimeout(() => setOpen(false), 150);
393
+ };
394
+
395
+ // Clear any pending close timer on unmount.
396
+ useEffect(() => () => clearTimeout(closeTimer.current ?? undefined), []);
371
397
 
372
398
  return (
373
- <DropdownMenu open={open} onOpenChange={setOpen}>
399
+ // Non-modal: a modal menu sets body `pointer-events: none` while open, which makes
400
+ // the hover open/close flap. It still closes on outside-click / Escape.
401
+ <DropdownMenu
402
+ modal={false}
403
+ open={open}
404
+ onOpenChange={(next) => {
405
+ // Fired by click / keyboard / dismiss (not by hover); keep our state in sync.
406
+ cancelClose();
407
+ if (next) openedByHover.current = false;
408
+ setOpen(next);
409
+ }}
410
+ >
374
411
  <DropdownMenuTrigger asChild>
412
+ {/* Tab-bar primitive: raw button is the menu trigger (asChild). */}
375
413
  <button
376
414
  type="button"
377
- aria-label={ariaLabel}
378
- aria-haspopup="menu"
379
- aria-expanded={open}
380
- className={cn(
381
- 'inline-flex min-w-40 max-w-56 flex-row items-center justify-between gap-2 rounded-md border border-border bg-transparent px-2.5 py-2 text-start text-inherit',
382
- 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',
383
- 'hover:bg-muted',
384
- )}
415
+ onMouseEnter={openOnHover}
416
+ onMouseLeave={closeAfterDelay}
417
+ className={cn(TAB_ITEM_BASE, active ? TAB_ITEM_ACTIVE : TAB_ITEM_INACTIVE)}
385
418
  >
386
- <span className="min-w-0 flex-1 overflow-hidden text-sm">{currentTab?.label}</span>
387
- <ChevronsUpDownIcon className="size-4 shrink-0 opacity-50" aria-hidden="true" />
419
+ {label}
420
+ <ChevronDownIcon className="ms-1 size-4" />
388
421
  </button>
389
422
  </DropdownMenuTrigger>
390
- <DropdownMenuContent align="start" className="z-[1000000] min-w-56 max-w-[min(24rem,calc(100vw-1rem))]">
391
- {tabs.map((tab) => {
392
- const isSelected = tab.name === activeTab;
423
+ <DropdownMenuContent
424
+ align="end"
425
+ className="w-max"
426
+ onMouseEnter={cancelClose}
427
+ onMouseLeave={closeAfterDelay}
428
+ onCloseAutoFocus={(e) => {
429
+ // Keep hover-opens from returning the focus ring to the trigger.
430
+ if (openedByHover.current) e.preventDefault();
431
+ }}
432
+ >
433
+ {tabs.map((tab) => (
434
+ <DropdownMenuItem
435
+ key={tab.name}
436
+ disabled={tab.disabled}
437
+ onClick={() => onTabChange(tab.name)}
438
+ className={cn(tab.name === current && 'text-primary')}
439
+ >
440
+ {tab.label}
441
+ </DropdownMenuItem>
442
+ ))}
443
+ </DropdownMenuContent>
444
+ </DropdownMenu>
445
+ );
446
+ }
447
+
448
+ interface OverflowTabsBarProps {
449
+ tabs: TabDefinition[];
450
+ current: string;
451
+ onTabChange: (name: string) => void;
452
+ className?: string;
453
+ }
393
454
 
455
+ /**
456
+ * Tabs as a horizontal row; any that don't fit collapse into a trailing "More"
457
+ * dropdown. The visible/overflow split is measured from a hidden full-width row.
458
+ */
459
+ function OverflowTabsBar({ tabs, current, onTabChange, className }: OverflowTabsBarProps) {
460
+ const { t } = useUITranslation();
461
+ const containerRef = useRef<HTMLDivElement | null>(null);
462
+ const itemRefs = useRef<Array<HTMLButtonElement | null>>([]);
463
+ const moreRef = useRef<HTMLButtonElement | null>(null);
464
+ // `count` leading tabs are shown. When `promote` is set, the active tab is pulled
465
+ // into the last slot (before More) and `count` counts the tabs shown before it.
466
+ const [layout, setLayout] = useState<{ count: number; promote: boolean }>({ count: tabs.length, promote: false });
467
+
468
+ const recompute = () => {
469
+ const container = containerRef.current;
470
+ if (!container) return;
471
+ const containerWidth = container.clientWidth;
472
+ const widths = tabs.map((_, i) => itemRefs.current[i]?.offsetWidth ?? 0);
473
+ const totalAll = widths.reduce((sum, w) => sum + w, 0) + TAB_GAP_PX * Math.max(0, tabs.length - 1);
474
+
475
+ // How many tabs (in order, optionally skipping one) fit within `available`.
476
+ const fitCount = (available: number, skipIndex: number) => {
477
+ let used = 0;
478
+ let count = 0;
479
+ for (let i = 0; i < tabs.length; i++) {
480
+ if (i === skipIndex) continue;
481
+ const cand = used + (count > 0 ? TAB_GAP_PX : 0) + widths[i];
482
+ if (cand > available) break;
483
+ used = cand;
484
+ count += 1;
485
+ }
486
+ return count;
487
+ };
488
+
489
+ let next: { count: number; promote: boolean };
490
+ if (totalAll <= containerWidth) {
491
+ next = { count: tabs.length, promote: false };
492
+ } else {
493
+ const moreWidth = moreRef.current?.offsetWidth ?? 0;
494
+ const naturalCount = Math.max(1, fitCount(containerWidth - moreWidth - TAB_GAP_PX, -1));
495
+ const activeIndex = tabs.findIndex((tab) => tab.name === current);
496
+ if (activeIndex < 0 || activeIndex < naturalCount) {
497
+ next = { count: naturalCount, promote: false };
498
+ } else {
499
+ // Active tab overflowed: reserve its slot at the end, fit leading tabs before it.
500
+ const leadAvailable = containerWidth - moreWidth - widths[activeIndex] - TAB_GAP_PX * 2;
501
+ next = { count: fitCount(leadAvailable, activeIndex), promote: true };
502
+ }
503
+ }
504
+ setLayout((prev) => (prev.count === next.count && prev.promote === next.promote ? prev : next));
505
+ };
506
+
507
+ // Re-measure after every render (tab/label changes) and on container resize.
508
+ const recomputeRef = useRef(recompute);
509
+ recomputeRef.current = recompute;
510
+ useLayoutEffect(() => {
511
+ recomputeRef.current();
512
+ });
513
+ useEffect(() => {
514
+ const container = containerRef.current;
515
+ if (!container || typeof ResizeObserver === 'undefined') return;
516
+ const observer = new ResizeObserver(() => recomputeRef.current());
517
+ observer.observe(container);
518
+ return () => observer.disconnect();
519
+ }, []);
520
+
521
+ const activeIndex = tabs.findIndex((tab) => tab.name === current);
522
+ let visible: TabDefinition[];
523
+ let overflow: TabDefinition[];
524
+ if (layout.promote && activeIndex >= 0) {
525
+ // Pull the active tab into the last visible slot; the tab it displaces overflows.
526
+ const others = tabs.filter((_, i) => i !== activeIndex);
527
+ visible = [...others.slice(0, layout.count), tabs[activeIndex]];
528
+ overflow = others.slice(layout.count);
529
+ } else {
530
+ visible = tabs.slice(0, layout.count);
531
+ overflow = tabs.slice(layout.count);
532
+ }
533
+ const activeInOverflow = overflow.some((tab) => tab.name === current);
534
+ const moreLabel = t('agent.moreTabs');
535
+
536
+ return (
537
+ <div ref={containerRef} className={cn('relative', className)}>
538
+ {/* Hidden measurement row: all tabs + More at natural width, kept separate
539
+ from the visible row so measuring can't feed back into the layout. */}
540
+ <div aria-hidden className="pointer-events-none invisible absolute left-0 top-0 flex w-max gap-1">
541
+ {tabs.map((tab, i) => (
542
+ <button
543
+ type="button"
544
+ key={tab.name}
545
+ tabIndex={-1}
546
+ ref={(el) => {
547
+ itemRefs.current[i] = el;
548
+ }}
549
+ className={cn(TAB_ITEM_BASE, TAB_ITEM_INACTIVE)}
550
+ >
551
+ {tab.label}
552
+ </button>
553
+ ))}
554
+ <button type="button" tabIndex={-1} ref={moreRef} className={cn(TAB_ITEM_BASE, TAB_ITEM_INACTIVE)}>
555
+ {moreLabel}
556
+ <ChevronDownIcon className="ms-1 size-4" />
557
+ </button>
558
+ </div>
559
+
560
+ {/* Visible row */}
561
+ <div className="-mb-px flex gap-1 overflow-hidden border-b">
562
+ {visible.map((tab) => {
563
+ const isActive = tab.name === current;
394
564
  return (
395
- <DropdownMenuItem
565
+ // Tab-bar primitive: raw button mirrors core TabsTrigger underline styling.
566
+ <button
567
+ type="button"
396
568
  key={tab.name}
397
- className="min-h-9 justify-between gap-3 px-2 py-1.5 text-sm"
398
- onSelect={() => {
399
- onChange(tab.name as RightPanelTab);
400
- setOpen(false);
401
- }}
569
+ aria-current={isActive ? 'page' : undefined}
570
+ disabled={tab.disabled}
571
+ onClick={() => onTabChange(tab.name)}
572
+ className={cn(
573
+ TAB_ITEM_BASE,
574
+ isActive ? TAB_ITEM_ACTIVE : TAB_ITEM_INACTIVE,
575
+ 'disabled:pointer-events-none disabled:opacity-50',
576
+ )}
402
577
  >
403
- <span className="min-w-0 flex-1 overflow-hidden">{tab.label}</span>
404
- {isSelected && <CheckIcon className="size-4 shrink-0" aria-hidden="true" />}
405
- </DropdownMenuItem>
578
+ {tab.label}
579
+ </button>
406
580
  );
407
581
  })}
408
- </DropdownMenuContent>
409
- </DropdownMenu>
582
+
583
+ {overflow.length > 0 && (
584
+ <OverflowMoreMenu
585
+ tabs={overflow}
586
+ current={current}
587
+ onTabChange={onTabChange}
588
+ label={moreLabel}
589
+ active={activeInOverflow}
590
+ />
591
+ )}
592
+ </div>
593
+ </div>
410
594
  );
411
595
  }
412
596
 
597
+ // ---------------------------------------------------------------------------
598
+ // Right panel tabs
599
+ // ---------------------------------------------------------------------------
600
+
601
+ type RightPanelTab = 'plan' | 'workstreams' | 'documents' | 'uploads' | 'artifacts' | 'payload' | 'conversation';
602
+
413
603
  export interface AgentRightPanelProps {
414
604
  /** Optional payload content to show as a "Payload" tab */
415
605
  payloadContent?: React.ReactNode;
@@ -639,15 +829,13 @@ function AgentRightPanelComponent({
639
829
  const visibleTabs = tabs.filter((tab) => tab.is_allowed === undefined || tab.is_allowed === true);
640
830
  return (
641
831
  <Tabs tabs={tabs} current={activeTab} onTabChange={handleTabChange} fullHeight className="px-0">
642
- <div className="flex items-center justify-between shrink-0 px-1 py-1 gap-1">
643
- <div className="min-w-0">
644
- <RightPanelTabSelect
645
- ariaLabel={t('agent.selectRightPanelSection')}
646
- tabs={visibleTabs}
647
- activeTab={activeTab}
648
- onChange={handleTabChange}
649
- />
650
- </div>
832
+ <div className="flex items-end justify-between shrink-0 px-1 py-1 gap-1">
833
+ <OverflowTabsBar
834
+ tabs={visibleTabs}
835
+ current={activeTab}
836
+ onTabChange={handleTabChange}
837
+ className="min-w-0 flex-1"
838
+ />
651
839
  {!conversationContent && (
652
840
  <Button
653
841
  variant="ghost"
@@ -145,7 +145,7 @@ export function PulsingMessageLoader({ message, className, color = 'blue' }: Pul
145
145
 
146
146
  return (
147
147
  <div className={cn('flex items-center gap-2 py-1', className)}>
148
- <div className="flex space-x-1">
148
+ <div className="flex gap-1">
149
149
  <div className={`w-1.5 h-1.5 ${colorClasses[color].dot} rounded-full animate-bounce`} />
150
150
  <div
151
151
  className={`w-1.5 h-1.5 ${colorClasses[color].dot} rounded-full animate-bounce`}
@@ -1,11 +1,9 @@
1
- import { Button, Center, ErrorBox, Input, Modal, ModalBody, ModalTitle, Switch } from '@vertesia/ui/core';
1
+ import { Button, Center, ErrorBox, Input } from '@vertesia/ui/core';
2
2
  import { useUITranslation } from '@vertesia/ui/i18n';
3
3
  import { useUserSession } from '@vertesia/ui/session';
4
4
  import {
5
5
  ChevronDownIcon,
6
6
  ChevronRightIcon,
7
- DownloadIcon,
8
- EyeIcon,
9
7
  FileIcon,
10
8
  FolderIcon,
11
9
  FolderOpenIcon,
@@ -14,10 +12,6 @@ import {
14
12
  RefreshCwIcon,
15
13
  } from 'lucide-react';
16
14
  import React, { useCallback, useId, useMemo, useState } from 'react';
17
- import {
18
- type UniversalDocumentSource,
19
- UniversalDocumentViewer,
20
- } from '../../document-viewer/UniversalDocumentViewer.js';
21
15
  import { type ArtifactTreeNode, useArtifacts } from './hooks/useArtifacts.js';
22
16
 
23
17
  // ---------------------------------------------------------------------------
@@ -28,26 +22,16 @@ interface TreeNodeProps {
28
22
  node: ArtifactTreeNode;
29
23
  depth: number;
30
24
  runId: string;
31
- onPreview: (relativePath: string) => void;
32
25
  onDownload: (relativePath: string) => void;
33
26
  downloadingPath: string | null;
34
27
  forceExpanded?: boolean;
35
28
  }
36
-
37
29
  //** Convert a raw directory segment (e.g. "out_files") into a readable label ("Out Files"). */
38
30
  function formatDirectoryLabel(name: string): string {
39
31
  return name.replace(/[_-]/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
40
32
  }
41
33
 
42
- function TreeNode({
43
- node,
44
- depth,
45
- runId,
46
- onPreview,
47
- onDownload,
48
- downloadingPath,
49
- forceExpanded = false,
50
- }: TreeNodeProps) {
34
+ function TreeNode({ node, depth, runId, onDownload, downloadingPath, forceExpanded = false }: TreeNodeProps) {
51
35
  const [expanded, setExpanded] = useState(false);
52
36
  const isExpanded = forceExpanded || expanded;
53
37
 
@@ -82,7 +66,6 @@ function TreeNode({
82
66
  node={child}
83
67
  depth={depth + 1}
84
68
  runId={runId}
85
- onPreview={onPreview}
86
69
  onDownload={onDownload}
87
70
  downloadingPath={downloadingPath}
88
71
  forceExpanded={forceExpanded}
@@ -95,45 +78,23 @@ function TreeNode({
95
78
  const isDownloading = downloadingPath === node.path;
96
79
 
97
80
  return (
98
- <div
99
- className="group flex min-w-0 items-center gap-1.5 rounded text-sm hover:bg-muted/30"
100
- style={{ paddingInlineStart: `${depth * 14 + 4}px` }}
101
- >
81
+ <div className="min-w-0">
102
82
  <Button
103
83
  variant="unstyled"
104
- className="flex min-w-0 flex-1 items-center justify-start gap-1.5 px-1 py-1 text-start"
105
- onClick={() => onPreview(node.path)}
84
+ className="flex w-full max-w-full items-center justify-start gap-1.5 rounded px-1 py-1 text-start text-sm hover:bg-muted/30"
85
+ style={{ paddingInlineStart: `${depth * 14 + 4}px` }}
86
+ onClick={() => onDownload(node.path)}
87
+ disabled={isDownloading}
106
88
  title={node.path}
107
89
  >
108
- <span className="size-3.5 shrink-0" />
90
+ {isDownloading ? (
91
+ <Loader2Icon className="size-3.5 shrink-0 animate-spin text-info" />
92
+ ) : (
93
+ <span className="size-3.5 shrink-0" />
94
+ )}
109
95
  <FileIcon className="size-4 shrink-0 text-muted" />
110
96
  <span className="min-w-0 truncate">{node.name}</span>
111
97
  </Button>
112
- <div className="flex shrink-0 items-center pe-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">
113
- <Button
114
- variant="ghost"
115
- size="xs"
116
- className="h-6 w-6 p-0"
117
- onClick={() => onPreview(node.path)}
118
- aria-label="Preview artifact"
119
- >
120
- <EyeIcon className="size-3.5" />
121
- </Button>
122
- <Button
123
- variant="ghost"
124
- size="xs"
125
- className="h-6 w-6 p-0"
126
- onClick={() => onDownload(node.path)}
127
- disabled={isDownloading}
128
- aria-label="Download artifact"
129
- >
130
- {isDownloading ? (
131
- <Loader2Icon className="size-3.5 animate-spin text-info" />
132
- ) : (
133
- <DownloadIcon className="size-3.5" />
134
- )}
135
- </Button>
136
- </div>
137
98
  </div>
138
99
  );
139
100
  }
@@ -181,42 +142,6 @@ function downloadUrl(url: string, filename: string) {
181
142
  anchor.remove();
182
143
  }
183
144
 
184
- function getArtifactContentType(path: string): string | undefined {
185
- const ext = path.split('.').pop()?.toLowerCase();
186
- switch (ext) {
187
- case 'css':
188
- return 'text/css';
189
- case 'gif':
190
- return 'image/gif';
191
- case 'htm':
192
- case 'html':
193
- return 'text/html';
194
- case 'jpeg':
195
- case 'jpg':
196
- return 'image/jpeg';
197
- case 'json':
198
- return 'application/json';
199
- case 'md':
200
- case 'markdown':
201
- return 'text/markdown';
202
- case 'pdf':
203
- return 'application/pdf';
204
- case 'png':
205
- return 'image/png';
206
- case 'svg':
207
- return 'image/svg+xml';
208
- case 'ts':
209
- case 'tsx':
210
- return 'text/typescript';
211
- case 'txt':
212
- return 'text/plain';
213
- case 'webp':
214
- return 'image/webp';
215
- default:
216
- return undefined;
217
- }
218
- }
219
-
220
145
  // ---------------------------------------------------------------------------
221
146
  // Main tab component
222
147
  // ---------------------------------------------------------------------------
@@ -247,15 +172,8 @@ function ArtifactEmptyState({
247
172
  function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
248
173
  const { t } = useUITranslation();
249
174
  const { client } = useUserSession();
250
- const [showSystem, setShowSystem] = useState(false);
251
- const { tree, flatFiles, totalCount, systemHiddenCount, isLoading, error, refresh } = useArtifacts(
252
- client,
253
- runId,
254
- refreshKey,
255
- showSystem,
256
- );
175
+ const { tree, flatFiles, isLoading, error, refresh } = useArtifacts(client, runId, refreshKey);
257
176
  const [downloadingPath, setDownloadingPath] = useState<string | null>(null);
258
- const [previewPath, setPreviewPath] = useState<string | null>(null);
259
177
  const [filterValue, setFilterValue] = useState('');
260
178
  const normalizedFilterValue = filterValue.trim();
261
179
  const filteredTree = useMemo(() => filterArtifactTree(tree, normalizedFilterValue), [tree, normalizedFilterValue]);
@@ -278,28 +196,11 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
278
196
  [client, runId],
279
197
  );
280
198
 
281
- const handlePreview = useCallback((relativePath: string) => {
282
- setPreviewPath(relativePath);
283
- }, []);
284
-
285
- const previewSource: UniversalDocumentSource | null =
286
- runId && previewPath
287
- ? {
288
- title: previewPath.split('/').pop() || previewPath,
289
- fileName: previewPath.split('/').pop() || previewPath,
290
- contentType: getArtifactContentType(previewPath),
291
- artifact: {
292
- runId,
293
- path: previewPath,
294
- },
295
- }
296
- : null;
297
-
298
199
  if (!runId) {
299
200
  return <ArtifactEmptyState icon={<PackageIcon className="mb-2 size-8" />}>No run selected</ArtifactEmptyState>;
300
201
  }
301
202
 
302
- if (isLoading && totalCount === 0) {
203
+ if (isLoading && flatFiles.length === 0) {
303
204
  return (
304
205
  <ArtifactEmptyState icon={<Loader2Icon className="mb-2 size-6 animate-spin" />}>
305
206
  {t('agent.loadingArtifacts')}
@@ -327,7 +228,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
327
228
  );
328
229
  }
329
230
 
330
- if (totalCount === 0) {
231
+ if (flatFiles.length === 0) {
331
232
  return (
332
233
  <ArtifactEmptyState
333
234
  icon={<PackageIcon className="mb-2 size-8" />}
@@ -346,28 +247,16 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
346
247
  return (
347
248
  <div className="flex flex-col h-full">
348
249
  {/* Top bar */}
349
- <div className="flex shrink-0 flex-col gap-2 border-b px-3 py-2">
250
+ <div className="flex shrink-0 flex-col gap-2 px-3 py-2">
350
251
  <div className="flex items-center justify-between gap-2 text-xs text-muted">
351
252
  <span>
352
253
  {normalizedFilterValue
353
254
  ? `${visibleFileCount} of ${flatFiles.length} file${flatFiles.length !== 1 ? 's' : ''}`
354
255
  : `${flatFiles.length} file${flatFiles.length !== 1 ? 's' : ''}`}
355
- {!showSystem && systemHiddenCount > 0 ? ` · ${systemHiddenCount} hidden` : ''}
356
256
  </span>
357
- <div className="flex items-center gap-1">
358
- <Switch size="sm" value={showSystem} onChange={setShowSystem}>
359
- <span className="text-xs text-muted">{t('agent.showSystemArtifacts')}</span>
360
- </Switch>
361
- <Button
362
- variant="ghost"
363
- size="sm"
364
- onClick={refresh}
365
- disabled={isLoading}
366
- className="h-6 w-6 p-0"
367
- >
368
- <RefreshCwIcon className={`size-3.5 ${isLoading ? 'animate-spin' : ''}`} />
369
- </Button>
370
- </div>
257
+ <Button variant="ghost" size="sm" onClick={refresh} disabled={isLoading} className="h-6 w-6 p-0">
258
+ <RefreshCwIcon className={`size-3.5 ${isLoading ? 'animate-spin' : ''}`} />
259
+ </Button>
371
260
  </div>
372
261
  <label htmlFor={filterInputId} className="sr-only">
373
262
  {t('form.filter')}
@@ -385,7 +274,7 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
385
274
  </div>
386
275
 
387
276
  {/* Tree */}
388
- <div className="flex-1 overflow-y-auto px-3 py-2">
277
+ <div className="flex-1 overflow-y-auto px-3 pb-2">
389
278
  {filteredTree.length > 0 ? (
390
279
  <div className="min-w-0">
391
280
  {filteredTree.map((node) => (
@@ -394,7 +283,6 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
394
283
  node={node}
395
284
  depth={0}
396
285
  runId={runId}
397
- onPreview={handlePreview}
398
286
  onDownload={handleDownload}
399
287
  downloadingPath={downloadingPath}
400
288
  forceExpanded={!!normalizedFilterValue}
@@ -402,31 +290,9 @@ function ArtifactsTabComponent({ runId, refreshKey = 0 }: ArtifactsTabProps) {
402
290
  ))}
403
291
  </div>
404
292
  ) : (
405
- <div className="px-1 py-6 text-sm text-muted">
406
- {!showSystem && systemHiddenCount > 0
407
- ? t('agent.onlySystemArtifacts')
408
- : t('agent.noContentAvailable')}
409
- </div>
293
+ <div className="px-1 py-6 text-sm text-muted">{t('agent.noContentAvailable')}</div>
410
294
  )}
411
295
  </div>
412
- {previewSource && (
413
- <Modal
414
- isOpen={!!previewPath}
415
- onClose={() => setPreviewPath(null)}
416
- size="xl"
417
- className="h-[90vh] p-0"
418
- description="Artifact preview"
419
- >
420
- <ModalTitle show={false}>{previewSource.fileName}</ModalTitle>
421
- <ModalBody className="h-full max-h-none p-0">
422
- <UniversalDocumentViewer
423
- source={previewSource}
424
- className="h-full"
425
- onDownload={() => previewPath && void handleDownload(previewPath)}
426
- />
427
- </ModalBody>
428
- </Modal>
429
- )}
430
296
  </div>
431
297
  );
432
298
  }