@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 +1 @@
1
- "use strict";exports.id=8838,exports.ids=[8838],exports.modules={360:(e,s,a)=>{a.d(s,{x:()=>y});var t=a(10326),r=a(17577),l=a(18753),n=a(15211),i=a(42270),d=a(62288),o=a(90772),c=a(54432),m=a(87673),x=a(31048),u=a(941),h=a(85206),p=a(98091),v=a(34789),b=a(77863),g=a(15286),j=a(79210),f=a(36931);function y({isOpen:e,onClose:s,messages:a,sessionTitle:y,existingWorkflow:w,isReadOnly:N=!1}){let{user:k}=(0,r.useContext)(n.S),{toast:C}=(0,v.pm)(),[_,A]=(0,r.useState)({rights_mode:w?.rights_mode||"private",users:w?.RBAC?.users||[],roles:w?.RBAC?.roles||[],projects:w?.RBAC?.projects||[]}),S=!!w,[Z,z]=(0,r.useState)(w?.name||""),[D,E]=(0,r.useState)(w?.description||""),[U,R]=(0,r.useState)(w?.variables||[]),[B,W]=(0,r.useState)(w?.steps_json||[]),[$,P]=(0,r.useState)(!1),[V,q]=(0,r.useState)("setup"),[F,M]=(0,r.useState)(!1),[I,O]=(0,r.useState)(null),[H,K]=(0,r.useState)(""),[L]=(0,l.D)(i.B_),[T]=(0,l.D)(i._J),J=(0,r.useCallback)((e,s)=>{if(!e.match(/^[A-Za-z_][A-Za-z0-9_]{1,63}$/))return C({title:"Invalid variable name",description:"Variable name must start with a letter or underscore, contain only letters, numbers, and underscores, and be 2-64 characters long.",variant:"destructive"}),!1;if(U.some(s=>s.name===e))return!0;let a={name:e,type:"string",required:!0,description:s||"Auto-detected variable"};return R(e=>[...e,a]),!0},[U,C]),Q=(0,r.useCallback)((e,s)=>{let a=(s.match(/\{([A-Za-z_][A-Za-z0-9_]{1,63})\}/g)||[]).map(e=>e.slice(1,-1));a.forEach(e=>{J(e)}),W(t=>t.map(t=>t.id===e?{...t,content:s,variablesUsed:a}:t));let t=new Set;B.forEach(a=>{a.id===e?(s.match(/\{([A-Za-z_][A-Za-z0-9_]{1,63})\}/g)||[]).forEach(e=>t.add(e.slice(1,-1))):a.variablesUsed&&a.variablesUsed.forEach(e=>t.add(e))}),R(e=>e.filter(e=>t.has(e.name)))},[B,J]),X=(0,r.useCallback)(e=>{R(s=>s.filter(s=>s.name!==e)),W(s=>s.map(s=>({...s,content:s.content?.replace(RegExp(`\\{${e}\\}`,"g"),""),variablesUsed:s.variablesUsed?.filter(s=>s!==e)||[]})))},[]),G=(0,r.useCallback)((e,s)=>s.match(/^[A-Za-z_][A-Za-z0-9_]{1,63}$/)?U.some(a=>a.name===s&&a.name!==e)?(C({title:"Variable name already exists",description:"A variable with this name already exists.",variant:"destructive"}),!1):(R(a=>a.map(a=>a.name===e?{...a,name:s}:a)),W(a=>a.map(a=>({...a,content:a.content?.replace(RegExp(`\\{${e}\\}`,"g"),`{${s}}`),variablesUsed:a.variablesUsed?.map(a=>a===e?s:a)||[]}))),!0):(C({title:"Invalid variable name",description:"Variable name must start with a letter or underscore and contain only letters, numbers, and underscores.",variant:"destructive"}),!1),[U,C]),Y=(0,r.useMemo)(()=>!!Z.trim()&&0!==B.length&&("users"!==_.rights_mode||_.users?.length!==0)&&("roles"!==_.rights_mode||_.roles?.length!==0)&&("projects"!==_.rights_mode||_.projects?.length!==0)&&B.filter(e=>"user"===e.type).every(e=>(e.content||"").replace(/\{[^}]+\}/g,"").trim().length>0),[Z,B,_]),ee=(0,r.useCallback)(async()=>{if(Y&&k?.id){P(!0);try{let e=B.map(e=>({id:e.id,type:e.type,..."user"===e.type&&{content:e.content},..."assistant"===e.type&&{contentExample:e.contentExample},..."tool"===e.type&&{toolName:e.toolName}}));S&&w?(await T({variables:{id:w.id,name:Z.trim(),description:D.trim()||null,rights_mode:_.rights_mode,RBAC:{users:_.users,roles:_.roles,projects:_.projects},variables:U,steps_json:e}}),C({title:"Workflow updated!",description:`"${Z}" has been updated successfully.`})):(await L({variables:{name:Z.trim(),description:D.trim()||null,owner:k.id,rights_mode:_.rights_mode,RBAC:{users:_.users,roles:_.roles,projects:_.projects},variables:U,steps_json:e}}),C({title:"Workflow created!",description:`"${Z}" has been saved as a workflow template.`})),s()}catch(e){console.error("Error saving workflow:",e),C({title:"Error saving workflow",description:"There was an error saving your workflow. Please try again.",variant:"destructive"})}finally{P(!1)}}},[Y,k?.id,Z,D,_,U,B,L,T,C,s,S,w]);return e?t.jsx(d.Vq,{open:e,onOpenChange:s,children:(0,t.jsxs)(d.cZ,{className:"max-w-4xl max-h-[92vh] flex flex-col",children:[(0,t.jsxs)(d.fK,{className:"pb-4",children:[t.jsx(d.$N,{className:"text-lg",children:S?N?"View Workflow":"Edit Workflow":"Save as Workflow"}),t.jsx(d.Be,{className:"text-sm",children:S?N?"View workflow details and configuration.":"Modify this workflow template. Edit your messages and use {variable_name} syntax to create variables.":"Convert this conversation into a reusable workflow template. Edit your messages and use {variable_name} syntax to create variables."})]}),t.jsx("div",{className:"flex-1 mt-6",children:(0,t.jsxs)(j.mQ,{value:V,onValueChange:q,className:"h-full flex flex-col",children:[(0,t.jsxs)(j.dr,{className:"grid w-full grid-cols-2 mb-6",children:[t.jsx(j.SP,{value:"setup",className:"data-[state=active]:bg-background",children:"Setup & Permissions"}),t.jsx(j.SP,{value:"workflow",className:"data-[state=active]:bg-background",children:"Workflow Steps & Variables"})]}),(0,t.jsxs)("div",{className:"flex-1 pb-6",children:[t.jsx(j.nU,{value:"setup",className:"mt-0 h-full",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[t.jsx(x._,{htmlFor:"workflow-name",className:"text-base font-semibold",children:"Workflow Name *"}),t.jsx(c.I,{id:"workflow-name",value:Z,onChange:e=>z(e.target.value),placeholder:"My Workflow",className:"mt-2 h-11",readOnly:N}),!Z.trim()&&(0,t.jsxs)("p",{className:"text-sm text-destructive mt-1 flex items-center",children:[t.jsx("span",{className:"mr-1",children:"⚠️"}),"Workflow name is required"]})]}),(0,t.jsxs)("div",{children:[t.jsx(x._,{htmlFor:"workflow-description",className:"text-base font-semibold",children:"Description"}),t.jsx(m.g,{id:"workflow-description",value:D,onChange:e=>E(e.target.value),placeholder:"Describe what this workflow does and when to use it...",rows:3,className:"mt-2 resize-none",readOnly:N})]})]}),(0,t.jsxs)("div",{className:"border-t pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[t.jsx("h3",{className:"text-base font-semibold mb-1",children:"Sharing & Permissions"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Control who can view and edit this workflow"})]}),(0,t.jsxs)(o.z,{type:"button",variant:"outline",size:"sm",onClick:()=>M(!F),className:"ml-4",children:[F?"Hide Advanced":"Show Advanced",t.jsx(u.Z,{className:(0,b.cn)("w-4 h-4 ml-1 transition-transform",F&&"rotate-180")})]})]}),F&&t.jsx(g.P,{initialRightsMode:w?.rights_mode,initialUsers:w?.RBAC?.users,initialRoles:w?.RBAC?.roles,initialProjects:w?.RBAC?.projects,onChange:(e,s,a,t)=>{A({rights_mode:e,users:s,roles:a,projects:t})}}),!F&&t.jsx("div",{className:"text-sm text-muted-foreground bg-muted/30 p-3 rounded-md",children:"Using default permissions (private to you)"})]})]})}),t.jsx(j.nU,{value:"workflow",className:"mt-0 h-full",children:(0,t.jsxs)("div",{className:"h-full flex gap-6",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-base font-semibold mb-2",children:"Conversation Steps"}),t.jsx("div",{className:"border rounded-lg p-3 mb-4",children:(0,t.jsxs)("p",{className:"text-sm",children:["\uD83D\uDCA1 ",t.jsx("strong",{children:"Pro tip:"})," Use ","{variable_name}"," syntax in your messages to create reusable variables. For example you can use ","{company_name}"," to create a variable for the company name so you can reuse this flow template with different companies."]})})]}),t.jsx("div",{className:"space-y-4 max-h-[500px] overflow-y-auto pr-2",children:B.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-card",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[t.jsx("span",{className:(0,b.cn)("text-sm font-medium px-3 py-1 rounded-full","user"===e.type?"bg-blue-100 text-blue-700":"assistant"===e.type?"bg-green-100 text-green-700":"bg-purple-100 text-purple-700"),children:"user"===e.type?"\uD83D\uDC64 User":"assistant"===e.type?"\uD83E\uDD16 Assistant":`🔧 ${e.toolName}`}),e.variablesUsed&&e.variablesUsed.length>0&&t.jsx("div",{className:"flex gap-1 flex-wrap",children:e.variablesUsed.map(e=>t.jsx("span",{className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded font-mono border border-blue-200",children:`{${e}}`},e))})]}),"user"===e.type?t.jsx("div",{children:t.jsx(m.g,{value:e.content||"",onChange:s=>Q(e.id,s.target.value),placeholder:"Enter your message...",className:"min-h-[80px] resize-none",rows:3,readOnly:N})}):t.jsx("div",{className:"bg-muted/50 p-3 rounded-md",children:"assistant"===e.type?(0,t.jsxs)("div",{children:[t.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Example response (will be regenerated):"}),t.jsx(f.H,{children:e.contentExample})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:["Tool: ",e.toolName]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Parameters will be generated dynamically"})]})})]}),s<B.length-1&&t.jsx("div",{className:"flex justify-center my-3",children:t.jsx(u.Z,{className:"w-5 h-5 text-muted-foreground/50"})})]},e.id))})]}),(0,t.jsxs)("div",{className:"w-80",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h3",{className:"text-base font-semibold mb-2",children:["Variables (",U.length,")"]}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Auto-detected from your messages"})]}),U.length>0?t.jsx("div",{className:"space-y-3 max-h-[500px] overflow-y-auto",children:U.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 bg-card",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[t.jsx("div",{className:"font-mono text-blue-600 font-medium text-sm",children:`{${e.name}}`}),!N&&t.jsx("div",{className:"flex gap-1",children:I===e.name?t.jsx(c.I,{value:H,onChange:e=>K(e.target.value),className:"h-6 text-xs font-mono w-20",placeholder:"variable_name",autoFocus:!0,onKeyDown:s=>{"Enter"===s.key?(H&&H!==e.name&&G(e.name,H),O(null),K("")):"Escape"===s.key&&(O(null),K(""))},onBlur:()=>{H&&H!==e.name&&G(e.name,H),O(null),K("")}}):(0,t.jsxs)(t.Fragment,{children:[t.jsx(o.z,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0",onClick:()=>{O(e.name),K(e.name)},children:t.jsx(h.Z,{className:"w-3 h-3"})}),t.jsx(o.z,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0 text-destructive hover:bg-destructive/10",onClick:()=>X(e.name),children:t.jsx(p.Z,{className:"w-3 h-3"})})]})})]}),t.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:e.description}),(0,t.jsxs)("div",{className:"flex gap-1",children:[t.jsx("span",{className:"text-xs bg-gray-100 text-gray-700 px-1.5 py-0.5 rounded",children:e.type}),e.required&&t.jsx("span",{className:"text-xs bg-orange-100 text-orange-700 px-1.5 py-0.5 rounded",children:"required"})]})]},e.name))}):(0,t.jsxs)("div",{className:"text-center py-8 text-muted-foreground border-2 border-dashed rounded-lg",children:[t.jsx("div",{className:"mb-3",children:t.jsx("span",{className:"text-3xl",children:"\uD83D\uDCDD"})}),t.jsx("div",{className:"text-sm mb-1 font-medium",children:"No variables yet"}),(0,t.jsxs)("div",{className:"text-xs",children:["Use ","{variable_name}"," syntax in your messages"]})]})]})]})})]})]})}),t.jsx("div",{className:"border-t p-4 bg-background",children:(0,t.jsxs)(d.cN,{children:[t.jsx(o.z,{variant:"outline",onClick:s,children:N?"Close":"Cancel"}),!N&&t.jsx(t.Fragment,{children:t.jsx(o.z,{onClick:ee,disabled:!Y||$,className:(0,b.cn)("min-w-[140px]",!Y&&"opacity-50 cursor-not-allowed"),children:$?(0,t.jsxs)(t.Fragment,{children:[t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),S?"Updating...":"Saving..."]}):S?"Update Workflow":"Save Workflow"})})]})})]})}):null}},54659:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},48998:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},85206:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]])},91470:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])}};
1
+ "use strict";exports.id=2875,exports.ids=[2875],exports.modules={360:(e,s,a)=>{a.d(s,{x:()=>w});var t=a(10326),r=a(17577),l=a(18753),n=a(15211),i=a(42270),d=a(62288),o=a(90772),c=a(54432),m=a(87673),x=a(31048),u=a(941),h=a(85206),p=a(98091),v=a(34789),b=a(77863),g=a(15286),j=a(79210),f=a(36931);function w({isOpen:e,onClose:s,messages:a,sessionTitle:w,existingWorkflow:N,isReadOnly:y=!1}){let{user:k}=(0,r.useContext)(n.S),{toast:C}=(0,v.pm)(),[_,A]=(0,r.useState)({rights_mode:N?.rights_mode||"private",users:N?.RBAC?.users||[],roles:N?.RBAC?.roles||[],projects:N?.RBAC?.projects||[]}),S=!!N,[Z,z]=(0,r.useState)(N?.name||""),[D,E]=(0,r.useState)(N?.description||""),[U,R]=(0,r.useState)(N?.variables||[]),[B,W]=(0,r.useState)(N?.steps_json||[]),[$,P]=(0,r.useState)(!1),[V,q]=(0,r.useState)("setup"),[F,M]=(0,r.useState)(!1),[I,O]=(0,r.useState)(null),[H,K]=(0,r.useState)(""),[L]=(0,l.D)(i.B_),[T]=(0,l.D)(i._J),J=(0,r.useCallback)((e,s)=>{if(!e.match(/^[A-Za-z_][A-Za-z0-9_]{1,63}$/))return C({title:"Invalid variable name",description:"Variable name must start with a letter or underscore, contain only letters, numbers, and underscores, and be 2-64 characters long.",variant:"destructive"}),!1;if(U.some(s=>s.name===e))return!0;let a={name:e,type:"string",required:!0,description:s||"Auto-detected variable"};return R(e=>[...e,a]),!0},[U,C]),Q=(0,r.useCallback)((e,s)=>{let a=(s.match(/\{([A-Za-z_][A-Za-z0-9_]{1,63})\}/g)||[]).map(e=>e.slice(1,-1));a.forEach(e=>{J(e)}),W(t=>t.map(t=>t.id===e?{...t,content:s,variablesUsed:a}:t));let t=new Set;B.forEach(a=>{a.id===e?(s.match(/\{([A-Za-z_][A-Za-z0-9_]{1,63})\}/g)||[]).forEach(e=>t.add(e.slice(1,-1))):a.variablesUsed&&a.variablesUsed.forEach(e=>t.add(e))}),R(e=>e.filter(e=>t.has(e.name)))},[B,J]),G=(0,r.useCallback)(e=>{R(s=>s.filter(s=>s.name!==e)),W(s=>s.map(s=>({...s,content:s.content?.replace(RegExp(`\\{${e}\\}`,"g"),""),variablesUsed:s.variablesUsed?.filter(s=>s!==e)||[]})))},[]),X=(0,r.useCallback)((e,s)=>s.match(/^[A-Za-z_][A-Za-z0-9_]{1,63}$/)?U.some(a=>a.name===s&&a.name!==e)?(C({title:"Variable name already exists",description:"A variable with this name already exists.",variant:"destructive"}),!1):(R(a=>a.map(a=>a.name===e?{...a,name:s}:a)),W(a=>a.map(a=>({...a,content:a.content?.replace(RegExp(`\\{${e}\\}`,"g"),`{${s}}`),variablesUsed:a.variablesUsed?.map(a=>a===e?s:a)||[]}))),!0):(C({title:"Invalid variable name",description:"Variable name must start with a letter or underscore and contain only letters, numbers, and underscores.",variant:"destructive"}),!1),[U,C]),Y=(0,r.useMemo)(()=>!!Z.trim()&&0!==B.length&&("users"!==_.rights_mode||_.users?.length!==0)&&("roles"!==_.rights_mode||_.roles?.length!==0)&&("projects"!==_.rights_mode||_.projects?.length!==0)&&B.filter(e=>"user"===e.type).every(e=>(e.content||"").replace(/\{[^}]+\}/g,"").trim().length>0),[Z,B,_]),ee=(0,r.useCallback)(async()=>{if(Y&&k?.id){P(!0);try{let e=B.map(e=>({id:e.id,type:e.type,..."user"===e.type&&{content:e.content},..."assistant"===e.type&&{contentExample:e.contentExample},..."tool"===e.type&&{toolName:e.toolName}}));S&&N?(await T({variables:{id:N.id,name:Z.trim(),description:D.trim()||null,rights_mode:_.rights_mode,RBAC:{users:_.users,roles:_.roles,projects:_.projects},variables:U,steps_json:e}}),C({title:"Workflow updated!",description:`"${Z}" has been updated successfully.`})):(await L({variables:{name:Z.trim(),description:D.trim()||null,owner:k.id,rights_mode:_.rights_mode,RBAC:{users:_.users,roles:_.roles,projects:_.projects},variables:U,steps_json:e}}),C({title:"Workflow created!",description:`"${Z}" has been saved as a workflow template.`})),s()}catch(e){console.error("Error saving workflow:",e),C({title:"Error saving workflow",description:"There was an error saving your workflow. Please try again.",variant:"destructive"})}finally{P(!1)}}},[Y,k?.id,Z,D,_,U,B,L,T,C,s,S,N]);return e?t.jsx(d.Vq,{open:e,onOpenChange:s,children:(0,t.jsxs)(d.cZ,{className:"max-w-4xl max-h-[92vh] flex flex-col",children:[(0,t.jsxs)(d.fK,{className:"pb-4",children:[t.jsx(d.$N,{className:"text-lg",children:S?y?"View Workflow":"Edit Workflow":"Save as Workflow"}),t.jsx(d.Be,{className:"text-sm",children:S?y?"View workflow details and configuration.":"Modify this workflow template. Edit your messages and use {variable_name} syntax to create variables.":"Convert this conversation into a reusable workflow template. Edit your messages and use {variable_name} syntax to create variables."})]}),t.jsx("div",{className:"flex-1 mt-6",children:(0,t.jsxs)(j.mQ,{value:V,onValueChange:q,className:"h-full flex flex-col",children:[(0,t.jsxs)(j.dr,{className:"grid w-full grid-cols-2 mb-6",children:[t.jsx(j.SP,{value:"setup",className:"data-[state=active]:bg-background",children:"Setup & Permissions"}),t.jsx(j.SP,{value:"workflow",className:"data-[state=active]:bg-background",children:"Workflow Steps & Variables"})]}),(0,t.jsxs)("div",{className:"flex-1 pb-6",children:[t.jsx(j.nU,{value:"setup",className:"mt-0 h-full",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[t.jsx(x._,{htmlFor:"workflow-name",className:"text-base font-semibold",children:"Workflow Name *"}),t.jsx(c.I,{id:"workflow-name",value:Z,onChange:e=>z(e.target.value),placeholder:"My Workflow",className:"mt-2 h-11",readOnly:y}),!Z.trim()&&(0,t.jsxs)("p",{className:"text-sm text-destructive mt-1 flex items-center",children:[t.jsx("span",{className:"mr-1",children:"⚠️"}),"Workflow name is required"]})]}),(0,t.jsxs)("div",{children:[t.jsx(x._,{htmlFor:"workflow-description",className:"text-base font-semibold",children:"Description"}),t.jsx(m.g,{id:"workflow-description",value:D,onChange:e=>E(e.target.value),placeholder:"Describe what this workflow does and when to use it...",rows:3,className:"mt-2 resize-none",readOnly:y})]})]}),(0,t.jsxs)("div",{className:"border-t pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[t.jsx("h3",{className:"text-base font-semibold mb-1",children:"Sharing & Permissions"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Control who can view and edit this workflow"})]}),(0,t.jsxs)(o.z,{type:"button",variant:"outline",size:"sm",onClick:()=>M(!F),className:"ml-4",children:[F?"Hide Advanced":"Show Advanced",t.jsx(u.Z,{className:(0,b.cn)("w-4 h-4 ml-1 transition-transform",F&&"rotate-180")})]})]}),F&&t.jsx(g.P,{initialRightsMode:N?.rights_mode,initialUsers:N?.RBAC?.users,initialRoles:N?.RBAC?.roles,initialProjects:N?.RBAC?.projects,onChange:(e,s,a,t)=>{A({rights_mode:e,users:s,roles:a,projects:t})}}),!F&&t.jsx("div",{className:"text-sm text-muted-foreground bg-muted/30 p-3 rounded-md",children:"Using default permissions (private to you)"})]})]})}),t.jsx(j.nU,{value:"workflow",className:"mt-0 h-full",children:(0,t.jsxs)("div",{className:"h-full flex gap-6",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-base font-semibold mb-2",children:"Conversation Steps"}),t.jsx("div",{className:"border rounded-lg p-3 mb-4",children:(0,t.jsxs)("p",{className:"text-sm",children:["\uD83D\uDCA1 ",t.jsx("strong",{children:"Pro tip:"})," Use ","{variable_name}"," syntax in your messages to create reusable variables. For example you can use ","{company_name}"," to create a variable for the company name so you can reuse this flow template with different companies."]})})]}),t.jsx("div",{className:"space-y-4 max-h-[500px] overflow-y-auto pr-2",children:B.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"border rounded-lg p-4 bg-card",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[t.jsx("span",{className:(0,b.cn)("text-sm font-medium px-3 py-1 rounded-full","user"===e.type?"bg-blue-100 text-blue-700":"assistant"===e.type?"bg-green-100 text-green-700":"bg-purple-100 text-purple-700"),children:"user"===e.type?"\uD83D\uDC64 User":"assistant"===e.type?"\uD83E\uDD16 Assistant":`🔧 ${e.toolName}`}),e.variablesUsed&&e.variablesUsed.length>0&&t.jsx("div",{className:"flex gap-1 flex-wrap",children:e.variablesUsed.map(e=>t.jsx("span",{className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded font-mono border border-blue-200",children:`{${e}}`},e))})]}),"user"===e.type?t.jsx("div",{children:t.jsx(m.g,{value:e.content||"",onChange:s=>Q(e.id,s.target.value),placeholder:"Enter your message...",className:"min-h-[80px] resize-none",rows:3,readOnly:y})}):t.jsx("div",{className:"bg-muted/50 p-3 rounded-md",children:"assistant"===e.type?(0,t.jsxs)("div",{children:[t.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Example response (will be regenerated):"}),t.jsx(f.H,{children:e.contentExample})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs font-medium text-muted-foreground mb-1",children:["Tool: ",e.toolName]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:"Parameters will be generated dynamically"})]})})]}),s<B.length-1&&t.jsx("div",{className:"flex justify-center my-3",children:t.jsx(u.Z,{className:"w-5 h-5 text-muted-foreground/50"})})]},e.id))})]}),(0,t.jsxs)("div",{className:"w-80",children:[(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h3",{className:"text-base font-semibold mb-2",children:["Variables (",U.length,")"]}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Auto-detected from your messages"})]}),U.length>0?t.jsx("div",{className:"space-y-3 max-h-[500px] overflow-y-auto",children:U.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 bg-card",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[t.jsx("div",{className:"font-mono text-blue-600 font-medium text-sm",children:`{${e.name}}`}),!y&&t.jsx("div",{className:"flex gap-1",children:I===e.name?t.jsx(c.I,{value:H,onChange:e=>K(e.target.value),className:"h-6 text-xs font-mono w-20",placeholder:"variable_name",autoFocus:!0,onKeyDown:s=>{"Enter"===s.key?(H&&H!==e.name&&X(e.name,H),O(null),K("")):"Escape"===s.key&&(O(null),K(""))},onBlur:()=>{H&&H!==e.name&&X(e.name,H),O(null),K("")}}):(0,t.jsxs)(t.Fragment,{children:[t.jsx(o.z,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0",onClick:()=>{O(e.name),K(e.name)},children:t.jsx(h.Z,{className:"w-3 h-3"})}),t.jsx(o.z,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0 text-destructive hover:bg-destructive/10",onClick:()=>G(e.name),children:t.jsx(p.Z,{className:"w-3 h-3"})})]})})]}),t.jsx("div",{className:"text-xs text-muted-foreground mb-2",children:e.description}),(0,t.jsxs)("div",{className:"flex gap-1",children:[t.jsx("span",{className:"text-xs bg-gray-100 text-gray-700 px-1.5 py-0.5 rounded",children:e.type}),e.required&&t.jsx("span",{className:"text-xs bg-orange-100 text-orange-700 px-1.5 py-0.5 rounded",children:"required"})]})]},e.name))}):(0,t.jsxs)("div",{className:"text-center py-8 text-muted-foreground border-2 border-dashed rounded-lg",children:[t.jsx("div",{className:"mb-3",children:t.jsx("span",{className:"text-3xl",children:"\uD83D\uDCDD"})}),t.jsx("div",{className:"text-sm mb-1 font-medium",children:"No variables yet"}),(0,t.jsxs)("div",{className:"text-xs",children:["Use ","{variable_name}"," syntax in your messages"]})]})]})]})})]})]})}),t.jsx("div",{className:"border-t p-4 bg-background",children:(0,t.jsxs)(d.cN,{children:[t.jsx(o.z,{variant:"outline",onClick:s,children:y?"Close":"Cancel"}),!y&&t.jsx(t.Fragment,{children:t.jsx(o.z,{onClick:ee,disabled:!Y||$,className:(0,b.cn)("min-w-[140px]",!Y&&"opacity-50 cursor-not-allowed"),children:$?(0,t.jsxs)(t.Fragment,{children:[t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),S?"Updating...":"Saving..."]}):S?"Update Workflow":"Save Workflow"})})]})})]})}):null}},54659:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},48998:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},85206:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]])}};
@@ -1 +1 @@
1
- "use strict";exports.id=2916,exports.ids=[2916],exports.modules={85060:(e,s,a)=>{a.d(s,{F:()=>D});var t=a(10326),l=a(17577),d=a(39167),n=a(18753),r=a(18019),i=a(40617),c=a(60214),o=a(1572),x=a(83855),m=a(87888),h=a(36283),p=a(75290),u=a(62288),g=a(90772),j=a(54432),f=a(31048),N=a(87673),v=a(42270),y=a(34789),b=a(79210),w=a(33071),k=a(567),C=a(65685),S=a(34474),Z=a(77961),T=a(98131),A=a(15728);function D({open:e,onClose:s,evalSetId:a,onSuccess:D,testCase:z}){let{toast:M}=(0,y.pm)(),_=!!z,{data:O}=(0,d.aM)(v.Ul,{variables:{page:1,limit:100}}),{regularTools:E,agentTools:F,knowledgeSourceTools:R}=(0,l.useMemo)(()=>{let e=O?.tools?.items||[];return console.log("tools",e),{regularTools:e.filter(e=>"function"===e.type),agentTools:e.filter(e=>"agent"===e.type),knowledgeSourceTools:e.filter(e=>"context"===e.type)}},[O]),[V,U]=(0,l.useState)(""),[P,K]=(0,l.useState)(""),[Y,q]=(0,l.useState)(""),[L,$]=(0,l.useState)([]),[B,H]=(0,l.useState)(""),[I,Q]=(0,l.useState)(null),[G,J]=(0,l.useState)([]),[W,X]=(0,l.useState)([]),[ee,es]=(0,l.useState)([]),[ea,et]=(0,l.useState)([]),[el,ed]=(0,l.useState)(""),[en,er]=(0,l.useState)(""),[ei,ec]=(0,l.useState)(""),[eo,{loading:ex}]=(0,n.D)(v.hx,{onCompleted:()=>{M({title:"Test case created",description:"The test case has been successfully created."}),D()},onError:e=>{M({title:"Failed to create test case",description:e.message,variant:"destructive"})}}),[em,{loading:eh}]=(0,n.D)(v.Mh,{onCompleted:()=>{M({title:"Test case updated",description:"The test case has been successfully updated."}),D()},onError:e=>{M({title:"Failed to update test case",description:e.message,variant:"destructive"})}}),ep=()=>{if(!B.trim()&&0===G.length)return;let e=[];B.trim()&&e.push({type:"text",text:B.trim()}),G.length>0&&e.push(...G),$([...L,{id:`msg-${Date.now()}`,role:"user",parts:e},{id:`msg-${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..."}]}]),H(""),Q(null),J([])},eu=ex||eh,eg=e=>{let s=E.find(s=>s.id===e);return s?.name||e},ej=e=>{let s=R.find(s=>s.id===e);return s?.name||e},ef=e=>{let s=F.find(s=>s.id===e);return s?.name||e};return t.jsx(u.Vq,{open:e,onOpenChange:s,children:(0,t.jsxs)(u.cZ,{className:"max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,t.jsxs)(u.fK,{children:[(0,t.jsxs)(u.$N,{children:[_?"Edit Test Case":"Create Test Case"," ",a?`for Eval Set: ${a}`:""]}),t.jsx(u.Be,{children:_?"Update the test case details.":"Create a new test case with conversation inputs and expected outputs."})]}),(0,t.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!V.trim()||!Y.trim()||0===L.length){M({title:"Validation error",description:"Name, at least one input message, and expected output are required.",variant:"destructive"});return}let s={name:V.trim(),description:P.trim()||null,inputs:L,expected_output:Y.trim(),expected_tools:W.length>0?W:null,expected_knowledge_sources:ee.length>0?ee:null,expected_agent_tools:ea.length>0?ea:null,...a?{eval_set_id:a}:{}};_?em({variables:{id:z.id,data:s}}):eo({variables:{data:s}})},className:"flex-1 overflow-hidden flex flex-col",children:[(0,t.jsxs)(b.mQ,{defaultValue:"basic",className:"flex-1 overflow-hidden flex flex-col",children:[(0,t.jsxs)(b.dr,{className:"grid w-full grid-cols-3",children:[(0,t.jsxs)(b.SP,{value:"basic",className:"gap-2",children:[t.jsx(r.Z,{className:"h-4 w-4"}),"Basic Info"]}),(0,t.jsxs)(b.SP,{value:"conversation",className:"gap-2",children:[t.jsx(i.Z,{className:"h-4 w-4"}),"Conversation"]}),(0,t.jsxs)(b.SP,{value:"expected",className:"gap-2",children:[t.jsx(c.Z,{className:"h-4 w-4"}),"Expected Tools"]})]}),(0,t.jsxs)(C.x,{className:"flex-1",children:[t.jsx(b.nU,{value:"basic",className:"space-y-4 p-1 mt-4",children:(0,t.jsxs)("div",{className:"grid gap-5",children:[(0,t.jsxs)("div",{className:"grid gap-2",children:[t.jsx(f._,{htmlFor:"name",children:"Name *"}),t.jsx(j.I,{id:"name",placeholder:"e.g., Customer Support - Refund Request",value:V,onChange:e=>U(e.target.value),disabled:eu,required:!0})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[t.jsx(f._,{htmlFor:"description",children:"Description"}),t.jsx(N.g,{id:"description",placeholder:"Describe what this test case evaluates...",value:P,onChange:e=>K(e.target.value),disabled:eu,rows:3})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[t.jsx(f._,{htmlFor:"expectedOutput",children:"Expected Output *"}),t.jsx(N.g,{id:"expectedOutput",placeholder:"Describe the expected final output (e.g., 'A JSON object containing refund details', 'An empathetic response offering alternatives')",value:Y,onChange:e=>q(e.target.value),disabled:eu,rows:4,required:!0}),t.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."})]})]})}),t.jsx(b.nU,{value:"conversation",className:"space-y-4 p-1 mt-4",children:(0,t.jsxs)(w.Zb,{children:[t.jsx(w.Ol,{className:"pb-3",children:t.jsx("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(i.Z,{className:"h-4 w-4"}),"Conversation Flow",L.length>0&&(0,t.jsxs)(k.C,{variant:"secondary",className:"ml-2",children:[L.length," ",1===L.length?"message":"messages"]})]}),t.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,t.jsxs)(w.aY,{className:"space-y-6",children:[L?.length===0?(0,t.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:[t.jsx(o.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),t.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No messages yet"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:"Start building your test conversation by adding user messages below."})]}):t.jsx(A.ri,{className:"max-h-[350px] overflow-y-auto border rounded-lg bg-muted/30 transition-all duration-300 ease-in-out",children:t.jsx(A.iG,{className:"px-6 py-4",children:t.jsx("div",{className:"animate-in fade-in duration-500",children:t.jsx(T.K,{messages:L,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,t.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[t.jsx(f._,{htmlFor:"currentInput",className:"text-sm font-semibold",children:"Add User Message"}),(0,t.jsxs)("div",{className:"space-y-3",children:[t.jsx(N.g,{id:"currentInput",placeholder:"Type the user's message...",value:B,onChange:e=>H(e.target.value),disabled:eu,rows:2,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),ep())}}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx(Z.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=>{Q(e)}}),(0,t.jsxs)(g.z,{type:"button",variant:"outline",onClick:ep,disabled:eu||!B.trim()&&0===G.length,className:"ml-auto",size:"default",children:[t.jsx(x.Z,{className:"h-4 w-4 mr-2"}),"Add Message"]})]}),I&&I.length>0&&(0,t.jsxs)(t.Fragment,{children:[t.jsx("div",{className:"grid grid-cols-3 gap-2",children:I.map(e=>t.jsx(Z.jU,{s3Key:e,disabled:!0,active:!1,onRemove:()=>{Q(I?.filter(s=>s!==e))}}))}),(0,t.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[t.jsx(m.Z,{className:"h-4 w-4 text-amber-600 dark:text-amber-500 mt-0.5 flex-shrink-0"}),(0,t.jsxs)("p",{className:"text-xs text-amber-900 dark:text-amber-200",children:[t.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.)."]})]})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Press Enter to add, Shift+Enter for new line. You can attach files to messages."})]})]})]})}),t.jsx(b.nU,{value:"expected",className:"space-y-4 p-1 mt-4",children:(0,t.jsxs)("div",{className:"grid gap-5",children:[(0,t.jsxs)(w.Zb,{className:"border-l-2 border-l-blue-500/30",children:[(0,t.jsxs)(w.Ol,{className:"pb-3",children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(c.Z,{className:"h-4 w-4"}),"Expected Tools (Optional)",W.length>0&&t.jsx(k.C,{variant:"secondary",className:"ml-2",children:W.length})]}),t.jsx(w.SZ,{children:"Regular tools that should be used during the conversation"})]}),(0,t.jsxs)(w.aY,{className:"space-y-2",children:[t.jsx("div",{className:"flex gap-2 flex-wrap",children:W.map((e,s)=>(0,t.jsxs)(k.C,{variant:"secondary",children:[eg(e),t.jsx("button",{type:"button",onClick:()=>X(W.filter((e,a)=>a!==s)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},s))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(S.Ph,{value:el,onValueChange:ed,disabled:eu,children:[t.jsx(S.i4,{className:"flex-1",children:t.jsx(S.ki,{placeholder:"Select a tool to add..."})}),t.jsx(S.Bw,{children:E.map(e=>t.jsx(S.Ql,{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)(g.z,{type:"button",onClick:()=>{console.log("selectedTool",el),console.log("expectedTools",W),el&&!W.includes(el)&&(console.log("adding tool",el),console.log("new expectedTools",[...W,el]),X([...W,el]),ed(""))},disabled:eu||!el,className:"gap-1.5",variant:el?"default":"outline",children:[t.jsx(x.Z,{className:"h-4 w-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Add"})]})]}),!el&&t.jsx("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select a tool from the dropdown, then click Add"})]})]}),(0,t.jsxs)(w.Zb,{className:"border-l-2 border-l-purple-500/30",children:[(0,t.jsxs)(w.Ol,{className:"pb-3",children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(h.Z,{className:"h-4 w-4"}),"Expected Knowledge Sources (Optional)",ee.length>0&&t.jsx(k.C,{variant:"secondary",className:"ml-2",children:ee.length})]}),t.jsx(w.SZ,{children:"Context/knowledge sources that should be used"})]}),(0,t.jsxs)(w.aY,{className:"space-y-2",children:[t.jsx("div",{className:"flex gap-2 flex-wrap",children:ee.map((e,s)=>(0,t.jsxs)(k.C,{variant:"secondary",children:[ej(e),t.jsx("button",{type:"button",onClick:()=>es(ee.filter((e,a)=>a!==s)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},s))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(S.Ph,{value:en,onValueChange:er,disabled:eu,children:[t.jsx(S.i4,{className:"flex-1",children:t.jsx(S.ki,{placeholder:"Select a knowledge source to add..."})}),t.jsx(S.Bw,{children:R.map(e=>t.jsx(S.Ql,{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)(g.z,{type:"button",onClick:()=>{console.log("selectedContext",en),console.log("expectedKnowledgeSources",ee),en&&!ee.includes(en)&&(console.log("adding context",en),console.log("new expectedKnowledgeSources",[...ee,en]),es([...ee,en]),er(""))},disabled:eu||!en,className:"gap-1.5",variant:en?"default":"outline",children:[t.jsx(x.Z,{className:"h-4 w-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Add"})]})]}),!en&&t.jsx("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select a knowledge source from the dropdown, then click Add"})]})]}),(0,t.jsxs)(w.Zb,{className:"border-l-2 border-l-green-500/30",children:[(0,t.jsxs)(w.Ol,{className:"pb-3",children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(o.Z,{className:"h-4 w-4"}),"Expected Agent Tools (Optional)",ea.length>0&&t.jsx(k.C,{variant:"secondary",className:"ml-2",children:ea.length})]}),t.jsx(w.SZ,{children:"Agents that should be called as tools"})]}),(0,t.jsxs)(w.aY,{className:"space-y-2",children:[t.jsx("div",{className:"flex gap-2 flex-wrap",children:ea.map((e,s)=>(0,t.jsxs)(k.C,{variant:"secondary",children:[ef(e),t.jsx("button",{type:"button",onClick:()=>et(ea.filter((e,a)=>a!==s)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},s))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(S.Ph,{value:ei,onValueChange:ec,disabled:eu,children:[t.jsx(S.i4,{className:"flex-1",children:t.jsx(S.ki,{placeholder:"Select an agent to add..."})}),t.jsx(S.Bw,{children:F.map(e=>t.jsx(S.Ql,{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)(g.z,{type:"button",onClick:()=>{console.log("selectedAgent",ei),console.log("expectedAgentTools",ea),ei&&!ea.includes(ei)&&(console.log("adding agent",ei),console.log("new expectedAgentTools",[...ea,ei]),et([...ea,ei]),ec(""))},disabled:eu||!ei,className:"gap-1.5",variant:ei?"default":"outline",children:[t.jsx(x.Z,{className:"h-4 w-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Add"})]})]}),!ei&&t.jsx("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select an agent from the dropdown, then click Add"})]})]})]})})]})]}),(0,t.jsxs)(u.cN,{className:"mt-4 gap-2",children:[t.jsx(g.z,{type:"button",variant:"outline",onClick:s,disabled:eu,children:"Cancel"}),(0,t.jsxs)(g.z,{type:"submit",disabled:eu||!V.trim()||!Y.trim()||0===L.length,className:"shadow-sm hover:shadow-md transition-all",children:[eu&&t.jsx(p.Z,{className:"mr-2 h-4 w-4 animate-spin"}),_?"Update Test Case":"Create Test Case"]})]})]})]})})}},99440:(e,s,a)=>{a.d(s,{OL:()=>g,_T:()=>x,aR:()=>i,f$:()=>p,fY:()=>m,le:()=>j,xo:()=>h,yT:()=>u});var t=a(10326),l=a(12194),d=a(17577),n=a(90772),r=a(77863);let i=l.fC;l.xz;let c=l.h_,o=d.forwardRef(({className:e,...s},a)=>t.jsx(l.aV,{className:(0,r.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",e),...s,ref:a}));o.displayName=l.aV.displayName;let x=d.forwardRef(({className:e,...s},a)=>(0,t.jsxs)(c,{children:[t.jsx(o,{}),t.jsx(l.VY,{ref:a,className:(0,r.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",e),...s})]}));x.displayName=l.VY.displayName;let m=({className:e,...s})=>t.jsx("div",{className:(0,r.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...s});m.displayName="AlertDialogHeader";let h=({className:e,...s})=>t.jsx("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});h.displayName="AlertDialogFooter";let p=d.forwardRef(({className:e,...s},a)=>t.jsx(l.Dx,{ref:a,className:(0,r.cn)("text-lg font-semibold",e),...s}));p.displayName=l.Dx.displayName;let u=d.forwardRef(({className:e,...s},a)=>t.jsx(l.dk,{ref:a,className:(0,r.cn)("text-sm text-muted-foreground",e),...s}));u.displayName=l.dk.displayName;let g=d.forwardRef(({className:e,...s},a)=>t.jsx(l.aU,{ref:a,className:(0,r.cn)((0,n.d)(),e),...s}));g.displayName=l.aU.displayName;let j=d.forwardRef(({className:e,...s},a)=>t.jsx(l.$j,{ref:a,className:(0,r.cn)((0,n.d)({variant:"outline"}),"mt-2 sm:mt-0",e),...s}));j.displayName=l.$j.displayName},87888:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},86333:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},40617:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},60214:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},1572:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]])}};
1
+ "use strict";exports.id=2916,exports.ids=[2916],exports.modules={85060:(e,s,a)=>{a.d(s,{F:()=>D});var t=a(10326),l=a(17577),d=a(39167),n=a(18753),r=a(18019),i=a(40617),c=a(60214),o=a(1572),x=a(83855),m=a(87888),h=a(36283),p=a(75290),u=a(62288),g=a(90772),j=a(54432),f=a(31048),N=a(87673),v=a(42270),b=a(34789),y=a(79210),w=a(33071),C=a(567),k=a(65685),S=a(34474),Z=a(77961),T=a(87599),A=a(15728);function D({open:e,onClose:s,evalSetId:a,onSuccess:D,testCase:z}){let{toast:_}=(0,b.pm)(),O=!!z,{data:E}=(0,d.aM)(v.Ul,{variables:{page:1,limit:100}}),{regularTools:F,agentTools:M,knowledgeSourceTools:R}=(0,l.useMemo)(()=>{let e=E?.tools?.items||[];return console.log("tools",e),{regularTools:e.filter(e=>"function"===e.type),agentTools:e.filter(e=>"agent"===e.type),knowledgeSourceTools:e.filter(e=>"context"===e.type)}},[E]),[V,U]=(0,l.useState)(""),[P,K]=(0,l.useState)(""),[Y,q]=(0,l.useState)(""),[$,B]=(0,l.useState)([]),[H,I]=(0,l.useState)(""),[Q,L]=(0,l.useState)(null),[G,J]=(0,l.useState)([]),[W,X]=(0,l.useState)([]),[ee,es]=(0,l.useState)([]),[ea,et]=(0,l.useState)([]),[el,ed]=(0,l.useState)(""),[en,er]=(0,l.useState)(""),[ei,ec]=(0,l.useState)(""),[eo,{loading:ex}]=(0,n.D)(v.hx,{onCompleted:()=>{_({title:"Test case created",description:"The test case has been successfully created."}),D()},onError:e=>{_({title:"Failed to create test case",description:e.message,variant:"destructive"})}}),[em,{loading:eh}]=(0,n.D)(v.Mh,{onCompleted:()=>{_({title:"Test case updated",description:"The test case has been successfully updated."}),D()},onError:e=>{_({title:"Failed to update test case",description:e.message,variant:"destructive"})}}),ep=()=>{if(!H.trim()&&0===G.length)return;let e=[];H.trim()&&e.push({type:"text",text:H.trim()}),G.length>0&&e.push(...G),B([...$,{id:`msg-${Date.now()}`,role:"user",parts:e},{id:`msg-${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..."}]}]),I(""),L(null),J([])},eu=ex||eh,eg=e=>{let s=F.find(s=>s.id===e);return s?.name||e},ej=e=>{let s=R.find(s=>s.id===e);return s?.name||e},ef=e=>{let s=M.find(s=>s.id===e);return s?.name||e};return t.jsx(u.Vq,{open:e,onOpenChange:s,children:(0,t.jsxs)(u.cZ,{className:"max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",children:[(0,t.jsxs)(u.fK,{children:[(0,t.jsxs)(u.$N,{children:[O?"Edit Test Case":"Create Test Case"," ",a?`for Eval Set: ${a}`:""]}),t.jsx(u.Be,{children:O?"Update the test case details.":"Create a new test case with conversation inputs and expected outputs."})]}),(0,t.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!V.trim()||!Y.trim()||0===$.length){_({title:"Validation error",description:"Name, at least one input message, and expected output are required.",variant:"destructive"});return}let s={name:V.trim(),description:P.trim()||null,inputs:$,expected_output:Y.trim(),expected_tools:W.length>0?W:null,expected_knowledge_sources:ee.length>0?ee:null,expected_agent_tools:ea.length>0?ea:null,...a?{eval_set_id:a}:{}};O?em({variables:{id:z.id,data:s}}):eo({variables:{data:s}})},className:"flex-1 overflow-hidden flex flex-col",children:[(0,t.jsxs)(y.mQ,{defaultValue:"basic",className:"flex-1 overflow-hidden flex flex-col",children:[(0,t.jsxs)(y.dr,{className:"grid w-full grid-cols-3",children:[(0,t.jsxs)(y.SP,{value:"basic",className:"gap-2",children:[t.jsx(r.Z,{className:"h-4 w-4"}),"Basic Info"]}),(0,t.jsxs)(y.SP,{value:"conversation",className:"gap-2",children:[t.jsx(i.Z,{className:"h-4 w-4"}),"Conversation"]}),(0,t.jsxs)(y.SP,{value:"expected",className:"gap-2",children:[t.jsx(c.Z,{className:"h-4 w-4"}),"Expected Tools"]})]}),(0,t.jsxs)(k.x,{className:"flex-1",children:[t.jsx(y.nU,{value:"basic",className:"space-y-4 p-1 mt-4",children:(0,t.jsxs)("div",{className:"grid gap-5",children:[(0,t.jsxs)("div",{className:"grid gap-2",children:[t.jsx(f._,{htmlFor:"name",children:"Name *"}),t.jsx(j.I,{id:"name",placeholder:"e.g., Customer Support - Refund Request",value:V,onChange:e=>U(e.target.value),disabled:eu,required:!0})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[t.jsx(f._,{htmlFor:"description",children:"Description"}),t.jsx(N.g,{id:"description",placeholder:"Describe what this test case evaluates...",value:P,onChange:e=>K(e.target.value),disabled:eu,rows:3})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[t.jsx(f._,{htmlFor:"expectedOutput",children:"Expected Output *"}),t.jsx(N.g,{id:"expectedOutput",placeholder:"Describe the expected final output (e.g., 'A JSON object containing refund details', 'An empathetic response offering alternatives')",value:Y,onChange:e=>q(e.target.value),disabled:eu,rows:4,required:!0}),t.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."})]})]})}),t.jsx(y.nU,{value:"conversation",className:"space-y-4 p-1 mt-4",children:(0,t.jsxs)(w.Zb,{children:[t.jsx(w.Ol,{className:"pb-3",children:t.jsx("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(i.Z,{className:"h-4 w-4"}),"Conversation Flow",$.length>0&&(0,t.jsxs)(C.C,{variant:"secondary",className:"ml-2",children:[$.length," ",1===$.length?"message":"messages"]})]}),t.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,t.jsxs)(w.aY,{className:"space-y-6",children:[$?.length===0?(0,t.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:[t.jsx(o.Z,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),t.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No messages yet"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm",children:"Start building your test conversation by adding user messages below."})]}):t.jsx(A.ri,{className:"max-h-[350px] overflow-y-auto border rounded-lg bg-muted/30 transition-all duration-300 ease-in-out",children:t.jsx(A.iG,{className:"px-6 py-4",children:t.jsx("div",{className:"animate-in fade-in duration-500",children:t.jsx(T.K,{messages:$,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,t.jsxs)("div",{className:"space-y-3 pt-2 border-t",children:[t.jsx(f._,{htmlFor:"currentInput",className:"text-sm font-semibold",children:"Add User Message"}),(0,t.jsxs)("div",{className:"space-y-3",children:[t.jsx(N.g,{id:"currentInput",placeholder:"Type the user's message...",value:H,onChange:e=>I(e.target.value),disabled:eu,rows:2,onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),ep())}}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[t.jsx(Z.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=>{L(e)}}),(0,t.jsxs)(g.z,{type:"button",variant:"outline",onClick:ep,disabled:eu||!H.trim()&&0===G.length,className:"ml-auto",size:"default",children:[t.jsx(x.Z,{className:"h-4 w-4 mr-2"}),"Add Message"]})]}),Q&&Q.length>0&&(0,t.jsxs)(t.Fragment,{children:[t.jsx("div",{className:"grid grid-cols-3 gap-2",children:Q.map(e=>t.jsx(Z.jU,{s3Key:e,disabled:!0,active:!1,onRemove:()=>{L(Q?.filter(s=>s!==e))}}))}),(0,t.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg",children:[t.jsx(m.Z,{className:"h-4 w-4 text-amber-600 dark:text-amber-500 mt-0.5 flex-shrink-0"}),(0,t.jsxs)("p",{className:"text-xs text-amber-900 dark:text-amber-200",children:[t.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.)."]})]})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Press Enter to add, Shift+Enter for new line. You can attach files to messages."})]})]})]})}),t.jsx(y.nU,{value:"expected",className:"space-y-4 p-1 mt-4",children:(0,t.jsxs)("div",{className:"grid gap-5",children:[(0,t.jsxs)(w.Zb,{className:"border-l-2 border-l-blue-500/30",children:[(0,t.jsxs)(w.Ol,{className:"pb-3",children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(c.Z,{className:"h-4 w-4"}),"Expected Tools (Optional)",W.length>0&&t.jsx(C.C,{variant:"secondary",className:"ml-2",children:W.length})]}),t.jsx(w.SZ,{children:"Regular tools that should be used during the conversation"})]}),(0,t.jsxs)(w.aY,{className:"space-y-2",children:[t.jsx("div",{className:"flex gap-2 flex-wrap",children:W.map((e,s)=>(0,t.jsxs)(C.C,{variant:"secondary",children:[eg(e),t.jsx("button",{type:"button",onClick:()=>X(W.filter((e,a)=>a!==s)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},s))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(S.Ph,{value:el,onValueChange:ed,disabled:eu,children:[t.jsx(S.i4,{className:"flex-1",children:t.jsx(S.ki,{placeholder:"Select a tool to add..."})}),t.jsx(S.Bw,{children:F.map(e=>t.jsx(S.Ql,{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)(g.z,{type:"button",onClick:()=>{console.log("selectedTool",el),console.log("expectedTools",W),el&&!W.includes(el)&&(console.log("adding tool",el),console.log("new expectedTools",[...W,el]),X([...W,el]),ed(""))},disabled:eu||!el,className:"gap-1.5",variant:el?"default":"outline",children:[t.jsx(x.Z,{className:"h-4 w-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Add"})]})]}),!el&&t.jsx("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select a tool from the dropdown, then click Add"})]})]}),(0,t.jsxs)(w.Zb,{className:"border-l-2 border-l-purple-500/30",children:[(0,t.jsxs)(w.Ol,{className:"pb-3",children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(h.Z,{className:"h-4 w-4"}),"Expected Knowledge Sources (Optional)",ee.length>0&&t.jsx(C.C,{variant:"secondary",className:"ml-2",children:ee.length})]}),t.jsx(w.SZ,{children:"Context/knowledge sources that should be used"})]}),(0,t.jsxs)(w.aY,{className:"space-y-2",children:[t.jsx("div",{className:"flex gap-2 flex-wrap",children:ee.map((e,s)=>(0,t.jsxs)(C.C,{variant:"secondary",children:[ej(e),t.jsx("button",{type:"button",onClick:()=>es(ee.filter((e,a)=>a!==s)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},s))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(S.Ph,{value:en,onValueChange:er,disabled:eu,children:[t.jsx(S.i4,{className:"flex-1",children:t.jsx(S.ki,{placeholder:"Select a knowledge source to add..."})}),t.jsx(S.Bw,{children:R.map(e=>t.jsx(S.Ql,{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)(g.z,{type:"button",onClick:()=>{console.log("selectedContext",en),console.log("expectedKnowledgeSources",ee),en&&!ee.includes(en)&&(console.log("adding context",en),console.log("new expectedKnowledgeSources",[...ee,en]),es([...ee,en]),er(""))},disabled:eu||!en,className:"gap-1.5",variant:en?"default":"outline",children:[t.jsx(x.Z,{className:"h-4 w-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Add"})]})]}),!en&&t.jsx("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select a knowledge source from the dropdown, then click Add"})]})]}),(0,t.jsxs)(w.Zb,{className:"border-l-2 border-l-green-500/30",children:[(0,t.jsxs)(w.Ol,{className:"pb-3",children:[(0,t.jsxs)(w.ll,{className:"text-sm flex items-center gap-2",children:[t.jsx(o.Z,{className:"h-4 w-4"}),"Expected Agent Tools (Optional)",ea.length>0&&t.jsx(C.C,{variant:"secondary",className:"ml-2",children:ea.length})]}),t.jsx(w.SZ,{children:"Agents that should be called as tools"})]}),(0,t.jsxs)(w.aY,{className:"space-y-2",children:[t.jsx("div",{className:"flex gap-2 flex-wrap",children:ea.map((e,s)=>(0,t.jsxs)(C.C,{variant:"secondary",children:[ef(e),t.jsx("button",{type:"button",onClick:()=>et(ea.filter((e,a)=>a!==s)),className:"ml-2 hover:text-destructive",children:"\xd7"})]},s))}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(S.Ph,{value:ei,onValueChange:ec,disabled:eu,children:[t.jsx(S.i4,{className:"flex-1",children:t.jsx(S.ki,{placeholder:"Select an agent to add..."})}),t.jsx(S.Bw,{children:M.map(e=>t.jsx(S.Ql,{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)(g.z,{type:"button",onClick:()=>{console.log("selectedAgent",ei),console.log("expectedAgentTools",ea),ei&&!ea.includes(ei)&&(console.log("adding agent",ei),console.log("new expectedAgentTools",[...ea,ei]),et([...ea,ei]),ec(""))},disabled:eu||!ei,className:"gap-1.5",variant:ei?"default":"outline",children:[t.jsx(x.Z,{className:"h-4 w-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Add"})]})]}),!ei&&t.jsx("p",{className:"text-xs text-muted-foreground/75 italic",children:"Select an agent from the dropdown, then click Add"})]})]})]})})]})]}),(0,t.jsxs)(u.cN,{className:"mt-4 gap-2",children:[t.jsx(g.z,{type:"button",variant:"outline",onClick:s,disabled:eu,children:"Cancel"}),(0,t.jsxs)(g.z,{type:"submit",disabled:eu||!V.trim()||!Y.trim()||0===$.length,className:"shadow-sm hover:shadow-md transition-all",children:[eu&&t.jsx(p.Z,{className:"mr-2 h-4 w-4 animate-spin"}),O?"Update Test Case":"Create Test Case"]})]})]})]})})}},99440:(e,s,a)=>{a.d(s,{OL:()=>g,_T:()=>x,aR:()=>i,f$:()=>p,fY:()=>m,le:()=>j,xo:()=>h,yT:()=>u});var t=a(10326),l=a(12194),d=a(17577),n=a(90772),r=a(77863);let i=l.fC;l.xz;let c=l.h_,o=d.forwardRef(({className:e,...s},a)=>t.jsx(l.aV,{className:(0,r.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",e),...s,ref:a}));o.displayName=l.aV.displayName;let x=d.forwardRef(({className:e,...s},a)=>(0,t.jsxs)(c,{children:[t.jsx(o,{}),t.jsx(l.VY,{ref:a,className:(0,r.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",e),...s})]}));x.displayName=l.VY.displayName;let m=({className:e,...s})=>t.jsx("div",{className:(0,r.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...s});m.displayName="AlertDialogHeader";let h=({className:e,...s})=>t.jsx("div",{className:(0,r.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});h.displayName="AlertDialogFooter";let p=d.forwardRef(({className:e,...s},a)=>t.jsx(l.Dx,{ref:a,className:(0,r.cn)("text-lg font-semibold",e),...s}));p.displayName=l.Dx.displayName;let u=d.forwardRef(({className:e,...s},a)=>t.jsx(l.dk,{ref:a,className:(0,r.cn)("text-sm text-muted-foreground",e),...s}));u.displayName=l.dk.displayName;let g=d.forwardRef(({className:e,...s},a)=>t.jsx(l.aU,{ref:a,className:(0,r.cn)((0,n.d)(),e),...s}));g.displayName=l.aU.displayName;let j=d.forwardRef(({className:e,...s},a)=>t.jsx(l.$j,{ref:a,className:(0,r.cn)((0,n.d)({variant:"outline"}),"mt-2 sm:mt-0",e),...s}));j.displayName=l.$j.displayName},87888:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},86333:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},40617:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},60214:(e,s,a)=>{a.d(s,{Z:()=>t});let t=(0,a(76557).Z)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=3503,exports.ids=[3503],exports.modules={15728:(e,t,s)=>{s.d(t,{iG:()=>i,ri:()=>n});var a=s(10326);s(90772);var r=s(77863);s(17577);var l=s(30778);let n=({className:e,...t})=>a.jsx(l.h,{className:(0,r.cn)("relative flex-1 overflow-y-auto",e),initial:"smooth",resize:"smooth",role:"log",...t}),i=({className:e,...t})=>a.jsx(l.h.Content,{className:(0,r.cn)("p-4",e),...t})},87599:(e,t,s)=>{s.d(t,{K:()=>M});var a=s(10326);s(28758);var r=s(77863);let l=({className:e,from:t,...s})=>a.jsx("div",{className:(0,r.cn)("group flex w-full items-end justify-end gap-2 py-4","user"===t?"is-user flex-row-reverse justify-end":"is-assistant flex-row-reverse justify-end","[&>div]:max-w-[80%]",e),...s}),n=({children:e,className:t,...s})=>a.jsx("div",{className:(0,r.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",t),...s,children:a.jsx("div",{className:"is-user:dark",children:e})});var i=s(90772),o=s(68232);let d=({className:e,children:t,...s})=>a.jsx("div",{className:(0,r.cn)("flex items-center gap-1",e),...s,children:t}),c=({tooltip:e,children:t,label:s,className:l,variant:n="ghost",size:d="sm",...c})=>{let u=(0,a.jsxs)(i.z,{className:(0,r.cn)("size-9 p-1.5 text-muted-foreground hover:text-foreground",l),size:d,type:"button",variant:n,...c,children:[t,a.jsx("span",{className:"sr-only",children:s||e})]});return e?a.jsx(o.pn,{children:(0,a.jsxs)(o.u,{children:[a.jsx(o.aJ,{asChild:!0,children:u}),a.jsx(o._v,{children:a.jsx("p",{children:e})})]})}):u};var u=s(36931),m=s(52067),x=s(24295),p=s(98360),h=s(941),g=s(17577);let f=(0,g.createContext)(null),j=()=>{let e=(0,g.useContext)(f);if(!e)throw Error("Reasoning components must be used within Reasoning");return e},N=(0,g.memo)(({className:e,isStreaming:t=!1,open:s,defaultOpen:l=!1,onOpenChange:n,duration:i,children:o,...d})=>{let[c,u]=(0,m.T)({prop:s,defaultProp:l,onChange:n}),[p,h]=(0,m.T)({prop:i,defaultProp:0}),[j,N]=(0,g.useState)(!1),[y,v]=(0,g.useState)(null);return(0,g.useEffect)(()=>{t?null===y&&v(Date.now()):null!==y&&(h(Math.round((Date.now()-y)/1e3)),v(null))},[t,y,h]),(0,g.useEffect)(()=>{if(t&&!c)u(!0);else if(!t&&c&&!l&&!j){let e=setTimeout(()=>{u(!1),N(!0)},1e3);return()=>clearTimeout(e)}},[t,c,l,u,j]),a.jsx(f.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:u,duration:p},children:a.jsx(x.zF,{className:(0,r.cn)("not-prose mb-4",e),onOpenChange:e=>{u(e)},open:c,...d,children:o})})}),y=(0,g.memo)(({className:e,title:t="Reasoning",children:s,...l})=>{let{isStreaming:n,isOpen:i,duration:o}=j();return a.jsx(x.wy,{className:(0,r.cn)("flex items-center gap-2 text-muted-foreground text-sm",e),...l,children:s??(0,a.jsxs)(a.Fragment,{children:[a.jsx(p.Z,{className:"size-4"}),n||0===o?a.jsx("p",{children:"Thinking..."}):(0,a.jsxs)("p",{children:["Thought for ",o," seconds"]}),a.jsx(h.Z,{className:(0,r.cn)("size-4 text-muted-foreground transition-transform",i?"rotate-180":"rotate-0")})]})})}),v=(0,g.memo)(({className:e,children:t,...s})=>a.jsx(x.Fw,{className:(0,r.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",e),...s,children:a.jsx(u.H,{className:"grid gap-2",children:t})}));N.displayName="Reasoning",y.displayName="ReasoningTrigger",v.displayName="ReasoningContent";var w=s(71876);let b=({className:e,...t})=>a.jsx(x.zF,{className:(0,r.cn)("not-prose mb-4 text-primary text-xs",e),...t}),C=({className:e,count:t,children:s,...r})=>a.jsx(x.wy,{className:"flex items-center gap-2",...r,children:s??(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"font-medium",children:["Used ",t," sources"]}),a.jsx(h.Z,{className:"h-4 w-4"})]})}),T=({className:e,...t})=>a.jsx(x.Fw,{className:(0,r.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",e),...t}),F=({href:e,title:t,children:s,...r})=>a.jsx("a",{className:"flex items-center gap-2",href:e,rel:"noreferrer",target:"_blank",...r,children:s??(0,a.jsxs)(a.Fragment,{children:[a.jsx(w.Z,{className:"h-4 w-4"}),a.jsx("span",{className:"block font-medium",children:t})]})});var k=s(91468),z=s(43810),$=s(46226),Z=s(34789),I=s(53982),_=s(75290),P=s(2179),R=s(91470);let E={pending:{icon:I.Z,label:"Pending",className:"text-muted-foreground"},in_progress:{icon:_.Z,label:"In Progress",className:"text-blue-500 animate-spin"},completed:{icon:P.Z,label:"Completed",className:"text-green-500"},cancelled:{icon:R.Z,label:"Cancelled",className:"text-red-500"}},S={high:{label:"High",className:"bg-red-500/10 text-red-500 border-red-500/20"},medium:{label:"Medium",className:"bg-yellow-500/10 text-yellow-500 border-yellow-500/20"},low:{label:"Low",className:"bg-blue-500/10 text-blue-500 border-blue-500/20"}},L=({todos:e,showPriority:t=!1,state:s,className:l,...n})=>{if("string"==typeof e&&(e=JSON.parse(e)),!e||0===e.length)return null;let i=e.filter(e=>"completed"===e.status).length,o=e.length;return(0,a.jsxs)("div",{className:(0,r.cn)("my-2 space-y-1","input-streaming"===s&&"opacity-70",l),...n,children:[e.map((s,l)=>{let n=E[s.status].icon,i=E[s.status].className;S[s.priority].className;let o="in_progress"===s.status&&l===e.findIndex(e=>"in_progress"===e.status);return(0,a.jsxs)("div",{className:(0,r.cn)("flex items-start gap-2 py-0.5","cancelled"===s.status&&"opacity-50"),children:[a.jsx("div",{className:"flex-shrink-0 pt-0.5",children:a.jsx(n,{className:(0,r.cn)("size-3.5",i)})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[a.jsx("span",{className:(0,r.cn)("text-sm","completed"===s.status&&"text-muted-foreground line-through","cancelled"===s.status&&"text-muted-foreground line-through","in_progress"===s.status&&o&&"font-medium"),children:s.content}),t&&"high"===s.priority&&a.jsx("span",{className:"ml-2 text-red-500 text-xs",children:"(!)"})]})]},s.id)}),o>1&&(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-1 text-muted-foreground text-xs",children:[a.jsx("div",{className:"h-1 flex-1 overflow-hidden rounded-full bg-secondary",children:a.jsx("div",{className:"h-full bg-primary transition-all duration-300",style:{width:`${i/o*100}%`}})}),(0,a.jsxs)("span",{className:"whitespace-nowrap",children:[i,"/",o]})]}),"output-error"===s&&(0,a.jsxs)("div",{className:"flex items-center gap-1 pt-1 text-red-500 text-xs",children:[a.jsx(R.Z,{className:"size-3"}),a.jsx("span",{children:"Error updating tasks"})]})]})};function M({messages:e,status:t="idle",className:s,showActions:i=!0,onRegenerate:o,onAddToolResult:m,UntypedToolPartComponent:x,addToContext:p,writeAccess:h=!0,config:g}){let{toast:f}=(0,Z.pm)();return a.jsx(a.Fragment,{children:e?.map((j,w)=>{let Z=j.metadata;return e.length,a.jsx(l,{className:r.cn("assistant"===j.role&&(g?.customAssistantClassnames?g?.customAssistantClassnames:""),0===w&&(g?.marginTopFirstMessage?g?.marginTopFirstMessage:"mt-12"),s),from:j.role,children:a.jsxs(n,{children:[j.parts.map((e,s)=>{if("step-start"===e.type)return null;if("text"===e.type)return a.jsx("div",{children:a.jsx(u.H,{className:"chat-response-container",children:e.text})},`${j.id}-${s}`);if("tool-askForConfirmation"===e.type&&m){let t=e.toolCallId;switch(e.state){case"input-streaming":return a.jsx("div",{children:"Loading confirmation request..."},t);case"input-available":return a.jsxs("div",{children:[e.input.message,a.jsxs("div",{children:[a.jsx("button",{onClick:()=>m({tool:"askForConfirmation",toolCallId:t,output:"Yes, confirmed"}),children:"Yes"}),a.jsx("button",{onClick:()=>m({tool:"askForConfirmation",toolCallId:t,output:"No, denied"}),children:"No"})]})]},t);case"output-available":return a.jsxs("div",{children:["Tool call allowed: ",e.output]},t);case"output-error":return a.jsxs("div",{children:["Error: ",e.errorText]},t)}}if(e.type?.toLowerCase()==="tool-todo_write"||e.type?.toLowerCase()==="tool-todo_read"){let t=e.output;if(!t?.result)return null;let s=e.state;return a.jsx(L,{todos:t.result,showPriority:!0,state:s})}if((e.type.startsWith("tool-")||"dynamic-tool"===e.type)&&x&&p){let t=e.toolCallId;return a.jsx(x,{untypedToolPart:e,callId:t,addToContext:p},t)}return"file"===e.type&&e.mediaType?.startsWith("image/")?a.jsx($.default,{src:e.url,width:300,height:300,alt:"Generated image"},`${j.id}-${s}`):"source-url"===e.type?a.jsxs(b,{children:[a.jsx(C,{count:j.parts.filter(e=>"source-url"===e.type).length}),a.jsx(T,{children:j.parts.map((e,t)=>{if("source-url"===e.type)return a.jsx(F,{href:e.url,title:e.title},`${j.id}-${t}`)})},`${j.id}`)]},`${j.id}-${s}`):"reasoning"===e.type?a.jsxs(N,{className:"w-full",isStreaming:"streaming"===t,children:[a.jsx(y,{}),a.jsx(v,{children:e.text})]},`${j.id}-${s}`):null}),i&&"assistant"===j.role&&a.jsxs(d,{className:"mt-2",children:[o&&a.jsx(c,{onClick:()=>o(),label:"Retry",disabled:!h,children:a.jsx(k.Z,{className:"size-3"})}),a.jsx(c,{onClick:()=>{navigator.clipboard.writeText(j.parts.map(e=>e?.text||"").join("\n")),f({title:"Copied message",description:"The message was copied to your clipboard."})},label:"Copy",children:a.jsx(z.Z,{className:"size-3"})}),Z?.totalTokens&&a.jsxs("small",{className:"text-muted-foreground",children:[Intl.NumberFormat("en-US").format(Z?.totalTokens)," tokens"]})]})]})},j.id)})})}},24295:(e,t,s)=>{s.d(t,{Fw:()=>n,wy:()=>l,zF:()=>r});var a=s(35663);let r=a.fC,l=a.wy,n=a.Fw}};