@exulu/frontend 1.3.2 → 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 (254) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/app-build-manifest.json +185 -174
  3. package/dist/.next/app-path-routes-manifest.json +1 -1
  4. package/dist/.next/build-manifest.json +2 -2
  5. package/dist/.next/prerender-manifest.json +1 -1
  6. package/dist/.next/server/app/(application)/agents/edit/[id]/page.js +1 -1
  7. package/dist/.next/server/app/(application)/agents/edit/[id]/page.js.nft.json +1 -1
  8. package/dist/.next/server/app/(application)/agents/edit/[id]/page_client-reference-manifest.js +1 -1
  9. package/dist/.next/server/app/(application)/agents/page.js +1 -2
  10. package/dist/.next/server/app/(application)/agents/page.js.nft.json +1 -1
  11. package/dist/.next/server/app/(application)/agents/page_client-reference-manifest.js +1 -1
  12. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js +1 -1
  13. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js.nft.json +1 -1
  14. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page_client-reference-manifest.js +1 -1
  15. package/dist/.next/server/app/(application)/chat/[agent]/page.js +1 -1
  16. package/dist/.next/server/app/(application)/chat/[agent]/page.js.nft.json +1 -1
  17. package/dist/.next/server/app/(application)/chat/[agent]/page_client-reference-manifest.js +1 -1
  18. package/dist/.next/server/app/(application)/chat/page.js +1 -1
  19. package/dist/.next/server/app/(application)/chat/page.js.nft.json +1 -1
  20. package/dist/.next/server/app/(application)/chat/page_client-reference-manifest.js +1 -1
  21. package/dist/.next/server/app/(application)/configuration/page.js +1 -1
  22. package/dist/.next/server/app/(application)/configuration/page.js.nft.json +1 -1
  23. package/dist/.next/server/app/(application)/configuration/page_client-reference-manifest.js +1 -1
  24. package/dist/.next/server/app/(application)/dashboard/page.js +5 -1
  25. package/dist/.next/server/app/(application)/dashboard/page.js.nft.json +1 -1
  26. package/dist/.next/server/app/(application)/dashboard/page_client-reference-manifest.js +1 -1
  27. package/dist/.next/server/app/(application)/data/[[...query]]/page.js +5 -1
  28. package/dist/.next/server/app/(application)/data/[[...query]]/page.js.nft.json +1 -1
  29. package/dist/.next/server/app/(application)/data/[[...query]]/page_client-reference-manifest.js +1 -1
  30. package/dist/.next/server/app/(application)/evals/[id]/page.js +1 -1
  31. package/dist/.next/server/app/(application)/evals/[id]/page.js.nft.json +1 -1
  32. package/dist/.next/server/app/(application)/evals/[id]/page_client-reference-manifest.js +1 -1
  33. package/dist/.next/server/app/(application)/evals/[id]/runs/page.js +1 -1
  34. package/dist/.next/server/app/(application)/evals/[id]/runs/page.js.nft.json +1 -1
  35. package/dist/.next/server/app/(application)/evals/[id]/runs/page_client-reference-manifest.js +1 -1
  36. package/dist/.next/server/app/(application)/evals/cases/page.js +1 -1
  37. package/dist/.next/server/app/(application)/evals/cases/page.js.nft.json +1 -1
  38. package/dist/.next/server/app/(application)/evals/cases/page_client-reference-manifest.js +1 -1
  39. package/dist/.next/server/app/(application)/evals/page.js +1 -1
  40. package/dist/.next/server/app/(application)/evals/page.js.nft.json +1 -1
  41. package/dist/.next/server/app/(application)/evals/page_client-reference-manifest.js +1 -1
  42. package/dist/.next/server/app/(application)/explorer/page.js +1 -1
  43. package/dist/.next/server/app/(application)/explorer/page.js.nft.json +1 -1
  44. package/dist/.next/server/app/(application)/explorer/page_client-reference-manifest.js +1 -1
  45. package/dist/.next/server/app/(application)/jobs/page.js +1 -1
  46. package/dist/.next/server/app/(application)/jobs/page.js.nft.json +1 -1
  47. package/dist/.next/server/app/(application)/jobs/page_client-reference-manifest.js +1 -1
  48. package/dist/.next/server/app/(application)/keys/page.js +1 -1
  49. package/dist/.next/server/app/(application)/keys/page.js.nft.json +1 -1
  50. package/dist/.next/server/app/(application)/keys/page_client-reference-manifest.js +1 -1
  51. package/dist/.next/server/app/(application)/page.js +1 -1
  52. package/dist/.next/server/app/(application)/page.js.nft.json +1 -1
  53. package/dist/.next/server/app/(application)/page_client-reference-manifest.js +1 -1
  54. package/dist/.next/server/app/(application)/projects/[project]/page.js +1 -1
  55. package/dist/.next/server/app/(application)/projects/[project]/page.js.nft.json +1 -1
  56. package/dist/.next/server/app/(application)/projects/[project]/page_client-reference-manifest.js +1 -1
  57. package/dist/.next/server/app/(application)/projects/page.js +1 -1
  58. package/dist/.next/server/app/(application)/projects/page.js.nft.json +1 -1
  59. package/dist/.next/server/app/(application)/projects/page_client-reference-manifest.js +1 -1
  60. package/dist/.next/server/app/(application)/roles/page.js +1 -1
  61. package/dist/.next/server/app/(application)/roles/page.js.nft.json +1 -1
  62. package/dist/.next/server/app/(application)/roles/page_client-reference-manifest.js +1 -1
  63. package/dist/.next/server/app/(application)/token/page.js +1 -1
  64. package/dist/.next/server/app/(application)/token/page.js.nft.json +1 -1
  65. package/dist/.next/server/app/(application)/token/page_client-reference-manifest.js +1 -1
  66. package/dist/.next/server/app/(application)/users/page.js +1 -1
  67. package/dist/.next/server/app/(application)/users/page.js.nft.json +1 -1
  68. package/dist/.next/server/app/(application)/users/page_client-reference-manifest.js +1 -1
  69. package/dist/.next/server/app/(application)/variables/create/page.js +1 -1
  70. package/dist/.next/server/app/(application)/variables/create/page.js.nft.json +1 -1
  71. package/dist/.next/server/app/(application)/variables/create/page_client-reference-manifest.js +1 -1
  72. package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page.js +1 -1
  73. package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page.js.nft.json +1 -1
  74. package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page_client-reference-manifest.js +1 -1
  75. package/dist/.next/server/app/(application)/variables/page.js +1 -1
  76. package/dist/.next/server/app/(application)/variables/page.js.nft.json +1 -1
  77. package/dist/.next/server/app/(application)/variables/page_client-reference-manifest.js +1 -1
  78. package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page.js +1 -1
  79. package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page.js.nft.json +1 -1
  80. package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page_client-reference-manifest.js +1 -1
  81. package/dist/.next/server/app/(application)/workflows/page.js +1 -1
  82. package/dist/.next/server/app/(application)/workflows/page.js.nft.json +1 -1
  83. package/dist/.next/server/app/(application)/workflows/page_client-reference-manifest.js +1 -1
  84. package/dist/.next/server/app/(authentication)/login/page_client-reference-manifest.js +1 -1
  85. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  86. package/dist/.next/server/app/_not-found.html +1 -1
  87. package/dist/.next/server/app/_not-found.rsc +1 -1
  88. package/dist/.next/server/app/api/auth/[...nextauth]/route.js +9 -9
  89. package/dist/.next/server/app-paths-manifest.json +5 -5
  90. package/dist/.next/server/chunks/1051.js +16 -16
  91. package/dist/.next/server/chunks/2270.js +188 -100
  92. package/dist/.next/server/chunks/{8838.js → 2875.js} +1 -1
  93. package/dist/.next/server/chunks/2916.js +1 -1
  94. package/dist/.next/server/chunks/3503.js +1 -0
  95. package/dist/.next/server/chunks/{7544.js → 4552.js} +1 -1
  96. package/dist/.next/server/chunks/{3393.js → 4739.js} +1 -1
  97. package/dist/.next/server/chunks/5192.js +1 -1
  98. package/dist/.next/server/chunks/5999.js +2 -0
  99. package/dist/.next/server/chunks/6282.js +1 -0
  100. package/dist/.next/server/chunks/6623.js +1 -0
  101. package/dist/.next/server/chunks/7721.js +1 -0
  102. package/dist/.next/server/chunks/7944.js +2 -2
  103. package/dist/.next/server/chunks/8050.js +1 -0
  104. package/dist/.next/server/chunks/8206.js +1 -0
  105. package/dist/.next/server/chunks/8679.js +5 -0
  106. package/dist/.next/server/middleware-manifest.json +5 -5
  107. package/dist/.next/server/pages/404.html +1 -1
  108. package/dist/.next/server/pages/500.html +1 -1
  109. package/dist/.next/server/server-reference-manifest.json +1 -1
  110. package/dist/.next/static/chunks/1294-368dc8ec59054da4.js +2 -0
  111. package/dist/.next/static/chunks/1294-368dc8ec59054da4.js.map +1 -0
  112. package/dist/.next/static/chunks/{1645-e5fd10236c0183ce.js → 1645-570e014100772437.js} +1 -1
  113. package/dist/.next/static/chunks/{1645-e5fd10236c0183ce.js.map → 1645-570e014100772437.js.map} +1 -1
  114. package/dist/.next/static/chunks/1957-5867716304ecd208.js +2 -0
  115. package/dist/.next/static/chunks/1957-5867716304ecd208.js.map +1 -0
  116. package/dist/.next/static/chunks/{2293-59b4bbce0c5bd2f2.js → 2293-1681cdef5b8c0c0b.js} +1 -1
  117. package/dist/.next/static/chunks/{2293-59b4bbce0c5bd2f2.js.map → 2293-1681cdef5b8c0c0b.js.map} +1 -1
  118. package/dist/.next/static/chunks/3475-28ce4fce960656bd.js +2 -0
  119. package/dist/.next/static/chunks/3475-28ce4fce960656bd.js.map +1 -0
  120. package/dist/.next/static/chunks/3832-a5e8fc6647e2be65.js +2 -0
  121. package/dist/.next/static/chunks/3832-a5e8fc6647e2be65.js.map +1 -0
  122. package/dist/.next/static/chunks/{4386-a36fe9c65884f025.js → 4386-c7690667749bff6a.js} +1 -1
  123. package/dist/.next/static/chunks/{4386-a36fe9c65884f025.js.map → 4386-c7690667749bff6a.js.map} +1 -1
  124. package/dist/.next/static/chunks/4750-4d5c13bbc96bc19b.js +2 -0
  125. package/dist/.next/static/chunks/4750-4d5c13bbc96bc19b.js.map +1 -0
  126. package/dist/.next/static/chunks/5243-1aaa41b2cd0ea87c.js +2 -0
  127. package/dist/.next/static/chunks/5243-1aaa41b2cd0ea87c.js.map +1 -0
  128. package/dist/.next/static/chunks/5978-814d6900645d2fcc.js +2 -0
  129. package/dist/.next/static/chunks/5978-814d6900645d2fcc.js.map +1 -0
  130. package/dist/.next/static/chunks/6373-651cb258c9e2b57b.js +2 -0
  131. package/dist/.next/static/chunks/6373-651cb258c9e2b57b.js.map +1 -0
  132. package/dist/.next/static/chunks/{7564-44a20b31206685e1.js → 6545-5a1d7cf4d5ca770e.js} +21 -21
  133. package/dist/.next/static/chunks/6545-5a1d7cf4d5ca770e.js.map +1 -0
  134. package/dist/.next/static/chunks/6839-0f4cfb48058a5ab6.js +2 -0
  135. package/dist/.next/static/chunks/6839-0f4cfb48058a5ab6.js.map +1 -0
  136. package/dist/.next/static/chunks/723-94e596796cbf911d.js +2 -0
  137. package/dist/.next/static/chunks/723-94e596796cbf911d.js.map +1 -0
  138. package/dist/.next/static/chunks/8202-db2cc384c66bc1be.js +2 -0
  139. package/dist/.next/static/chunks/8202-db2cc384c66bc1be.js.map +1 -0
  140. package/dist/.next/static/chunks/8269-37dd07515eb44201.js +2 -0
  141. package/dist/.next/static/chunks/8269-37dd07515eb44201.js.map +1 -0
  142. package/dist/.next/static/chunks/8469-ba31cbd7acab5f94.js +2 -0
  143. package/dist/.next/static/chunks/8469-ba31cbd7acab5f94.js.map +1 -0
  144. package/dist/.next/static/chunks/8824-20030459012376a3.js +2 -0
  145. package/dist/.next/static/chunks/8824-20030459012376a3.js.map +1 -0
  146. package/dist/.next/static/chunks/9105-3800f721d38e2b9a.js +2 -0
  147. package/dist/.next/static/chunks/9105-3800f721d38e2b9a.js.map +1 -0
  148. package/dist/.next/static/chunks/9183-a51605ff26b92fed.js +41 -0
  149. package/dist/.next/static/chunks/9183-a51605ff26b92fed.js.map +1 -0
  150. package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-511f168123f85285.js +2 -0
  151. package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-511f168123f85285.js.map +1 -0
  152. package/dist/.next/static/chunks/app/(application)/agents/{page-499ac3bd1044306c.js → page-63643deabdaa6b2c.js} +2 -2
  153. package/dist/.next/static/chunks/app/(application)/agents/{page-499ac3bd1044306c.js.map → page-63643deabdaa6b2c.js.map} +1 -1
  154. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/{page-3807a8bc2ae87548.js → page-62c7321ba26632af.js} +2 -2
  155. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-62c7321ba26632af.js.map +1 -0
  156. package/dist/.next/static/chunks/app/(application)/chat/{layout-53796525bd3e2443.js → layout-5eb1d22ddcbc0b55.js} +2 -2
  157. package/dist/.next/static/chunks/app/(application)/chat/{layout-53796525bd3e2443.js.map → layout-5eb1d22ddcbc0b55.js.map} +1 -1
  158. package/dist/.next/static/chunks/app/(application)/configuration/{page-2d8a0e2664ab9a94.js → page-8f92af5318feb84f.js} +1 -1
  159. package/dist/.next/static/chunks/app/(application)/configuration/{page-2d8a0e2664ab9a94.js.map → page-8f92af5318feb84f.js.map} +1 -1
  160. package/dist/.next/static/chunks/app/(application)/dashboard/page-00e425d942e0d769.js +2 -0
  161. package/dist/.next/static/chunks/app/(application)/dashboard/page-00e425d942e0d769.js.map +1 -0
  162. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-a460a56d3efac658.js +2 -0
  163. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-a460a56d3efac658.js.map +1 -0
  164. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-bb06a9553c9ed178.js +2 -0
  165. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-bb06a9553c9ed178.js.map +1 -0
  166. package/dist/.next/static/chunks/app/(application)/evals/[id]/{page-2238f1fb73d93328.js → page-ef82e92ca7d0da6c.js} +2 -2
  167. package/dist/.next/static/chunks/app/(application)/evals/[id]/{page-2238f1fb73d93328.js.map → page-ef82e92ca7d0da6c.js.map} +1 -1
  168. package/dist/.next/static/chunks/app/(application)/evals/[id]/runs/page-6622dd1b22a7885d.js +2 -0
  169. package/dist/.next/static/chunks/app/(application)/evals/[id]/runs/page-6622dd1b22a7885d.js.map +1 -0
  170. package/dist/.next/static/chunks/app/(application)/evals/cases/{page-ea5faf58b368feae.js → page-6246be9d6592d1d3.js} +2 -2
  171. package/dist/.next/static/chunks/app/(application)/evals/cases/{page-ea5faf58b368feae.js.map → page-6246be9d6592d1d3.js.map} +1 -1
  172. package/dist/.next/static/chunks/app/(application)/evals/{page-f79e1a90384ba618.js → page-b1e1fd7dba1e675f.js} +2 -2
  173. package/dist/.next/static/chunks/app/(application)/evals/{page-f79e1a90384ba618.js.map → page-b1e1fd7dba1e675f.js.map} +1 -1
  174. package/dist/.next/static/chunks/app/(application)/jobs/{page-e6f02a338bec4806.js → page-a96441a0bc654d68.js} +1 -1
  175. package/dist/.next/static/chunks/app/(application)/jobs/{page-e6f02a338bec4806.js.map → page-a96441a0bc654d68.js.map} +1 -1
  176. package/dist/.next/static/chunks/app/(application)/keys/{page-59ee4e0281131cbc.js → page-163aadfe9ad0d794.js} +1 -1
  177. package/dist/.next/static/chunks/app/(application)/keys/{page-59ee4e0281131cbc.js.map → page-163aadfe9ad0d794.js.map} +1 -1
  178. package/dist/.next/static/chunks/app/(application)/{layout-73d93420d0c6661c.js → layout-694c53aca85ef437.js} +2 -2
  179. package/dist/.next/static/chunks/app/(application)/{layout-73d93420d0c6661c.js.map → layout-694c53aca85ef437.js.map} +1 -1
  180. package/dist/.next/static/chunks/app/(application)/projects/[project]/page-e69828fde85c50af.js +2 -0
  181. package/dist/.next/static/chunks/app/(application)/projects/[project]/page-e69828fde85c50af.js.map +1 -0
  182. package/dist/.next/static/chunks/app/(application)/projects/{layout-f73ad7daf4825f1b.js → layout-d7642b25bf6d33b3.js} +2 -2
  183. package/dist/.next/static/chunks/app/(application)/projects/{layout-f73ad7daf4825f1b.js.map → layout-d7642b25bf6d33b3.js.map} +1 -1
  184. package/dist/.next/static/chunks/app/(application)/roles/page-5d5e5142f0997122.js +2 -0
  185. package/dist/.next/static/chunks/app/(application)/roles/page-5d5e5142f0997122.js.map +1 -0
  186. package/dist/.next/static/chunks/app/(application)/users/{page-e0a04fda52138aa0.js → page-b862cb199fd72525.js} +2 -2
  187. package/dist/.next/static/chunks/app/(application)/users/{page-e0a04fda52138aa0.js.map → page-b862cb199fd72525.js.map} +1 -1
  188. package/dist/.next/static/chunks/app/(application)/variables/create/{page-6c6076f3f253190d.js → page-d79d5c1c1ecabdb5.js} +1 -1
  189. package/dist/.next/static/chunks/app/(application)/variables/create/{page-6c6076f3f253190d.js.map → page-d79d5c1c1ecabdb5.js.map} +1 -1
  190. package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/{page-a3fa477fead5609a.js → page-72cf3aa95776ab96.js} +1 -1
  191. package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/{page-a3fa477fead5609a.js.map → page-72cf3aa95776ab96.js.map} +1 -1
  192. package/dist/.next/static/chunks/app/(application)/variables/{page-ddeff54a8b19bdbe.js → page-67864b471b48c950.js} +2 -2
  193. package/dist/.next/static/chunks/app/(application)/variables/{page-ddeff54a8b19bdbe.js.map → page-67864b471b48c950.js.map} +1 -1
  194. package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/{page-ed6d136e7ee3a591.js → page-208b4c9cc64abf2e.js} +1 -1
  195. package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/{page-ed6d136e7ee3a591.js.map → page-208b4c9cc64abf2e.js.map} +1 -1
  196. package/dist/.next/static/chunks/app/(application)/workflows/page-5b1ffc7c5012fdf6.js +2 -0
  197. package/dist/.next/static/chunks/app/(application)/workflows/page-5b1ffc7c5012fdf6.js.map +1 -0
  198. package/dist/.next/static/css/006966ab2edd0ebc.css +4 -0
  199. package/dist/.next/static/css/006966ab2edd0ebc.css.map +1 -0
  200. package/dist/.next/static/css/e3f2a16ab7676b05.css.map +1 -1
  201. package/dist/package.json +4 -1
  202. package/package.json +1 -1
  203. package/dist/.next/server/chunks/3743.js +0 -1
  204. package/dist/.next/server/chunks/4375.js +0 -1
  205. package/dist/.next/server/chunks/4680.js +0 -1
  206. package/dist/.next/server/chunks/7203.js +0 -5
  207. package/dist/.next/server/chunks/7598.js +0 -5
  208. package/dist/.next/server/chunks/8806.js +0 -1
  209. package/dist/.next/static/chunks/1957-670ddf66742d95f2.js +0 -2
  210. package/dist/.next/static/chunks/1957-670ddf66742d95f2.js.map +0 -1
  211. package/dist/.next/static/chunks/3397-5a704b2e12e9e883.js +0 -2
  212. package/dist/.next/static/chunks/3397-5a704b2e12e9e883.js.map +0 -1
  213. package/dist/.next/static/chunks/3832-10b779e2f89f162f.js +0 -2
  214. package/dist/.next/static/chunks/3832-10b779e2f89f162f.js.map +0 -1
  215. package/dist/.next/static/chunks/3998-c1c5bec61ce07357.js +0 -2
  216. package/dist/.next/static/chunks/3998-c1c5bec61ce07357.js.map +0 -1
  217. package/dist/.next/static/chunks/428-61741966c36f4f72.js +0 -2
  218. package/dist/.next/static/chunks/428-61741966c36f4f72.js.map +0 -1
  219. package/dist/.next/static/chunks/5585-4f0c084850210a82.js +0 -2
  220. package/dist/.next/static/chunks/5585-4f0c084850210a82.js.map +0 -1
  221. package/dist/.next/static/chunks/5615-042f927b657e6db1.js +0 -41
  222. package/dist/.next/static/chunks/5615-042f927b657e6db1.js.map +0 -1
  223. package/dist/.next/static/chunks/5978-f3b8475a2d9f9299.js +0 -2
  224. package/dist/.next/static/chunks/5978-f3b8475a2d9f9299.js.map +0 -1
  225. package/dist/.next/static/chunks/6242-c1c2f1479529e9d4.js +0 -2
  226. package/dist/.next/static/chunks/6242-c1c2f1479529e9d4.js.map +0 -1
  227. package/dist/.next/static/chunks/6373-fc4799cc7a13474a.js +0 -2
  228. package/dist/.next/static/chunks/6373-fc4799cc7a13474a.js.map +0 -1
  229. package/dist/.next/static/chunks/7398-c6de1642586049cd.js +0 -2
  230. package/dist/.next/static/chunks/7398-c6de1642586049cd.js.map +0 -1
  231. package/dist/.next/static/chunks/7564-44a20b31206685e1.js.map +0 -1
  232. package/dist/.next/static/chunks/79-1d568f3c4cd45bd4.js +0 -2
  233. package/dist/.next/static/chunks/79-1d568f3c4cd45bd4.js.map +0 -1
  234. package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-b66390eb4a95ac1a.js +0 -2
  235. package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-b66390eb4a95ac1a.js.map +0 -1
  236. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-3807a8bc2ae87548.js.map +0 -1
  237. package/dist/.next/static/chunks/app/(application)/dashboard/page-85d3f8d2bd28ae4b.js +0 -2
  238. package/dist/.next/static/chunks/app/(application)/dashboard/page-85d3f8d2bd28ae4b.js.map +0 -1
  239. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-822dad4cb57f62e2.js +0 -2
  240. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-822dad4cb57f62e2.js.map +0 -1
  241. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-3efd7701534078ea.js +0 -2
  242. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-3efd7701534078ea.js.map +0 -1
  243. package/dist/.next/static/chunks/app/(application)/evals/[id]/runs/page-b6a3cb8435be3ade.js +0 -2
  244. package/dist/.next/static/chunks/app/(application)/evals/[id]/runs/page-b6a3cb8435be3ade.js.map +0 -1
  245. package/dist/.next/static/chunks/app/(application)/projects/[project]/page-19382bb263f85fda.js +0 -2
  246. package/dist/.next/static/chunks/app/(application)/projects/[project]/page-19382bb263f85fda.js.map +0 -1
  247. package/dist/.next/static/chunks/app/(application)/roles/page-acd9ef282bc53557.js +0 -2
  248. package/dist/.next/static/chunks/app/(application)/roles/page-acd9ef282bc53557.js.map +0 -1
  249. package/dist/.next/static/chunks/app/(application)/workflows/page-38488c44d89b32f4.js +0 -2
  250. package/dist/.next/static/chunks/app/(application)/workflows/page-38488c44d89b32f4.js.map +0 -1
  251. package/dist/.next/static/css/a7092ddec8ffd4fb.css +0 -4
  252. package/dist/.next/static/css/a7092ddec8ffd4fb.css.map +0 -1
  253. /package/dist/.next/static/{HHwzgh0RLIMeodnSs4vIv → soJPoIxCmlpJ75t9n-Q9V}/_buildManifest.js +0 -0
  254. /package/dist/.next/static/{HHwzgh0RLIMeodnSs4vIv → soJPoIxCmlpJ75t9n-Q9V}/_ssgManifest.js +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5978],{82534:function(e,t,s){s.d(t,{F:function(){return z}});var a=s(57437),l=s(2265),n=s(7211),r=s(12199),i=s(33245),o=s(53417),d=s(10866),c=s(82023),u=s(99397),m=s(22252),x=s(48736),h=s(15863),p=s(26110),f=s(62869),g=s(95186),j=s(26815),v=s(76818),N=s(27689),b=s(77992),y=s(12339),w=s(66070),C=s(35974),k=s(19378),T=s(53647),S=s(78361),Z=s(69836),_=s(27182);function z(e){let{open:t,onClose:s,evalSetId:z,onSuccess:F,testCase:A}=e,{toast:R}=(0,b.pm)(),E=!!A,{data:P}=(0,n.aM)(N.Ul,{variables:{page:1,limit:100}}),{regularTools:D,agentTools:O,knowledgeSourceTools:V}=(0,l.useMemo)(()=>{var e;let t=(null==P?void 0:null===(e=P.tools)||void 0===e?void 0:e.items)||[];return console.log("tools",t),{regularTools:t.filter(e=>"function"===e.type),agentTools:t.filter(e=>"agent"===e.type),knowledgeSourceTools:t.filter(e=>"context"===e.type)}},[P]),[I,U]=(0,l.useState)(""),[Y,$]=(0,l.useState)(""),[M,K]=(0,l.useState)(""),[q,L]=(0,l.useState)([]),[B,Q]=(0,l.useState)(""),[W,G]=(0,l.useState)(null),[H,J]=(0,l.useState)([]),[X,ee]=(0,l.useState)([]),[et,es]=(0,l.useState)([]),[ea,el]=(0,l.useState)([]),[en,er]=(0,l.useState)(""),[ei,eo]=(0,l.useState)(""),[ed,ec]=(0,l.useState)("");(0,l.useEffect)(()=>{A&&t?(U(A.name),$(A.description||""),K(A.expected_output),L(A.inputs||[]),ee(A.expected_tools||[]),es(A.expected_knowledge_sources||[]),el(A.expected_agent_tools||[])):t||(U(""),$(""),K(""),L([]),Q(""),G(null),J([]),ee([]),es([]),el([]),er(""),eo(""),ec(""))},[A,t]);let eu=async e=>{J(await Promise.all(e.map(async e=>({type:"file",mediaType:e.split(".").pop()||"",filename:e,url:await (0,S.NF)(e)}))))};(0,l.useEffect)(()=>{if(!W||0===W.length){J([]);return}eu(W)},[W]);let[em,{loading:ex}]=(0,r.D)(N.hx,{onCompleted:()=>{R({title:"Test case created",description:"The test case has been successfully created."}),F()},onError:e=>{R({title:"Failed to create test case",description:e.message,variant:"destructive"})}}),[eh,{loading:ep}]=(0,r.D)(N.Mh,{onCompleted:()=>{R({title:"Test case updated",description:"The test case has been successfully updated."}),F()},onError:e=>{R({title:"Failed to update test case",description:e.message,variant:"destructive"})}}),ef=()=>{if(!B.trim()&&0===H.length)return;let e=[];B.trim()&&e.push({type:"text",text:B.trim()}),H.length>0&&e.push(...H),L([...q,{id:"msg-".concat(Date.now()),role:"user",parts:e},{id:"msg-".concat(Date.now()),role:"assistant",metadata:{type:"placeholder"},parts:[{type:"text",text:"\uD83D\uDCAC Placeholder, generated agent response will be added here when the test case is run..."}]}]),Q(""),G(null),J([])},eg=ex||ep,ej=e=>{let t=D.find(t=>t.id===e);return(null==t?void 0:t.name)||e},ev=e=>{let t=V.find(t=>t.id===e);return(null==t?void 0:t.name)||e},eN=e=>{let t=O.find(t=>t.id===e);return(null==t?void 0:t.name)||e};return(0,a.jsx)(p.Vq,{open:t,onOpenChange:s,children:(0,a.jsxs)(p.cZ,{className:"max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,a.jsxs)(p.fK,{children:[(0,a.jsxs)(p.$N,{children:[E?"Edit Test Case":"Create Test Case"," ",z?"for Eval Set: ".concat(z):""]}),(0,a.jsx)(p.Be,{children:E?"Update the test case details.":"Create a new test case with conversation inputs and expected outputs."})]}),(0,a.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!I.trim()||!M.trim()||0===q.length){R({title:"Validation error",description:"Name, at least one input message, and expected output are required.",variant:"destructive"});return}let t={name:I.trim(),description:Y.trim()||null,inputs:q,expected_output:M.trim(),expected_tools:X.length>0?X:null,expected_knowledge_sources:et.length>0?et:null,expected_agent_tools:ea.length>0?ea:null,...z?{eval_set_id:z}:{}};E?eh({variables:{id:A.id,data:t}}):em({variables:{data:t}})},className:"flex-1 overflow-hidden flex flex-col",children:[(0,a.jsxs)(y.mQ,{defaultValue:"basic",className:"flex-1 overflow-hidden flex flex-col",children:[(0,a.jsxs)(y.dr,{className:"grid w-full grid-cols-3",children:[(0,a.jsxs)(y.SP,{value:"basic",className:"gap-2",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4"}),"Basic Info"]}),(0,a.jsxs)(y.SP,{value:"conversation",className:"gap-2",children:[(0,a.jsx)(o.Z,{className:"h-4 w-4"}),"Conversation"]}),(0,a.jsxs)(y.SP,{value:"expected",className:"gap-2",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4"}),"Expected Tools"]})]}),(0,a.jsxs)(k.x,{className:"flex-1",children:[(0,a.jsx)(y.nU,{value:"basic",className:"space-y-4 p-1 mt-4",children:(0,a.jsxs)("div",{className:"grid gap-5",children:[(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)(j._,{htmlFor:"name",children:"Name *"}),(0,a.jsx)(g.I,{id:"name",placeholder:"e.g., Customer Support - Refund Request",value:I,onChange:e=>U(e.target.value),disabled:eg,required:!0})]}),(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)(j._,{htmlFor:"description",children:"Description"}),(0,a.jsx)(v.g,{id:"description",placeholder:"Describe what this test case evaluates...",value:Y,onChange:e=>$(e.target.value),disabled:eg,rows:3})]}),(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)(j._,{htmlFor:"expectedOutput",children:"Expected Output *"}),(0,a.jsx)(v.g,{id:"expectedOutput",placeholder:"Describe the expected final output (e.g., 'A JSON object containing refund details', 'An empathetic response offering alternatives')",value:M,onChange:e=>K(e.target.value),disabled:eg,rows:4,required:!0}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"This can be an exact expected response or a description of what the output should contain."})]})]})}),(0,a.jsx)(y.nU,{value:"conversation",className:"space-y-4 p-1 mt-4",children:(0,a.jsxs)(w.Zb,{children:[(0,a.jsx)(w.Ol,{className:"pb-3",children:(0,a.jsx)("div",{className:"flex items-start justify-between",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[(0,a.jsx)(o.Z,{className:"h-4 w-4"}),"Conversation Flow",q.length>0&&(0,a.jsxs)(C.C,{variant:"secondary",className:"ml-2",children:[q.length," ",1===q.length?"message":"messages"]})]}),(0,a.jsx)(w.SZ,{className:"mt-1.5",children:"Add user messages in order. The agent will run through this conversation flow and respond between each message automatically."})]})})}),(0,a.jsxs)(w.aY,{className:"space-y-6",children:[(null==q?void 0:q.length)===0?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4 text-center border-2 border-dashed border-muted rounded-lg",children:[(0,a.jsx)(c.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),(0,a.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"No messages yet"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground max-w-sm",children:"Start building your test conversation by adding user messages below."})]}):(0,a.jsx)(_.ri,{className:"max-h-[350px] overflow-y-auto border rounded-lg bg-muted/30 transition-all duration-300 ease-in-out",children:(0,a.jsx)(_.iG,{className:"px-6 py-4",children:(0,a.jsx)("div",{className:"animate-in fade-in duration-500",children:(0,a.jsx)(Z.K,{messages:q,config:{marginTopFirstMessage:"mt-0",customAssistantClassnames:"bg-secondary/50 rounded-lg px-3 py-1 border-l-2 border-primary/30"},status:"ready",showActions:!1,writeAccess:!1})})})}),(0,a.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[(0,a.jsx)(j._,{htmlFor:"currentInput",className:"text-sm font-semibold",children:"Add User Message"}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(v.g,{id:"currentInput",placeholder:"Type the user's message...",value:B,onChange:e=>Q(e.target.value),disabled:eg,rows:2,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),ef())}}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(S.ZP,{id:"test-case-files",selectionLimit:10,allowedFileTypes:[".png",".jpg",".jpeg",".gif",".webp",".pdf",".docx",".xlsx",".xls",".csv",".pptx",".ppt",".mp3",".wav",".m4a",".mp4",".mpeg"],dependencies:[],onConfirm:e=>{G(e)}}),(0,a.jsxs)(f.z,{type:"button",variant:"outline",onClick:ef,disabled:eg||!B.trim()&&0===H.length,className:"ml-auto",size:"default",children:[(0,a.jsx)(u.Z,{className:"h-4 w-4 mr-2"}),"Add Message"]})]}),W&&W.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2",children:W.map(e=>(0,a.jsx)(S.jU,{s3Key:e,disabled:!0,active:!1,onRemove:()=>{G(null==W?void 0:W.filter(t=>t!==e))}}))}),(0,a.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[(0,a.jsx)(m.Z,{className:"h-4 w-4 text-amber-600 dark:text-amber-500 mt-0.5 flex-shrink-0"}),(0,a.jsxs)("p",{className:"text-xs text-amber-900 dark:text-amber-200",children:[(0,a.jsx)("strong",{children:"Note:"})," When running this test case, ensure the selected agent supports the file types you've attached here (images, documents, audio, etc.)."]})]})]})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Press Enter to add, Shift+Enter for new line. You can attach files to messages."})]})]})]})}),(0,a.jsx)(y.nU,{value:"expected",className:"space-y-4 p-1 mt-4",children:(0,a.jsxs)("div",{className:"grid gap-5",children:[(0,a.jsxs)(w.Zb,{className:"border-l-2 border-l-blue-500/30",children:[(0,a.jsxs)(w.Ol,{className:"pb-3",children:[(0,a.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4"}),"Expected Tools (Optional)",X.length>0&&(0,a.jsx)(C.C,{variant:"secondary",className:"ml-2",children:X.length})]}),(0,a.jsx)(w.SZ,{children:"Regular tools that should be used during the conversation"})]}),(0,a.jsxs)(w.aY,{className:"space-y-2",children:[(0,a.jsx)("div",{className:"flex gap-2 flex-wrap",children:X.map((e,t)=>(0,a.jsxs)(C.C,{variant:"secondary",children:[ej(e),(0,a.jsx)("button",{type:"button",onClick:()=>ee(X.filter((e,s)=>s!==t)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},t))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(T.Ph,{value:en,onValueChange:er,disabled:eg,children:[(0,a.jsx)(T.i4,{className:"flex-1",children:(0,a.jsx)(T.ki,{placeholder:"Select a tool to add..."})}),(0,a.jsx)(T.Bw,{children:D.map(e=>(0,a.jsx)(T.Ql,{value:e.id,children:e.name},e.id))})]}),(0,a.jsxs)(f.z,{type:"button",onClick:()=>{console.log("selectedTool",en),console.log("expectedTools",X),en&&!X.includes(en)&&(console.log("adding tool",en),console.log("new expectedTools",[...X,en]),ee([...X,en]),er(""))},disabled:eg||!en,className:"gap-1.5",variant:en?"default":"outline",children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Add"})]})]}),!en&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select a tool from the dropdown, then click Add"})]})]}),(0,a.jsxs)(w.Zb,{className:"border-l-2 border-l-purple-500/30",children:[(0,a.jsxs)(w.Ol,{className:"pb-3",children:[(0,a.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4"}),"Expected Knowledge Sources (Optional)",et.length>0&&(0,a.jsx)(C.C,{variant:"secondary",className:"ml-2",children:et.length})]}),(0,a.jsx)(w.SZ,{children:"Context/knowledge sources that should be used"})]}),(0,a.jsxs)(w.aY,{className:"space-y-2",children:[(0,a.jsx)("div",{className:"flex gap-2 flex-wrap",children:et.map((e,t)=>(0,a.jsxs)(C.C,{variant:"secondary",children:[ev(e),(0,a.jsx)("button",{type:"button",onClick:()=>es(et.filter((e,s)=>s!==t)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},t))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(T.Ph,{value:ei,onValueChange:eo,disabled:eg,children:[(0,a.jsx)(T.i4,{className:"flex-1",children:(0,a.jsx)(T.ki,{placeholder:"Select a knowledge source to add..."})}),(0,a.jsx)(T.Bw,{children:V.map(e=>(0,a.jsx)(T.Ql,{value:e.id,children:e.name},e.id))})]}),(0,a.jsxs)(f.z,{type:"button",onClick:()=>{console.log("selectedContext",ei),console.log("expectedKnowledgeSources",et),ei&&!et.includes(ei)&&(console.log("adding context",ei),console.log("new expectedKnowledgeSources",[...et,ei]),es([...et,ei]),eo(""))},disabled:eg||!ei,className:"gap-1.5",variant:ei?"default":"outline",children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Add"})]})]}),!ei&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select a knowledge source from the dropdown, then click Add"})]})]}),(0,a.jsxs)(w.Zb,{className:"border-l-2 border-l-green-500/30",children:[(0,a.jsxs)(w.Ol,{className:"pb-3",children:[(0,a.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[(0,a.jsx)(c.Z,{className:"h-4 w-4"}),"Expected Agent Tools (Optional)",ea.length>0&&(0,a.jsx)(C.C,{variant:"secondary",className:"ml-2",children:ea.length})]}),(0,a.jsx)(w.SZ,{children:"Agents that should be called as tools"})]}),(0,a.jsxs)(w.aY,{className:"space-y-2",children:[(0,a.jsx)("div",{className:"flex gap-2 flex-wrap",children:ea.map((e,t)=>(0,a.jsxs)(C.C,{variant:"secondary",children:[eN(e),(0,a.jsx)("button",{type:"button",onClick:()=>el(ea.filter((e,s)=>s!==t)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},t))}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(T.Ph,{value:ed,onValueChange:ec,disabled:eg,children:[(0,a.jsx)(T.i4,{className:"flex-1",children:(0,a.jsx)(T.ki,{placeholder:"Select an agent to add..."})}),(0,a.jsx)(T.Bw,{children:O.map(e=>(0,a.jsx)(T.Ql,{value:e.id,children:e.name},e.id))})]}),(0,a.jsxs)(f.z,{type:"button",onClick:()=>{console.log("selectedAgent",ed),console.log("expectedAgentTools",ea),ed&&!ea.includes(ed)&&(console.log("adding agent",ed),console.log("new expectedAgentTools",[...ea,ed]),el([...ea,ed]),ec(""))},disabled:eg||!ed,className:"gap-1.5",variant:ed?"default":"outline",children:[(0,a.jsx)(u.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Add"})]})]}),!ed&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select an agent from the dropdown, then click Add"})]})]})]})})]})]}),(0,a.jsxs)(p.cN,{className:"mt-4 gap-2",children:[(0,a.jsx)(f.z,{type:"button",variant:"outline",onClick:s,disabled:eg,children:"Cancel"}),(0,a.jsxs)(f.z,{type:"submit",disabled:eg||!I.trim()||!M.trim()||0===q.length,className:"shadow-sm hover:shadow-md transition-all",children:[eg&&(0,a.jsx)(h.Z,{className:"mr-2 h-4 w-4 animate-spin"}),E?"Update Test Case":"Create Test Case"]})]})]})]})})}},53245:function(e,t,s){s.d(t,{d:function(){return x},f:function(){return h}});var a=s(57437),l=s(62869),n=s(94508),r=s(30401),i=s(78867),o=s(2265),d=s(34996),c=s(1479),u=s(9880);let m=(0,o.createContext)({code:""}),x=e=>{let{code:t,language:s,showLineNumbers:l=!1,className:r,children:i,...o}=e;return(0,a.jsx)(m.Provider,{value:{code:t},children:(0,a.jsx)("div",{className:(0,n.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",r),...o,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(d.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:l,style:c.Z,children:t}),(0,a.jsx)(d.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:l,style:u.Z,children:t}),i&&(0,a.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:i})]})})})},h=e=>{let{onCopy:t,onError:s,timeout:d=2e3,children:c,className:u,...x}=e,[h,p]=(0,o.useState)(!1),{code:f}=(0,o.useContext)(m),g=async()=>{if(!navigator.clipboard.writeText){null==s||s(Error("Clipboard API not available"));return}try{await navigator.clipboard.writeText(f),p(!0),null==t||t(),setTimeout(()=>p(!1),d)}catch(e){null==s||s(e)}},j=h?r.Z:i.Z;return(0,a.jsx)(l.z,{className:(0,n.cn)("shrink-0",u),onClick:g,size:"icon",variant:"ghost",...x,children:null!=c?c:(0,a.jsx)(j,{size:14})})}},27182:function(e,t,s){s.d(t,{iG:function(){return i},ri:function(){return r}});var a=s(57437);s(62869);var l=s(94508);s(2265);var n=s(20460);let r=e=>{let{className:t,...s}=e;return(0,a.jsx)(n.h,{className:(0,l.cn)("relative flex-1 overflow-y-auto",t),initial:"smooth",resize:"smooth",role:"log",...s})},i=e=>{let{className:t,...s}=e;return(0,a.jsx)(n.h.Content,{className:(0,l.cn)("p-4",t),...s})}},35629:function(e,t,s){s.d(t,{H:function(){return x}});var a=s(57437),l=s(94508),n=s(2265),r=s(86816),i=s(67245),o=s(58146),d=s(85020),c=s(53245);s(2446);let u=(0,s(86589).Z)(r.UG),m={ol:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("ol",{className:(0,l.cn)("ml-4 list-outside list-decimal",n),...r,children:s})},li:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("li",{className:(0,l.cn)("py-1",n),...r,children:s})},ul:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("ul",{className:(0,l.cn)("ml-4 list-outside list-disc",n),...r,children:s})},hr:e=>{let{node:t,className:s,...n}=e;return(0,a.jsx)("hr",{className:(0,l.cn)("my-6 border-border",s),...n})},strong:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("span",{className:(0,l.cn)("font-semibold",n),...r,children:s})},a:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("a",{className:(0,l.cn)("font-medium text-primary underline",n),rel:"noreferrer",target:"_blank",...r,children:s})},h1:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("h1",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-3xl",n),...r,children:s})},h2:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("h2",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-2xl",n),...r,children:s})},h3:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("h3",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-xl",n),...r,children:s})},h4:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("h4",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-lg",n),...r,children:s})},h5:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("h5",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-base",n),...r,children:s})},h6:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("h6",{className:(0,l.cn)("mt-6 mb-2 font-semibold text-sm",n),...r,children:s})},table:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("div",{className:"my-4 overflow-x-auto",children:(0,a.jsx)("table",{className:(0,l.cn)("w-full border-collapse border border-border",n),...r,children:s})})},thead:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("thead",{className:(0,l.cn)("bg-muted/50",n),...r,children:s})},tbody:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("tbody",{className:(0,l.cn)("divide-y divide-border",n),...r,children:s})},tr:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("tr",{className:(0,l.cn)("border-border border-b",n),...r,children:s})},th:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("th",{className:(0,l.cn)("px-4 py-2 text-left font-semibold text-sm",n),...r,children:s})},td:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("td",{className:(0,l.cn)("px-4 py-2 text-sm",n),...r,children:s})},blockquote:e=>{let{node:t,children:s,className:n,...r}=e;return(0,a.jsx)("blockquote",{className:(0,l.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",n),...r,children:s})},code:e=>{var t,s;let{node:n,className:r,...i}=e;return(null==n?void 0:null===(t=n.position)||void 0===t?void 0:t.start.line)!==(null==n?void 0:null===(s=n.position)||void 0===s?void 0:s.end.line)?(0,a.jsx)("code",{className:r,...i}):(0,a.jsx)("code",{className:(0,l.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",r),...i})},pre:e=>{var t;let{node:s,className:r,children:i}=e,o="javascript";"string"==typeof(null==s?void 0:null===(t=s.properties)||void 0===t?void 0:t.className)&&(o=s.properties.className.replace("language-",""));let d="";return(0,n.isValidElement)(i)&&i.props&&"string"==typeof i.props.children?d=i.props.children:"string"==typeof i&&(d=i),(0,a.jsx)(c.d,{className:(0,l.cn)("my-4 h-auto",r),code:d,language:o,children:(0,a.jsx)(c.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},x=(0,n.memo)(e=>{let{className:t,options:s,children:n,allowedImagePrefixes:r,allowedLinkPrefixes:c,defaultOrigin:x,parseIncompleteMarkdown:h=!0,...p}=e,f="string"==typeof n&&h?function(e){if(!e||"string"!=typeof e)return e;let t=e,s=t.match(/(!?\[)([^\]]*?)$/);if(s){let e=t.lastIndexOf(s[1]);t=t.substring(0,e)}if(t.match(/(\*\*)([^*]*?)$/)&&(t.match(/\*\*/g)||[]).length%2==1&&(t="".concat(t,"**")),t.match(/(__)([^_]*?)$/)&&(t.match(/__/g)||[]).length%2==1&&(t="".concat(t,"__")),t.match(/(\*)([^*]*?)$/)&&t.split("").reduce((e,s,a)=>{if("*"===s){let s=t[a-1],l=t[a+1];if("*"!==s&&"*"!==l)return e+1}return e},0)%2==1&&(t="".concat(t,"*")),t.match(/(_)([^_]*?)$/)&&t.split("").reduce((e,s,a)=>{if("_"===s){let s=t[a-1],l=t[a+1];if("_"!==s&&"_"!==l)return e+1}return e},0)%2==1&&(t="".concat(t,"_")),t.match(/(`)([^`]*?)$/)&&(t.includes("```"),(t.match(/```[\s\S]*?```/g)||[]).length,(t.match(/```/g)||[]).length%2!=1)){let e=0;for(let s=0;s<t.length;s++)if("`"===t[s]){let a="```"===t.substring(s,s+3),l=s>0&&"```"===t.substring(s-1,s+2),n=s>1&&"```"===t.substring(s-2,s+1);!(a||l||n)&&e++}e%2==1&&(t="".concat(t,"`"))}return t.match(/(~~)([^~]*?)$/)&&(t.match(/~~/g)||[]).length%2==1&&(t="".concat(t,"~~")),t}(n):n;return(0,a.jsx)("div",{className:(0,l.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",t),...p,children:(0,a.jsx)(u,{allowedImagePrefixes:null!=r?r:["*"],allowedLinkPrefixes:null!=c?c:["*"],components:m,defaultOrigin:x,rehypePlugins:[i.Z],remarkPlugins:[o.Z,d.Z],...s,children:f})})},(e,t)=>e.children===t.children);x.displayName="Response"},69836:function(e,t,s){s.d(t,{K:function(){return F}});var a=s(57437);s(16831);var l=s(94508);let n=e=>{let{className:t,from:s,...n}=e;return(0,a.jsx)("div",{className:(0,l.cn)("group flex w-full items-end justify-end gap-2 py-4","user"===s?"is-user flex-row-reverse justify-end":"is-assistant flex-row-reverse justify-end","[&>div]:max-w-[80%]",t),...n})},r=e=>{let{children:t,className:s,...n}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col gap-2 overflow-hidden rounded-lg py-3 text-foreground text-sm","group-[.is-user]:bg-secondary group-[.is-user]:text-primary-foreground group-[.is-user]:px-4","group-[.is-assistant]:bg-transparent group-[.is-assistant]:text-foreground",s),...n,children:(0,a.jsx)("div",{className:"is-user:dark",children:t})})};var i=s(62869),o=s(81103);let d=e=>{let{className:t,children:s,...n}=e;return(0,a.jsx)("div",{className:(0,l.cn)("flex items-center gap-1",t),...n,children:s})},c=e=>{let{tooltip:t,children:s,label:n,className:r,variant:d="ghost",size:c="sm",...u}=e,m=(0,a.jsxs)(i.z,{className:(0,l.cn)("size-9 p-1.5 text-muted-foreground hover:text-foreground",r),size:c,type:"button",variant:d,...u,children:[s,(0,a.jsx)("span",{className:"sr-only",children:n||t})]});return t?(0,a.jsx)(o.pn,{children:(0,a.jsxs)(o.u,{children:[(0,a.jsx)(o.aJ,{asChild:!0,children:m}),(0,a.jsx)(o._v,{children:(0,a.jsx)("p",{children:t})})]})}):m};var u=s(35629),m=s(80886),x=s(74928),h=s(64972),p=s(40875),f=s(2265);let g=(0,f.createContext)(null),j=()=>{let e=(0,f.useContext)(g);if(!e)throw Error("Reasoning components must be used within Reasoning");return e},v=(0,f.memo)(e=>{let{className:t,isStreaming:s=!1,open:n,defaultOpen:r=!1,onOpenChange:i,duration:o,children:d,...c}=e,[u,h]=(0,m.T)({prop:n,defaultProp:r,onChange:i}),[p,j]=(0,m.T)({prop:o,defaultProp:0}),[v,N]=(0,f.useState)(!1),[b,y]=(0,f.useState)(null);return(0,f.useEffect)(()=>{s?null===b&&y(Date.now()):null!==b&&(j(Math.round((Date.now()-b)/1e3)),y(null))},[s,b,j]),(0,f.useEffect)(()=>{if(s&&!u)h(!0);else if(!s&&u&&!r&&!v){let e=setTimeout(()=>{h(!1),N(!0)},1e3);return()=>clearTimeout(e)}},[s,u,r,h,v]),(0,a.jsx)(g.Provider,{value:{isStreaming:s,isOpen:u,setIsOpen:h,duration:p},children:(0,a.jsx)(x.zF,{className:(0,l.cn)("not-prose mb-4",t),onOpenChange:e=>{h(e)},open:u,...c,children:d})})}),N=(0,f.memo)(e=>{let{className:t,title:s="Reasoning",children:n,...r}=e,{isStreaming:i,isOpen:o,duration:d}=j();return(0,a.jsx)(x.wy,{className:(0,l.cn)("flex items-center gap-2 text-muted-foreground text-sm",t),...r,children:null!=n?n:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.Z,{className:"size-4"}),i||0===d?(0,a.jsx)("p",{children:"Thinking..."}):(0,a.jsxs)("p",{children:["Thought for ",d," seconds"]}),(0,a.jsx)(p.Z,{className:(0,l.cn)("size-4 text-muted-foreground transition-transform",o?"rotate-180":"rotate-0")})]})})}),b=(0,f.memo)(e=>{let{className:t,children:s,...n}=e;return(0,a.jsx)(x.Fw,{className:(0,l.cn)("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",t),...n,children:(0,a.jsx)(u.H,{className:"grid gap-2",children:s})})});v.displayName="Reasoning",N.displayName="ReasoningTrigger",b.displayName="ReasoningContent";var y=s(55455);let w=e=>{let{className:t,...s}=e;return(0,a.jsx)(x.zF,{className:(0,l.cn)("not-prose mb-4 text-primary text-xs",t),...s})},C=e=>{let{className:t,count:s,children:l,...n}=e;return(0,a.jsx)(x.wy,{className:"flex items-center gap-2",...n,children:null!=l?l:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"font-medium",children:["Used ",s," sources"]}),(0,a.jsx)(p.Z,{className:"h-4 w-4"})]})})},k=e=>{let{className:t,...s}=e;return(0,a.jsx)(x.Fw,{className:(0,l.cn)("mt-3 flex w-fit flex-col gap-2","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",t),...s})},T=e=>{let{href:t,title:s,children:l,...n}=e;return(0,a.jsx)("a",{className:"flex items-center gap-2",href:t,rel:"noreferrer",target:"_blank",...n,children:null!=l?l:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y.Z,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"block font-medium",children:s})]})})};var S=s(52636),Z=s(78867),_=s(33145),z=s(77992);function F(e){let{messages:t,status:s="idle",className:i,showActions:o=!0,onRegenerate:m,onAddToolResult:x,UntypedToolPartComponent:h,addToContext:p,writeAccess:f=!0,config:g}=e,{toast:j}=(0,z.pm)();return(0,a.jsx)(a.Fragment,{children:null==t?void 0:t.map((e,y)=>{let z=e.metadata;return t.length,(0,a.jsx)(n,{className:(0,l.cn)("assistant"===e.role&&((null==g?void 0:g.customAssistantClassnames)?null==g?void 0:g.customAssistantClassnames:""),0===y&&((null==g?void 0:g.marginTopFirstMessage)?null==g?void 0:g.marginTopFirstMessage:"mt-12"),i),from:e.role,children:(0,a.jsxs)(r,{children:[e.parts.map((t,l)=>{if("step-start"===t.type)return null;if("text"===t.type)return(0,a.jsx)("div",{children:(0,a.jsx)(u.H,{className:"chat-response-container",children:t.text})},"".concat(e.id,"-").concat(l));if("tool-askForConfirmation"===t.type&&x){let e=t.toolCallId;switch(t.state){case"input-streaming":return(0,a.jsx)("div",{children:"Loading confirmation request..."},e);case"input-available":return(0,a.jsxs)("div",{children:[t.input.message,(0,a.jsxs)("div",{children:[(0,a.jsx)("button",{onClick:()=>x({tool:"askForConfirmation",toolCallId:e,output:"Yes, confirmed"}),children:"Yes"}),(0,a.jsx)("button",{onClick:()=>x({tool:"askForConfirmation",toolCallId:e,output:"No, denied"}),children:"No"})]})]},e);case"output-available":return(0,a.jsxs)("div",{children:["Tool call allowed: ",t.output]},e);case"output-error":return(0,a.jsxs)("div",{children:["Error: ",t.errorText]},e)}}if((t.type.startsWith("tool-")||"dynamic-tool"===t.type)&&h&&p){let e=t.toolCallId;return(0,a.jsx)(h,{untypedToolPart:t,callId:e,addToContext:p},e)}if("file"===t.type){var n;if(null===(n=t.mediaType)||void 0===n?void 0:n.startsWith("image/"))return(0,a.jsx)(_.default,{src:t.url,width:300,height:300,alt:"Generated image"},"".concat(e.id,"-").concat(l))}return"source-url"===t.type?(0,a.jsxs)(w,{children:[(0,a.jsx)(C,{count:e.parts.filter(e=>"source-url"===e.type).length}),(0,a.jsx)(k,{children:e.parts.map((t,s)=>{if("source-url"===t.type)return(0,a.jsx)(T,{href:t.url,title:t.title},"".concat(e.id,"-").concat(s))})},"".concat(e.id))]},"".concat(e.id,"-").concat(l)):"reasoning"===t.type?(0,a.jsxs)(v,{className:"w-full",isStreaming:"streaming"===s,children:[(0,a.jsx)(N,{}),(0,a.jsx)(b,{children:t.text})]},"".concat(e.id,"-").concat(l)):null}),o&&"assistant"===e.role&&(0,a.jsxs)(d,{className:"mt-2",children:[m&&(0,a.jsx)(c,{onClick:()=>m(),label:"Retry",disabled:!f,children:(0,a.jsx)(S.Z,{className:"size-3"})}),(0,a.jsx)(c,{onClick:()=>{navigator.clipboard.writeText(e.parts.map(e=>(null==e?void 0:e.text)||"").join("\n")),j({title:"Copied message",description:"The message was copied to your clipboard."})},label:"Copy",children:(0,a.jsx)(Z.Z,{className:"size-3"})}),(null==z?void 0:z.totalTokens)&&(0,a.jsxs)("small",{className:"text-muted-foreground",children:[Intl.NumberFormat("en-US").format(null==z?void 0:z.totalTokens)," tokens"]})]})]})},e.id)})})}},37099:function(e,t,s){s.d(t,{OL:function(){return f},_T:function(){return u},aR:function(){return o},f$:function(){return h},fY:function(){return m},le:function(){return g},xo:function(){return x},yT:function(){return p}});var a=s(57437),l=s(23619),n=s(2265),r=s(62869),i=s(94508);let o=l.fC;l.xz;let d=l.h_,c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.aV,{className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:t})});c.displayName=l.aV.displayName;let u=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsxs)(d,{children:[(0,a.jsx)(c,{}),(0,a.jsx)(l.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...n})]})});u.displayName=l.VY.displayName;let m=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s})};m.displayName="AlertDialogHeader";let x=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};x.displayName="AlertDialogFooter";let h=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold",s),...n})});h.displayName=l.Dx.displayName;let p=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",s),...n})});p.displayName=l.dk.displayName;let f=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.aU,{ref:t,className:(0,i.cn)((0,r.d)(),s),...n})});f.displayName=l.aU.displayName;let g=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.$j,{ref:t,className:(0,i.cn)((0,r.d)({variant:"outline"}),"mt-2 sm:mt-0",s),...n})});g.displayName=l.$j.displayName},74928:function(e,t,s){s.d(t,{Fw:function(){return r},wy:function(){return n},zF:function(){return l}});var a=s(88985);let l=a.fC,n=a.wy,r=a.Fw},12339:function(e,t,s){s.d(t,{SP:function(){return d},dr:function(){return o},mQ:function(){return i},nU:function(){return c}});var a=s(57437),l=s(20271),n=s(2265),r=s(94508);let i=l.fC,o=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.aV,{ref:t,className:(0,r.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...n})});o.displayName=l.aV.displayName;let d=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.xz,{ref:t,className:(0,r.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",s),...n})});d.displayName=l.xz.displayName;let c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(l.VY,{ref:t,className:(0,r.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n})});c.displayName=l.VY.displayName}}]);
2
- //# sourceMappingURL=5978-f3b8475a2d9f9299.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/chunks/5978-f3b8475a2d9f9299.js","mappings":"8aA6CO,SAASA,EAAcC,CAMT,KANS,CAC5BC,KAAAA,CAAI,CACJC,QAAAA,CAAO,CACPC,UAAAA,CAAS,CACTC,UAAAA,CAAS,CACTC,SAAAA,CAAQ,CACW,CANSL,EAOtB,CAAEM,MAAAA,CAAK,CAAE,CAAGC,CAAAA,EAAAA,EAAAA,EAAAA,IACZC,EAAY,CAAC,CAACH,EAGd,CAAEI,KAAMC,CAAS,CAAE,CAAGC,CAAAA,EAAAA,EAAAA,EAAAA,EAIzBC,EAAAA,EAASA,CAAE,CACZC,UAAW,CAAEC,KAAM,EAAGC,MAAO,GAAI,CACnC,GAGM,CAAEC,aAAAA,CAAY,CAAEC,WAAAA,CAAU,CAAEC,qBAAAA,CAAoB,CAAE,CAAGC,CAAAA,EAAAA,EA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,QACxB,GAAAwG,EAAAC,GAAA,EAACqS,EAAAA,EAAqB,EACpBV,IAAKA,EACLtR,UAAW+F,CAAAA,EAAAA,EAAAA,EAAAA,EACT,sYACA/F,GAED,GAAG6F,CAAK,IAGbjF,CAAAA,EAAYuL,WAAW,CAAG6F,EAAAA,EAAqB,CAAC7F,WAAW,CAE3D,IAAMjL,EAAcmQ,EAAAA,UAAgB,CAGlC,CAAAnY,EAA0BoY,QAAzB,CAAEtR,UAAAA,CAAS,CAAE,GAAG6F,EAAO,CAAA3M,QACxB,GAAAwG,EAAAC,GAAA,EAACqS,EAAAA,EAAqB,EACpBV,IAAKA,EACLtR,UAAW+F,CAAAA,EAAAA,EAAAA,EAAAA,EACT,kIACA/F,GAED,GAAG6F,CAAK,IAGb3E,CAAAA,EAAYiL,WAAW,CAAG6F,EAAAA,EAAqB,CAAC7F,WAAW","sources":["webpack://_N_E/./app/(application)/evals/cases/components/test-case-modal.tsx","webpack://_N_E/./components/ai-elements/code-block.tsx","webpack://_N_E/./components/ai-elements/conversation.tsx","webpack://_N_E/./components/ai-elements/response.tsx","webpack://_N_E/./components/ai-elements/message.tsx","webpack://_N_E/./components/ai-elements/actions.tsx","webpack://_N_E/./components/ai-elements/reasoning.tsx","webpack://_N_E/./components/ai-elements/source.tsx","webpack://_N_E/./components/message-renderer.tsx","webpack://_N_E/./components/ui/alert-dialog.tsx","webpack://_N_E/./components/ui/collapsible.tsx","webpack://_N_E/./components/ui/tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useMemo } from \"react\";\nimport { useMutation, useQuery } from \"@apollo/client\";\nimport { Loader2, Plus, MessageSquare, Info, Sparkles, Settings2, FileText, AlertCircle } from \"lucide-react\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"@/components/ui/dialog\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { Textarea } from \"@/components/ui/textarea\";\nimport { CREATE_TEST_CASE, UPDATE_TEST_CASE, GET_TOOLS } from \"@/queries/queries\";\nimport { useToast } from \"@/components/ui/use-toast\";\nimport { TestCase } from \"@/types/models/test-case\";\nimport { Tool } from \"@EXULU_SHARED/models/tool\";\nimport { UIMessage, FileUIPart } from \"ai\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\";\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { ScrollArea } from \"@/components/ui/scroll-area\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/ui/select\";\nimport UppyDashboard, { FileItem, getPresignedUrl } from \"@/components/uppy-dashboard\";\nimport { MessageRenderer } from \"@/components/message-renderer\";\nimport { Conversation, ConversationContent } from \"@/components/ai-elements/conversation\";\n\ninterface TestCaseModalProps {\n open: boolean;\n onClose: () => void;\n onSuccess: () => void;\n testCase?: TestCase | null;\n evalSetId?: string;\n}\n\nexport function TestCaseModal({\n open,\n onClose,\n evalSetId,\n onSuccess,\n testCase,\n}: TestCaseModalProps) {\n const { toast } = useToast();\n const isEditing = !!testCase;\n\n // Fetch tools from server\n const { data: toolsData } = useQuery<{\n tools: {\n items: Tool[]\n }\n }>(GET_TOOLS, {\n variables: { page: 1, limit: 100 },\n });\n\n // Split tools by type\n const { regularTools, agentTools, knowledgeSourceTools } = useMemo(() => {\n const tools = toolsData?.tools?.items || [];\n console.log(\"tools\", tools);\n return {\n regularTools: tools.filter(t => t.type === \"function\"),\n agentTools: tools.filter(t => t.type === \"agent\"),\n knowledgeSourceTools: tools.filter(t => t.type === \"context\"),\n };\n }, [toolsData]);\n\n // Basic fields\n const [name, setName] = useState(\"\");\n const [description, setDescription] = useState(\"\");\n const [expectedOutput, setExpectedOutput] = useState(\"\");\n\n // Conversation inputs (UIMessage array)\n const [inputs, setInputs] = useState<UIMessage[]>([]);\n const [currentInput, setCurrentInput] = useState(\"\");\n const [currentFiles, setCurrentFiles] = useState<string[] | null>(null);\n const [currentFileParts, setCurrentFileParts] = useState<FileUIPart[]>([]);\n\n // Optional expected fields\n const [expectedTools, setExpectedTools] = useState<string[]>([]);\n const [expectedKnowledgeSources, setExpectedKnowledgeSources] = useState<string[]>([]);\n const [expectedAgentTools, setExpectedAgentTools] = useState<string[]>([]);\n\n // Temp selectors\n const [selectedTool, setSelectedTool] = useState<string>(\"\");\n const [selectedContext, setSelectedContext] = useState<string>(\"\");\n const [selectedAgent, setSelectedAgent] = useState<string>(\"\");\n\n useEffect(() => {\n if (testCase && open) {\n setName(testCase.name);\n setDescription(testCase.description || \"\");\n setExpectedOutput(testCase.expected_output);\n setInputs(testCase.inputs || []);\n setExpectedTools(testCase.expected_tools || []);\n setExpectedKnowledgeSources(testCase.expected_knowledge_sources || []);\n setExpectedAgentTools(testCase.expected_agent_tools || []);\n } else if (!open) {\n // Reset when closing\n setName(\"\");\n setDescription(\"\");\n setExpectedOutput(\"\");\n setInputs([]);\n setCurrentInput(\"\");\n setCurrentFiles(null);\n setCurrentFileParts([]);\n setExpectedTools([]);\n setExpectedKnowledgeSources([]);\n setExpectedAgentTools([]);\n setSelectedTool(\"\");\n setSelectedContext(\"\");\n setSelectedAgent(\"\");\n }\n }, [testCase, open]);\n\n // Convert items to FileUIPart when files are selected\n const updateMessageFiles = async (keys: string[]) => {\n const files = await Promise.all(keys.map(async (key) => {\n /* if (!item.s3key) {\n // Take all item fields and turn into a data url\n let content = \"\";\n Object.entries(item).forEach(([key, value]) => {\n content += `${key}: ${value}\\n`\n })\n return {\n type: \"file\" as const,\n mediaType: item.type,\n filename: item.name,\n url: `data:text/plain;base64,${btoa(content)}`\n }\n } */\n\n return {\n type: \"file\" as const,\n mediaType: key.split(\".\").pop() || \"\",\n filename: key,\n url: await getPresignedUrl(key)\n }\n }))\n setCurrentFileParts(files)\n }\n\n useEffect(() => {\n if (!currentFiles || currentFiles.length === 0) {\n setCurrentFileParts([])\n return;\n }\n updateMessageFiles(currentFiles)\n }, [currentFiles])\n\n const [createTestCase, { loading: creating }] = useMutation(CREATE_TEST_CASE, {\n onCompleted: () => {\n toast({\n title: \"Test case created\",\n description: \"The test case has been successfully created.\",\n });\n onSuccess();\n },\n onError: (error) => {\n toast({\n title: \"Failed to create test case\",\n description: error.message,\n variant: \"destructive\",\n });\n },\n });\n\n const [updateTestCase, { loading: updating }] = useMutation(UPDATE_TEST_CASE, {\n onCompleted: () => {\n toast({\n title: \"Test case updated\",\n description: \"The test case has been successfully updated.\",\n });\n onSuccess();\n },\n onError: (error) => {\n toast({\n title: \"Failed to update test case\",\n description: error.message,\n variant: \"destructive\",\n });\n },\n });\n\n const handleAddMessage = () => {\n if (!currentInput.trim() && currentFileParts.length === 0) return;\n\n const parts: any[] = [];\n\n if (currentInput.trim()) {\n parts.push({\n type: \"text\",\n text: currentInput.trim(),\n });\n }\n\n // Add file parts\n if (currentFileParts.length > 0) {\n parts.push(...currentFileParts);\n }\n\n const newMessage: UIMessage = {\n id: `msg-${Date.now()}`,\n role: \"user\",\n parts,\n };\n\n const placeholderMessage: UIMessage = {\n id: `msg-${Date.now()}`,\n role: \"assistant\",\n metadata: {\n type: \"placeholder\",\n },\n parts: [{\n type: \"text\",\n text: \"💬 Placeholder, generated agent response will be added here when the test case is run...\",\n }],\n };\n\n setInputs([...inputs, newMessage, placeholderMessage]);\n setCurrentInput(\"\");\n setCurrentFiles(null);\n setCurrentFileParts([]);\n };\n\n const handleRemoveMessage = (index: number) => {\n setInputs(inputs.filter((_, i) => i !== index));\n };\n\n const handleAddTool = () => {\n console.log(\"selectedTool\", selectedTool);\n console.log(\"expectedTools\", expectedTools);\n if (selectedTool && !expectedTools.includes(selectedTool)) {\n console.log(\"adding tool\", selectedTool);\n console.log(\"new expectedTools\", [...expectedTools, selectedTool]);\n setExpectedTools([...expectedTools, selectedTool]);\n setSelectedTool(\"\");\n }\n };\n\n const handleAddContext = () => {\n console.log(\"selectedContext\", selectedContext);\n console.log(\"expectedKnowledgeSources\", expectedKnowledgeSources);\n if (selectedContext && !expectedKnowledgeSources.includes(selectedContext)) {\n console.log(\"adding context\", selectedContext);\n console.log(\"new expectedKnowledgeSources\", [...expectedKnowledgeSources, selectedContext]);\n setExpectedKnowledgeSources([...expectedKnowledgeSources, selectedContext]);\n setSelectedContext(\"\");\n }\n };\n\n const handleAddAgent = () => {\n console.log(\"selectedAgent\", selectedAgent);\n console.log(\"expectedAgentTools\", expectedAgentTools);\n if (selectedAgent && !expectedAgentTools.includes(selectedAgent)) {\n console.log(\"adding agent\", selectedAgent);\n console.log(\"new expectedAgentTools\", [...expectedAgentTools, selectedAgent]);\n setExpectedAgentTools([...expectedAgentTools, selectedAgent]);\n setSelectedAgent(\"\");\n }\n };\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n if (!name.trim() || !expectedOutput.trim() || inputs.length === 0) {\n toast({\n title: \"Validation error\",\n description: \"Name, at least one input message, and expected output are required.\",\n variant: \"destructive\",\n });\n return;\n }\n\n const data = {\n name: name.trim(),\n description: description.trim() || null,\n inputs,\n expected_output: expectedOutput.trim(),\n expected_tools: expectedTools.length > 0 ? expectedTools : null,\n expected_knowledge_sources: expectedKnowledgeSources.length > 0 ? expectedKnowledgeSources : null,\n expected_agent_tools: expectedAgentTools.length > 0 ? expectedAgentTools : null,\n ...(evalSetId ? { eval_set_id: evalSetId } : {}),\n };\n\n if (isEditing) {\n updateTestCase({\n variables: {\n id: testCase.id,\n data,\n },\n });\n } else {\n createTestCase({\n variables: {\n data,\n },\n });\n }\n };\n\n const loading = creating || updating;\n\n const getToolName = (id: string) => {\n const tool = regularTools.find(t => t.id === id);\n return tool?.name || id;\n };\n\n const getContextName = (id: string) => {\n const context = knowledgeSourceTools.find(t => t.id === id);\n return context?.name || id;\n };\n\n const getAgentName = (id: string) => {\n const agent = agentTools.find(t => t.id === id);\n return agent?.name || id;\n };\n\n const getFileCount = (message: UIMessage) => {\n return message.parts.filter(part => part.type === \"file\").length;\n };\n\n return (\n <Dialog open={open} onOpenChange={onClose}>\n <DialogContent className=\"max-w-4xl max-h-[90vh] overflow-hidden flex flex-col\">\n <DialogHeader>\n <DialogTitle>{isEditing ? \"Edit Test Case\" : \"Create Test Case\"} {evalSetId ? `for Eval Set: ${evalSetId}` : \"\"}</DialogTitle>\n <DialogDescription>\n {isEditing ? \"Update the test case details.\" : \"Create a new test case with conversation inputs and expected outputs.\"}\n </DialogDescription>\n </DialogHeader>\n\n <form onSubmit={handleSubmit} className=\"flex-1 overflow-hidden flex flex-col\">\n <Tabs defaultValue=\"basic\" className=\"flex-1 overflow-hidden flex flex-col\">\n <TabsList className=\"grid w-full grid-cols-3\">\n <TabsTrigger value=\"basic\" className=\"gap-2\">\n <Info className=\"h-4 w-4\" />\n Basic Info\n </TabsTrigger>\n <TabsTrigger value=\"conversation\" className=\"gap-2\">\n <MessageSquare className=\"h-4 w-4\" />\n Conversation\n </TabsTrigger>\n <TabsTrigger value=\"expected\" className=\"gap-2\">\n <Settings2 className=\"h-4 w-4\" />\n Expected Tools\n </TabsTrigger>\n </TabsList>\n\n <ScrollArea className=\"flex-1\">\n <TabsContent value=\"basic\" className=\"space-y-4 p-1 mt-4\">\n <div className=\"grid gap-5\">\n <div className=\"grid gap-2\">\n <Label htmlFor=\"name\">Name *</Label>\n <Input\n id=\"name\"\n placeholder=\"e.g., Customer Support - Refund Request\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n disabled={loading}\n required\n />\n </div>\n <div className=\"grid gap-2\">\n <Label htmlFor=\"description\">Description</Label>\n <Textarea\n id=\"description\"\n placeholder=\"Describe what this test case evaluates...\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n disabled={loading}\n rows={3}\n />\n </div>\n <div className=\"grid gap-2\">\n <Label htmlFor=\"expectedOutput\">Expected Output *</Label>\n <Textarea\n id=\"expectedOutput\"\n placeholder=\"Describe the expected final output (e.g., 'A JSON object containing refund details', 'An empathetic response offering alternatives')\"\n value={expectedOutput}\n onChange={(e) => setExpectedOutput(e.target.value)}\n disabled={loading}\n rows={4}\n required\n />\n <p className=\"text-xs text-muted-foreground\">\n This can be an exact expected response or a description of what the output should contain.\n </p>\n </div>\n </div>\n </TabsContent>\n\n <TabsContent value=\"conversation\" className=\"space-y-4 p-1 mt-4\">\n <Card>\n <CardHeader className=\"pb-3\">\n <div className=\"flex items-start justify-between\">\n <div>\n <CardTitle className=\"text-sm flex items-center gap-2\">\n <MessageSquare className=\"h-4 w-4\" />\n Conversation Flow\n {inputs.length > 0 && (\n <Badge variant=\"secondary\" className=\"ml-2\">\n {inputs.length} {inputs.length === 1 ? 'message' : 'messages'}\n </Badge>\n )}\n </CardTitle>\n <CardDescription className=\"mt-1.5\">\n Add user messages in order. The agent will run through this conversation flow and respond between each message automatically.\n </CardDescription>\n </div>\n </div>\n </CardHeader>\n <CardContent className=\"space-y-6\">\n\n {inputs?.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-12 px-4 text-center border-2 border-dashed border-muted rounded-lg\">\n <Sparkles className=\"h-12 w-12 text-muted-foreground/50 mb-4\" />\n <h3 className=\"font-semibold text-lg mb-2\">No messages yet</h3>\n <p className=\"text-sm text-muted-foreground max-w-sm\">\n Start building your test conversation by adding user messages below.\n </p>\n </div>\n ) : (\n /* @ts-ignore */\n <Conversation className=\"max-h-[350px] overflow-y-auto border rounded-lg bg-muted/30 transition-all duration-300 ease-in-out\">\n {/* @ts-ignore */}\n <ConversationContent className=\"px-6 py-4\">\n <div className=\"animate-in fade-in duration-500\">\n <MessageRenderer\n messages={inputs}\n config={{\n marginTopFirstMessage: 'mt-0',\n customAssistantClassnames: 'bg-secondary/50 rounded-lg px-3 py-1 border-l-2 border-primary/30'\n }}\n status={\"ready\"}\n showActions={false}\n writeAccess={false}\n />\n </div>\n </ConversationContent>\n </Conversation>\n )}\n\n <div className=\"space-y-3 pt-2 border-t\">\n <Label htmlFor=\"currentInput\" className=\"text-sm font-semibold\">Add User Message</Label>\n <div className=\"space-y-3\">\n <Textarea\n id=\"currentInput\"\n placeholder=\"Type the user's message...\"\n value={currentInput}\n onChange={(e) => setCurrentInput(e.target.value)}\n disabled={loading}\n rows={2}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" && !e.shiftKey) {\n e.preventDefault();\n handleAddMessage();\n }\n }}\n />\n\n <div className=\"flex items-center gap-2\">\n <UppyDashboard\n id=\"test-case-files\"\n selectionLimit={10}\n allowedFileTypes={[\n '.png', '.jpg', '.jpeg', '.gif', '.webp',\n '.pdf', '.docx', '.xlsx', '.xls', '.csv', '.pptx', '.ppt',\n '.mp3', '.wav', '.m4a', '.mp4', '.mpeg'\n ]}\n dependencies={[]}\n onConfirm={(items) => {\n setCurrentFiles(items)\n }}\n />\n\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleAddMessage}\n disabled={loading || (!currentInput.trim() && currentFileParts.length === 0)}\n className=\"ml-auto\"\n size=\"default\"\n >\n <Plus className=\"h-4 w-4 mr-2\" />\n Add Message\n </Button>\n </div>\n\n {currentFiles && currentFiles.length > 0 && (\n <>\n <div className=\"grid grid-cols-3 gap-2\">\n {currentFiles.map((item) => (\n <FileItem\n s3Key={item}\n disabled={true}\n active={false}\n onRemove={() => {\n setCurrentFiles(currentFiles?.filter((i) => i !== item))\n }}\n />\n ))}\n </div>\n <div className=\"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg\">\n <AlertCircle className=\"h-4 w-4 text-amber-600 dark:text-amber-500 mt-0.5 flex-shrink-0\" />\n <p className=\"text-xs text-amber-900 dark:text-amber-200\">\n <strong>Note:</strong> When running this test case, ensure the selected agent supports the file types you've attached here (images, documents, audio, etc.).\n </p>\n </div>\n </>\n )}\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Press Enter to add, Shift+Enter for new line. You can attach files to messages.\n </p>\n </div>\n </CardContent>\n </Card>\n </TabsContent>\n\n <TabsContent value=\"expected\" className=\"space-y-4 p-1 mt-4\">\n <div className=\"grid gap-5\">\n <Card className=\"border-l-2 border-l-blue-500/30\">\n <CardHeader className=\"pb-3\">\n <CardTitle className=\"text-sm flex items-center gap-2\">\n <Settings2 className=\"h-4 w-4\" />\n Expected Tools (Optional)\n {expectedTools.length > 0 && (\n <Badge variant=\"secondary\" className=\"ml-2\">\n {expectedTools.length}\n </Badge>\n )}\n </CardTitle>\n <CardDescription>Regular tools that should be used during the conversation</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n <div className=\"flex gap-2 flex-wrap\">\n {expectedTools.map((toolId, index) => (\n <Badge key={index} variant=\"secondary\">\n {getToolName(toolId)}\n <button\n type=\"button\"\n onClick={() => setExpectedTools(expectedTools.filter((_, i) => i !== index))}\n className=\"ml-2 hover:text-destructive\">\n ×\n </button>\n </Badge>\n ))}\n </div>\n <div className=\"flex gap-2\">\n <Select value={selectedTool} onValueChange={setSelectedTool} disabled={loading}>\n <SelectTrigger className=\"flex-1\">\n <SelectValue placeholder=\"Select a tool to add...\" />\n </SelectTrigger>\n <SelectContent>\n {regularTools.map((tool) => (\n <SelectItem key={tool.id} value={tool.id}>\n {tool.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Button\n type=\"button\"\n onClick={handleAddTool}\n disabled={loading || !selectedTool}\n className=\"gap-1.5\"\n variant={selectedTool ? \"default\" : \"outline\"}\n >\n <Plus className=\"h-4 w-4\" />\n <span className=\"hidden sm:inline\">Add</span>\n </Button>\n </div>\n {!selectedTool && (\n <p className=\"text-xs text-muted-foreground/75 italic\">\n Select a tool from the dropdown, then click Add\n </p>\n )}\n </CardContent>\n </Card>\n\n <Card className=\"border-l-2 border-l-purple-500/30\">\n <CardHeader className=\"pb-3\">\n <CardTitle className=\"text-sm flex items-center gap-2\">\n <FileText className=\"h-4 w-4\" />\n Expected Knowledge Sources (Optional)\n {expectedKnowledgeSources.length > 0 && (\n <Badge variant=\"secondary\" className=\"ml-2\">\n {expectedKnowledgeSources.length}\n </Badge>\n )}\n </CardTitle>\n <CardDescription>Context/knowledge sources that should be used</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n <div className=\"flex gap-2 flex-wrap\">\n {expectedKnowledgeSources.map((contextId, index) => (\n <Badge key={index} variant=\"secondary\">\n {getContextName(contextId)}\n <button\n type=\"button\"\n onClick={() => setExpectedKnowledgeSources(expectedKnowledgeSources.filter((_, i) => i !== index))}\n className=\"ml-2 hover:text-destructive\"\n >\n ×\n </button>\n </Badge>\n ))}\n </div>\n <div className=\"flex gap-2\">\n <Select value={selectedContext} onValueChange={setSelectedContext} disabled={loading}>\n <SelectTrigger className=\"flex-1\">\n <SelectValue placeholder=\"Select a knowledge source to add...\" />\n </SelectTrigger>\n <SelectContent>\n {knowledgeSourceTools.map((context) => (\n <SelectItem key={context.id} value={context.id}>\n {context.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Button\n type=\"button\"\n onClick={handleAddContext}\n disabled={loading || !selectedContext}\n className=\"gap-1.5\"\n variant={selectedContext ? \"default\" : \"outline\"}\n >\n <Plus className=\"h-4 w-4\" />\n <span className=\"hidden sm:inline\">Add</span>\n </Button>\n </div>\n {!selectedContext && (\n <p className=\"text-xs text-muted-foreground/75 italic\">\n Select a knowledge source from the dropdown, then click Add\n </p>\n )}\n </CardContent>\n </Card>\n\n <Card className=\"border-l-2 border-l-green-500/30\">\n <CardHeader className=\"pb-3\">\n <CardTitle className=\"text-sm flex items-center gap-2\">\n <Sparkles className=\"h-4 w-4\" />\n Expected Agent Tools (Optional)\n {expectedAgentTools.length > 0 && (\n <Badge variant=\"secondary\" className=\"ml-2\">\n {expectedAgentTools.length}\n </Badge>\n )}\n </CardTitle>\n <CardDescription>Agents that should be called as tools</CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n <div className=\"flex gap-2 flex-wrap\">\n {expectedAgentTools.map((agentId, index) => (\n <Badge key={index} variant=\"secondary\">\n {getAgentName(agentId)}\n <button\n type=\"button\"\n onClick={() => setExpectedAgentTools(expectedAgentTools.filter((_, i) => i !== index))}\n className=\"ml-2 hover:text-destructive\"\n >\n ×\n </button>\n </Badge>\n ))}\n </div>\n <div className=\"flex gap-2\">\n <Select value={selectedAgent} onValueChange={setSelectedAgent} disabled={loading}>\n <SelectTrigger className=\"flex-1\">\n <SelectValue placeholder=\"Select an agent to add...\" />\n </SelectTrigger>\n <SelectContent>\n {agentTools.map((agent) => (\n <SelectItem key={agent.id} value={agent.id}>\n {agent.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Button\n type=\"button\"\n onClick={handleAddAgent}\n disabled={loading || !selectedAgent}\n className=\"gap-1.5\"\n variant={selectedAgent ? \"default\" : \"outline\"}\n >\n <Plus className=\"h-4 w-4\" />\n <span className=\"hidden sm:inline\">Add</span>\n </Button>\n </div>\n {!selectedAgent && (\n <p className=\"text-xs text-muted-foreground/75 italic\">\n Select an agent from the dropdown, then click Add\n </p>\n )}\n </CardContent>\n </Card>\n </div>\n </TabsContent>\n </ScrollArea>\n </Tabs>\n\n <DialogFooter className=\"mt-4 gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={onClose}\n disabled={loading}\n >\n Cancel\n </Button>\n <Button\n type=\"submit\"\n disabled={loading || !name.trim() || !expectedOutput.trim() || inputs.length === 0}\n className=\"shadow-sm hover:shadow-md transition-all\"\n >\n {loading && <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />}\n {isEditing ? \"Update Test Case\" : \"Create Test Case\"}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog >\n );\n}\n","'use client';\n\nimport { Button } from '@/components/ui/button';\nimport { cn } from '@/lib/utils';\nimport { CheckIcon, CopyIcon } from 'lucide-react';\nimport type { ComponentProps, HTMLAttributes, ReactNode } from 'react';\nimport { createContext, useContext, useState } from 'react';\nimport { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';\nimport {\n oneDark,\n oneLight,\n} from 'react-syntax-highlighter/dist/esm/styles/prism';\n\ntype CodeBlockContextType = {\n code: string;\n};\n\nconst CodeBlockContext = createContext<CodeBlockContextType>({\n code: '',\n});\n\nexport type CodeBlockProps = HTMLAttributes<HTMLDivElement> & {\n code: string;\n language: string;\n showLineNumbers?: boolean;\n children?: ReactNode;\n};\n\nexport const CodeBlock = ({\n code,\n language,\n showLineNumbers = false,\n className,\n children,\n ...props\n}: CodeBlockProps) => (\n <CodeBlockContext.Provider value={{ code }}>\n <div\n className={cn(\n 'relative w-full overflow-hidden rounded-md border bg-background text-foreground',\n className\n )}\n {...props}\n >\n <div className=\"relative\">\n <SyntaxHighlighter\n className=\"overflow-hidden dark:hidden\"\n codeTagProps={{\n className: 'font-mono text-sm',\n }}\n customStyle={{\n margin: 0,\n padding: '1rem',\n fontSize: '0.875rem',\n background: 'hsl(var(--background))',\n color: 'hsl(var(--foreground))',\n }}\n language={language}\n lineNumberStyle={{\n color: 'hsl(var(--muted-foreground))',\n paddingRight: '1rem',\n minWidth: '2.5rem',\n }}\n showLineNumbers={showLineNumbers}\n style={oneLight}\n >\n {code}\n </SyntaxHighlighter>\n <SyntaxHighlighter\n className=\"hidden overflow-hidden dark:block\"\n codeTagProps={{\n className: 'font-mono text-sm',\n }}\n customStyle={{\n margin: 0,\n padding: '1rem',\n fontSize: '0.875rem',\n background: 'hsl(var(--background))',\n color: 'hsl(var(--foreground))',\n }}\n language={language}\n lineNumberStyle={{\n color: 'hsl(var(--muted-foreground))',\n paddingRight: '1rem',\n minWidth: '2.5rem',\n }}\n showLineNumbers={showLineNumbers}\n style={oneDark}\n >\n {code}\n </SyntaxHighlighter>\n {children && (\n <div className=\"absolute top-2 right-2 flex items-center gap-2\">\n {children}\n </div>\n )}\n </div>\n </div>\n </CodeBlockContext.Provider>\n);\n\nexport type CodeBlockCopyButtonProps = ComponentProps<typeof Button> & {\n onCopy?: () => void;\n onError?: (error: Error) => void;\n timeout?: number;\n};\n\nexport const CodeBlockCopyButton = ({\n onCopy,\n onError,\n timeout = 2000,\n children,\n className,\n ...props\n}: CodeBlockCopyButtonProps) => {\n const [isCopied, setIsCopied] = useState(false);\n const { code } = useContext(CodeBlockContext);\n\n const copyToClipboard = async () => {\n if (typeof window === 'undefined' || !navigator.clipboard.writeText) {\n onError?.(new Error('Clipboard API not available'));\n return;\n }\n\n try {\n await navigator.clipboard.writeText(code);\n setIsCopied(true);\n onCopy?.();\n setTimeout(() => setIsCopied(false), timeout);\n } catch (error) {\n onError?.(error as Error);\n }\n };\n\n const Icon = isCopied ? CheckIcon : CopyIcon;\n\n return (\n <Button\n className={cn('shrink-0', className)}\n onClick={copyToClipboard}\n size=\"icon\"\n variant=\"ghost\"\n {...props}\n >\n {children ?? <Icon size={14} />}\n </Button>\n );\n};\n","'use client';\n\nimport { Button } from '@/components/ui/button';\nimport { cn } from '@/lib/utils';\nimport { ArrowDownIcon } from 'lucide-react';\nimport type { ComponentProps } from 'react';\nimport { useCallback } from 'react';\nimport { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';\n\n// @ts-ignore\nexport type ConversationProps = ComponentProps<typeof StickToBottom>;\n\n// @ts-ignore\nexport const Conversation = ({ className, ...props }: ConversationProps) => (\n// @ts-ignore\n <StickToBottom\n className={cn('relative flex-1 overflow-y-auto', className)}\n initial=\"smooth\"\n resize=\"smooth\"\n role=\"log\"\n {...props}\n />\n);\n\nexport type ConversationContentProps = ComponentProps<\n // @ts-ignore\n typeof StickToBottom.Content\n>;\n\nexport const ConversationContent = ({\n // @ts-ignore\n className,\n ...props\n}: ConversationContentProps) => (\n // @ts-ignore\n <StickToBottom.Content className={cn('p-4', className)} {...props} />\n);\n\nexport type ConversationScrollButtonProps = ComponentProps<typeof Button>;\n\nexport const ConversationScrollButton = ({\n className,\n ...props\n}: ConversationScrollButtonProps) => {\n const { isAtBottom, scrollToBottom } = useStickToBottomContext();\n\n const handleScrollToBottom = useCallback(() => {\n scrollToBottom();\n }, [scrollToBottom]);\n\n return (\n !isAtBottom && (\n <Button\n className={cn(\n 'absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full',\n className\n )}\n onClick={handleScrollToBottom}\n size=\"icon\"\n type=\"button\"\n variant=\"outline\"\n {...props}\n >\n <ArrowDownIcon className=\"size-4\" />\n </Button>\n )\n );\n};\n","'use client';\n\nimport { cn } from '@/lib/utils';\nimport type { ComponentProps, HTMLAttributes } from 'react';\nimport { isValidElement, memo } from 'react';\nimport ReactMarkdown, { type Options } from 'react-markdown';\nimport rehypeKatex from 'rehype-katex';\nimport remarkGfm from 'remark-gfm';\nimport remarkMath from 'remark-math';\nimport { CodeBlock, CodeBlockCopyButton } from './code-block';\nimport 'katex/dist/katex.min.css';\nimport hardenReactMarkdown from 'harden-react-markdown';\n\n/**\n * Parses markdown text and removes incomplete tokens to prevent partial rendering\n * of links, images, bold, and italic formatting during streaming.\n */\nfunction parseIncompleteMarkdown(text: string): string {\n if (!text || typeof text !== 'string') {\n return text;\n }\n\n let result = text;\n\n // Handle incomplete links and images\n // Pattern: [...] or ![...] where the closing ] is missing\n const linkImagePattern = /(!?\\[)([^\\]]*?)$/;\n const linkMatch = result.match(linkImagePattern);\n if (linkMatch) {\n // If we have an unterminated [ or ![, remove it and everything after\n const startIndex = result.lastIndexOf(linkMatch[1]);\n result = result.substring(0, startIndex);\n }\n\n // Handle incomplete bold formatting (**)\n const boldPattern = /(\\*\\*)([^*]*?)$/;\n const boldMatch = result.match(boldPattern);\n if (boldMatch) {\n // Count the number of ** in the entire string\n const asteriskPairs = (result.match(/\\*\\*/g) || []).length;\n // If odd number of **, we have an incomplete bold - complete it\n if (asteriskPairs % 2 === 1) {\n result = `${result}**`;\n }\n }\n\n // Handle incomplete italic formatting (__)\n const italicPattern = /(__)([^_]*?)$/;\n const italicMatch = result.match(italicPattern);\n if (italicMatch) {\n // Count the number of __ in the entire string\n const underscorePairs = (result.match(/__/g) || []).length;\n // If odd number of __, we have an incomplete italic - complete it\n if (underscorePairs % 2 === 1) {\n result = `${result}__`;\n }\n }\n\n // Handle incomplete single asterisk italic (*)\n const singleAsteriskPattern = /(\\*)([^*]*?)$/;\n const singleAsteriskMatch = result.match(singleAsteriskPattern);\n if (singleAsteriskMatch) {\n // Count single asterisks that aren't part of **\n const singleAsterisks = result.split('').reduce((acc, char, index) => {\n if (char === '*') {\n // Check if it's part of a ** pair\n const prevChar = result[index - 1];\n const nextChar = result[index + 1];\n if (prevChar !== '*' && nextChar !== '*') {\n return acc + 1;\n }\n }\n return acc;\n }, 0);\n\n // If odd number of single *, we have an incomplete italic - complete it\n if (singleAsterisks % 2 === 1) {\n result = `${result}*`;\n }\n }\n\n // Handle incomplete single underscore italic (_)\n const singleUnderscorePattern = /(_)([^_]*?)$/;\n const singleUnderscoreMatch = result.match(singleUnderscorePattern);\n if (singleUnderscoreMatch) {\n // Count single underscores that aren't part of __\n const singleUnderscores = result.split('').reduce((acc, char, index) => {\n if (char === '_') {\n // Check if it's part of a __ pair\n const prevChar = result[index - 1];\n const nextChar = result[index + 1];\n if (prevChar !== '_' && nextChar !== '_') {\n return acc + 1;\n }\n }\n return acc;\n }, 0);\n\n // If odd number of single _, we have an incomplete italic - complete it\n if (singleUnderscores % 2 === 1) {\n result = `${result}_`;\n }\n }\n\n // Handle incomplete inline code blocks (`) - but avoid code blocks (```)\n const inlineCodePattern = /(`)([^`]*?)$/;\n const inlineCodeMatch = result.match(inlineCodePattern);\n if (inlineCodeMatch) {\n // Check if we're dealing with a code block (triple backticks)\n const hasCodeBlockStart = result.includes('```');\n const codeBlockPattern = /```[\\s\\S]*?```/g;\n const completeCodeBlocks = (result.match(codeBlockPattern) || []).length;\n const allTripleBackticks = (result.match(/```/g) || []).length;\n\n // If we have an odd number of ``` sequences, we're inside an incomplete code block\n // In this case, don't complete inline code\n const insideIncompleteCodeBlock = allTripleBackticks % 2 === 1;\n\n if (!insideIncompleteCodeBlock) {\n // Count the number of single backticks that are NOT part of triple backticks\n let singleBacktickCount = 0;\n for (let i = 0; i < result.length; i++) {\n if (result[i] === '`') {\n // Check if this backtick is part of a triple backtick sequence\n const isTripleStart = result.substring(i, i + 3) === '```';\n const isTripleMiddle =\n i > 0 && result.substring(i - 1, i + 2) === '```';\n const isTripleEnd = i > 1 && result.substring(i - 2, i + 1) === '```';\n\n if (!(isTripleStart || isTripleMiddle || isTripleEnd)) {\n singleBacktickCount++;\n }\n }\n }\n\n // If odd number of single backticks, we have an incomplete inline code - complete it\n if (singleBacktickCount % 2 === 1) {\n result = `${result}\\``;\n }\n }\n }\n\n // Handle incomplete strikethrough formatting (~~)\n const strikethroughPattern = /(~~)([^~]*?)$/;\n const strikethroughMatch = result.match(strikethroughPattern);\n if (strikethroughMatch) {\n // Count the number of ~~ in the entire string\n const tildePairs = (result.match(/~~/g) || []).length;\n // If odd number of ~~, we have an incomplete strikethrough - complete it\n if (tildePairs % 2 === 1) {\n result = `${result}~~`;\n }\n }\n\n return result;\n}\n\n// Create a hardened version of ReactMarkdown\nconst HardenedMarkdown = hardenReactMarkdown(ReactMarkdown);\n\nexport type ResponseProps = HTMLAttributes<HTMLDivElement> & {\n options?: Options;\n children: Options['children'];\n allowedImagePrefixes?: ComponentProps<\n ReturnType<typeof hardenReactMarkdown>\n >['allowedImagePrefixes'];\n allowedLinkPrefixes?: ComponentProps<\n ReturnType<typeof hardenReactMarkdown>\n >['allowedLinkPrefixes'];\n defaultOrigin?: ComponentProps<\n ReturnType<typeof hardenReactMarkdown>\n >['defaultOrigin'];\n parseIncompleteMarkdown?: boolean;\n};\n\nconst components: Options['components'] = {\n ol: ({ node, children, className, ...props }) => (\n <ol className={cn('ml-4 list-outside list-decimal', className)} {...props}>\n {children}\n </ol>\n ),\n li: ({ node, children, className, ...props }) => (\n <li className={cn('py-1', className)} {...props}>\n {children}\n </li>\n ),\n ul: ({ node, children, className, ...props }) => (\n <ul className={cn('ml-4 list-outside list-disc', className)} {...props}>\n {children}\n </ul>\n ),\n hr: ({ node, className, ...props }) => (\n <hr className={cn('my-6 border-border', className)} {...props} />\n ),\n strong: ({ node, children, className, ...props }) => (\n <span className={cn('font-semibold', className)} {...props}>\n {children}\n </span>\n ),\n a: ({ node, children, className, ...props }) => (\n <a\n className={cn('font-medium text-primary underline', className)}\n rel=\"noreferrer\"\n target=\"_blank\"\n {...props}\n >\n {children}\n </a>\n ),\n h1: ({ node, children, className, ...props }) => (\n <h1\n className={cn('mt-6 mb-2 font-semibold text-3xl', className)}\n {...props}\n >\n {children}\n </h1>\n ),\n h2: ({ node, children, className, ...props }) => (\n <h2\n className={cn('mt-6 mb-2 font-semibold text-2xl', className)}\n {...props}\n >\n {children}\n </h2>\n ),\n h3: ({ node, children, className, ...props }) => (\n <h3 className={cn('mt-6 mb-2 font-semibold text-xl', className)} {...props}>\n {children}\n </h3>\n ),\n h4: ({ node, children, className, ...props }) => (\n <h4 className={cn('mt-6 mb-2 font-semibold text-lg', className)} {...props}>\n {children}\n </h4>\n ),\n h5: ({ node, children, className, ...props }) => (\n <h5\n className={cn('mt-6 mb-2 font-semibold text-base', className)}\n {...props}\n >\n {children}\n </h5>\n ),\n h6: ({ node, children, className, ...props }) => (\n <h6 className={cn('mt-6 mb-2 font-semibold text-sm', className)} {...props}>\n {children}\n </h6>\n ),\n table: ({ node, children, className, ...props }) => (\n <div className=\"my-4 overflow-x-auto\">\n <table\n className={cn('w-full border-collapse border border-border', className)}\n {...props}\n >\n {children}\n </table>\n </div>\n ),\n thead: ({ node, children, className, ...props }) => (\n <thead className={cn('bg-muted/50', className)} {...props}>\n {children}\n </thead>\n ),\n tbody: ({ node, children, className, ...props }) => (\n <tbody className={cn('divide-y divide-border', className)} {...props}>\n {children}\n </tbody>\n ),\n tr: ({ node, children, className, ...props }) => (\n <tr className={cn('border-border border-b', className)} {...props}>\n {children}\n </tr>\n ),\n th: ({ node, children, className, ...props }) => (\n <th\n className={cn('px-4 py-2 text-left font-semibold text-sm', className)}\n {...props}\n >\n {children}\n </th>\n ),\n td: ({ node, children, className, ...props }) => (\n <td className={cn('px-4 py-2 text-sm', className)} {...props}>\n {children}\n </td>\n ),\n blockquote: ({ node, children, className, ...props }) => (\n <blockquote\n className={cn(\n 'my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic',\n className\n )}\n {...props}\n >\n {children}\n </blockquote>\n ),\n code: ({ node, className, ...props }) => {\n const inline = node?.position?.start.line === node?.position?.end.line;\n\n if (!inline) {\n return <code className={className} {...props} />;\n }\n\n return (\n <code\n className={cn(\n 'rounded bg-muted px-1.5 py-0.5 font-mono text-sm',\n className\n )}\n {...props}\n />\n );\n },\n pre: ({ node, className, children }) => {\n let language = 'javascript';\n\n if (typeof node?.properties?.className === 'string') {\n language = node.properties.className.replace('language-', '');\n }\n\n // Extract code content from children safely\n let code = '';\n if (\n isValidElement(children) &&\n children.props &&\n typeof children.props.children === 'string'\n ) {\n code = children.props.children;\n } else if (typeof children === 'string') {\n code = children;\n }\n\n return (\n <CodeBlock\n className={cn('my-4 h-auto', className)}\n code={code}\n language={language}\n >\n <CodeBlockCopyButton\n onCopy={() => console.log('Copied code to clipboard')}\n onError={() => console.error('Failed to copy code to clipboard')}\n />\n </CodeBlock>\n );\n },\n};\n\nexport const Response = memo(\n ({\n className,\n options,\n children,\n allowedImagePrefixes,\n allowedLinkPrefixes,\n defaultOrigin,\n parseIncompleteMarkdown: shouldParseIncompleteMarkdown = true,\n ...props\n }: ResponseProps) => {\n // Parse the children to remove incomplete markdown tokens if enabled\n const parsedChildren =\n typeof children === 'string' && shouldParseIncompleteMarkdown\n ? parseIncompleteMarkdown(children)\n : children;\n\n return (\n <div\n className={cn(\n 'size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0',\n className\n )}\n {...props}\n >\n <HardenedMarkdown\n allowedImagePrefixes={allowedImagePrefixes ?? ['*']}\n allowedLinkPrefixes={allowedLinkPrefixes ?? ['*']}\n components={components}\n defaultOrigin={defaultOrigin}\n rehypePlugins={[rehypeKatex]}\n remarkPlugins={[remarkGfm, remarkMath]}\n {...options}\n >\n {parsedChildren}\n </HardenedMarkdown>\n </div>\n );\n },\n (prevProps, nextProps) => prevProps.children === nextProps.children\n);\n\nResponse.displayName = 'Response';\n","import {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from '@/components/ui/avatar';\nimport { cn } from '@/lib/utils';\nimport type { UIMessage } from 'ai';\nimport type { ComponentProps, HTMLAttributes } from 'react';\n\nexport type MessageProps = HTMLAttributes<HTMLDivElement> & {\n from: UIMessage['role'];\n};\n\nexport const Message = ({ className, from, ...props }: MessageProps) => (\n <div\n className={cn(\n 'group flex w-full items-end justify-end gap-2 py-4',\n from === 'user' ? 'is-user flex-row-reverse justify-end' : 'is-assistant flex-row-reverse justify-end',\n '[&>div]:max-w-[80%]',\n className\n )}\n {...props}\n />\n);\n\nexport type MessageContentProps = HTMLAttributes<HTMLDivElement>;\n\nexport const MessageContent = ({\n children,\n className,\n ...props\n}: MessageContentProps) => (\n <div\n className={cn(\n 'flex flex-col gap-2 overflow-hidden rounded-lg py-3 text-foreground text-sm',\n 'group-[.is-user]:bg-secondary group-[.is-user]:text-primary-foreground group-[.is-user]:px-4',\n 'group-[.is-assistant]:bg-transparent group-[.is-assistant]:text-foreground',\n className\n )}\n {...props}\n >\n <div className=\"is-user:dark\">{children}</div>\n </div>\n);\n\nexport type MessageAvatarProps = ComponentProps<typeof Avatar> & {\n src: string;\n name?: string;\n};\n\nexport const MessageAvatar = ({\n src,\n name,\n className,\n ...props\n}: MessageAvatarProps) => (\n <Avatar\n className={cn('size-8 ring ring-1 ring-border', className)}\n {...props}\n >\n <AvatarImage alt=\"\" className=\"mt-0 mb-0\" src={src} />\n <AvatarFallback>{name?.slice(0, 2) || 'ME'}</AvatarFallback>\n </Avatar>\n);\n","'use client';\n\nimport { Button } from '@/components/ui/button';\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/ui/tooltip';\nimport { cn } from '@/lib/utils';\nimport type { ComponentProps } from 'react';\n\nexport type ActionsProps = ComponentProps<'div'>;\n\nexport const Actions = ({ className, children, ...props }: ActionsProps) => (\n <div className={cn('flex items-center gap-1', className)} {...props}>\n {children}\n </div>\n);\n\nexport type ActionProps = ComponentProps<typeof Button> & {\n tooltip?: string;\n label?: string;\n};\n\nexport const Action = ({\n tooltip,\n children,\n label,\n className,\n variant = 'ghost',\n size = 'sm',\n ...props\n}: ActionProps) => {\n const button = (\n <Button\n className={cn(\n 'size-9 p-1.5 text-muted-foreground hover:text-foreground',\n className\n )}\n size={size}\n type=\"button\"\n variant={variant}\n {...props}\n >\n {children}\n <span className=\"sr-only\">{label || tooltip}</span>\n </Button>\n );\n\n if (tooltip) {\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent>\n <p>{tooltip}</p>\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n }\n\n return button;\n};\n","'use client';\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '@/components/ui/collapsible';\nimport { cn } from '@/lib/utils';\nimport { BrainIcon, ChevronDownIcon } from 'lucide-react';\nimport type { ComponentProps } from 'react';\nimport { createContext, memo, useContext, useEffect, useState } from 'react';\nimport { Response } from './response';\n\ntype ReasoningContextValue = {\n isStreaming: boolean;\n isOpen: boolean;\n setIsOpen: (open: boolean) => void;\n duration: number;\n};\n\nconst ReasoningContext = createContext<ReasoningContextValue | null>(null);\n\nconst useReasoning = () => {\n const context = useContext(ReasoningContext);\n if (!context) {\n throw new Error('Reasoning components must be used within Reasoning');\n }\n return context;\n};\n\nexport type ReasoningProps = ComponentProps<typeof Collapsible> & {\n isStreaming?: boolean;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n duration?: number;\n};\n\nconst AUTO_CLOSE_DELAY = 1000;\n\nexport const Reasoning = memo(\n ({\n className,\n isStreaming = false,\n open,\n defaultOpen = false,\n onOpenChange,\n duration: durationProp,\n children,\n ...props\n }: ReasoningProps) => {\n const [isOpen, setIsOpen] = useControllableState({\n prop: open,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n const [duration, setDuration] = useControllableState({\n prop: durationProp,\n defaultProp: 0,\n });\n\n const [hasAutoClosedRef, setHasAutoClosedRef] = useState(false);\n const [startTime, setStartTime] = useState<number | null>(null);\n\n // Track duration when streaming starts and ends\n useEffect(() => {\n if (isStreaming) {\n if (startTime === null) {\n setStartTime(Date.now());\n }\n } else if (startTime !== null) {\n setDuration(Math.round((Date.now() - startTime) / 1000));\n setStartTime(null);\n }\n }, [isStreaming, startTime, setDuration]);\n\n // Auto-open when streaming starts, auto-close when streaming ends (once only)\n useEffect(() => {\n if (isStreaming && !isOpen) {\n setIsOpen(true);\n } else if (!isStreaming && isOpen && !defaultOpen && !hasAutoClosedRef) {\n // Add a small delay before closing to allow user to see the content\n const timer = setTimeout(() => {\n setIsOpen(false);\n setHasAutoClosedRef(true);\n }, AUTO_CLOSE_DELAY);\n return () => clearTimeout(timer);\n }\n }, [isStreaming, isOpen, defaultOpen, setIsOpen, hasAutoClosedRef]);\n\n const handleOpenChange = (newOpen: boolean) => {\n setIsOpen(newOpen);\n };\n\n return (\n <ReasoningContext.Provider\n value={{ isStreaming, isOpen, setIsOpen, duration }}\n >\n <Collapsible\n className={cn('not-prose mb-4', className)}\n onOpenChange={handleOpenChange}\n open={isOpen}\n {...props}\n >\n {children}\n </Collapsible>\n </ReasoningContext.Provider>\n );\n }\n);\n\nexport type ReasoningTriggerProps = ComponentProps<\n typeof CollapsibleTrigger\n> & {\n title?: string;\n};\n\nexport const ReasoningTrigger = memo(\n ({\n className,\n title = 'Reasoning',\n children,\n ...props\n }: ReasoningTriggerProps) => {\n const { isStreaming, isOpen, duration } = useReasoning();\n\n return (\n <CollapsibleTrigger\n className={cn(\n 'flex items-center gap-2 text-muted-foreground text-sm',\n className\n )}\n {...props}\n >\n {children ?? (\n <>\n <BrainIcon className=\"size-4\" />\n {isStreaming || duration === 0 ? (\n <p>Thinking...</p>\n ) : (\n <p>Thought for {duration} seconds</p>\n )}\n <ChevronDownIcon\n className={cn(\n 'size-4 text-muted-foreground transition-transform',\n isOpen ? 'rotate-180' : 'rotate-0'\n )}\n />\n </>\n )}\n </CollapsibleTrigger>\n );\n }\n);\n\nexport type ReasoningContentProps = ComponentProps<\n typeof CollapsibleContent\n> & {\n children: string;\n};\n\nexport const ReasoningContent = memo(\n ({ className, children, ...props }: ReasoningContentProps) => (\n <CollapsibleContent\n className={cn(\n 'mt-4 text-sm',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in',\n className\n )}\n {...props}\n >\n <Response className=\"grid gap-2\">{children}</Response>\n </CollapsibleContent>\n )\n);\n\nReasoning.displayName = 'Reasoning';\nReasoningTrigger.displayName = 'ReasoningTrigger';\nReasoningContent.displayName = 'ReasoningContent';\n","'use client';\n\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '@/components/ui/collapsible';\nimport { cn } from '@/lib/utils';\nimport { BookIcon, ChevronDownIcon } from 'lucide-react';\nimport type { ComponentProps } from 'react';\n\nexport type SourcesProps = ComponentProps<'div'>;\n\nexport const Sources = ({ className, ...props }: SourcesProps) => (\n // @ts-ignore\n <Collapsible\n className={cn('not-prose mb-4 text-primary text-xs', className)}\n {...props}\n />\n);\n\nexport type SourcesTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {\n count: number;\n};\n\nexport const SourcesTrigger = ({\n className,\n count,\n children,\n ...props\n}: SourcesTriggerProps) => (\n <CollapsibleTrigger className=\"flex items-center gap-2\" {...props}>\n {children ?? (\n <>\n <p className=\"font-medium\">Used {count} sources</p>\n <ChevronDownIcon className=\"h-4 w-4\" />\n </>\n )}\n </CollapsibleTrigger>\n);\n\nexport type SourcesContentProps = ComponentProps<typeof CollapsibleContent>;\n\nexport const SourcesContent = ({\n className,\n ...props\n}: SourcesContentProps) => (\n <CollapsibleContent\n className={cn(\n 'mt-3 flex w-fit flex-col gap-2',\n 'data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in',\n className\n )}\n {...props}\n />\n);\n\nexport type SourceProps = ComponentProps<'a'>;\n\nexport const Source = ({ href, title, children, ...props }: SourceProps) => (\n <a\n className=\"flex items-center gap-2\"\n href={href}\n rel=\"noreferrer\"\n target=\"_blank\"\n {...props}\n >\n {children ?? (\n <>\n <BookIcon className=\"h-4 w-4\" />\n <span className=\"block font-medium\">{title}</span>\n </>\n )}\n </a>\n);\n","\"use client\"\n\nimport { DynamicToolUIPart, UIMessage } from \"ai\"\nimport { Message, MessageContent } from '@/components/ai-elements/message'\nimport { Actions, Action } from '@/components/ai-elements/actions'\nimport { Response } from '@/components/ai-elements/response'\nimport { Reasoning, ReasoningTrigger, ReasoningContent } from \"@/components/ai-elements/reasoning\"\nimport { Source, Sources, SourcesContent, SourcesTrigger } from \"@/components/ai-elements/source\"\nimport { RefreshCcwIcon, CopyIcon } from \"lucide-react\"\nimport { cn } from \"@/lib/utils\"\nimport Image from \"next/image\"\nimport { useToast } from \"@/components/ui/use-toast\"\n\ninterface MessageRendererProps {\n messages: UIMessage[]\n status?: \"streaming\" | \"idle\" | \"error\" | \"submitted\" | \"ready\"\n className?: string\n showActions?: boolean\n onRegenerate?: () => void\n onAddToolResult?: (args: { tool: string; toolCallId: string; output: string }) => void\n UntypedToolPartComponent?: React.ComponentType<{\n untypedToolPart: DynamicToolUIPart\n callId: string\n addToContext: (item: any) => void\n }>\n addToContext?: (item: any) => void\n writeAccess?: boolean\n config?: {\n marginTopFirstMessage?: string\n customAssistantClassnames?: string\n }\n}\n\nexport function MessageRenderer({\n messages,\n status = \"idle\",\n className,\n showActions = true,\n onRegenerate,\n onAddToolResult,\n UntypedToolPartComponent,\n addToContext,\n writeAccess = true,\n config\n}: MessageRendererProps) {\n const { toast } = useToast()\n\n return (\n <>\n {messages?.map((message, messageIndex) => {\n const isFirstMessage = messageIndex === 0\n const messageMetadata = message.metadata as any\n const isLastMessage = messageIndex === messages.length - 1\n\n return (\n <Message\n className={cn(\n message.role === 'assistant' && (\n config?.customAssistantClassnames ? config?.customAssistantClassnames : ''\n ),\n isFirstMessage && (\n config?.marginTopFirstMessage ? config?.marginTopFirstMessage : 'mt-12'\n ), className\n )}\n from={message.role}\n key={message.id}\n >\n <MessageContent>\n {message.parts.map((part, i) => {\n if (part.type === 'step-start') {\n return null\n }\n\n if (part.type === 'text') {\n return (\n <div key={`${message.id}-${i}`}>\n <Response className=\"chat-response-container\">\n {part.text}\n </Response>\n </div>\n )\n }\n\n if (part.type === 'tool-askForConfirmation' && onAddToolResult) {\n const callId = part.toolCallId\n\n switch (part.state) {\n case 'input-streaming':\n return (\n <div key={callId}>Loading confirmation request...</div>\n )\n case 'input-available':\n return (\n <div key={callId}>\n {(part.input as { message: string }).message}\n <div>\n <button\n onClick={() =>\n onAddToolResult({\n tool: 'askForConfirmation',\n toolCallId: callId,\n output: 'Yes, confirmed',\n })\n }\n >\n Yes\n </button>\n <button\n onClick={() =>\n onAddToolResult({\n tool: 'askForConfirmation',\n toolCallId: callId,\n output: 'No, denied',\n })\n }\n >\n No\n </button>\n </div>\n </div>\n )\n case 'output-available':\n return (\n <div key={callId}>\n Tool call allowed: {part.output as string}\n </div>\n )\n case 'output-error':\n return <div key={callId}>Error: {part.errorText}</div>\n }\n }\n\n if (\n (part.type.startsWith('tool-') || part.type === 'dynamic-tool') &&\n UntypedToolPartComponent &&\n addToContext\n ) {\n const untypedToolPart = part as DynamicToolUIPart\n const callId = untypedToolPart.toolCallId\n return (\n <UntypedToolPartComponent\n key={callId}\n untypedToolPart={untypedToolPart}\n callId={callId}\n addToContext={addToContext}\n />\n )\n }\n\n if (part.type === 'file') {\n if (part.mediaType?.startsWith('image/')) {\n return (\n <Image\n key={`${message.id}-${i}`}\n src={part.url}\n width={300}\n height={300}\n alt={\"Generated image\"}\n />\n )\n }\n }\n\n if (part.type === 'source-url') {\n return (\n <Sources key={`${message.id}-${i}`}>\n <SourcesTrigger\n count={message.parts.filter(\n (part) => part.type === 'source-url'\n ).length}\n />\n <SourcesContent key={`${message.id}`}>\n {message.parts.map((part, i) => {\n switch (part.type) {\n case 'source-url':\n return (\n <Source\n key={`${message.id}-${i}`}\n href={part.url}\n title={part.title}\n />\n )\n }\n })}\n </SourcesContent>\n </Sources>\n )\n }\n\n if (part.type === 'reasoning') {\n return (\n <Reasoning\n key={`${message.id}-${i}`}\n className=\"w-full\"\n isStreaming={status === 'streaming'}\n >\n <ReasoningTrigger />\n <ReasoningContent>{part.text}</ReasoningContent>\n </Reasoning>\n )\n }\n\n return null\n })}\n\n {showActions && message.role === 'assistant' && (\n <Actions className=\"mt-2\">\n {onRegenerate && (\n <Action\n onClick={() => onRegenerate()}\n label=\"Retry\"\n disabled={!writeAccess}\n >\n <RefreshCcwIcon className=\"size-3\" />\n </Action>\n )}\n <Action\n onClick={() => {\n navigator.clipboard.writeText(\n message.parts.map((part: any) => part?.text || \"\").join('\\n')\n )\n toast({\n title: \"Copied message\",\n description: \"The message was copied to your clipboard.\",\n })\n }}\n label=\"Copy\"\n >\n <CopyIcon className=\"size-3\" />\n </Action>\n {messageMetadata?.totalTokens && (\n <small className=\"text-muted-foreground\">\n {Intl.NumberFormat('en-US').format(messageMetadata?.totalTokens)} tokens\n </small>\n )}\n </Actions>\n )}\n </MessageContent>\n </Message>\n )\n })}\n </>\n )\n}\n","\"use client\";\n\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-2 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nconst AlertDialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold\", className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants(), className)}\n {...props}\n />\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ variant: \"outline\" }),\n \"mt-2 sm:mt-0\",\n className,\n )}\n {...props}\n />\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n","\"use client\";\n\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n","\"use client\";\n\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className,\n )}\n {...props}\n />\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"names":["TestCaseModal","param","open","onClose","evalSetId","onSuccess","testCase","toast","useToast","isEditing","data","toolsData","useQuery","GET_TOOLS","variables","page","limit","regularTools","agentTools","knowledgeSourceTools","useMemo","tools","items","console","log","filter","t","type","name","setName","useState","description","setDescription","expectedOutput","setExpectedOutput","inputs","setInputs","currentInput","setCurrentInput","currentFiles","setCurrentFiles","currentFileParts","setCurrentFileParts","expectedTools","setExpectedTools","expectedKnowledgeSources","setExpectedKnowledgeSources","expectedAgentTools","setExpectedAgentTools","selectedTool","setSelectedTool","selectedContext","setSelectedContext","selectedAgent","setSelectedAgent","useEffect","expected_output","expected_tools","expected_knowledge_sources","expected_agent_tools","updateMessageFiles","keys","Promise","all","map","key","mediaType","split","pop","filename","url","getPresignedUrl","length","createTestCase","loading","creating","useMutation","CREATE_TEST_CASE","onCompleted","title","onError","error","message","variant","updateTestCase","updating","UPDATE_TEST_CASE","handleAddMessage","trim","parts","push","text","id","concat","Date","now","role","metadata","getToolName","tool","find","getContextName","context","getAgentName","agent","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Dialog","onOpenChange","jsxs","DialogContent","className","DialogHeader","DialogTitle","DialogDescription","form","onSubmit","e","preventDefault","eval_set_id","Tabs","defaultValue","TabsList","TabsTrigger","value","Info","MessageSquare","Settings2","ScrollArea","TabsContent","div","Label","htmlFor","Input","placeholder","onChange","target","disabled","required","Textarea","rows","p","Card","CardHeader","CardTitle","Badge","CardDescription","CardContent","Sparkles","h3","Conversation","ConversationContent","MessageRenderer","messages","config","marginTopFirstMessage","customAssistantClassnames","status","showActions","writeAccess","onKeyDown","shiftKey","UppyDashboard","selectionLimit","allowedFileTypes","dependencies","onConfirm","Button","onClick","size","Plus","Fragment","FileItem","s3Key","item","active","onRemove","i","AlertCircle","strong","toolId","index","button","_","Select","onValueChange","SelectTrigger","SelectValue","SelectContent","SelectItem","includes","span","FileText","contextId","agentId","DialogFooter","Loader2","CodeBlockContext","createContext","code","CodeBlock","language","showLineNumbers","children","props","Provider","cn","SyntaxHighlighter","codeTagProps","customStyle","margin","padding","fontSize","background","color","lineNumberStyle","paddingRight","minWidth","style","oneLight","oneDark","CodeBlockCopyButton","onCopy","timeout","isCopied","setIsCopied","useContext","copyToClipboard","navigator","clipboard","writeText","setTimeout","Icon","CheckIcon","CopyIcon","StickToBottom","initial","resize","Content","HardenedMarkdown","hardenReactMarkdown","ReactMarkdown","components","ol","node","li","ul","hr","a","rel","h1","h2","h4","h5","h6","table","thead","tbody","tr","th","td","blockquote","position","start","line","end","pre","properties","replace","isValidElement","Response","memo","options","allowedImagePrefixes","allowedLinkPrefixes","defaultOrigin","parseIncompleteMarkdown","shouldParseIncompleteMarkdown","parsedChildren","result","linkMatch","match","startIndex","lastIndexOf","substring","asteriskPairs","underscorePairs","singleAsterisks","reduce","acc","char","prevChar","nextChar","singleUnderscores","singleBacktickCount","isTripleStart","isTripleMiddle","isTripleEnd","tildePairs","rehypePlugins","rehypeKatex","remarkPlugins","remarkGfm","remarkMath","prevProps","nextProps","displayName","Message","from","jsx_runtime","MessageContent","Actions","Action","tooltip","label","TooltipProvider","Tooltip","TooltipTrigger","asChild","TooltipContent","ReasoningContext","useReasoning","Reasoning","isStreaming","defaultOpen","duration","durationProp","isOpen","setIsOpen","useControllableState","prop","defaultProp","setDuration","hasAutoClosedRef","setHasAutoClosedRef","startTime","setStartTime","Math","round","timer","clearTimeout","Collapsible","newOpen","ReasoningTrigger","CollapsibleTrigger","BrainIcon","ChevronDownIcon","ReasoningContent","CollapsibleContent","Sources","SourcesTrigger","count","SourcesContent","Source","href","BookIcon","onRegenerate","onAddToolResult","UntypedToolPartComponent","addToContext","messageIndex","messageMetadata","isFirstMessage","part","callId","toolCallId","state","input","output","errorText","startsWith","untypedToolPart","Image","src","width","height","alt","RefreshCcwIcon","join","totalTokens","small","Intl","NumberFormat","format","AlertDialog","AlertDialogPrimitive","AlertDialogPortal","AlertDialogOverlay","React","ref","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","buttonVariants","AlertDialogCancel","CollapsiblePrimitive","TabsPrimitive"],"sourceRoot":""}