@redocly/openapi-docs 3.24.0-next.8 → 3.24.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 (56) hide show
  1. package/dist/{redocly-openapi-docs.min.AiChatProvider-D8o94qvX.js → redocly-openapi-docs.min.AiChatProvider-CIrPFbvX.js} +3 -3
  2. package/dist/{redocly-openapi-docs.min.AiChatSqliteDBStorage-BLTom3F-.js → redocly-openapi-docs.min.AiChatSqliteDBStorage-eAy3scC4.js} +1 -1
  3. package/dist/{redocly-openapi-docs.min.AiPanel-DloIzPy9.js → redocly-openapi-docs.min.AiPanel-C6CGDyzy.js} +116 -116
  4. package/dist/redocly-openapi-docs.min.FileWatcher-dIKl80Ec.js +1 -0
  5. package/dist/redocly-openapi-docs.min.Observable-D6wKbFwB.js +1 -0
  6. package/dist/redocly-openapi-docs.min.SemanticSearchService-D4V6-td8.js +1 -0
  7. package/dist/{redocly-openapi-docs.min.SqliteDBStorage-CksbFVf-.js → redocly-openapi-docs.min.SqliteDBStorage-D9-Rb-N7.js} +1 -1
  8. package/dist/redocly-openapi-docs.min.TauriFileSystemAdapter-CHW6hO3z.js +1 -0
  9. package/dist/redocly-openapi-docs.min.TauriRootStorage-CHiKNUn2.js +1 -0
  10. package/dist/redocly-openapi-docs.min.ai-chat-mappers-C19k85fj.js +1 -0
  11. package/dist/redocly-openapi-docs.min.core-BYyFOtMX.js +1 -0
  12. package/dist/redocly-openapi-docs.min.external-resolver-BH7DBWU-.js +2 -0
  13. package/dist/redocly-openapi-docs.min.index-BQp5pipW.js +1 -0
  14. package/dist/redocly-openapi-docs.min.index-BuFUmOUm.js +7730 -0
  15. package/dist/redocly-openapi-docs.min.index-DLlCa16R.js +1 -0
  16. package/dist/redocly-openapi-docs.min.index-YnvLQkG_.js +1 -0
  17. package/dist/redocly-openapi-docs.min.index-dirYvuKs.js +1 -0
  18. package/dist/redocly-openapi-docs.min.index-xl_tBaHD.js +1 -0
  19. package/dist/redocly-openapi-docs.min.js +1 -1
  20. package/dist/redocly-openapi-docs.min.lint-Xu623Q1T.js +181 -0
  21. package/dist/{redocly-openapi-docs.min.lint-graphql-y6yM0_Y_.js → redocly-openapi-docs.min.lint-graphql-D-Nm5P1M.js} +1 -1
  22. package/dist/redocly-openapi-docs.min.periodic-revalidation-Dsp-n7ui.js +1 -0
  23. package/dist/redocly-openapi-docs.min.promise-map-limit-Db_42GvV.js +1 -0
  24. package/dist/{redocly-openapi-docs.min.respect-run-C77Wul9G.js → redocly-openapi-docs.min.respect-run-CWNqYysq.js} +23 -23
  25. package/dist/redocly-openapi-docs.min.standalone-CRo0Sa5b.js +11995 -0
  26. package/dist/redocly-openapi-docs.min.tauri-path-BUSVirPk.js +1 -0
  27. package/dist/{redocly-openapi-docs.min.useAiChatQueries-B9Y_hT0w.js → redocly-openapi-docs.min.useAiChatQueries-CXyQzME7.js} +80 -80
  28. package/lib/components/Callbacks/CallbackOperation.js +1 -1
  29. package/lib/components/Content/useAutoScroll.js +1 -1
  30. package/lib/components/ContentItem/useIsExpanded.js +1 -1
  31. package/lib/components/ContentItems/ContentItems.js +1 -1
  32. package/lib/components/ContentItems/VirtualList.js +1 -1
  33. package/lib/components/ContentItems/useScrollOnRender.js +1 -1
  34. package/lib/components/Responses/OperationResponseList.js +1 -1
  35. package/lib/components/Schema/Schema.js +1 -1
  36. package/lib/components/Schema/SubSchema.js +1 -1
  37. package/lib/components/Schema/useOneOfLocationIdx.js +1 -1
  38. package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
  39. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +1 -1
  40. package/lib/components/TagItem/OperationsNavigation.js +1 -1
  41. package/lib/components/TagItem/TagItem.js +1 -1
  42. package/lib/components/common/LinkToField.js +1 -1
  43. package/lib/components/common/linkify.js +1 -1
  44. package/lib/hooks/useRouter.js +1 -1
  45. package/lib/hooks/useUppercase2LowercaseRedirect.js +1 -1
  46. package/lib/utils/path.d.ts +1 -1
  47. package/package.json +12 -12
  48. package/dist/redocly-openapi-docs.min.ai-chat-mappers-Dza6UMVG.js +0 -1
  49. package/dist/redocly-openapi-docs.min.external-resolver-Cm8qMSH6.js +0 -2
  50. package/dist/redocly-openapi-docs.min.index-CVScN5cj.js +0 -7586
  51. package/dist/redocly-openapi-docs.min.index-DQKkHTdL.js +0 -1
  52. package/dist/redocly-openapi-docs.min.index-DWPYSZX6.js +0 -1
  53. package/dist/redocly-openapi-docs.min.index-qqKTpI_q.js +0 -1
  54. package/dist/redocly-openapi-docs.min.lint-B0W-5WwE.js +0 -181
  55. package/dist/redocly-openapi-docs.min.standalone-BFWv5fnd.js +0 -12112
  56. package/dist/redocly-openapi-docs.min.tauri-path-Dc9-nUUG.js +0 -1
@@ -1,4 +1,4 @@
1
- import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as pt,h as ft,m as me,n as ht,aD as xt,aE as gt,ah as R,ae as U,d as mt}from"./redocly-openapi-docs.min.standalone-BFWv5fnd.js";import{f as J,z as ve,B as vt,e as yt,q as ye,m as wt,n as jt,C as bt,E as Ct,F as se,G as le,H as kt,J as It,S as $,K as ce,L as Tt,M as _t,N as we,O as St,P as At,R as de,Q as Ot,U as ue,V as je,W as be,t as Ce,X as pe,Y as L,Z as Bt,_ as Vt,$ as zt,a0 as Ft,a1 as Mt}from"./redocly-openapi-docs.min.index-CVScN5cj.js";import{B as $t,C as Et,E as Rt,F as Lt,G as Nt,H as Dt,I as Pt,J as ke,K as C,L as Ie,M as Ut,N as Ht,O as H,P as Gt,Q as Kt,R as Wt,S as V,U as Zt,V as N}from"./redocly-openapi-docs.min.useAiChatQueries-B9Y_hT0w.js";function Q(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Yt=45e3,qt=e=>r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r.jsx("path",{d:"M12 7.5H4V8.5H12V7.5Z"})}),Jt=l(qt).attrs({"data-component-name":"icons/SubtractIcon/SubtractIcon"})`
1
+ import{g as q,a as l,j as r,h as ae,B as _,r as h,f as ct,z as dt,ad as ut,Z as pt,$ as ft,a0 as ye,x as ht,az as xt,aA as gt,ac as E,a8 as U,e as mt}from"./redocly-openapi-docs.min.standalone-CRo0Sa5b.js";import{f as J,M as we,N as vt,e as yt,q as je,m as wt,n as jt,O as bt,Q as Ct,U as se,V as le,W as kt,X as It,Y as F,Z as ce,_ as Tt,$ as _t,a0 as be,a1 as St,a2 as At,R as de,a3 as Ot,a4 as ue,a5 as Ce,t as ke,a6 as pe,a7 as L,a8 as Bt,a9 as Vt,aa as zt,ab as Mt,ac as $t}from"./redocly-openapi-docs.min.index-BuFUmOUm.js";import{B as Ft,C as Rt,E as Et,F as Lt,G as Nt,H as Dt,I as Pt,J as Ie,K as k,L as Te,M as Ut,N as Ht,O as H,P as Gt,Q as Kt,R as Wt,S as V,U as Zt,V as N}from"./redocly-openapi-docs.min.useAiChatQueries-CXyQzME7.js";import{g as _e}from"./redocly-openapi-docs.min.SemanticSearchService-D4V6-td8.js";function Q(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Yt=45e3,qt=e=>r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:r.jsx("path",{d:"M12 7.5H4V8.5H12V7.5Z"})}),Jt=l(qt).attrs({"data-component-name":"icons/SubtractIcon/SubtractIcon"})`
2
2
  path {
3
3
  fill: ${({color:e})=>q(e)};
4
4
  }
@@ -19,17 +19,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
19
19
 
20
20
  height: ${({size:e})=>e||"16px"};
21
21
  width: ${({size:e})=>e||"16px"};
22
- `,nn=e=>r.jsxs("svg",{viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r.jsxs("g",{clipPath:"url(#clip0_5333_7017)",children:[r.jsxs("mask",{id:"mask0_5333_7017",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:[r.jsx("path",{d:"M6.98858 0.876221C7.11667 0.876221 7.22837 0.96381 7.25964 1.08813C7.3552 1.46837 7.48112 1.84033 7.63618 2.20043C8.04154 3.14225 8.59778 3.96654 9.30396 4.67271C10.0105 5.37908 10.8346 5.93532 11.7763 6.34069C12.1364 6.4957 12.5085 6.62162 12.8887 6.71723C13.0131 6.7485 13.1005 6.86001 13.1005 6.9881C13.1005 7.11618 13.0131 7.22788 12.8885 7.25915C12.5083 7.35471 12.1363 7.48063 11.7763 7.63569C10.8344 8.04106 10.0103 8.5973 9.30396 9.30348C8.59778 10.01 8.04154 10.8341 7.63618 11.7758C7.48109 12.1359 7.35511 12.508 7.25945 12.8882C7.24431 12.9487 7.20945 13.0023 7.16038 13.0406C7.11132 13.079 7.05086 13.0999 6.98858 13.1C6.8605 13.1 6.74898 13.0126 6.71772 12.8881C6.62209 12.5078 6.49611 12.1359 6.34099 11.7758C5.93581 10.8339 5.37976 10.0098 4.6732 9.30348C3.96684 8.5973 3.14274 8.04106 2.20091 7.63569C1.8408 7.48062 1.46885 7.35464 1.08862 7.25896C1.02821 7.24387 0.974561 7.20905 0.936177 7.16002C0.897792 7.11099 0.876864 7.05055 0.876709 6.98828C0.876709 6.8602 0.964299 6.74868 1.08862 6.71742C1.46887 6.6218 1.84082 6.49582 2.20091 6.34069C3.14274 5.93551 3.96702 5.37927 4.6732 4.6729C5.37957 3.96672 5.93581 3.14244 6.34117 2.20061C6.49619 1.8405 6.62211 1.46854 6.71772 1.08832C6.73278 1.02784 6.76762 0.97413 6.81669 0.935705C6.86576 0.89728 6.92626 0.876345 6.98858 0.876221Z",fill:"black"}),r.jsx("path",{d:"M6.98858 0.876221C7.11667 0.876221 7.22837 0.96381 7.25964 1.08813C7.3552 1.46837 7.48112 1.84033 7.63618 2.20043C8.04154 3.14225 8.59778 3.96654 9.30396 4.67271C10.0105 5.37908 10.8346 5.93532 11.7763 6.34069C12.1364 6.4957 12.5085 6.62162 12.8887 6.71723C13.0131 6.7485 13.1005 6.86001 13.1005 6.9881C13.1005 7.11618 13.0131 7.22788 12.8885 7.25915C12.5083 7.35471 12.1363 7.48063 11.7763 7.63569C10.8344 8.04106 10.0103 8.5973 9.30396 9.30348C8.59778 10.01 8.04154 10.8341 7.63618 11.7758C7.48109 12.1359 7.35511 12.508 7.25945 12.8882C7.24431 12.9487 7.20945 13.0023 7.16038 13.0406C7.11132 13.079 7.05086 13.0999 6.98858 13.1C6.8605 13.1 6.74898 13.0126 6.71772 12.8881C6.62209 12.5078 6.49611 12.1359 6.34099 11.7758C5.93581 10.8339 5.37976 10.0098 4.6732 9.30348C3.96684 8.5973 3.14274 8.04106 2.20091 7.63569C1.8408 7.48062 1.46885 7.35464 1.08862 7.25896C1.02821 7.24387 0.974561 7.20905 0.936177 7.16002C0.897792 7.11099 0.876864 7.05055 0.876709 6.98828C0.876709 6.8602 0.964299 6.74868 1.08862 6.71742C1.46887 6.6218 1.84082 6.49582 2.20091 6.34069C3.14274 5.93551 3.96702 5.37927 4.6732 4.6729C5.37957 3.96672 5.93581 3.14244 6.34117 2.20061C6.49619 1.8405 6.62211 1.46854 6.71772 1.08832C6.73278 1.02784 6.76762 0.97413 6.81669 0.935705C6.86576 0.89728 6.92626 0.876345 6.98858 0.876221Z",fill:"url(#paint0_linear_5333_7017)"})]}),r.jsxs("g",{mask:"url(#mask0_5333_7017)",children:[r.jsx("g",{filter:"url(#filter0_f_5333_7017)",children:r.jsx("path",{d:"M-0.227015 10.4326C1.18534 10.9342 2.80867 9.99369 3.39882 8.33193C3.98897 6.67037 3.32234 4.91669 1.90998 4.41507C0.497625 3.91346 -1.1257 4.85396 -1.71604 6.51553C-2.306 8.17729 -1.63937 9.93096 -0.227015 10.4326Z",fill:"#FFE432"})}),r.jsx("g",{filter:"url(#filter1_f_5333_7017)",children:r.jsx("path",{d:"M6.04409 4.95442C7.98425 4.95442 9.55728 3.34672 9.55728 1.3638C9.55728 -0.619301 7.98443 -2.22681 6.04409 -2.22681C4.10374 -2.22681 2.53052 -0.619113 2.53052 1.3638C2.53052 3.34672 4.10355 4.95442 6.04409 4.95442Z",fill:"#FC413D"})}),r.jsx("g",{filter:"url(#filter2_f_5333_7017)",children:r.jsx("path",{d:"M4.67843 16.4367C6.70392 16.3378 8.24192 14.1304 8.11364 11.5065C7.98556 8.88254 6.23941 6.83558 4.21393 6.93466C2.18844 7.03374 0.650439 9.241 0.778715 11.8649C0.906992 14.4888 2.65295 16.5358 4.67843 16.4367Z",fill:"#00B95C"})}),r.jsx("g",{filter:"url(#filter3_f_5333_7017)",children:r.jsx("path",{d:"M4.67843 16.4367C6.70392 16.3378 8.24192 14.1304 8.11364 11.5065C7.98556 8.88254 6.23941 6.83558 4.21393 6.93466C2.18844 7.03374 0.650439 9.241 0.778715 11.8649C0.906992 14.4888 2.65295 16.5358 4.67843 16.4367Z",fill:"#00B95C"})}),r.jsx("g",{filter:"url(#filter4_f_5333_7017)",children:r.jsx("path",{d:"M6.70714 14.8494C8.40506 13.8162 8.85958 11.4634 7.72223 9.59402C6.58489 7.7245 4.28627 7.04658 2.58816 8.07957C0.890051 9.11294 0.435527 11.4658 1.57287 13.3353C2.7106 15.2047 5.00903 15.8826 6.70714 14.8494Z",fill:"#00B95C"})}),r.jsx("g",{filter:"url(#filter5_f_5333_7017)",children:r.jsx("path",{d:"M13.5707 8.97502C15.4792 8.97502 17.0265 7.48505 17.0265 5.64736C17.0265 3.80949 15.4792 2.31952 13.5707 2.31952C11.6622 2.31952 10.115 3.80949 10.115 5.64736C10.115 7.48524 11.6622 8.97502 13.5707 8.97502Z",fill:"#3186FF"})}),r.jsx("g",{filter:"url(#filter6_f_5333_7017)",children:r.jsx("path",{d:"M-1.5844 8.58873C0.17304 9.92499 2.74027 9.50587 4.1498 7.65218C5.55933 5.79867 5.27754 3.2126 3.5201 1.87634C1.76265 0.539895 -0.804385 0.959007 -2.21411 2.81271C-3.62364 4.66622 -3.34166 7.25247 -1.5844 8.58873Z",fill:"#FBBC04"})}),r.jsx("g",{filter:"url(#filter7_f_5333_7017)",children:r.jsx("path",{d:"M7.42033 10.5639C9.51777 12.006 12.2982 11.6044 13.6303 9.66653C14.9626 7.72883 14.3422 4.98906 12.2445 3.54694C10.1469 2.10444 7.36664 2.50641 6.03434 4.44393C4.70222 6.38183 5.32251 9.12159 7.42014 10.5639H7.42033Z",fill:"#3186FF"})}),r.jsx("g",{filter:"url(#filter8_f_5333_7017)",children:r.jsx("path",{d:"M11.2336 0.436156C11.7673 1.16174 11.0814 2.57221 9.70202 3.58694C8.32243 4.60166 6.77163 4.83598 6.23799 4.11059C5.70435 3.38482 6.39 1.97416 7.76939 0.959622C9.14898 -0.0550994 10.7 -0.289425 11.2334 0.435968L11.2336 0.436156Z",fill:"#749BFF"})}),r.jsx("g",{filter:"url(#filter9_f_5333_7017)",children:r.jsx("path",{d:"M6.85291 3.9097C8.98633 1.93074 9.7185 -0.748558 8.48848 -2.07465C7.25846 -3.40074 4.53169 -2.87181 2.39827 -0.892846C0.264845 1.08612 -0.467518 3.76542 0.762693 5.09151C1.99272 6.41759 4.71949 5.88867 6.85291 3.9097Z",fill:"#FC413D"})}),r.jsx("g",{filter:"url(#filter10_f_5333_7017)",children:r.jsx("path",{d:"M2.47959 11.0173C3.74766 11.9248 5.20334 12.0627 5.73114 11.3254C6.25894 10.588 5.65881 9.25455 4.39074 8.34701C3.12285 7.43947 1.66698 7.30159 1.13937 8.03885C0.611574 8.77629 1.21152 10.1097 2.47959 11.0173Z",fill:"#FFEE48"})})]})]}),r.jsxs("defs",{children:[r.jsxs("filter",{id:"filter0_f_5333_7017",x:"-2.85766",y:"3.3534",width:"7.39819",height:"8.14086",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"0.463378",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter1_f_5333_7017",x:"-1.94918",y:"-6.7065",width:"15.9862",height:"16.1406",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"2.23985",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter2_f_5333_7017",x:"-3.03712",y:"3.12285",width:"14.9666",height:"17.1257",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.90418",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter3_f_5333_7017",x:"-3.03712",y:"3.12285",width:"14.9666",height:"17.1257",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.90418",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter4_f_5333_7017",x:"-2.86183",y:"3.78807",width:"15.0188",height:"15.3529",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.90418",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter5_f_5333_7017",x:"6.49612",y:"-1.29935",width:"14.1491",height:"13.8932",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.80943",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter6_f_5333_7017",x:"-6.39114",y:"-2.1852",width:"14.7181",height:"14.8353",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.6399",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter7_f_5333_7017",x:"2.40345",y:"-0.247677",width:"14.8579",height:"14.606",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.46454",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter8_f_5333_7017",x:"3.43598",y:"-2.60638",width:"10.5997",height:"9.75933",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.31045",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter9_f_5333_7017",x:"-2.04789",y:"-5.01896",width:"13.3468",height:"13.0548",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.10683",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter10_f_5333_7017",x:"-1.7922",y:"4.82486",width:"10.455",height:"9.71453",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.36998",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("linearGradient",{id:"paint0_linear_5333_7017",x1:"4.35148",y1:"9.05502",x2:"10.7005",y2:"3.70245",gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:"#4893FC"}),r.jsx("stop",{offset:"0.27",stopColor:"#4893FC"}),r.jsx("stop",{offset:"0.777",stopColor:"#969DFF"}),r.jsx("stop",{offset:"1",stopColor:"#BD99FE"})]}),r.jsx("clipPath",{id:"clip0_5333_7017",children:r.jsx("rect",{width:"14",height:"14",fill:"white"})})]})]}),rn=l(nn).attrs({"data-component-name":"icons/GeminiIcon/GeminiIcon"})`
23
- height: ${({size:e})=>e||"16px"};
24
- width: ${({size:e})=>e||"16px"};
25
- `;function on(e){return r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r.jsx("path",{fill:"currentColor",d:"M11.375 11.375H2.625V2.625H7V1.75H2.625C2.39301 1.75023 2.17058 1.84249 2.00654 2.00654C1.84249 2.17058 1.75023 2.39301 1.75 2.625V11.375C1.75023 11.607 1.84249 11.8294 2.00654 11.9935C2.17058 12.1575 2.39301 12.2498 2.625 12.25H11.375C11.607 12.2498 11.8294 12.1575 11.9935 11.9935C12.1575 11.8294 12.2498 11.607 12.25 11.375V7H11.375V11.375Z"}),r.jsx("path",{fill:"currentColor",d:"M11.375 2.625V0.875H10.5V2.625H8.75V3.5H10.5V5.25H11.375V3.5H13.125V2.625H11.375Z"})]})}const an=l(on).attrs({"data-component-name":"icons/NewChatIcon/NewChatIcon"})`
26
- path {
27
- fill: ${({color:e})=>q(e)};
28
- }
29
-
30
- height: ${({size:e="14px"})=>e};
31
- width: ${({size:e="14px"})=>e};
32
- `;function sn({placeholder:e="Ask anything...",className:t,disabled:n,isStreaming:i=!1,onStop:o,modelSelector:a,value:s,onValueChange:c,onSubmit:d,textareaRef:u}){const f=s.trim(),p=!n&&f.length>0&&!i,x=!n&&f.length>0,g=w=>{c(w.target.value)},v=()=>{!f||n||i||d()},j=()=>{!i||!o||o()},y=w=>{w.key==="Enter"&&!w.shiftKey&&!w.nativeEvent.isComposing&&(w.preventDefault(),i&&o?j():v())};return r.jsxs(ln,{className:t,$isActive:x,children:[r.jsx(cn,{ref:u,rows:1,maxLength:Yt,placeholder:e,value:s,disabled:n,spellCheck:!1,onChange:g,onKeyDown:y}),r.jsxs(dn,{children:[a,i&&o?r.jsx(pn,{type:"button",size:"small","aria-label":"Stop generating",icon:r.jsx(tn,{color:"var(--icon-color-on-color)"}),onClick:j}):r.jsx(un,{type:"button",size:"small","aria-label":"Send message",icon:r.jsx(Xt,{color:"var(--icon-color-on-color)"}),onClick:v,disabled:!p})]})]})}const ln=l.div`
22
+ `;function nn({placeholder:e="Ask anything...",className:t,disabled:n,isStreaming:o=!1,onStop:i,modelSelector:a,value:s,onValueChange:c,onSubmit:d,textareaRef:u}){const f=s.trim(),p=!n&&f.length>0&&!o,x=!n&&f.length>0,g=w=>{c(w.target.value)},v=()=>{!f||n||o||d()},b=()=>{!o||!i||i()},y=w=>{w.key==="Enter"&&!w.shiftKey&&!w.nativeEvent.isComposing&&(w.preventDefault(),o&&i?b():v())};return r.jsxs(rn,{className:t,$isActive:x,children:[r.jsx(on,{ref:u,rows:1,maxLength:Yt,placeholder:e,value:s,disabled:n,spellCheck:!1,onChange:g,onKeyDown:y}),r.jsxs(an,{children:[a,o&&i?r.jsx(ln,{type:"button",size:"small","aria-label":"Stop generating",icon:r.jsx(tn,{color:"var(--icon-color-on-color)"}),onClick:b}):r.jsx(sn,{type:"button",size:"small","aria-label":"Send message",icon:r.jsx(Xt,{color:"var(--icon-color-on-color)"}),onClick:v,disabled:!p})]})]})}const rn=l.div`
33
23
  display: flex;
34
24
  flex-direction: column;
35
25
  gap: var(--spacing-xs);
@@ -54,7 +44,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
54
44
  linear-gradient(var(--layer-color), var(--layer-color)) padding-box,
55
45
  var(--replay-ai-gradient-soft) border-box;
56
46
  `}
57
- `,cn=l.textarea`
47
+ `,on=l.textarea`
58
48
  max-height: 150px;
59
49
  min-height: var(--search-ai-conversation-input-min-height);
60
50
 
@@ -74,12 +64,12 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
74
64
  color: var(--text-color-helper);
75
65
  text-indent: 2px;
76
66
  }
77
- `,dn=l.div`
67
+ `,an=l.div`
78
68
  display: flex;
79
69
  justify-content: space-between;
80
70
  align-items: center;
81
71
  gap: var(--spacing-xs);
82
- `,un=l(_)`
72
+ `,sn=l(_)`
83
73
  box-sizing: border-box;
84
74
  background: var(--search-ai-gradient);
85
75
 
@@ -89,17 +79,17 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
89
79
  width: 24px;
90
80
  height: 24px;
91
81
  }
92
- `,pn=l(_)`
82
+ `,ln=l(_)`
93
83
  box-sizing: border-box;
94
84
  background: var(--color-warm-grey-9);
95
85
  border-radius: var(--border-radius-xxl);
96
- `,fn=new Set(["collection","workflow","step","operation","workflow-run"]);function Te(e){return`replay://step?${new URLSearchParams({collectionId:e.collectionId.trim(),workflowId:e.workflowId.trim(),stepId:e.stepId.trim()}).toString()}`}function z(e,t){const n=e.get(t);if(n==null)return null;const i=n.trim();return i.length>0?i:null}function hn(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="replay:")return null;const n=t.hostname.toLowerCase();if(!fn.has(n))return null;const i=t.searchParams;switch(n){case"collection":{const o=z(i,"collectionId");return o?{kind:"collection",collectionId:o}:null}case"workflow":{const o=z(i,"collectionId"),a=z(i,"workflowId");return!o||!a?null:{kind:"workflow",collectionId:o,workflowId:a}}case"step":{const o=z(i,"collectionId"),a=z(i,"workflowId"),s=z(i,"stepId");return!o||!a||!s?null:{kind:"step",collectionId:o,workflowId:a,stepId:s}}case"operation":{const o=z(i,"operationId");return o?{kind:"operation",operationId:o}:null}case"workflow-run":{const o=z(i,"collectionId"),a=z(i,"workflowId");if(!o||!a)return null;const s=z(i,"historyId"),c=s==="null"||s==="undefined"?null:s;return{kind:"workflow-run",collectionId:o,workflowId:a,...c?{historyId:c}:{}}}default:return null}}function xn(e,t,n){return e.tabsState.tabs.get({noproxy:!0}).findIndex(({data:i})=>vt(i,yt.WorkflowRun)&&i.collectionId===t&&i.workflowId===n)}function gn(e,t,n,i={}){switch(n.kind){case"collection":t.openCollectionTab({collectionId:n.collectionId,activeTabName:ve.COLLECTION_SETTINGS});break;case"workflow":t.openWorkflowTab({collectionId:n.collectionId,workflowId:n.workflowId,activeTabName:ve.WORKFLOW_SETTINGS});break;case"step":t.openStepTabFromCollection({collectionId:n.collectionId,workflowId:n.workflowId,stepId:n.stepId,state:J.Normal});break;case"workflow-run":{const o=i.workflowRunHistoryIds?.[Lt(n.collectionId,n.workflowId)]??[],a=n.historyId&&o.includes(n.historyId)?n.historyId:o.at(-1)??n.historyId;if(a){t.openWorkflowRunTabFromHistory(a,{state:J.Normal});break}const s=xn(e,n.collectionId,n.workflowId);if(s!==-1){e.tabsState.tabs.get({noproxy:!0})[s].state===J.Preview&&t.changeTabState(s,J.Normal),t.handleTabChange(s);break}t.openWorkflowRunTab({collectionId:n.collectionId,workflowId:n.workflowId});break}case"operation":{const o=$t(e,n.operationId);if(!o.ok){console.warn("[executeReplayChatLink] Operation not resolved",{operationId:n.operationId,message:o.message});return}Et(e,Rt(o.value),t);break}}}function mn(e,t,n,i={}){const o=hn(n);o&&gn(e,t,o,i)}function _e({workflowRunHistoryIds:e}={}){const t=ye(),{getApiOperation:n}=wt(),{handleTabChange:i,addNewTab:o,openCollectionTab:a,openWorkflowTab:s,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,changeTabState:f}=jt();return h.useCallback(p=>{const x=p.target;if(!(x instanceof Element))return;const g=x.closest("a[href]");if(!(g instanceof HTMLAnchorElement))return;const v=g.getAttribute("href");v?.startsWith("replay:")&&(p.preventDefault(),p.stopPropagation(),mn(t,{getApiOperation:n,handleTabChange:i,addNewTab:o,openCollectionTab:a,openWorkflowTab:s,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,changeTabState:f},v,{workflowRunHistoryIds:e}))},[e,t,n,i,o,a,s,c,d,u,f])}class vn{diff(t,n,i={}){let o;typeof i=="function"?(o=i,i={}):"callback"in i&&(o=i.callback);const a=this.castInput(t,i),s=this.castInput(n,i),c=this.removeEmpty(this.tokenize(a,i)),d=this.removeEmpty(this.tokenize(s,i));return this.diffWithOptionsObj(c,d,i,o)}diffWithOptionsObj(t,n,i,o){var a;const s=m=>{if(m=this.postProcess(m,i),o){setTimeout(function(){o(m)},0);return}else return m},c=n.length,d=t.length;let u=1,f=c+d;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));const p=(a=i.timeout)!==null&&a!==void 0?a:1/0,x=Date.now()+p,g=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(g[0],n,t,0,i);if(g[0].oldPos+1>=d&&v+1>=c)return s(this.buildValues(g[0].lastComponent,n,t));let j=-1/0,y=1/0;const w=()=>{for(let m=Math.max(j,-u);m<=Math.min(y,u);m+=2){let T;const O=g[m-1],S=g[m+1];O&&(g[m-1]=void 0);let M=!1;if(S){const Y=S.oldPos-m;M=S&&0<=Y&&Y<c}const Z=O&&O.oldPos+1<d;if(!M&&!Z){g[m]=void 0;continue}if(!Z||M&&O.oldPos<S.oldPos?T=this.addToPath(S,!0,!1,0,i):T=this.addToPath(O,!1,!0,1,i),v=this.extractCommon(T,n,t,m,i),T.oldPos+1>=d&&v+1>=c)return s(this.buildValues(T.lastComponent,n,t))||!0;g[m]=T,T.oldPos+1>=d&&(y=Math.min(y,m-1)),v+1>=c&&(j=Math.max(j,m+1))}u++};if(o)(function m(){setTimeout(function(){if(u>f||Date.now()>x)return o(void 0);w()||m()},0)})();else for(;u<=f&&Date.now()<=x;){const m=w();if(m)return m}}addToPath(t,n,i,o,a){const s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===n&&s.removed===i?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:n,removed:i,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:i,previousComponent:s}}}extractCommon(t,n,i,o,a){const s=n.length,c=i.length;let d=t.oldPos,u=d-o,f=0;for(;u+1<s&&d+1<c&&this.equals(i[d+1],n[u+1],a);)u++,d++,f++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return f&&!a.oneChangePerToken&&(t.lastComponent={count:f,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,u}equals(t,n,i){return i.comparator?i.comparator(t,n):t===n||!!i.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,i){const o=[];let a;for(;t;)o.push(t),a=t.previousComponent,delete t.previousComponent,t=a;o.reverse();const s=o.length;let c=0,d=0,u=0;for(;c<s;c++){const f=o[c];if(f.removed)f.value=this.join(i.slice(u,u+f.count)),u+=f.count;else{if(!f.added&&this.useLongestToken){let p=n.slice(d,d+f.count);p=p.map(function(x,g){const v=i[u+g];return v.length>x.length?v:x}),f.value=this.join(p)}else f.value=this.join(n.slice(d,d+f.count));d+=f.count,f.added||(u+=f.count)}}return o}}class yn extends vn{constructor(){super(...arguments),this.tokenize=bn}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
97
- `))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
98
- `))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
86
+ `,cn=new Set(["collection","workflow","step","operation","workflow-run"]);function fe(e){return`replay://step?${new URLSearchParams({collectionId:e.collectionId.trim(),workflowId:e.workflowId.trim(),stepId:e.stepId.trim()}).toString()}`}function z(e,t){const n=e.get(t);if(n==null)return null;const o=n.trim();return o.length>0?o:null}function dn(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="replay:")return null;const n=t.hostname.toLowerCase();if(!cn.has(n))return null;const o=t.searchParams;switch(n){case"collection":{const i=z(o,"collectionId");return i?{kind:"collection",collectionId:i}:null}case"workflow":{const i=z(o,"collectionId"),a=z(o,"workflowId");return!i||!a?null:{kind:"workflow",collectionId:i,workflowId:a}}case"step":{const i=z(o,"collectionId"),a=z(o,"workflowId"),s=z(o,"stepId");return!i||!a||!s?null:{kind:"step",collectionId:i,workflowId:a,stepId:s}}case"operation":{const i=z(o,"operationId");return i?{kind:"operation",operationId:i}:null}case"workflow-run":{const i=z(o,"collectionId"),a=z(o,"workflowId");if(!i||!a)return null;const s=z(o,"historyId"),c=s==="null"||s==="undefined"?null:s;return{kind:"workflow-run",collectionId:i,workflowId:a,...c?{historyId:c}:{}}}default:return null}}function un(e,t,n){return e.tabsState.tabs.get({noproxy:!0}).findIndex(({data:o})=>vt(o,yt.WorkflowRun)&&o.collectionId===t&&o.workflowId===n)}function pn(e,t,n,o={}){switch(n.kind){case"collection":t.openCollectionTab({collectionId:n.collectionId,activeTabName:we.COLLECTION_SETTINGS});break;case"workflow":t.openWorkflowTab({collectionId:n.collectionId,workflowId:n.workflowId,activeTabName:we.WORKFLOW_SETTINGS});break;case"step":t.openStepTabFromCollection({collectionId:n.collectionId,workflowId:n.workflowId,stepId:n.stepId,state:J.Normal});break;case"workflow-run":{const i=o.workflowRunHistoryIds?.[Lt(n.collectionId,n.workflowId)]??[],a=n.historyId&&i.includes(n.historyId)?n.historyId:i.at(-1)??n.historyId;if(a){t.openWorkflowRunTabFromHistory(a,{state:J.Normal});break}const s=un(e,n.collectionId,n.workflowId);if(s!==-1){e.tabsState.tabs.get({noproxy:!0})[s].state===J.Preview&&t.changeTabState(s,J.Normal),t.handleTabChange(s);break}t.openWorkflowRunTab({collectionId:n.collectionId,workflowId:n.workflowId});break}case"operation":{const i=Ft(e,n.operationId);if(!i.ok){console.warn("[executeReplayChatLink] Operation not resolved",{operationId:n.operationId,message:i.message});return}Rt(e,Et(i.value),t);break}}}function fn(e,t,n,o={}){const i=dn(n);i&&pn(e,t,i,o)}function Se({workflowRunHistoryIds:e}={}){const t=je(),{getApiOperation:n}=wt(),{handleTabChange:o,addNewTab:i,openCollectionTab:a,openWorkflowTab:s,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,changeTabState:f}=jt();return h.useCallback(p=>{const x=p.target;if(!(x instanceof Element))return;const g=x.closest("a[href]");if(!(g instanceof HTMLAnchorElement))return;const v=g.getAttribute("href");v?.startsWith("replay:")&&(p.preventDefault(),p.stopPropagation(),fn(t,{getApiOperation:n,handleTabChange:o,addNewTab:i,openCollectionTab:a,openWorkflowTab:s,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,changeTabState:f},v,{workflowRunHistoryIds:e}))},[e,t,n,o,i,a,s,c,d,u,f])}class hn{diff(t,n,o={}){let i;typeof o=="function"?(i=o,o={}):"callback"in o&&(i=o.callback);const a=this.castInput(t,o),s=this.castInput(n,o),c=this.removeEmpty(this.tokenize(a,o)),d=this.removeEmpty(this.tokenize(s,o));return this.diffWithOptionsObj(c,d,o,i)}diffWithOptionsObj(t,n,o,i){var a;const s=m=>{if(m=this.postProcess(m,o),i){setTimeout(function(){i(m)},0);return}else return m},c=n.length,d=t.length;let u=1,f=c+d;o.maxEditLength!=null&&(f=Math.min(f,o.maxEditLength));const p=(a=o.timeout)!==null&&a!==void 0?a:1/0,x=Date.now()+p,g=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(g[0],n,t,0,o);if(g[0].oldPos+1>=d&&v+1>=c)return s(this.buildValues(g[0].lastComponent,n,t));let b=-1/0,y=1/0;const w=()=>{for(let m=Math.max(b,-u);m<=Math.min(y,u);m+=2){let T;const O=g[m-1],S=g[m+1];O&&(g[m-1]=void 0);let $=!1;if(S){const Y=S.oldPos-m;$=S&&0<=Y&&Y<c}const Z=O&&O.oldPos+1<d;if(!$&&!Z){g[m]=void 0;continue}if(!Z||$&&O.oldPos<S.oldPos?T=this.addToPath(S,!0,!1,0,o):T=this.addToPath(O,!1,!0,1,o),v=this.extractCommon(T,n,t,m,o),T.oldPos+1>=d&&v+1>=c)return s(this.buildValues(T.lastComponent,n,t))||!0;g[m]=T,T.oldPos+1>=d&&(y=Math.min(y,m-1)),v+1>=c&&(b=Math.max(b,m+1))}u++};if(i)(function m(){setTimeout(function(){if(u>f||Date.now()>x)return i(void 0);w()||m()},0)})();else for(;u<=f&&Date.now()<=x;){const m=w();if(m)return m}}addToPath(t,n,o,i,a){const s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===n&&s.removed===o?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:n,removed:o,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:o,previousComponent:s}}}extractCommon(t,n,o,i,a){const s=n.length,c=o.length;let d=t.oldPos,u=d-i,f=0;for(;u+1<s&&d+1<c&&this.equals(o[d+1],n[u+1],a);)u++,d++,f++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return f&&!a.oneChangePerToken&&(t.lastComponent={count:f,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=d,u}equals(t,n,o){return o.comparator?o.comparator(t,n):t===n||!!o.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let o=0;o<t.length;o++)t[o]&&n.push(t[o]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,o){const i=[];let a;for(;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();const s=i.length;let c=0,d=0,u=0;for(;c<s;c++){const f=i[c];if(f.removed)f.value=this.join(o.slice(u,u+f.count)),u+=f.count;else{if(!f.added&&this.useLongestToken){let p=n.slice(d,d+f.count);p=p.map(function(x,g){const v=o[u+g];return v.length>x.length?v:x}),f.value=this.join(p)}else f.value=this.join(n.slice(d,d+f.count));d+=f.count,f.added||(u+=f.count)}}return i}}class xn extends hn{constructor(){super(...arguments),this.tokenize=vn}equals(t,n,o){return o.ignoreWhitespace?((!o.newlineIsToken||!t.includes(`
87
+ `))&&(t=t.trim()),(!o.newlineIsToken||!n.includes(`
88
+ `))&&(n=n.trim())):o.ignoreNewlineAtEof&&!o.newlineIsToken&&(t.endsWith(`
99
89
  `)&&(t=t.slice(0,-1)),n.endsWith(`
100
- `)&&(n=n.slice(0,-1))),super.equals(t,n,i)}}const wn=new yn;function jn(e,t,n){return wn.diff(e,t,n)}function bn(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
101
- `));const n=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let o=0;o<i.length;o++){const a=i[o];o%2&&!t.newlineIsToken?n[n.length-1]+=a:n.push(a)}return n}const Cn=500;function kn(e,t){const n=In(e,t);if(n.length===0)return[];const i=[];let o=0;for(;o<n.length;){let a=o;const s=n[o].type==="context";for(;a<n.length&&n[a].type==="context"===s;)a++;const c=n.slice(o,a);i.push({start:o,end:a,rows:c,hasAdditions:c.some(d=>d.type==="add"),hasRemovals:c.some(d=>d.type==="remove")}),o=a}return i}function In(e,t){if(e===void 0)return t===void 0?[]:D(t,"add");if(t===void 0)return D(e,"remove");if(e===t)return D(t,"context");const n=Tn(e,t);return n?n.flatMap(i=>D(i.value,i.added?"add":i.removed?"remove":"context")):[...D(e,"remove"),...D(t,"add")]}function Tn(e,t){try{return jn(e,t,{timeout:Cn})}catch{return}}function D(e,t){const n=e.split(`
102
- `);return n.length>1&&n[n.length-1]===""&&n.pop(),n.map(i=>({type:t,text:i}))}const Se=1,Ae=e=>e&&e.hasAdditions!==e.hasRemovals,Oe=e=>e&&(e.hasAdditions||e.hasRemovals);function _n(e,t,n){if(e.hasAdditions||e.hasRemovals)return X(e.rows);const i=n[t-1],o=n[t+1],a=Ae(i)?Se:0,s=Ae(o)?Se:0;if(a+s>=e.rows.length)return X(e.rows);const c=e.rows.slice(0,a),d=s>0?e.rows.slice(-s):[],u=[];return u.push(...X(c)),Oe(i)&&Oe(o)&&u.push({kind:"separator"}),u.push(...X(d)),u}function X(e){return e.map(t=>({kind:"row",row:t}))}const Sn=200;function Be({oldValue:e,newValue:t}){const n=h.useMemo(()=>kn(e,t),[e,t]),i=h.useMemo(()=>n.flatMap(_n),[n]);return h.useMemo(()=>n.some(o=>o.hasAdditions||o.hasRemovals),[n])?r.jsx(On,{$maxHeight:Sn,children:i.map((o,a)=>{if(o.kind==="separator")return r.jsx(Mn,{children:r.jsx(Ve,{children:"\xB7\xB7\xB7"})},a);const{row:s}=o,c=An(s.type);return r.jsxs(c,{children:[r.jsxs(Fn,{children:[s.type==="remove"&&r.jsx(Jt,{size:"12px"}),s.type==="add"&&r.jsx(bt,{size:"12px"})]}),r.jsx(Ve,{children:s.text===""?" ":s.text})]},a)})}):null}function An(e){return e==="remove"?Bn:e==="add"?Vn:zn}const On=l.div`
90
+ `)&&(n=n.slice(0,-1))),super.equals(t,n,o)}}const gn=new xn;function mn(e,t,n){return gn.diff(e,t,n)}function vn(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
91
+ `));const n=[],o=e.split(/(\n|\r\n)/);o[o.length-1]||o.pop();for(let i=0;i<o.length;i++){const a=o[i];i%2&&!t.newlineIsToken?n[n.length-1]+=a:n.push(a)}return n}const yn=500;function wn(e,t){const n=jn(e,t);if(n.length===0)return[];const o=[];let i=0;for(;i<n.length;){let a=i;const s=n[i].type==="context";for(;a<n.length&&n[a].type==="context"===s;)a++;const c=n.slice(i,a);o.push({start:i,end:a,rows:c,hasAdditions:c.some(d=>d.type==="add"),hasRemovals:c.some(d=>d.type==="remove")}),i=a}return o}function jn(e,t){if(e===void 0)return t===void 0?[]:D(t,"add");if(t===void 0)return D(e,"remove");if(e===t)return D(t,"context");const n=bn(e,t);return n?n.flatMap(o=>D(o.value,o.added?"add":o.removed?"remove":"context")):[...D(e,"remove"),...D(t,"add")]}function bn(e,t){try{return mn(e,t,{timeout:yn})}catch{return}}function D(e,t){const n=e.split(`
92
+ `);return n.length>1&&n[n.length-1]===""&&n.pop(),n.map(o=>({type:t,text:o}))}const Ae=1,Oe=e=>e&&e.hasAdditions!==e.hasRemovals,Be=e=>e&&(e.hasAdditions||e.hasRemovals);function Cn(e,t,n){if(e.hasAdditions||e.hasRemovals)return X(e.rows);const o=n[t-1],i=n[t+1],a=Oe(o)?Ae:0,s=Oe(i)?Ae:0;if(a+s>=e.rows.length)return X(e.rows);const c=e.rows.slice(0,a),d=s>0?e.rows.slice(-s):[],u=[];return u.push(...X(c)),Be(o)&&Be(i)&&u.push({kind:"separator"}),u.push(...X(d)),u}function X(e){return e.map(t=>({kind:"row",row:t}))}const kn=200;function Ve({oldValue:e,newValue:t}){const n=h.useMemo(()=>wn(e,t),[e,t]),o=h.useMemo(()=>n.flatMap(Cn),[n]);return h.useMemo(()=>n.some(i=>i.hasAdditions||i.hasRemovals),[n])?r.jsx(Tn,{$maxHeight:kn,children:o.map((i,a)=>{if(i.kind==="separator")return r.jsx(Bn,{children:r.jsx(ze,{children:"\xB7\xB7\xB7"})},a);const{row:s}=i,c=In(s.type);return r.jsxs(c,{children:[r.jsxs(On,{children:[s.type==="remove"&&r.jsx(Jt,{size:"12px"}),s.type==="add"&&r.jsx(bt,{size:"12px"})]}),r.jsx(ze,{children:s.text===""?" ":s.text})]},a)})}):null}function In(e){return e==="remove"?_n:e==="add"?Sn:An}const Tn=l.div`
103
93
  display: flex;
104
94
  flex-direction: column;
105
95
  width: 100%;
@@ -116,23 +106,23 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
116
106
  line-height: var(--line-height-sm);
117
107
  font-weight: var(--font-weight-regular);
118
108
  padding-right: var(--spacing-xxs);
119
- `,Bn=l(ee)`
109
+ `,_n=l(ee)`
120
110
  background: var(--admonition-danger-bg-color);
121
111
  color: var(--color-raspberry-7);
122
- `,Vn=l(ee)`
112
+ `,Sn=l(ee)`
123
113
  background: var(--admonition-success-bg-color);
124
114
  color: var(--color-green-7);
125
- `,zn=l(ee)`
115
+ `,An=l(ee)`
126
116
  background: transparent;
127
117
  color: var(--text-color-secondary);
128
- `,Fn=l.span`
118
+ `,On=l.span`
129
119
  display: flex;
130
120
  align-items: center;
131
121
  justify-content: center;
132
122
  min-width: 16px;
133
123
  height: 20px;
134
124
  flex-shrink: 0;
135
- `,Ve=l.span`
125
+ `,ze=l.span`
136
126
  width: 100%;
137
127
  min-width: 0;
138
128
  line-height: var(--line-height-sm);
@@ -140,9 +130,9 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
140
130
  font-weight: var(--font-weight-regular);
141
131
  white-space: pre-wrap;
142
132
  word-break: break-all;
143
- `,Mn=l(ee)`
133
+ `,Bn=l(ee)`
144
134
  user-select: none;
145
- `,$n=e=>typeof e!="object"||e===null?!1:"kind"in e&&e.kind==="batch"?"changes"in e?Array.isArray(e.changes)&&e.changes.every(ze):!1:ze(e);function ze(e){return typeof e!="object"||e===null||!("id"in e)||!("target"in e)||!("included"in e)||!("kind"in e)?!1:e.kind==="single"}const En={approveLabel:"Approve",denyLabel:"Deny"};function Rn(e,t){const n=k(t,"action");if(n){const o=Nt[n];if(o)return o}return Dt[e]||En}function k(e,t){if(!e||typeof e!="object")return null;const n=e.payload;if(!n||typeof n!="object")return null;const i=n[t];return typeof i!="string"?null:i.trim()||null}function te(e,t){if(!(typeof t>"u"))return e?`${e}: ${t}`:t}function Ln(e){return e?"changes"in e?Array.isArray(e.changes)?e.changes.map(t=>!t||typeof t!="object"||!("approved"in t)?!1:t.approved===!0):[]:[]:[]}function Nn(e,t){if(!e||typeof e!="object")return;const n=ne(e,se),i=ne(n,le);if(!(t in i))return;const o=i[t];if(Array.isArray(o)&&o.length!==0&&o.every($n))return o}function Fe(e,t){return Pt(e)&&ke(e)&&e.toolCallId===t}function Dn(e,t,n){const i=e.parts.map(c=>Fe(c,t)?{...c,input:Pn(c.input,n)}:c),o=e.metadata&&typeof e.metadata=="object"?e.metadata:{},a=ne(o,se),s={...ne(a,le),[t]:Ct(n)};return{...e,parts:i,metadata:{...o,[se]:{...a,[le]:s}}}}function ne(e,t){const n=e[t];return typeof n=="object"&&n!==null?n:{}}function Pn(e,t){if(!e||!("changes"in e)||!Array.isArray(e.changes))return e;const{changes:n,...i}=e;return{...i,changes:n.map((o,a)=>({...o,approved:t[a]?.included??!1}))}}function Un({preview:e,isIncluded:t,onToggle:n,readOnly:i}){const{primaryLabel:o,categoryLabel:a,diffLineKey:s}=Hn(e.target);return r.jsx(Gn,{isIncluded:t,onToggle:n,readOnly:i,primaryLabel:o,categoryLabel:a,children:e.kind==="batch"?r.jsx(nr,{children:e.changes.map(c=>r.jsx(Be,{oldValue:te(c.target.key,c.oldValue),newValue:te(c.target.key,c.newValue)},c.id))}):r.jsx(Be,{oldValue:te(s,e.oldValue),newValue:te(s,e.newValue)})})}function Hn(e){const t=e.schemeId??e.type;return e.stepId||e.schemeId?{primaryLabel:e.stepId??t,categoryLabel:e.stepId?t:void 0,diffLineKey:e.key}:{primaryLabel:e.key??e.type,categoryLabel:e.key?e.type:void 0,diffLineKey:void 0}}function Gn({isIncluded:e,onToggle:t,readOnly:n,primaryLabel:i,categoryLabel:o,children:a}){return r.jsxs(Kn,{$dimmed:n&&!e,children:[r.jsxs(Wn,{children:[n?r.jsx(Xn,{children:e?r.jsx(er,{size:"16px"}):r.jsx(tr,{size:"16px"})}):r.jsxs(Jn,{children:[r.jsx(qn,{checked:e}),r.jsx(Qn,{type:"checkbox",checked:e,onChange:t})]}),r.jsx(Zn,{children:i}),o?r.jsx(Yn,{children:o}):null]}),a]})}const Kn=l.div`
135
+ `,Vn=e=>typeof e!="object"||e===null?!1:"kind"in e&&e.kind==="batch"?"changes"in e?Array.isArray(e.changes)&&e.changes.every(Me):!1:Me(e);function Me(e){return typeof e!="object"||e===null||!("id"in e)||!("target"in e)||!("included"in e)||!("kind"in e)?!1:e.kind==="single"}const zn={approveLabel:"Approve",denyLabel:"Deny"};function Mn(e,t){const n=j(t,"action");if(n){const i=Nt[n];if(i)return i}return Dt[e]||zn}function j(e,t){if(!e||typeof e!="object")return null;const n=e.payload;if(!n||typeof n!="object")return null;const o=n[t];return typeof o!="string"?null:o.trim()||null}function te(e,t){if(!(typeof t>"u"))return e?`${e}: ${t}`:t}function $n(e){return e?"changes"in e?Array.isArray(e.changes)?e.changes.map(t=>!t||typeof t!="object"||!("approved"in t)?!1:t.approved===!0):[]:[]:[]}function Fn(e,t){if(!e||typeof e!="object")return;const n=ne(e,se),o=ne(n,le);if(!(t in o))return;const i=o[t];if(Array.isArray(i)&&i.length!==0&&i.every(Vn))return i}function $e(e,t){return Pt(e)&&Ie(e)&&e.toolCallId===t}function Rn(e,t,n){const o=e.parts.map(c=>$e(c,t)?{...c,input:En(c.input,n)}:c),i=e.metadata&&typeof e.metadata=="object"?e.metadata:{},a=ne(i,se),s={...ne(a,le),[t]:Ct(n)};return{...e,parts:o,metadata:{...i,[se]:{...a,[le]:s}}}}function ne(e,t){const n=e[t];return typeof n=="object"&&n!==null?n:{}}function En(e,t){if(!e||!("changes"in e)||!Array.isArray(e.changes))return e;const{changes:n,...o}=e;return{...o,changes:n.map((i,a)=>({...i,approved:t[a]?.included??!1}))}}function Ln({preview:e,isIncluded:t,onToggle:n,readOnly:o}){const{primaryLabel:i,categoryLabel:a,diffLineKey:s}=Nn(e.target);return r.jsx(Dn,{isIncluded:t,onToggle:n,readOnly:o,primaryLabel:i,categoryLabel:a,children:e.kind==="batch"?r.jsx(Qn,{children:e.changes.map(c=>r.jsx(Ve,{oldValue:te(c.target.key,c.oldValue),newValue:te(c.target.key,c.newValue)},c.id))}):r.jsx(Ve,{oldValue:te(s,e.oldValue),newValue:te(s,e.newValue)})})}function Nn(e){const t=e.schemeId??e.type;return e.stepId||e.schemeId?{primaryLabel:e.stepId??t,categoryLabel:e.stepId?t:void 0,diffLineKey:e.key}:{primaryLabel:e.key??e.type,categoryLabel:e.key?e.type:void 0,diffLineKey:void 0}}function Dn({isIncluded:e,onToggle:t,readOnly:n,primaryLabel:o,categoryLabel:i,children:a}){return r.jsxs(Pn,{$dimmed:n&&!e,children:[r.jsxs(Un,{children:[n?r.jsx(Yn,{children:e?r.jsx(qn,{size:"16px"}):r.jsx(Jn,{size:"16px"})}):r.jsxs(Wn,{children:[r.jsx(Kn,{checked:e}),r.jsx(Zn,{type:"checkbox",checked:e,onChange:t})]}),r.jsx(Hn,{children:o}),i?r.jsx(Gn,{children:i}):null]}),a]})}const Pn=l.div`
146
136
  display: flex;
147
137
  flex-direction: column;
148
138
  gap: var(--spacing-xs);
@@ -154,12 +144,12 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
154
144
  &:last-child {
155
145
  border-bottom: none;
156
146
  }
157
- `,Wn=l.div`
147
+ `,Un=l.div`
158
148
  display: flex;
159
149
  align-items: center;
160
150
  gap: var(--spacing-xs);
161
151
  min-width: 0;
162
- `,Zn=l.span`
152
+ `,Hn=l.span`
163
153
  flex: 1;
164
154
  min-width: 0;
165
155
  color: var(--text-color-primary);
@@ -169,24 +159,24 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
169
159
  overflow: hidden;
170
160
  text-overflow: ellipsis;
171
161
  white-space: nowrap;
172
- `,Yn=l.span`
162
+ `,Gn=l.span`
173
163
  flex-shrink: 0;
174
164
  font-family: var(--code-block-font-family, var(--font-family-monospace, monospace));
175
165
  font-size: var(--font-size-sm);
176
166
  font-weight: var(--font-weight-regular);
177
167
  line-height: var(--line-height-sm);
178
168
  color: var(--text-color-secondary);
179
- `,qn=l(It).attrs({"aria-hidden":!0})`
169
+ `,Kn=l(It).attrs({"aria-hidden":!0})`
180
170
  --checkbox-border-color: var(--color-blueberry-6);
181
171
  --checkbox-box-color: var(--color-blueberry-6);
182
172
  --checkbox-box-color-active: var(--color-blueberry-6);
183
- `,Jn=l.span`
173
+ `,Wn=l.span`
184
174
  position: relative;
185
175
  display: inline-flex;
186
176
  flex-shrink: 0;
187
177
  width: 16px;
188
178
  height: 16px;
189
- `,Qn=l.input`
179
+ `,Zn=l.input`
190
180
  position: absolute;
191
181
  inset: 0;
192
182
  width: 16px;
@@ -194,26 +184,26 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
194
184
  margin: 0;
195
185
  opacity: 0;
196
186
  cursor: pointer;
197
- `,Xn=l.span`
187
+ `,Yn=l.span`
198
188
  display: inline-flex;
199
189
  flex-shrink: 0;
200
190
  width: 16px;
201
191
  height: 16px;
202
192
  align-items: center;
203
193
  justify-content: center;
204
- `,er=l(ct)`
194
+ `,qn=l(ct)`
205
195
  color: var(--color-success-base);
206
- `,tr=l(kt)`
196
+ `,Jn=l(kt)`
207
197
  color: var(--text-color-description);
208
- `,nr=l.div`
198
+ `,Qn=l.div`
209
199
  display: flex;
210
200
  flex-direction: column;
211
201
  gap: var(--spacing-xxs);
212
202
  min-width: 0;
213
- `;function Me({previews:e,handleToggle:t,readOnly:n}){return e.length===0?null:r.jsx(rr,{children:e.map((i,o)=>r.jsx(Un,{preview:i,isIncluded:i.included,onToggle:t?()=>t(o):void 0,readOnly:n},i.id))})}const rr=l.div`
203
+ `;function Fe({previews:e,handleToggle:t,readOnly:n}){return e.length===0?null:r.jsx(Xn,{children:e.map((o,i)=>r.jsx(Ln,{preview:o,isIncluded:o.included,onToggle:t?()=>t(i):void 0,readOnly:n},o.id))})}const Xn=l.div`
214
204
  display: flex;
215
205
  flex-direction: column;
216
- `,ir={update_step:sr,update_security:lr,run_request:pr,web_search:fr,manage_environment:dr,manage_collection:ur};function or(e,t){const n=ir[e];return n?n(t):ar(e)}function ar(e){return[{kind:"text",text:e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}]}function sr(e){return $e(e,"Update step")}function lr(e){const t=cr(e);if(t.size>1)return I("Update security");const[n]=t;return $e(e,"Update security",n)}function cr(e){const t=e&&"changes"in e?e.changes:void 0;if(!Array.isArray(t))return new Set;const n=G(e,"stepId"),i=t.map(o=>G(o,"stepId")??n);return new Set(i.filter(o=>!!o))}function $e(e,t,n){const{collectionId:i,workflowId:o,stepId:a}=hr(e),s=n??a;return!i||!o||!s?I(t):Ee(`${t} `,Te({collectionId:i,workflowId:o,stepId:s}),s)}function I(e){return[{kind:"text",text:e}]}function A(e,t){return t?`${e} "${t}"`:e}function Ee(e,t,n){return[{kind:"text",text:e},{kind:"link",href:t,label:n}]}function dr(e){const t=k(e,"action"),n=k(e,"environment"),i=n?` in environment "${n}"`:"";switch(t){case"add_environment":return I(A("Add environment",n));case"set_active_environment":return I(n?`Switch active environment to ${n}`:"Switch active environment");case"upsert_input":return I(A("Set input",k(e,"name"))+i);case"remove_input":return I(A("Remove input",k(e,"inputName"))+i);case"upsert_server":return I(A("Set server",k(e,"apiId"))+i);case"remove_server":return I(A("Remove server",k(e,"apiId"))+i);default:return I("Manage environment")}}function ur(e){switch(k(e,"action")){case"create_collection":return I(A("Create collection",k(e,"title")));case"delete_collection":return I(A("Delete collection",k(e,"collectionId")));case"create_workflow":return I(A("Create workflow",k(e,"name")));case"delete_workflow":return I(A("Delete workflow",k(e,"workflowId")));case"create_step":return I(A("Create step",k(e,"stepName")));case"delete_step":{const t=k(e,"collectionId"),n=k(e,"workflowId"),i=k(e,"stepId");return!t||!n||!i?I("Delete step"):Ee("Delete step ",Te({collectionId:t,workflowId:n,stepId:i}),i)}case"save_tab_to_collection":return I(A("Save tab as step",k(e,"newStepName")));default:return I("Manage collection")}}function pr(){return[{kind:"text",text:"Run current request"}]}function fr(e){return[{kind:"text",text:"Search the web at "},{kind:"link",href:e.url,label:e.url}]}function hr(e){return{collectionId:G(e,"collectionId"),workflowId:G(e,"workflowId"),stepId:G(e,"stepId")}}function G(e,t){if(typeof e!="object"||e===null||!(t in e))return null;const n=e[t];return typeof n=="string"&&n.trim()||null}function Re({toolName:e,input:t}){const n=or(e,t),i=_e();return r.jsx(xr,{onClick:i,children:r.jsx(gr,{children:n.map((o,a)=>o.kind==="text"?r.jsx("span",{children:o.text},a):r.jsx(mr,{href:o.href,children:o.label},a))})})}const xr=l.div`
206
+ `,er={update_step:rr,update_security:or,run_request:lr,web_search:cr,manage_environment:ar,manage_collection:sr};function tr(e,t){const n=er[e];return n?n(t):nr(e)}function nr(e){return[{kind:"text",text:e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}]}function rr(e){return Re(e,"Update step")}function or(e){const t=ir(e);if(t.size>1)return I("Update security");const[n]=t;return Re(e,"Update security",n)}function ir(e){const t=e&&"changes"in e?e.changes:void 0;if(!Array.isArray(t))return new Set;const n=G(e,"stepId"),o=t.map(i=>G(i,"stepId")??n);return new Set(o.filter(i=>!!i))}function Re(e,t,n){const{collectionId:o,workflowId:i,stepId:a}=dr(e),s=n??a;return!o||!i||!s?I(t):he(`${t} `,fe({collectionId:o,workflowId:i,stepId:s}),s)}function I(e){return[{kind:"text",text:e}]}function A(e,t){return t?`${e} "${t}"`:e}function he(e,t,n){return[{kind:"text",text:e},{kind:"link",href:t,label:n}]}function ar(e){const t=j(e,"action"),n=j(e,"environment"),o=n?` in environment "${n}"`:"";switch(t){case"add_environment":return I(A("Add environment",n));case"set_active_environment":return I(n?`Switch active environment to ${n}`:"Switch active environment");case"upsert_input":return I(A("Set input",j(e,"name"))+o);case"remove_input":return I(A("Remove input",j(e,"inputName"))+o);case"upsert_server":return I(A("Set server",j(e,"apiId"))+o);case"remove_server":return I(A("Remove server",j(e,"apiId"))+o);default:return I("Manage environment")}}function sr(e){switch(j(e,"action")){case"create_collection":return I(A("Create collection",j(e,"title")));case"delete_collection":return I(A("Delete collection",j(e,"collectionId")));case"create_workflow":return I(A("Create workflow",j(e,"name")));case"delete_workflow":return I(A("Delete workflow",j(e,"workflowId")));case"create_step":return I(A("Create step",j(e,"stepName")));case"delete_step":{const t=j(e,"collectionId"),n=j(e,"workflowId"),o=j(e,"stepId");return!t||!n||!o?I("Delete step"):he("Delete step ",fe({collectionId:t,workflowId:n,stepId:o}),o)}case"move_step":{const t=j(e,"collectionId"),n=j(e,"workflowId"),o=j(e,"stepId");return!t||!n||!o?I("Move step"):he("Move step ",fe({collectionId:t,workflowId:n,stepId:o}),o)}case"save_tab_to_collection":return I(A("Save tab as step",j(e,"newStepName")));default:return I("Manage collection")}}function lr(){return[{kind:"text",text:"Run current request"}]}function cr(e){return[{kind:"text",text:"Search the web at "},{kind:"link",href:e.url,label:e.url}]}function dr(e){return{collectionId:G(e,"collectionId"),workflowId:G(e,"workflowId"),stepId:G(e,"stepId")}}function G(e,t){if(typeof e!="object"||e===null||!(t in e))return null;const n=e[t];return typeof n=="string"&&n.trim()||null}function Ee({toolName:e,input:t}){const n=tr(e,t),o=Se();return r.jsx(ur,{onClick:o,children:r.jsx(pr,{children:n.map((i,a)=>i.kind==="text"?r.jsx("span",{children:i.text},a):r.jsx(fr,{href:i.href,children:i.label},a))})})}const ur=l.div`
217
207
  display: flex;
218
208
  flex-direction: column;
219
209
  gap: 0;
@@ -223,13 +213,13 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
223
213
  &:not(:last-child) {
224
214
  border-bottom: 1px solid var(--border-color-secondary);
225
215
  }
226
- `,gr=l.span`
216
+ `,pr=l.span`
227
217
  font-family: var(--font-family-base);
228
218
  font-size: var(--font-size-sm);
229
219
  font-weight: var(--font-weight-regular);
230
220
  line-height: var(--line-height-sm);
231
221
  color: var(--text-color-primary);
232
- `,mr=l.a`
222
+ `,fr=l.a`
233
223
  color: var(--link-color-primary);
234
224
  cursor: pointer;
235
225
  text-decoration: none;
@@ -237,7 +227,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
237
227
  &:hover {
238
228
  color: var(--link-color-primary, var(--text-color-link));
239
229
  }
240
- `;function Le(e,t,n){const i={type:e};return t!==void 0&&(i.key=t),n&&(i.stepId=n),i}function b({id:e,targetType:t,targetKey:n,targetStepId:i,oldValue:o,newValue:a}){return{kind:"single",id:e,target:Le(t,n,i),oldValue:o,newValue:a,included:!0}}function E(e,t,n){return b({id:e,targetType:t,targetStepId:n,oldValue:void 0,newValue:void 0})}function P({data:e,baseId:t,targetType:n,batchTargetKey:i,targetStepId:o,getOldValue:a,getNewValue:s=(d,u)=>String(u??""),resolveTargetKey:c=d=>d}){const d=Object.entries(e).filter(([,p])=>p!==void 0);if(d.length===0)return E(t,n,o);if(d.length>=2){const p=d.map(([x,g])=>b({id:`${t}:${x}`,targetType:n,targetKey:c(x),oldValue:a(x),newValue:s(x,g)}));return{kind:"batch",id:t,target:Le(n,i,o),changes:p,included:!0}}const[u,f]=d[0];return b({id:t,targetType:n,targetKey:c(u),targetStepId:o,oldValue:a(u),newValue:s(u,f)})}function vr({store:e,input:t}){if(!yr(t))return[];const n=new Map,i=o=>{const a=n.get(o);if(a)return a;const s=Ie(e,t.collectionId,t.workflowId,o),c=s.ok?s.value:null,d=c?Array.from(c.security.get({noproxy:!0})):[];return n.set(o,d),d};return t.changes.map((o,a)=>{const s=o.stepId?.trim(),c=s||t.stepId;return wr(i(c),o,a,s)})}function yr(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.collectionId=="string"&&typeof t.workflowId=="string"&&typeof t.stepId=="string"&&Array.isArray(t.changes)&&t.changes.length>0}function wr(e,t,n,i){const o=`security[${n}]`;switch(t.action){case C.ADD:{const{type:a,schemeId:s,data:c}=t;return!c||Object.keys(c).length===0?K(b({id:o,targetType:a,targetStepId:i,oldValue:void 0,newValue:a}),s):K(P({data:c,baseId:o,targetType:a,targetStepId:i,getOldValue:()=>{}}),s)}case C.UPDATE:{const{type:a,data:s}=t,c=t.index!==void 0?e[t.index]:void 0,d=t.schemeId||fe(c);return!s||Object.keys(s).length===0?K(b({id:o,targetType:a,targetStepId:i,oldValue:De(c),newValue:a}),d):K(P({data:s,baseId:o,targetType:a,targetStepId:i,getOldValue:u=>c?jr(c,u):void 0}),d)}case C.REMOVE:{const a=Ut(e,t),s=a.ok?a.entry:void 0;return K(b({id:o,targetType:s?.securityType??"Security",targetStepId:i,oldValue:De(s),newValue:void 0}),fe(s))}}}function K(e,t){return t?{...e,target:{...e.target,schemeId:t}}:e}function jr(e,t){switch(e.securityType){case $.NoAuth:return;case $.OAuth2:return Ne(e[$.OAuth2],t);case $.OpenIDConnect:{const n=e[$.OpenIDConnect];return t==="openIdConnectUrl"?n.openIdConnectUrl||void 0:t==="userInfoUrl"?n.userInfoUrl||void 0:Ne(n,t)}case $.APIKey:{const n=e[$.APIKey];return t==="location"?re(n,t)?.toLowerCase():re(n,t)}default:{const n=e[e.securityType];return re(n,t)}}}function Ne(e,t){if(t==="grantType")return e.grantType||void 0;if(!e.grantType)return;const n=e[e.grantType];return re(n,t)}function re(e,t){const n=e[t];return n!==void 0&&n!==""?String(n):void 0}function De(e){if(!e||e.securityType===$.NoAuth)return;const t=fe(e);return t?`${e.securityType} (${t})`:e.securityType}function fe(e){return!e||e.securityType===$.NoAuth?void 0:e[e.securityType]?.schemeName||void 0}function br({store:e,input:t}){if(!Cr(t))return[];const n=Ie(e,t.collectionId,t.workflowId,t.stepId),i=n.ok?n.value:null;return t.changes.map((o,a)=>kr(i,o,a))}function Cr(e){return typeof e!="object"||e===null?!1:"collectionId"in e&&"workflowId"in e&&"stepId"in e&&"changes"in e&&Array.isArray(e.changes)&&e.changes.length>0&&typeof e.collectionId=="string"&&typeof e.workflowId=="string"&&typeof e.stepId=="string"}function kr(e,t,n){const i=t.id??`${t.field}[${n}]`;switch(t.field){case"method":case"url":case"description":return Ir(e,t,i);case"parameters":return Tr(e,t,i);case"outputs":return _r(e,t,i);case"body":return Sr(e,t,i);case"successCriteria":return Ar(e,t,i)}}function Ir(e,t,n){const i=Q(t.field);switch(t.action){case C.ADD:return b({id:n,targetType:i,oldValue:void 0,newValue:t.data});case C.UPDATE:return b({id:n,targetType:i,oldValue:Pe(e,t.field),newValue:t.data});case C.REMOVE:return b({id:n,targetType:i,oldValue:Pe(e,t.field),newValue:void 0})}}function Tr(e,t,n){switch(t.action){case C.ADD:{if(!t.data)return E(n,"parameter");const{in:i,name:o,value:a}=t.data;return b({id:n,targetType:Q(i),targetKey:o,oldValue:void 0,newValue:a})}case C.UPDATE:{if(!t.id&&!t.data?.name)return E(n,"parameter");const i=Ue(e,t),o=t.data?.in??i?.in??"parameter";return b({id:n,targetType:Q(o),targetKey:t.data?.name??i?.key,oldValue:i?i.value??"":void 0,newValue:t.data?.value})}case C.REMOVE:{if(!t.id&&!t.data?.name)return E(n,"parameter");const i=Ue(e,t),o=t.data?.in??i?.in??"parameter";return b({id:n,targetType:Q(o),targetKey:i?.key??t.data?.name,oldValue:i?i.value??"":void 0,newValue:void 0})}}}function _r(e,t,n){switch(t.action){case C.ADD:return t.data?b({id:n,targetType:"Output",targetKey:t.data.name,oldValue:void 0,newValue:t.data.expression}):b({id:n,targetType:"Output",oldValue:void 0,newValue:void 0});case C.UPDATE:{if(!t.data)return b({id:n,targetType:"Output",oldValue:void 0,newValue:void 0});const i=t.id&&e?We(e,t.id):void 0;return b({id:n,targetType:"Output",targetKey:t.data.name,oldValue:i?.value,newValue:t.data.expression})}case C.REMOVE:{if(!t.id&&!t.data?.name)return E(n,"Output");let i=t.id&&e?We(e,t.id):void 0;return!i&&e&&t.data?.name&&(i=Vr(e,t.data.name)),b({id:n,targetType:"Output",targetKey:i?.key??t.data?.name,oldValue:i?.value,newValue:void 0})}}}function Sr(e,t,n){const{data:i}=t;switch(t.action){case C.ADD:return P({data:i,baseId:n,targetType:"Body",getOldValue:()=>{},getNewValue:o=>o==="content"?he(i.content,i.contentType):oe(i[o]),resolveTargetKey:o=>o==="content"?void 0:o});case C.UPDATE:{const o=e?.requestBody.type.get(),a=i.contentType??o;return P({data:i,baseId:n,targetType:"Body",getOldValue:s=>{if(e){if(s==="content")return he(e.requestBody.content.get(),o)||void 0;if(s==="contentType")return o}},getNewValue:s=>s==="content"?he(i.content,a):oe(i[s]),resolveTargetKey:s=>s==="content"?void 0:s})}case C.REMOVE:{const o=e?ce({contentType:e.requestBody.type.get(),content:e.requestBody.content.get()}):void 0;return b({id:n,targetType:"Body",oldValue:o,newValue:void 0})}}}function Ar(e,t,n){switch(t.action){case C.ADD:return t.data?P({data:t.data,baseId:n,targetType:"successCriteria",getOldValue:()=>{},getNewValue:i=>oe(t.data[i])}):E(n,"successCriteria");case C.UPDATE:{if(!t.data)return E(n,"successCriteria");const i=typeof t.id=="string"&&e?Ge(e,t.id):void 0;return P({data:t.data,baseId:n,targetType:"successCriteria",getOldValue:o=>{if(i){if(o==="condition")return i.condition;if(o==="context")return i.context??void 0;if(o==="type")return i.type}},getNewValue:o=>oe(t.data[o])})}case C.REMOVE:{if(typeof t.id!="string")return E(n,"successCriteria");const i=e?Ge(e,t.id):void 0;return b({id:n,targetType:"successCriteria",targetKey:i?.condition,oldValue:i?ce(i):void 0,newValue:void 0})}}}function Pe(e,t){if(e)switch(t){case"method":return e.xOperation.ornull?.method.get();case"url":return e.xOperation.ornull?.url.get();case"description":return e.description.get()}}function Ue(e,t){let n=t.id&&e?Or(e,t.id):null;return!n&&e&&t.data?.name&&(n=Br(e,t.data.name)),n}function He(e,t){for(const n of["path","query","header","cookie"]){const i=e.parameters[Ht[n]].get().find(o=>Tt(o)&&t(o));if(i)return i}return null}function Or(e,t){return He(e,n=>n.id===t)}function Br(e,t){return He(e,n=>n.key===t)}function Ge(e,t){return e.successCriteria.get().find(n=>n.condition===t)}function Ke(e,t){for(const n of e.outputs.get())if(t(n))return{key:ie(n.key),value:ie(n.value)}}function We(e,t){return Ke(e,n=>ie(n.id)===t)}function Vr(e,t){return Ke(e,n=>ie(n.key)===t)}function ie(e){return typeof e=="string"?e:e.get()}function oe(e){return e==null?"":typeof e=="string"?e:ce(e)}function he(e,t){if(!e||t!==_t.JSON)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const zr={update_security:vr,update_step:br};function Ze(e,t){const n=ye(),i=h.useMemo(()=>{const d=e?zr[e]:void 0;if(!d)return[];try{return d({store:n,input:t})}catch(u){return console.error("Unable to build change previews",u),[]}},[e,n,t]),[o,a]=h.useState(()=>Object.fromEntries(i.map(d=>[d.id,d.included]))),s=h.useMemo(()=>i.map(d=>({...d,included:o[d.id]??d.included})),[i,o]),c=h.useCallback(d=>{a(typeof d=="function"?u=>{const f=i.map(p=>({...p,included:u[p.id]??p.included}));return Object.fromEntries(d(f).map(p=>[p.id,p.included]))}:Object.fromEntries(d.map(u=>[u.id,u.included])))},[i]);return{previews:s,setPreviews:c}}function Fr({toolCallId:e,toolName:t,input:n,onApprove:i,onDeny:o}){const{updateMessages:a}=H(),{previews:s,setPreviews:c}=Ze(t,n),{includedCount:d,totalCount:u}=h.useMemo(()=>({includedCount:s.filter(v=>v.included).length,totalCount:s.length}),[s]),{approveLabel:f,denyLabel:p}=h.useMemo(()=>Rn(t,n),[t,n]),x=h.useCallback(()=>{a(v=>{const j=[];for(let y=0;y<v.length;y++){const w=v[y],{parts:m}=w,T=w.role==="assistant",O=m.some(S=>Fe(S,e));if(T&&O){const S=Dn(w,e,s);j.push({index:y,message:S})}}return j}),i()},[s,i,a,e]),g=h.useCallback(v=>{c(j=>j.map((y,w)=>w===v?{...y,included:!y.included}:y))},[c]);return r.jsxs(Mr,{children:[r.jsx(Re,{toolName:t,input:n}),s.length?r.jsx($r,{children:r.jsx(Me,{previews:s,handleToggle:g})}):null,s.length?r.jsx(we,{}):null,r.jsxs(Er,{children:[u>1?r.jsxs(Rr,{children:[d," of ",u," selected"]}):null,r.jsx(Lr,{size:"small",variant:"secondary",onClick:o,children:p}),r.jsx(Nr,{size:"small",variant:"primary",onClick:x,disabled:u>0?d===0:!1,children:f})]})]})}const Mr=l.div`
230
+ `;function Le(e,t,n){const o={type:e};return t!==void 0&&(o.key=t),n&&(o.stepId=n),o}function C({id:e,targetType:t,targetKey:n,targetStepId:o,oldValue:i,newValue:a}){return{kind:"single",id:e,target:Le(t,n,o),oldValue:i,newValue:a,included:!0}}function R(e,t,n){return C({id:e,targetType:t,targetStepId:n,oldValue:void 0,newValue:void 0})}function P({data:e,baseId:t,targetType:n,batchTargetKey:o,targetStepId:i,getOldValue:a,getNewValue:s=(d,u)=>String(u??""),resolveTargetKey:c=d=>d}){const d=Object.entries(e).filter(([,p])=>p!==void 0);if(d.length===0)return R(t,n,i);if(d.length>=2){const p=d.map(([x,g])=>C({id:`${t}:${x}`,targetType:n,targetKey:c(x),oldValue:a(x),newValue:s(x,g)}));return{kind:"batch",id:t,target:Le(n,o,i),changes:p,included:!0}}const[u,f]=d[0];return C({id:t,targetType:n,targetKey:c(u),targetStepId:i,oldValue:a(u),newValue:s(u,f)})}function hr({store:e,input:t}){if(!xr(t))return[];const n=new Map,o=i=>{const a=n.get(i);if(a)return a;const s=Te(e,t.collectionId,t.workflowId,i),c=s.ok?s.value:null,d=c?Array.from(c.security.get({noproxy:!0})):[];return n.set(i,d),d};return t.changes.map((i,a)=>{const s=i.stepId?.trim(),c=s||t.stepId;return gr(o(c),i,a,s)})}function xr(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.collectionId=="string"&&typeof t.workflowId=="string"&&typeof t.stepId=="string"&&Array.isArray(t.changes)&&t.changes.length>0}function gr(e,t,n,o){const i=`security[${n}]`;switch(t.action){case k.ADD:{const{type:a,schemeId:s,data:c}=t;return!c||Object.keys(c).length===0?K(C({id:i,targetType:a,targetStepId:o,oldValue:void 0,newValue:a}),s):K(P({data:c,baseId:i,targetType:a,targetStepId:o,getOldValue:()=>{}}),s)}case k.UPDATE:{const{type:a,data:s}=t,c=t.index!==void 0?e[t.index]:void 0,d=t.schemeId||xe(c);return!s||Object.keys(s).length===0?K(C({id:i,targetType:a,targetStepId:o,oldValue:De(c),newValue:a}),d):K(P({data:s,baseId:i,targetType:a,targetStepId:o,getOldValue:u=>c?mr(c,u):void 0}),d)}case k.REMOVE:{const a=Ut(e,t),s=a.ok?a.entry:void 0;return K(C({id:i,targetType:s?.securityType??"Security",targetStepId:o,oldValue:De(s),newValue:void 0}),xe(s))}}}function K(e,t){return t?{...e,target:{...e.target,schemeId:t}}:e}function mr(e,t){switch(e.securityType){case F.NoAuth:return;case F.OAuth2:return Ne(e[F.OAuth2],t);case F.OpenIDConnect:{const n=e[F.OpenIDConnect];return t==="openIdConnectUrl"?n.openIdConnectUrl||void 0:t==="userInfoUrl"?n.userInfoUrl||void 0:Ne(n,t)}case F.APIKey:{const n=e[F.APIKey];return t==="location"?re(n,t)?.toLowerCase():re(n,t)}default:{const n=e[e.securityType];return re(n,t)}}}function Ne(e,t){if(t==="grantType")return e.grantType||void 0;if(!e.grantType)return;const n=e[e.grantType];return re(n,t)}function re(e,t){const n=e[t];return n!==void 0&&n!==""?String(n):void 0}function De(e){if(!e||e.securityType===F.NoAuth)return;const t=xe(e);return t?`${e.securityType} (${t})`:e.securityType}function xe(e){return!e||e.securityType===F.NoAuth?void 0:e[e.securityType]?.schemeName||void 0}function vr({store:e,input:t}){if(!yr(t))return[];const n=Te(e,t.collectionId,t.workflowId,t.stepId),o=n.ok?n.value:null;return t.changes.map((i,a)=>wr(o,i,a))}function yr(e){return typeof e!="object"||e===null?!1:"collectionId"in e&&"workflowId"in e&&"stepId"in e&&"changes"in e&&Array.isArray(e.changes)&&e.changes.length>0&&typeof e.collectionId=="string"&&typeof e.workflowId=="string"&&typeof e.stepId=="string"}function wr(e,t,n){const o=t.id??`${t.field}[${n}]`;switch(t.field){case"method":case"url":case"description":return jr(e,t,o);case"parameters":return br(e,t,o);case"outputs":return Cr(e,t,o);case"body":return kr(e,t,o);case"successCriteria":return Ir(e,t,o)}}function jr(e,t,n){const o=Q(t.field);switch(t.action){case k.ADD:return C({id:n,targetType:o,oldValue:void 0,newValue:t.data});case k.UPDATE:return C({id:n,targetType:o,oldValue:Pe(e,t.field),newValue:t.data});case k.REMOVE:return C({id:n,targetType:o,oldValue:Pe(e,t.field),newValue:void 0})}}function br(e,t,n){switch(t.action){case k.ADD:{if(!t.data)return R(n,"parameter");const{in:o,name:i,value:a}=t.data;return C({id:n,targetType:Q(o),targetKey:i,oldValue:void 0,newValue:a})}case k.UPDATE:{if(!t.id&&!t.data?.name)return R(n,"parameter");const o=Ue(e,t),i=t.data?.in??o?.in??"parameter";return C({id:n,targetType:Q(i),targetKey:t.data?.name??o?.key,oldValue:o?o.value??"":void 0,newValue:t.data?.value})}case k.REMOVE:{if(!t.id&&!t.data?.name)return R(n,"parameter");const o=Ue(e,t),i=t.data?.in??o?.in??"parameter";return C({id:n,targetType:Q(i),targetKey:o?.key??t.data?.name,oldValue:o?o.value??"":void 0,newValue:void 0})}}}function Cr(e,t,n){switch(t.action){case k.ADD:return t.data?C({id:n,targetType:"Output",targetKey:t.data.name,oldValue:void 0,newValue:t.data.expression}):C({id:n,targetType:"Output",oldValue:void 0,newValue:void 0});case k.UPDATE:{if(!t.data)return C({id:n,targetType:"Output",oldValue:void 0,newValue:void 0});const o=t.id&&e?We(e,t.id):void 0;return C({id:n,targetType:"Output",targetKey:t.data.name,oldValue:o?.value,newValue:t.data.expression})}case k.REMOVE:{if(!t.id&&!t.data?.name)return R(n,"Output");let o=t.id&&e?We(e,t.id):void 0;return!o&&e&&t.data?.name&&(o=Sr(e,t.data.name)),C({id:n,targetType:"Output",targetKey:o?.key??t.data?.name,oldValue:o?.value,newValue:void 0})}}}function kr(e,t,n){const{data:o}=t;switch(t.action){case k.ADD:return P({data:o,baseId:n,targetType:"Body",getOldValue:()=>{},getNewValue:i=>i==="content"?ge(o.content,o.contentType):ie(o[i]),resolveTargetKey:i=>i==="content"?void 0:i});case k.UPDATE:{const i=e?.requestBody.type.get(),a=o.contentType??i;return P({data:o,baseId:n,targetType:"Body",getOldValue:s=>{if(e){if(s==="content")return ge(e.requestBody.content.get(),i)||void 0;if(s==="contentType")return i}},getNewValue:s=>s==="content"?ge(o.content,a):ie(o[s]),resolveTargetKey:s=>s==="content"?void 0:s})}case k.REMOVE:{const i=e?ce({contentType:e.requestBody.type.get(),content:e.requestBody.content.get()}):void 0;return C({id:n,targetType:"Body",oldValue:i,newValue:void 0})}}}function Ir(e,t,n){switch(t.action){case k.ADD:return t.data?P({data:t.data,baseId:n,targetType:"successCriteria",getOldValue:()=>{},getNewValue:o=>ie(t.data[o])}):R(n,"successCriteria");case k.UPDATE:{if(!t.data)return R(n,"successCriteria");const o=typeof t.id=="string"&&e?Ge(e,t.id):void 0;return P({data:t.data,baseId:n,targetType:"successCriteria",getOldValue:i=>{if(o){if(i==="condition")return o.condition;if(i==="context")return o.context??void 0;if(i==="type")return o.type}},getNewValue:i=>ie(t.data[i])})}case k.REMOVE:{if(typeof t.id!="string")return R(n,"successCriteria");const o=e?Ge(e,t.id):void 0;return C({id:n,targetType:"successCriteria",targetKey:o?.condition,oldValue:o?ce(o):void 0,newValue:void 0})}}}function Pe(e,t){if(e)switch(t){case"method":return e.xOperation.ornull?.method.get();case"url":return e.xOperation.ornull?.url.get();case"description":return e.description.get()}}function Ue(e,t){let n=t.id&&e?Tr(e,t.id):null;return!n&&e&&t.data?.name&&(n=_r(e,t.data.name)),n}function He(e,t){for(const n of["path","query","header","cookie"]){const o=e.parameters[Ht[n]].get().find(i=>Tt(i)&&t(i));if(o)return o}return null}function Tr(e,t){return He(e,n=>n.id===t)}function _r(e,t){return He(e,n=>n.key===t)}function Ge(e,t){return e.successCriteria.get().find(n=>n.condition===t)}function Ke(e,t){for(const n of e.outputs.get())if(t(n))return{key:oe(n.key),value:oe(n.value)}}function We(e,t){return Ke(e,n=>oe(n.id)===t)}function Sr(e,t){return Ke(e,n=>oe(n.key)===t)}function oe(e){return typeof e=="string"?e:e.get()}function ie(e){return e==null?"":typeof e=="string"?e:ce(e)}function ge(e,t){if(!e||t!==_t.JSON)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const Ar={update_security:hr,update_step:vr};function Ze(e,t){const n=je(),o=h.useMemo(()=>{const d=e?Ar[e]:void 0;if(!d)return[];try{return d({store:n,input:t})}catch(u){return console.error("Unable to build change previews",u),[]}},[e,n,t]),[i,a]=h.useState(()=>Object.fromEntries(o.map(d=>[d.id,d.included]))),s=h.useMemo(()=>o.map(d=>({...d,included:i[d.id]??d.included})),[o,i]),c=h.useCallback(d=>{a(typeof d=="function"?u=>{const f=o.map(p=>({...p,included:u[p.id]??p.included}));return Object.fromEntries(d(f).map(p=>[p.id,p.included]))}:Object.fromEntries(d.map(u=>[u.id,u.included])))},[o]);return{previews:s,setPreviews:c}}function Or({toolCallId:e,toolName:t,input:n,onApprove:o,onDeny:i}){const{updateMessages:a}=H(),{previews:s,setPreviews:c}=Ze(t,n),{includedCount:d,totalCount:u}=h.useMemo(()=>({includedCount:s.filter(v=>v.included).length,totalCount:s.length}),[s]),{approveLabel:f,denyLabel:p}=h.useMemo(()=>Mn(t,n),[t,n]),x=h.useCallback(()=>{a(v=>{const b=[];for(let y=0;y<v.length;y++){const w=v[y],{parts:m}=w,T=w.role==="assistant",O=m.some(S=>$e(S,e));if(T&&O){const S=Rn(w,e,s);b.push({index:y,message:S})}}return b}),o()},[s,o,a,e]),g=h.useCallback(v=>{c(b=>b.map((y,w)=>w===v?{...y,included:!y.included}:y))},[c]);return r.jsxs(Br,{children:[r.jsx(Ee,{toolName:t,input:n}),s.length?r.jsx(Vr,{children:r.jsx(Fe,{previews:s,handleToggle:g})}):null,s.length?r.jsx(be,{}):null,r.jsxs(zr,{children:[u>1?r.jsxs(Mr,{children:[d," of ",u," selected"]}):null,r.jsx($r,{size:"small",variant:"secondary",onClick:i,children:p}),r.jsx(Fr,{size:"small",variant:"primary",onClick:x,disabled:u>0?d===0:!1,children:f})]})]})}const Br=l.div`
241
231
  display: flex;
242
232
  color: var(--text-color-primary);
243
233
  flex-direction: column;
@@ -248,34 +238,34 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
248
238
  border: 1px solid var(--border-color-secondary);
249
239
  background: var(--layer-color);
250
240
  line-height: var(--line-height-sm);
251
- `,$r=l.div`
241
+ `,Vr=l.div`
252
242
  display: flex;
253
243
  flex-direction: column;
254
244
  gap: var(--spacing-xs);
255
245
  min-width: 0;
256
- `,Er=l.div`
246
+ `,zr=l.div`
257
247
  display: flex;
258
248
  flex-wrap: wrap;
259
249
  justify-content: flex-end;
260
250
  align-items: center;
261
251
  padding: 0 var(--spacing-sm) var(--spacing-xs) var(--spacing-sm);
262
252
  gap: var(--spacing-xxs);
263
- `,Rr=l.span`
253
+ `,Mr=l.span`
264
254
  flex: 1;
265
255
  font-size: var(--font-size-sm);
266
256
  font-weight: var(--font-weight-regular);
267
257
  line-height: var(--line-height-sm);
268
258
  color: var(--text-color-secondary);
269
- `,Lr=l(_)`
259
+ `,$r=l(_)`
270
260
  background: none;
271
- `,Nr=l(_)`
261
+ `,Fr=l(_)`
272
262
  border: 1px solid var(--button-bg-color);
273
263
  padding-top: 0;
274
264
  padding-bottom: 0;
275
265
  &:disabled {
276
266
  border: 1px solid var(--button-border-color-disabled);
277
267
  }
278
- `;function Dr({approvalId:e,toolCallId:t,toolName:n,input:i}){const{addToolApprovalResponse:o}=H(),a=h.useCallback(()=>{o({id:e,approved:!0})},[e,o]),s=h.useCallback(()=>{o({id:e,approved:!1})},[e,o]);return r.jsx(Fr,{onApprove:a,onDeny:s,toolCallId:t,toolName:n,input:i})}function Pr({toolName:e,toolCallId:t,input:n,isDenied:i,messageMetadata:o,onUndo:a}){const s=h.useMemo(()=>Nn(o,t),[o,t]),{previews:c}=Ze(s?void 0:e,n),d=h.useMemo(()=>{const p=s??c;if(i)return p.map(g=>({...g,included:!1}));const x=Ln(n);return p.map((g,v)=>({...g,included:x[v]??g.included}))},[s,c,n,i]);if(d.length===0)return null;const u=d.filter(p=>p.included).length,f=u===0?"Nothing applied":`${u} ${u===1?"change":"changes"} applied`;return r.jsxs(Ur,{children:[r.jsx(Re,{toolName:e,input:n}),r.jsx(Hr,{children:r.jsx(Me,{previews:d,readOnly:!0})}),r.jsx(we,{}),r.jsxs(Gr,{children:[r.jsx(Kr,{children:f}),a?r.jsx(Wr,{size:"small",variant:"outlined",onClick:a,children:"Undo"}):null]})]})}const Ur=l.div`
268
+ `;function Rr({approvalId:e,toolCallId:t,toolName:n,input:o}){const{addToolApprovalResponse:i}=H(),a=h.useCallback(()=>{i({id:e,approved:!0})},[e,i]),s=h.useCallback(()=>{i({id:e,approved:!1})},[e,i]);return r.jsx(Or,{onApprove:a,onDeny:s,toolCallId:t,toolName:n,input:o})}function Er({toolName:e,toolCallId:t,input:n,isDenied:o,messageMetadata:i,onUndo:a}){const s=h.useMemo(()=>Fn(i,t),[i,t]),{previews:c}=Ze(s?void 0:e,n),d=h.useMemo(()=>{const p=s??c;if(o)return p.map(g=>({...g,included:!1}));const x=$n(n);return p.map((g,v)=>({...g,included:x[v]??g.included}))},[s,c,n,o]);if(d.length===0)return null;const u=d.filter(p=>p.included).length,f=u===0?"Nothing applied":`${u} ${u===1?"change":"changes"} applied`;return r.jsxs(Lr,{children:[r.jsx(Ee,{toolName:e,input:n}),r.jsx(Nr,{children:r.jsx(Fe,{previews:d,readOnly:!0})}),r.jsx(be,{}),r.jsxs(Dr,{children:[r.jsx(Pr,{children:f}),a?r.jsx(Ur,{size:"small",variant:"outlined",onClick:a,children:"Undo"}):null]})]})}const Lr=l.div`
279
269
  display: flex;
280
270
  color: var(--text-color-primary);
281
271
  flex-direction: column;
@@ -285,46 +275,46 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
285
275
  border: 1px solid var(--border-color-secondary);
286
276
  background: var(--layer-color);
287
277
  line-height: var(--line-height-sm);
288
- `,Hr=l.div`
278
+ `,Nr=l.div`
289
279
  display: flex;
290
280
  flex-direction: column;
291
281
  min-width: 0;
292
- `,Gr=l.div`
282
+ `,Dr=l.div`
293
283
  display: flex;
294
284
  justify-content: space-between;
295
285
  align-items: center;
296
286
  padding: var(--spacing-xs) var(--spacing-sm);
297
287
  gap: var(--spacing-xs);
298
- `,Kr=l.span`
288
+ `,Pr=l.span`
299
289
  font-size: var(--font-size-sm);
300
290
  font-weight: var(--font-weight-regular);
301
291
  line-height: var(--line-height-sm);
302
292
  color: var(--text-color-secondary);
303
- `,Wr=l(_)`
293
+ `,Ur=l(_)`
304
294
  padding-top: 0;
305
295
  padding-bottom: 0;
306
- `;function Zr({items:e,isLast:t}){const[n,i]=h.useState(t),o=h.useCallback(()=>{i(s=>!s)},[]),a=h.useMemo(()=>e.filter(s=>s.kind==="action"),[e]);return r.jsxs(qr,{children:[r.jsxs(Jr,{type:"button",onClick:o,"aria-expanded":n,children:[r.jsx(Qr,{children:n?r.jsx(dt,{size:"12px",color:"var(--icon-color-additional)"}):r.jsx(ut,{size:"12px",color:"var(--icon-color-additional)"})}),r.jsxs(Xr,{children:[a.length," ",a.length===1?"action":"actions"]})]}),n&&r.jsx(ei,{children:a.map((s,c)=>r.jsx(Yr,{text:s.text},c))})]})}function Yr({text:e}){return r.jsxs(ti,{children:[r.jsxs(ni,{children:[r.jsx(ri,{"aria-hidden":!0}),r.jsx(ii,{children:r.jsx(oi,{"aria-hidden":!0})}),r.jsx(Ye,{"aria-hidden":!0})]}),r.jsx(ai,{children:e})]})}const qr=l.div`
296
+ `;function Hr({items:e,isLast:t}){const[n,o]=h.useState(t),i=h.useCallback(()=>{o(s=>!s)},[]),a=h.useMemo(()=>e.filter(s=>s.kind==="action"),[e]);return r.jsxs(Kr,{children:[r.jsxs(Wr,{type:"button",onClick:i,"aria-expanded":n,children:[r.jsx(Zr,{children:n?r.jsx(dt,{size:"12px",color:"var(--icon-color-additional)"}):r.jsx(ut,{size:"12px",color:"var(--icon-color-additional)"})}),r.jsxs(Yr,{children:[a.length," ",a.length===1?"action":"actions"]})]}),n&&r.jsx(qr,{children:a.map((s,c)=>r.jsx(Gr,{text:s.text},c))})]})}function Gr({text:e}){return r.jsxs(Jr,{children:[r.jsxs(Qr,{children:[r.jsx(Xr,{"aria-hidden":!0}),r.jsx(eo,{children:r.jsx(to,{"aria-hidden":!0})}),r.jsx(Ye,{"aria-hidden":!0})]}),r.jsx(no,{children:e})]})}const Kr=l.div`
307
297
  display: flex;
308
298
  flex-direction: column;
309
299
  width: 100%;
310
300
  min-width: 0;
311
- `,Jr=l.button`
301
+ `,Wr=l.button`
312
302
  display: flex;
313
303
  align-items: center;
314
304
  cursor: pointer;
315
305
  user-select: none;
316
306
  width: fit-content;
317
307
  padding: 0;
318
- `,Qr=l.span`
308
+ `,Zr=l.span`
319
309
  display: flex;
320
310
  align-items: center;
321
311
  flex-shrink: 0;
322
- `,Xr=l.span`
312
+ `,Yr=l.span`
323
313
  font-size: var(--font-size-sm);
324
314
  font-weight: var(--font-weight-regular);
325
315
  line-height: var(--line-height-sm);
326
316
  color: var(--text-color-description);
327
- `,ei=l.div`
317
+ `,qr=l.div`
328
318
  display: flex;
329
319
  flex-direction: column;
330
320
  gap: 0;
@@ -336,7 +326,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
336
326
  background: var(--border-color-secondary);
337
327
  flex: 1 1 auto;
338
328
  min-height: 8px;
339
- `,ti=l.div`
329
+ `,Jr=l.div`
340
330
  display: flex;
341
331
  flex-direction: row;
342
332
  align-items: stretch;
@@ -348,7 +338,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
348
338
  display: none;
349
339
  }
350
340
  }
351
- `,ni=l.div`
341
+ `,Qr=l.div`
352
342
  display: flex;
353
343
  flex-direction: column;
354
344
  align-items: center;
@@ -357,14 +347,14 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
357
347
  flex: 0 0 auto;
358
348
  align-self: stretch;
359
349
  min-height: 0;
360
- `,ri=l.span`
350
+ `,Xr=l.span`
361
351
  display: block;
362
352
  width: 1px;
363
353
  height: 4px;
364
354
  flex: 0 0 auto;
365
355
  flex-shrink: 0;
366
356
  background: var(--border-color-secondary);
367
- `,ii=l.div`
357
+ `,eo=l.div`
368
358
  width: 12px;
369
359
  height: 12px;
370
360
  flex: 0 0 auto;
@@ -372,7 +362,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
372
362
  display: flex;
373
363
  align-items: center;
374
364
  justify-content: center;
375
- `,oi=l.span`
365
+ `,to=l.span`
376
366
  width: 4px;
377
367
  height: 4px;
378
368
  flex-shrink: 0;
@@ -380,7 +370,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
380
370
  box-sizing: border-box;
381
371
  border: 1px solid var(--border-color-secondary);
382
372
  background: transparent;
383
- `,ai=l.span`
373
+ `,no=l.span`
384
374
  flex: 1;
385
375
  min-width: 0;
386
376
  align-self: flex-start;
@@ -388,11 +378,11 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
388
378
  font-weight: var(--font-weight-regular);
389
379
  line-height: var(--line-height-sm);
390
380
  color: var(--text-color-helper);
391
- `;function si({items:e,messageMetadata:t}){return r.jsx(ci,{children:e.map((n,i)=>{if(n.kind==="reasoning-block"){const s=i===e.length-1;return r.jsx(Zr,{items:n.items,isLast:s},n.key)}if(n.kind==="text")return r.jsx(li,{rawMarkdown:n.text,workflowRunHistoryIds:n.workflowRunHistoryIds},n.key);const{part:o}=n,a=Gt(o.type);return a&&ke(o)?r.jsx(Dr,{approvalId:o.approval.id,toolCallId:o.toolCallId,toolName:a,input:o.input},n.key):a&&Kt(o)?r.jsx(Pr,{toolName:a,toolCallId:o.toolCallId,input:o.input,isDenied:o.state==="output-denied",messageMetadata:t},n.key):null})})}function li({rawMarkdown:e,workflowRunHistoryIds:t}){const n=_e({workflowRunHistoryIds:t});return r.jsx(di,{onClick:n,children:r.jsx(St,{rawMarkdown:e,parser:At})})}const ci=l.div`
381
+ `;function ro({items:e,messageMetadata:t}){return r.jsx(io,{children:e.map((n,o)=>{if(n.kind==="reasoning-block"){const s=o===e.length-1;return r.jsx(Hr,{items:n.items,isLast:s},n.key)}if(n.kind==="text")return r.jsx(oo,{rawMarkdown:n.text,workflowRunHistoryIds:n.workflowRunHistoryIds},n.key);const{part:i}=n,a=Gt(i.type);return a&&Ie(i)?r.jsx(Rr,{approvalId:i.approval.id,toolCallId:i.toolCallId,toolName:a,input:i.input},n.key):a&&Kt(i)?r.jsx(Er,{toolName:a,toolCallId:i.toolCallId,input:i.input,isDenied:i.state==="output-denied",messageMetadata:t},n.key):null})})}function oo({rawMarkdown:e,workflowRunHistoryIds:t}){const n=Se({workflowRunHistoryIds:t});return r.jsx(ao,{onClick:n,children:r.jsx(St,{rawMarkdown:e,parser:At})})}const io=l.div`
392
382
  display: flex;
393
383
  flex-direction: column;
394
384
  gap: var(--spacing-xs);
395
- `,di=l.div`
385
+ `,ao=l.div`
396
386
  white-space: normal;
397
387
 
398
388
  max-width: 100%;
@@ -441,22 +431,22 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
441
431
  transform: scale(1);
442
432
  }
443
433
  }
444
- `;function ui(){return r.jsxs(pi,{children:[r.jsx(W,{}),r.jsx(W,{}),r.jsx(W,{})]})}const pi=l.div`
434
+ `;function so(){return r.jsxs(lo,{children:[r.jsx(W,{}),r.jsx(W,{}),r.jsx(W,{})]})}const lo=l.div`
445
435
  display: flex;
446
436
  align-items: center;
447
437
  justify-content: space-between;
448
438
  width: 24px;
449
439
  height: 24px;
450
- `;function fi(){return r.jsxs(hi,{children:[r.jsx(ui,{}),r.jsx(xi,{children:"Thinking"})]})}const hi=l.div`
440
+ `;function co(){return r.jsxs(uo,{children:[r.jsx(so,{}),r.jsx(po,{children:"Thinking"})]})}const uo=l.div`
451
441
  display: flex;
452
442
  align-items: center;
453
443
  gap: var(--spacing-xxs);
454
- `,xi=l.span`
444
+ `,po=l.span`
455
445
  font-family: var(--font-family-base);
456
446
  font-size: var(--font-size-sm);
457
447
  line-height: var(--line-height-sm);
458
448
  color: var(--text-color-helper);
459
- `;function gi({items:e}){return r.jsx(h.Fragment,{children:e.map(t=>t.kind!=="text"?null:r.jsx(qe,{children:t.text},t.key))})}const mi="Something went wrong. Please try again.";function vi(e){return e?.message?.trim()||mi}function yi({message:e,isLastMessage:t}){const{chatStatus:n,chatError:i}=H(),{role:o,parts:a}=e,s=o===V.ASSISTANT,c=h.useMemo(()=>Wt(a),[a]),d=c.length>0,u=n==="error"&&t&&s&&!d;return!d&&!u?null:r.jsx(Je,{$role:o,children:r.jsx(ji,{isFailedEmptyAssistant:u,chatError:i,isAssistant:s,contentItems:c,messageMetadata:e.metadata})})}function wi(){return r.jsx(Je,{$role:V.ASSISTANT,children:r.jsx(xe,{children:r.jsx(fi,{})})})}function ji({isFailedEmptyAssistant:e,chatError:t,isAssistant:n,contentItems:i,messageMetadata:o}){return e?r.jsx(xe,{children:r.jsx(qe,{children:vi(t)})}):r.jsx(xe,{children:n?r.jsx(si,{items:i,messageMetadata:o}):r.jsx(gi,{items:i})})}const Je=l.div`
449
+ `;function fo({items:e}){return r.jsx(h.Fragment,{children:e.map(t=>t.kind!=="text"?null:r.jsx(qe,{children:t.text},t.key))})}const ho="Something went wrong. Please try again.";function xo(e){return e?.message?.trim()||ho}function go({message:e,isLastMessage:t}){const{chatStatus:n,chatError:o}=H(),{role:i,parts:a}=e,s=i===V.ASSISTANT,c=h.useMemo(()=>Wt(a),[a]),d=c.length>0,u=n==="error"&&t&&s&&!d;return!d&&!u?null:r.jsx(Je,{$role:i,children:r.jsx(vo,{isFailedEmptyAssistant:u,chatError:o,isAssistant:s,contentItems:c,messageMetadata:e.metadata})})}function mo(){return r.jsx(Je,{$role:V.ASSISTANT,children:r.jsx(me,{children:r.jsx(co,{})})})}function vo({isFailedEmptyAssistant:e,chatError:t,isAssistant:n,contentItems:o,messageMetadata:i}){return e?r.jsx(me,{children:r.jsx(qe,{children:xo(t)})}):r.jsx(me,{children:n?r.jsx(ro,{items:o,messageMetadata:i}):r.jsx(fo,{items:o})})}const Je=l.div`
460
450
  display: flex;
461
451
  flex-direction: column;
462
452
  padding: var(--spacing-xs) var(--spacing-sm);
@@ -471,13 +461,13 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
471
461
  word-wrap: break-word;
472
462
  white-space: pre-wrap;
473
463
  max-width: 100%;
474
- `,xe=l.div`
464
+ `,me=l.div`
475
465
  display: flex;
476
466
  flex-direction: column;
477
467
  gap: var(--spacing-xxs);
478
468
  min-width: 0;
479
469
  width: 100%;
480
- `;function bi(){const{messages:e,isStreaming:t}=H(),n=e.at(-1),i=h.useMemo(()=>{const o=n?.role===V.ASSISTANT,a=n?.parts.at(-1)?.type==="text";return t&&!(o&&a)},[t,n?.parts,n?.role]);return r.jsxs(Ci,{children:[e.map((o,a)=>r.jsx(Qe,{$role:o.role,children:r.jsx(Xe,{$role:o.role,children:r.jsx(yi,{message:o,isLastMessage:a===e.length-1})})},o.id)),i&&r.jsx(Qe,{$role:V.ASSISTANT,children:r.jsx(Xe,{$role:V.ASSISTANT,children:r.jsx(wi,{})})})]})}const Ci=l.div`
470
+ `;function yo(){const{messages:e,isStreaming:t}=H(),n=e.at(-1),o=h.useMemo(()=>{const i=n?.role===V.ASSISTANT,a=n?.parts.at(-1)?.type==="text";return t&&!(i&&a)},[t,n?.parts,n?.role]);return r.jsxs(wo,{children:[e.map((i,a)=>r.jsx(Qe,{$role:i.role,children:r.jsx(Xe,{$role:i.role,children:r.jsx(go,{message:i,isLastMessage:a===e.length-1})})},i.id)),o&&r.jsx(Qe,{$role:V.ASSISTANT,children:r.jsx(Xe,{$role:V.ASSISTANT,children:r.jsx(mo,{})})})]})}const wo=l.div`
481
471
  display: flex;
482
472
  flex-direction: column;
483
473
  gap: var(--spacing-xs);
@@ -494,17 +484,20 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
494
484
  min-width: 0;
495
485
  width: 100%;
496
486
  max-width: 100%;
497
- `;function ki(e){const t=h.useRef(void 0);return h.useEffect(()=>{t.current=e}),t.current}const et=l.div`
487
+ `;function jo(e){const t=h.useRef(void 0);return h.useEffect(()=>{t.current=e}),t.current}const et=l.div`
498
488
  display: flex;
499
489
  flex-direction: column;
500
490
  flex: 1;
501
491
  width: 100%;
502
492
  overflow: auto;
503
493
  padding: var(--spacing-xs);
504
- `,Ii=e=>r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",...e,children:[r.jsx("path",{d:"M12.1683 8.65224C13.4439 7.91782 13.4439 6.08176 12.1683 5.34733L8.48891 3.22903L5.13033 6.57817C5.03961 6.66863 5.03961 6.8153 5.13033 6.90577L8.81674 10.5818L12.1683 8.65224Z",fill:"url(#replay-icon-gradient)"}),r.jsx("path",{d:"M7.56707 11.3013L3.81522 13.4613C2.53957 14.1957 0.945007 13.2777 0.945007 11.8088L0.945008 2.19072C0.945008 0.721872 2.53957 -0.196157 3.81522 0.538267L7.23924 2.50957L4.14475 5.59536C3.5097 6.22861 3.5097 7.25532 4.14475 7.88858L7.56707 11.3013Z",fill:"url(#replay-icon-gradient)"}),r.jsx("defs",{children:r.jsxs("linearGradient",{id:"replay-icon-gradient",x1:"12.0947",y1:"10.9627",x2:"1.65018",y2:"0.120816",gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:"#C361FF"}),r.jsx("stop",{offset:"0.411322",stopColor:"#9461FF"}),r.jsx("stop",{offset:"0.73777",stopColor:"#207DFF"}),r.jsx("stop",{offset:"1",stopColor:"#1DA8F6"})]})})]}),Ti=l(Ii)`
494
+ `,bo=e=>r.jsxs("svg",{viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r.jsxs("g",{clipPath:"url(#clip0_5333_7017)",children:[r.jsxs("mask",{id:"mask0_5333_7017",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:[r.jsx("path",{d:"M6.98858 0.876221C7.11667 0.876221 7.22837 0.96381 7.25964 1.08813C7.3552 1.46837 7.48112 1.84033 7.63618 2.20043C8.04154 3.14225 8.59778 3.96654 9.30396 4.67271C10.0105 5.37908 10.8346 5.93532 11.7763 6.34069C12.1364 6.4957 12.5085 6.62162 12.8887 6.71723C13.0131 6.7485 13.1005 6.86001 13.1005 6.9881C13.1005 7.11618 13.0131 7.22788 12.8885 7.25915C12.5083 7.35471 12.1363 7.48063 11.7763 7.63569C10.8344 8.04106 10.0103 8.5973 9.30396 9.30348C8.59778 10.01 8.04154 10.8341 7.63618 11.7758C7.48109 12.1359 7.35511 12.508 7.25945 12.8882C7.24431 12.9487 7.20945 13.0023 7.16038 13.0406C7.11132 13.079 7.05086 13.0999 6.98858 13.1C6.8605 13.1 6.74898 13.0126 6.71772 12.8881C6.62209 12.5078 6.49611 12.1359 6.34099 11.7758C5.93581 10.8339 5.37976 10.0098 4.6732 9.30348C3.96684 8.5973 3.14274 8.04106 2.20091 7.63569C1.8408 7.48062 1.46885 7.35464 1.08862 7.25896C1.02821 7.24387 0.974561 7.20905 0.936177 7.16002C0.897792 7.11099 0.876864 7.05055 0.876709 6.98828C0.876709 6.8602 0.964299 6.74868 1.08862 6.71742C1.46887 6.6218 1.84082 6.49582 2.20091 6.34069C3.14274 5.93551 3.96702 5.37927 4.6732 4.6729C5.37957 3.96672 5.93581 3.14244 6.34117 2.20061C6.49619 1.8405 6.62211 1.46854 6.71772 1.08832C6.73278 1.02784 6.76762 0.97413 6.81669 0.935705C6.86576 0.89728 6.92626 0.876345 6.98858 0.876221Z",fill:"black"}),r.jsx("path",{d:"M6.98858 0.876221C7.11667 0.876221 7.22837 0.96381 7.25964 1.08813C7.3552 1.46837 7.48112 1.84033 7.63618 2.20043C8.04154 3.14225 8.59778 3.96654 9.30396 4.67271C10.0105 5.37908 10.8346 5.93532 11.7763 6.34069C12.1364 6.4957 12.5085 6.62162 12.8887 6.71723C13.0131 6.7485 13.1005 6.86001 13.1005 6.9881C13.1005 7.11618 13.0131 7.22788 12.8885 7.25915C12.5083 7.35471 12.1363 7.48063 11.7763 7.63569C10.8344 8.04106 10.0103 8.5973 9.30396 9.30348C8.59778 10.01 8.04154 10.8341 7.63618 11.7758C7.48109 12.1359 7.35511 12.508 7.25945 12.8882C7.24431 12.9487 7.20945 13.0023 7.16038 13.0406C7.11132 13.079 7.05086 13.0999 6.98858 13.1C6.8605 13.1 6.74898 13.0126 6.71772 12.8881C6.62209 12.5078 6.49611 12.1359 6.34099 11.7758C5.93581 10.8339 5.37976 10.0098 4.6732 9.30348C3.96684 8.5973 3.14274 8.04106 2.20091 7.63569C1.8408 7.48062 1.46885 7.35464 1.08862 7.25896C1.02821 7.24387 0.974561 7.20905 0.936177 7.16002C0.897792 7.11099 0.876864 7.05055 0.876709 6.98828C0.876709 6.8602 0.964299 6.74868 1.08862 6.71742C1.46887 6.6218 1.84082 6.49582 2.20091 6.34069C3.14274 5.93551 3.96702 5.37927 4.6732 4.6729C5.37957 3.96672 5.93581 3.14244 6.34117 2.20061C6.49619 1.8405 6.62211 1.46854 6.71772 1.08832C6.73278 1.02784 6.76762 0.97413 6.81669 0.935705C6.86576 0.89728 6.92626 0.876345 6.98858 0.876221Z",fill:"url(#paint0_linear_5333_7017)"})]}),r.jsxs("g",{mask:"url(#mask0_5333_7017)",children:[r.jsx("g",{filter:"url(#filter0_f_5333_7017)",children:r.jsx("path",{d:"M-0.227015 10.4326C1.18534 10.9342 2.80867 9.99369 3.39882 8.33193C3.98897 6.67037 3.32234 4.91669 1.90998 4.41507C0.497625 3.91346 -1.1257 4.85396 -1.71604 6.51553C-2.306 8.17729 -1.63937 9.93096 -0.227015 10.4326Z",fill:"#FFE432"})}),r.jsx("g",{filter:"url(#filter1_f_5333_7017)",children:r.jsx("path",{d:"M6.04409 4.95442C7.98425 4.95442 9.55728 3.34672 9.55728 1.3638C9.55728 -0.619301 7.98443 -2.22681 6.04409 -2.22681C4.10374 -2.22681 2.53052 -0.619113 2.53052 1.3638C2.53052 3.34672 4.10355 4.95442 6.04409 4.95442Z",fill:"#FC413D"})}),r.jsx("g",{filter:"url(#filter2_f_5333_7017)",children:r.jsx("path",{d:"M4.67843 16.4367C6.70392 16.3378 8.24192 14.1304 8.11364 11.5065C7.98556 8.88254 6.23941 6.83558 4.21393 6.93466C2.18844 7.03374 0.650439 9.241 0.778715 11.8649C0.906992 14.4888 2.65295 16.5358 4.67843 16.4367Z",fill:"#00B95C"})}),r.jsx("g",{filter:"url(#filter3_f_5333_7017)",children:r.jsx("path",{d:"M4.67843 16.4367C6.70392 16.3378 8.24192 14.1304 8.11364 11.5065C7.98556 8.88254 6.23941 6.83558 4.21393 6.93466C2.18844 7.03374 0.650439 9.241 0.778715 11.8649C0.906992 14.4888 2.65295 16.5358 4.67843 16.4367Z",fill:"#00B95C"})}),r.jsx("g",{filter:"url(#filter4_f_5333_7017)",children:r.jsx("path",{d:"M6.70714 14.8494C8.40506 13.8162 8.85958 11.4634 7.72223 9.59402C6.58489 7.7245 4.28627 7.04658 2.58816 8.07957C0.890051 9.11294 0.435527 11.4658 1.57287 13.3353C2.7106 15.2047 5.00903 15.8826 6.70714 14.8494Z",fill:"#00B95C"})}),r.jsx("g",{filter:"url(#filter5_f_5333_7017)",children:r.jsx("path",{d:"M13.5707 8.97502C15.4792 8.97502 17.0265 7.48505 17.0265 5.64736C17.0265 3.80949 15.4792 2.31952 13.5707 2.31952C11.6622 2.31952 10.115 3.80949 10.115 5.64736C10.115 7.48524 11.6622 8.97502 13.5707 8.97502Z",fill:"#3186FF"})}),r.jsx("g",{filter:"url(#filter6_f_5333_7017)",children:r.jsx("path",{d:"M-1.5844 8.58873C0.17304 9.92499 2.74027 9.50587 4.1498 7.65218C5.55933 5.79867 5.27754 3.2126 3.5201 1.87634C1.76265 0.539895 -0.804385 0.959007 -2.21411 2.81271C-3.62364 4.66622 -3.34166 7.25247 -1.5844 8.58873Z",fill:"#FBBC04"})}),r.jsx("g",{filter:"url(#filter7_f_5333_7017)",children:r.jsx("path",{d:"M7.42033 10.5639C9.51777 12.006 12.2982 11.6044 13.6303 9.66653C14.9626 7.72883 14.3422 4.98906 12.2445 3.54694C10.1469 2.10444 7.36664 2.50641 6.03434 4.44393C4.70222 6.38183 5.32251 9.12159 7.42014 10.5639H7.42033Z",fill:"#3186FF"})}),r.jsx("g",{filter:"url(#filter8_f_5333_7017)",children:r.jsx("path",{d:"M11.2336 0.436156C11.7673 1.16174 11.0814 2.57221 9.70202 3.58694C8.32243 4.60166 6.77163 4.83598 6.23799 4.11059C5.70435 3.38482 6.39 1.97416 7.76939 0.959622C9.14898 -0.0550994 10.7 -0.289425 11.2334 0.435968L11.2336 0.436156Z",fill:"#749BFF"})}),r.jsx("g",{filter:"url(#filter9_f_5333_7017)",children:r.jsx("path",{d:"M6.85291 3.9097C8.98633 1.93074 9.7185 -0.748558 8.48848 -2.07465C7.25846 -3.40074 4.53169 -2.87181 2.39827 -0.892846C0.264845 1.08612 -0.467518 3.76542 0.762693 5.09151C1.99272 6.41759 4.71949 5.88867 6.85291 3.9097Z",fill:"#FC413D"})}),r.jsx("g",{filter:"url(#filter10_f_5333_7017)",children:r.jsx("path",{d:"M2.47959 11.0173C3.74766 11.9248 5.20334 12.0627 5.73114 11.3254C6.25894 10.588 5.65881 9.25455 4.39074 8.34701C3.12285 7.43947 1.66698 7.30159 1.13937 8.03885C0.611574 8.77629 1.21152 10.1097 2.47959 11.0173Z",fill:"#FFEE48"})})]})]}),r.jsxs("defs",{children:[r.jsxs("filter",{id:"filter0_f_5333_7017",x:"-2.85766",y:"3.3534",width:"7.39819",height:"8.14086",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"0.463378",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter1_f_5333_7017",x:"-1.94918",y:"-6.7065",width:"15.9862",height:"16.1406",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"2.23985",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter2_f_5333_7017",x:"-3.03712",y:"3.12285",width:"14.9666",height:"17.1257",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.90418",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter3_f_5333_7017",x:"-3.03712",y:"3.12285",width:"14.9666",height:"17.1257",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.90418",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter4_f_5333_7017",x:"-2.86183",y:"3.78807",width:"15.0188",height:"15.3529",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.90418",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter5_f_5333_7017",x:"6.49612",y:"-1.29935",width:"14.1491",height:"13.8932",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.80943",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter6_f_5333_7017",x:"-6.39114",y:"-2.1852",width:"14.7181",height:"14.8353",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.6399",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter7_f_5333_7017",x:"2.40345",y:"-0.247677",width:"14.8579",height:"14.606",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.46454",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter8_f_5333_7017",x:"3.43598",y:"-2.60638",width:"10.5997",height:"9.75933",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.31045",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter9_f_5333_7017",x:"-2.04789",y:"-5.01896",width:"13.3468",height:"13.0548",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.10683",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("filter",{id:"filter10_f_5333_7017",x:"-1.7922",y:"4.82486",width:"10.455",height:"9.71453",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[r.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),r.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),r.jsx("feGaussianBlur",{stdDeviation:"1.36998",result:"effect1_foregroundBlur_5333_7017"})]}),r.jsxs("linearGradient",{id:"paint0_linear_5333_7017",x1:"4.35148",y1:"9.05502",x2:"10.7005",y2:"3.70245",gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:"#4893FC"}),r.jsx("stop",{offset:"0.27",stopColor:"#4893FC"}),r.jsx("stop",{offset:"0.777",stopColor:"#969DFF"}),r.jsx("stop",{offset:"1",stopColor:"#BD99FE"})]}),r.jsx("clipPath",{id:"clip0_5333_7017",children:r.jsx("rect",{width:"14",height:"14",fill:"white"})})]})]}),Co=l(bo).attrs({"data-component-name":"icons/GeminiIcon/GeminiIcon"})`
495
+ height: ${({size:e})=>e||"16px"};
496
+ width: ${({size:e})=>e||"16px"};
497
+ `,ko=e=>r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",...e,children:[r.jsx("path",{d:"M12.1683 8.65224C13.4439 7.91782 13.4439 6.08176 12.1683 5.34733L8.48891 3.22903L5.13033 6.57817C5.03961 6.66863 5.03961 6.8153 5.13033 6.90577L8.81674 10.5818L12.1683 8.65224Z",fill:"url(#replay-icon-gradient)"}),r.jsx("path",{d:"M7.56707 11.3013L3.81522 13.4613C2.53957 14.1957 0.945007 13.2777 0.945007 11.8088L0.945008 2.19072C0.945008 0.721872 2.53957 -0.196157 3.81522 0.538267L7.23924 2.50957L4.14475 5.59536C3.5097 6.22861 3.5097 7.25532 4.14475 7.88858L7.56707 11.3013Z",fill:"url(#replay-icon-gradient)"}),r.jsx("defs",{children:r.jsxs("linearGradient",{id:"replay-icon-gradient",x1:"12.0947",y1:"10.9627",x2:"1.65018",y2:"0.120816",gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:"#C361FF"}),r.jsx("stop",{offset:"0.411322",stopColor:"#9461FF"}),r.jsx("stop",{offset:"0.73777",stopColor:"#207DFF"}),r.jsx("stop",{offset:"1",stopColor:"#1DA8F6"})]})})]}),Io=l(ko)`
505
498
  height: ${({size:e})=>e||"14px"};
506
499
  width: ${({size:e})=>e||"14px"};
507
- `;function _i(e){const t="var(--font-size-base)";switch(e){case de:return r.jsx(Ti,{size:t});case ue.OPENAI:return r.jsx(gt,{size:t,color:"var(--text-color-primary)"});case ue.GEMINI:return r.jsx(rn,{size:t});case ue.ANTHROPIC:return r.jsx(xt,{size:t,color:"var(--replay-claude-icon-color)"})}}function Si({models:e,selectedModelId:t,placement:n,onModelSelect:i,onSettingsOpen:o}){const a=e.find(p=>p.id===t),s=a?.label??"Replay AI",c=a?.id,d=e.filter(p=>p.provider===de),u=e.filter(p=>p.provider!==de),f=d.length>0&&u.length>0;return r.jsx(Vi,{children:r.jsx(zi,{trigger:r.jsx(Ai,{label:s}),placement:n,alignment:"start",withArrow:!0,children:r.jsxs(Fi,{children:[r.jsxs(Ei,{children:[d.map(p=>r.jsx(tt,{model:p,activeModelId:c,onModelSelect:i},p.id)),f&&r.jsx(nt,{"aria-hidden":!0}),u.length>0&&r.jsx(r.Fragment,{children:u.map(p=>r.jsx(tt,{model:p,activeModelId:c,onModelSelect:i},p.id))})]}),o&&e.length>0&&r.jsx(nt,{"aria-hidden":!0}),o&&r.jsx(Ri,{prefix:r.jsx(Ot,{size:"var(--font-size-base)",color:"var(--text-color-secondary)"}),content:"Manage models",onAction:()=>o("ai-providers")})]})})})}function Ai({label:e,icon:t,onClick:n,onKeyDown:i}){return r.jsxs(Oi,{onClick:n,onKeyDown:i,children:[r.jsx(Bi,{children:e}),t]})}function tt({model:e,activeModelId:t,onModelSelect:n}){const i=e.id===t;return r.jsx(me,{prefix:_i(e.provider),suffix:i?r.jsx($i,{size:"var(--font-size-base)",color:"var(--text-color-primary)"}):void 0,onAction:()=>n(e.id),active:i,children:r.jsx(Mi,{children:e.label})})}const Oi=l.div`
500
+ `;function To(e){const t="var(--font-size-base)";switch(e){case de:return r.jsx(Io,{size:t});case ue.OPENAI:return r.jsx(gt,{size:t,color:"var(--text-color-primary)"});case ue.GEMINI:return r.jsx(Co,{size:t});case ue.ANTHROPIC:return r.jsx(xt,{size:t,color:"var(--replay-claude-icon-color)"})}}function _o({models:e,selectedModelId:t,placement:n,onModelSelect:o,onSettingsOpen:i}){const a=e.find(p=>p.id===t),s=a?.label??"Replay AI",c=a?.id,d=e.filter(p=>p.provider===de),u=e.filter(p=>p.provider!==de),f=d.length>0&&u.length>0;return r.jsx(Bo,{children:r.jsx(Vo,{trigger:r.jsx(So,{label:s}),placement:n,alignment:"start",withArrow:!0,children:r.jsxs(zo,{children:[r.jsxs(Fo,{children:[d.map(p=>r.jsx(tt,{model:p,activeModelId:c,onModelSelect:o},p.id)),f&&r.jsx(nt,{"aria-hidden":!0}),u.length>0&&r.jsx(r.Fragment,{children:u.map(p=>r.jsx(tt,{model:p,activeModelId:c,onModelSelect:o},p.id))})]}),i&&e.length>0&&r.jsx(nt,{"aria-hidden":!0}),i&&r.jsx(Ro,{prefix:r.jsx(Ot,{size:"var(--font-size-base)",color:"var(--text-color-secondary)"}),content:"Manage models",onAction:()=>i("ai-providers")})]})})})}function So({label:e,icon:t,onClick:n,onKeyDown:o}){return r.jsxs(Ao,{onClick:n,onKeyDown:o,children:[r.jsx(Oo,{children:e}),t]})}function tt({model:e,activeModelId:t,onModelSelect:n}){const o=e.id===t;return r.jsx(ye,{prefix:To(e.provider),suffix:o?r.jsx($o,{size:"var(--font-size-base)",color:"var(--text-color-primary)"}):void 0,onAction:()=>n(e.id),active:o,children:r.jsx(Mo,{children:e.label})})}const Ao=l.div`
508
501
  display: flex;
509
502
  align-items: center;
510
503
  min-width: 0;
@@ -519,7 +512,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
519
512
  &:hover {
520
513
  background: var(--layer-color-active);
521
514
  }
522
- `,Bi=l.span`
515
+ `,Oo=l.span`
523
516
  overflow: hidden;
524
517
  text-overflow: ellipsis;
525
518
  font-family: var(--font-family-base);
@@ -528,13 +521,13 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
528
521
  line-height: var(--line-height-base);
529
522
  color: var(--text-color-primary);
530
523
  white-space: nowrap;
531
- `,Vi=l.div`
524
+ `,Bo=l.div`
532
525
  --dropdown-menu-padding-top: 0;
533
526
 
534
527
  min-width: 0;
535
528
  flex: 1;
536
529
  position: relative;
537
- `,zi=l(pt)`
530
+ `,Vo=l(pt)`
538
531
  width: 100%;
539
532
  min-width: 0;
540
533
  flex: 1;
@@ -543,7 +536,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
543
536
  width: 100%;
544
537
  max-width: 200px;
545
538
  }
546
- `,Fi=l(ft)`
539
+ `,zo=l(ft)`
547
540
  --dropdown-menu-item-gap: calc(var(--spacing-unit) / 2);
548
541
  --dropdown-menu-item-padding-vertical: var(--spacing-xxs);
549
542
  --dropdown-menu-item-padding-horizontal: var(--spacing-xs);
@@ -552,13 +545,13 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
552
545
  margin: 5px 0;
553
546
  border-radius: var(--border-radius-lg);
554
547
  background: var(--bg-color);
555
- `,Mi=l.span`
548
+ `,Mo=l.span`
556
549
  flex: 1;
557
550
  min-width: 0;
558
551
  overflow: hidden;
559
552
  text-overflow: ellipsis;
560
553
  white-space: nowrap;
561
- `,$i=l(ht)`
554
+ `,$o=l(ht)`
562
555
  margin-left: var(--spacing-xxs);
563
556
  `,nt=l.li`
564
557
  flex-shrink: 0;
@@ -567,16 +560,16 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
567
560
  height: 1px;
568
561
  margin: 0;
569
562
  background: var(--border-color-secondary);
570
- `,Ei=l.li`
563
+ `,Fo=l.li`
571
564
  display: flex;
572
565
  flex-direction: column;
573
566
  gap: var(--dropdown-menu-item-gap);
574
567
  list-style: none;
575
568
  min-height: 0;
576
569
  overflow-y: auto;
577
- `,Ri=l(me)`
570
+ `,Ro=l(ye)`
578
571
  flex-shrink: 0;
579
- `,Li=280;function rt({pinToBottom:e=!1}){const[t,n]=h.useState(()=>je().getIndexingActivityState().inProgress);return h.useEffect(()=>je().subscribe("indexing-activity",i=>{n(i.inProgress)}),[]),r.jsx(Ni,{$open:t,$pinToBottom:e,"aria-hidden":!t,children:r.jsx(R,{tip:"We're building a search index of your project. Until it's ready, the assistant may need more context in each reply to stay accurate, which can use more tokens.",placement:"top",width:"240px",arrowPosition:"left",children:r.jsxs(Di,{role:"status","aria-live":"polite","aria-label":"Indexing in progress...",children:[r.jsx("div",{children:r.jsx(W,{})}),r.jsx(Pi,{children:"Indexing in progress..."})]})})})}const Ni=l.div`
572
+ `,Eo=280;function rt({pinToBottom:e=!1}){const[t,n]=h.useState(()=>_e().getIndexingActivityState().inProgress);return h.useEffect(()=>_e().subscribe("indexing-activity",o=>{n(o.inProgress)}),[]),r.jsx(Lo,{$open:t,$pinToBottom:e,"aria-hidden":!t,children:r.jsx(E,{tip:"We're building a search index of your project. Until it's ready, the assistant may need more context in each reply to stay accurate, which can use more tokens.",placement:"top",width:"240px",arrowPosition:"left",children:r.jsxs(No,{role:"status","aria-live":"polite","aria-label":"Indexing in progress...",children:[r.jsx("div",{children:r.jsx(W,{})}),r.jsx(Do,{children:"Indexing in progress..."})]})})})}const Lo=l.div`
580
573
  width: 100%;
581
574
  display: block;
582
575
 
@@ -593,13 +586,13 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
593
586
  `}
594
587
 
595
588
  opacity: ${({$open:e})=>e?1:0};
596
- transition: opacity ${Li}ms ease-out;
589
+ transition: opacity ${Eo}ms ease-out;
597
590
  pointer-events: ${({$open:e})=>e?"auto":"none"};
598
591
 
599
592
  ${W} {
600
593
  animation-play-state: ${({$open:e})=>e?"running":"paused"};
601
594
  }
602
- `,Di=l.div`
595
+ `,No=l.div`
603
596
  width: 100%;
604
597
  display: flex;
605
598
  align-items: center;
@@ -609,10 +602,10 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
609
602
  border-radius: 4px;
610
603
  font-size: var(--font-size-sm);
611
604
  line-height: 12px;
612
- `,Pi=l.div`
605
+ `,Do=l.div`
613
606
  flex: 1;
614
607
  min-width: 0;
615
- `;function Ui(){const{chatId:e,isLoading:t,pendingComposerPreset:n,clearPendingComposerPreset:i,availableModels:o,selectedModelId:a,selectModel:s,onSettingsOpen:c}=be(),{messages:d,isStreaming:u,sendMessage:f,stopGeneration:p}=H(),{isOpen:x}=Ce(),[g,v]=h.useState(""),j=h.useRef(null),y=h.useRef(null),w=h.useRef(!0),m=d.length>0,T=t||m,O=ki(d.length),S=O!==void 0&&O>0&&!m,M=h.useCallback((B="smooth")=>{y.current&&y.current.scrollTo({top:y.current.scrollHeight,behavior:B})},[]),Z=h.useCallback(()=>{const B=y.current;B&&B.scrollHeight-B.scrollTop-B.clientHeight<50&&(w.current=!0)},[]);h.useEffect(()=>{const B=y.current;if(!B)return;const ge=lt=>{lt.deltaY<0&&(w.current=!1)};return B.addEventListener("wheel",ge,{passive:!0}),()=>B.removeEventListener("wheel",ge)},[]);const Y=h.useCallback(async()=>{g&&(v(""),w.current=!0,await f(g),j.current&&requestAnimationFrame(()=>j.current?.focus()))},[f,g]);h.useEffect(()=>{x&&(j.current&&j.current.focus(),w.current=!0,M())},[x,d.length,M]),h.useEffect(()=>{u&&w.current&&M()}),h.useEffect(function(){x&&j.current&&(j.current.focus(),M("instant"))},[e,x,M]),h.useEffect(function(){!x||n===null||(v(n),i())},[x,n,i]);const st=r.jsx(sn,{value:g,onValueChange:v,onSubmit:Y,isStreaming:u,onStop:p,textareaRef:j,modelSelector:r.jsx(Si,{models:o,selectedModelId:a,placement:m?"top":"bottom",onModelSelect:s,onSettingsOpen:c})});return r.jsxs(et,{children:[r.jsx(Hi,{ref:y,$isExpanded:T,$isAnimated:u||S,onScroll:Z,children:t?r.jsx(Ki,{children:r.jsx(pe,{size:"20px"})}):r.jsx(bi,{})}),r.jsxs(Gi,{$isExpanded:!T,children:[r.jsx(rt,{pinToBottom:!T}),st]})]})}const Hi=l.div`
608
+ `;function Po(){const{chatId:e,isLoading:t,pendingComposerPreset:n,clearPendingComposerPreset:o,availableModels:i,selectedModelId:a,selectModel:s,onSettingsOpen:c}=Ce(),{messages:d,isStreaming:u,sendMessage:f,stopGeneration:p}=H(),{isOpen:x}=ke(),[g,v]=h.useState(""),b=h.useRef(null),y=h.useRef(null),w=h.useRef(!0),m=d.length>0,T=t||m,O=jo(d.length),S=O!==void 0&&O>0&&!m,$=h.useCallback((B="smooth")=>{y.current&&y.current.scrollTo({top:y.current.scrollHeight,behavior:B})},[]),Z=h.useCallback(()=>{const B=y.current;B&&B.scrollHeight-B.scrollTop-B.clientHeight<50&&(w.current=!0)},[]);h.useEffect(()=>{const B=y.current;if(!B)return;const ve=lt=>{lt.deltaY<0&&(w.current=!1)};return B.addEventListener("wheel",ve,{passive:!0}),()=>B.removeEventListener("wheel",ve)},[]);const Y=h.useCallback(async()=>{g&&(v(""),w.current=!0,await f(g),b.current&&requestAnimationFrame(()=>b.current?.focus()))},[f,g]);h.useEffect(()=>{x&&(b.current&&b.current.focus(),w.current=!0,$())},[x,d.length,$]),h.useEffect(()=>{u&&w.current&&$()}),h.useEffect(function(){x&&b.current&&(b.current.focus(),$("instant"))},[e,x,$]),h.useEffect(function(){!x||n===null||(v(n),o())},[x,n,o]);const st=r.jsx(nn,{value:g,onValueChange:v,onSubmit:Y,isStreaming:u,onStop:p,textareaRef:b,modelSelector:r.jsx(_o,{models:i,selectedModelId:a,placement:m?"top":"bottom",onModelSelect:s,onSettingsOpen:c})});return r.jsxs(et,{children:[r.jsx(Uo,{ref:y,$isExpanded:T,$isAnimated:u||S,onScroll:Z,children:t?r.jsx(Go,{children:r.jsx(pe,{size:"20px"})}):r.jsx(yo,{})}),r.jsxs(Ho,{$isExpanded:!T,children:[r.jsx(rt,{pinToBottom:!T}),st]})]})}const Uo=l.div`
616
609
  flex: ${({$isExpanded:e})=>e?1:0};
617
610
  width: 100%;
618
611
  overflow: auto;
@@ -620,54 +613,54 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
620
613
  transition-property: flex;
621
614
  transition-duration: ${e=>e.$isAnimated?"var(--replay-transition-duration)":"0s"};
622
615
  transition-timing-function: var(--replay-transition-timing-function);
623
- `,Gi=l.div`
616
+ `,Ho=l.div`
624
617
  position: relative;
625
618
  display: flex;
626
619
  flex-direction: column;
627
620
  width: 100%;
628
621
  flex: ${({$isExpanded:e})=>e?1:0};
629
- `,Ki=l.div`
622
+ `,Go=l.div`
630
623
  display: flex;
631
624
  justify-content: center;
632
625
  height: 100%;
633
626
  padding-top: var(--spacing-lg);
634
- `,F={TODAY:"today",YESTERDAY:"yesterday",LAST_WEEK:"last_week",LAST_MONTH:"last_month",OLDER:"older"},Wi={[F.TODAY]:"Today",[F.YESTERDAY]:"Yesterday",[F.LAST_WEEK]:"Last 7 days",[F.LAST_MONTH]:"Last 30 days",[F.OLDER]:"Older"};function Zi(e,t=Date.now()){const n=L(e).startOf("day"),i=L(t).startOf("day"),o=L(t).subtract(1,"day").startOf("day"),a=L(t).subtract(7,"day").startOf("day"),s=L(t).subtract(30,"day").startOf("day");return n.isSame(i,"day")?F.TODAY:n.isSame(o,"day")?F.YESTERDAY:!n.isBefore(a,"day")&&n.isBefore(o,"day")?F.LAST_WEEK:!n.isBefore(s,"day")&&n.isBefore(a,"day")?F.LAST_MONTH:F.OLDER}function Yi(e){const t=[];for(const n of e){const i=Zi(n.updatedAt),o=t[t.length-1];!o||o.bucket!==i?t.push({bucket:i,chats:[n]}):o.chats.push(n)}return t}function qi(e){const{scrollRef:t,sentinelRef:n,hasNextPage:i,isFetchingNextPage:o,fetchNextPage:a,observerResetKey:s}=e;h.useLayoutEffect(()=>{const c=t.current,d=n.current;if(!c||!d)return;const u=new IntersectionObserver(f=>{const p=f[0];p&&p.isIntersecting&&i&&(o||a())},{root:c,rootMargin:"80px"});return u.observe(d),()=>{u.disconnect()}},[s,a,i,o,t,n])}const it=l(et)`
627
+ `,M={TODAY:"today",YESTERDAY:"yesterday",LAST_WEEK:"last_week",LAST_MONTH:"last_month",OLDER:"older"},Ko={[M.TODAY]:"Today",[M.YESTERDAY]:"Yesterday",[M.LAST_WEEK]:"Last 7 days",[M.LAST_MONTH]:"Last 30 days",[M.OLDER]:"Older"};function Wo(e,t=Date.now()){const n=L(e).startOf("day"),o=L(t).startOf("day"),i=L(t).subtract(1,"day").startOf("day"),a=L(t).subtract(7,"day").startOf("day"),s=L(t).subtract(30,"day").startOf("day");return n.isSame(o,"day")?M.TODAY:n.isSame(i,"day")?M.YESTERDAY:!n.isBefore(a,"day")&&n.isBefore(i,"day")?M.LAST_WEEK:!n.isBefore(s,"day")&&n.isBefore(a,"day")?M.LAST_MONTH:M.OLDER}function Zo(e){const t=[];for(const n of e){const o=Wo(n.updatedAt),i=t[t.length-1];!i||i.bucket!==o?t.push({bucket:o,chats:[n]}):i.chats.push(n)}return t}function Yo(e){const{scrollRef:t,sentinelRef:n,hasNextPage:o,isFetchingNextPage:i,fetchNextPage:a,observerResetKey:s}=e;h.useLayoutEffect(()=>{const c=t.current,d=n.current;if(!c||!d)return;const u=new IntersectionObserver(f=>{const p=f[0];p&&p.isIntersecting&&o&&(i||a())},{root:c,rootMargin:"80px"});return u.observe(d),()=>{u.disconnect()}},[s,a,o,i,t,n])}const ot=l(et)`
635
628
  gap: var(--spacing-xxs);
636
629
  user-select: none;
637
- `,Ji=l.div`
630
+ `,qo=l.div`
638
631
  display: flex;
639
632
  flex-direction: column;
640
633
  gap: var(--spacing-xs);
641
- `,Qi=l.div`
634
+ `,Jo=l.div`
642
635
  display: flex;
643
636
  flex-direction: column;
644
637
  gap: var(--spacing-xxs);
645
- `,Xi=l(it)`
638
+ `,Qo=l(ot)`
646
639
  display: flex;
647
640
  flex-grow: 1;
648
641
  align-items: center;
649
642
  flex-direction: column;
650
643
  padding: var(--spacing-md);
651
- `,eo=l.div`
644
+ `,Xo=l.div`
652
645
  display: flex;
653
646
  flex-grow: 1;
654
647
  align-items: center;
655
648
  justify-content: center;
656
- `,to=l.div`
649
+ `,ei=l.div`
657
650
  display: flex;
658
651
  flex-direction: column;
659
652
  align-items: center;
660
653
  max-width: 75%;
661
654
  gap: var(--spacing-xxs);
662
- `,no=l.div`
655
+ `,ti=l.div`
663
656
  display: flex;
664
657
  justify-content: center;
665
658
  padding: var(--spacing-xs);
666
- `,ro=l(U)`
659
+ `,ni=l(U)`
667
660
  padding-left: var(--spacing-xs);
668
661
  font-size: var(--font-size-sm);
669
662
  color: var(--color-warm-grey-7);
670
- `,io=l.div`
663
+ `,ri=l.div`
671
664
  display: flex;
672
665
  flex-grow: 1;
673
666
 
@@ -675,7 +668,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
675
668
  flex-grow: 1;
676
669
  min-width: 0;
677
670
  }
678
- `,oo=l.div`
671
+ `,oi=l.div`
679
672
  display: flex;
680
673
  align-items: center;
681
674
  justify-content: space-between;
@@ -698,19 +691,26 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
698
691
  display: inline-flex;
699
692
  }
700
693
  }
701
- `,ao=l(U)`
694
+ `,ii=l(U)`
702
695
  overflow: hidden;
703
696
  white-space: nowrap;
704
697
  text-overflow: ellipsis;
705
- `,so=l.div`
698
+ `,ai=l.div`
706
699
  height: 1px;
707
700
  flex-shrink: 0;
708
- `;function lo(e){const{chat:t,onSelect:n,onRemove:i}=e;return r.jsx(io,{children:r.jsx(R,{tip:L(t.updatedAt).format("MMM DD, YYYY, hh:mm:ss A"),className:"expanded",children:r.jsxs(oo,{role:"button",onClick:()=>n?.(t.id),children:[r.jsx(ao,{children:t.title??"New chat"}),r.jsx(_,{variant:"ghost",size:"small",tone:"danger",icon:r.jsx(Bt,{}),onClick:o=>{o.stopPropagation(),i?.(t.id)}})]})})})}function co(e){const{group:t,onChatSelect:n,onChatRemove:i}=e;return r.jsxs(Qi,{children:[r.jsx(ro,{children:Wi[t.bucket]}),t.chats.map(o=>r.jsx(lo,{chat:o,onSelect:n,onRemove:i},o.id))]})}function uo(){return r.jsx(eo,{children:r.jsxs(to,{children:[r.jsx(U,{textAlign:"center",fontWeight:"var(--font-weight-semibold)",children:"No chat history"}),r.jsx(U,{textAlign:"center",children:"Ask questions or let the assistant take action for you."})]})})}function po(){return r.jsx(Xi,{children:r.jsx(pe,{})})}const fo=50;function ho(e){const{onChatSelect:t,onChatRemove:n}=e,i=h.useRef(null),o=h.useRef(null),{data:a,isPending:s,hasNextPage:c,isFetchingNextPage:d,fetchNextPage:u}=Zt(fo),f=h.useMemo(()=>(a?.pages??[]).flatMap(x=>x.items),[a?.pages]),p=h.useMemo(()=>Yi(f),[f]);return qi({scrollRef:i,sentinelRef:o,hasNextPage:c,isFetchingNextPage:d,fetchNextPage:u,observerResetKey:a?.pages.length}),s&&!a?r.jsx(po,{}):f.length===0?r.jsx(uo,{}):r.jsxs(it,{ref:i,children:[r.jsx(Ji,{children:p.map(x=>r.jsx(co,{group:x,onChatSelect:t,onChatRemove:n},`${x.bucket}-${x.chats[0]?.id??""}`))}),c&&r.jsx(so,{ref:o,"aria-hidden":!0}),d&&r.jsx(no,{children:r.jsx(pe,{})})]})}function xo(){const e=h.useRef(null),[t,n]=h.useState(!1);return h.useLayoutEffect(()=>{if(!e.current)return;const i=e.current;function o(){n(i.scrollWidth>i.clientWidth)}o();const a=new ResizeObserver(o);return a.observe(i),()=>a.disconnect()},[]),{ref:e,value:t}}function go(e){const{ref:t,value:n}=xo();return r.jsx(mo,{children:r.jsx(R,{tip:e.value,className:"no-overflow",disabled:!n,children:r.jsx(vo,{ref:t,children:e.value})})})}const mo=l.div`
701
+ `;function si(e){const{chat:t,onSelect:n,onRemove:o}=e;return r.jsx(ri,{children:r.jsx(E,{tip:L(t.updatedAt).format("MMM DD, YYYY, hh:mm:ss A"),className:"expanded",children:r.jsxs(oi,{role:"button",onClick:()=>n?.(t.id),children:[r.jsx(ii,{children:t.title??"New chat"}),r.jsx(_,{variant:"ghost",size:"small",tone:"danger",icon:r.jsx(Bt,{}),onClick:i=>{i.stopPropagation(),o?.(t.id)}})]})})})}function li(e){const{group:t,onChatSelect:n,onChatRemove:o}=e;return r.jsxs(Jo,{children:[r.jsx(ni,{children:Ko[t.bucket]}),t.chats.map(i=>r.jsx(si,{chat:i,onSelect:n,onRemove:o},i.id))]})}function ci(){return r.jsx(Xo,{children:r.jsxs(ei,{children:[r.jsx(U,{textAlign:"center",fontWeight:"var(--font-weight-semibold)",children:"No chat history"}),r.jsx(U,{textAlign:"center",children:"Ask questions or let the assistant take action for you."})]})})}function di(){return r.jsx(Qo,{children:r.jsx(pe,{})})}const ui=50;function pi(e){const{onChatSelect:t,onChatRemove:n}=e,o=h.useRef(null),i=h.useRef(null),{data:a,isPending:s,hasNextPage:c,isFetchingNextPage:d,fetchNextPage:u}=Zt(ui),f=h.useMemo(()=>(a?.pages??[]).flatMap(x=>x.items),[a?.pages]),p=h.useMemo(()=>Zo(f),[f]);return Yo({scrollRef:o,sentinelRef:i,hasNextPage:c,isFetchingNextPage:d,fetchNextPage:u,observerResetKey:a?.pages.length}),s&&!a?r.jsx(di,{}):f.length===0?r.jsx(ci,{}):r.jsxs(ot,{ref:o,children:[r.jsx(qo,{children:p.map(x=>r.jsx(li,{group:x,onChatSelect:t,onChatRemove:n},`${x.bucket}-${x.chats[0]?.id??""}`))}),c&&r.jsx(ai,{ref:i,"aria-hidden":!0}),d&&r.jsx(ti,{children:r.jsx(pe,{})})]})}function fi(e){return r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[r.jsx("path",{fill:"currentColor",d:"M11.375 11.375H2.625V2.625H7V1.75H2.625C2.39301 1.75023 2.17058 1.84249 2.00654 2.00654C1.84249 2.17058 1.75023 2.39301 1.75 2.625V11.375C1.75023 11.607 1.84249 11.8294 2.00654 11.9935C2.17058 12.1575 2.39301 12.2498 2.625 12.25H11.375C11.607 12.2498 11.8294 12.1575 11.9935 11.9935C12.1575 11.8294 12.2498 11.607 12.25 11.375V7H11.375V11.375Z"}),r.jsx("path",{fill:"currentColor",d:"M11.375 2.625V0.875H10.5V2.625H8.75V3.5H10.5V5.25H11.375V3.5H13.125V2.625H11.375Z"})]})}const hi=l(fi).attrs({"data-component-name":"icons/NewChatIcon/NewChatIcon"})`
702
+ path {
703
+ fill: ${({color:e})=>q(e)};
704
+ }
705
+
706
+ height: ${({size:e="14px"})=>e};
707
+ width: ${({size:e="14px"})=>e};
708
+ `;function xi(){const e=h.useRef(null),[t,n]=h.useState(!1);return h.useLayoutEffect(()=>{if(!e.current)return;const o=e.current;function i(){n(o.scrollWidth>o.clientWidth)}i();const a=new ResizeObserver(i);return a.observe(o),()=>a.disconnect()},[]),{ref:e,value:t}}function gi(e){const{ref:t,value:n}=xi();return r.jsx(mi,{children:r.jsx(E,{tip:e.value,className:"no-overflow",disabled:!n,children:r.jsx(vi,{ref:t,children:e.value})})})}const mi=l.div`
709
709
  overflow: hidden;
710
710
  .tooltip-no-overflow {
711
711
  overflow: hidden;
712
712
  }
713
- `,vo=l.div`
713
+ `,vi=l.div`
714
714
  color: var(--text-color-primary);
715
715
  font-size: var(--font-size-base);
716
716
  line-height: var(--line-height-base);
@@ -718,7 +718,7 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
718
718
  white-space: nowrap;
719
719
  text-overflow: ellipsis;
720
720
  user-select: none;
721
- `;function ot(e){const{children:t,buttons:n}=e;return r.jsxs(yo,{children:[r.jsx(wo,{children:t}),n&&r.jsx(jo,{children:n})]})}const yo=l.div`
721
+ `;function it(e){const{children:t,buttons:n}=e;return r.jsxs(yi,{children:[r.jsx(wi,{children:t}),n&&r.jsx(ji,{children:n})]})}const yi=l.div`
722
722
  display: flex;
723
723
  flex-direction: row;
724
724
  align-items: center;
@@ -726,28 +726,28 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
726
726
  gap: var(--spacing-xs);
727
727
  width: 100%;
728
728
  flex-shrink: 0;
729
- `,wo=l.div`
729
+ `,wi=l.div`
730
730
  display: flex;
731
731
  align-items: center;
732
732
  gap: var(--spacing-xs);
733
733
  min-width: 0;
734
734
  flex: 1;
735
- `,jo=l.div`
735
+ `,ji=l.div`
736
736
  display: flex;
737
737
  align-items: center;
738
738
  gap: 2px;
739
- `;function bo(e){const{title:t,onCreateNewChat:n,onViewHistory:i,onClose:o}=e,a=r.jsxs(r.Fragment,{children:[r.jsx(R,{tip:"New chat",children:r.jsx(_,{size:"small",variant:"text","aria-label":"Create new chat",onClick:n,icon:r.jsx(an,{})})}),r.jsx(R,{tip:"Chat history",children:r.jsx(_,{size:"small",variant:"text","aria-label":"View chat history",onClick:i,icon:r.jsx(zt,{})})}),r.jsx(ko,{children:r.jsx(Ft,{})}),r.jsx(R,{tip:"Close",arrowPosition:"left",children:r.jsx(_,{variant:"text",size:"small","aria-label":"Close panel",icon:r.jsx(mt,{}),onClick:o})})]});return r.jsxs(ot,{buttons:a,children:[r.jsx(Co,{children:r.jsx(Vt,{size:"14px"})}),r.jsx(go,{value:t})]})}const Co=l.div`
739
+ `;function bi(e){const{title:t,onCreateNewChat:n,onViewHistory:o,onClose:i}=e,a=r.jsxs(r.Fragment,{children:[r.jsx(E,{tip:"New chat",children:r.jsx(_,{size:"small",variant:"text","aria-label":"Create new chat",onClick:n,icon:r.jsx(hi,{})})}),r.jsx(E,{tip:"Chat history",children:r.jsx(_,{size:"small",variant:"text","aria-label":"View chat history",onClick:o,icon:r.jsx(zt,{})})}),r.jsx(ki,{children:r.jsx(Mt,{})}),r.jsx(E,{tip:"Close",arrowPosition:"left",children:r.jsx(_,{variant:"text",size:"small","aria-label":"Close panel",icon:r.jsx(mt,{}),onClick:i})})]});return r.jsxs(it,{buttons:a,children:[r.jsx(Ci,{children:r.jsx(Vt,{size:"14px"})}),r.jsx(gi,{value:t})]})}const Ci=l.div`
740
740
  display: flex;
741
- `,ko=l.div`
741
+ `,ki=l.div`
742
742
  display: flex;
743
743
  height: 14px;
744
- `;function Io(e){const{onReturnFromHistory:t}=e;return r.jsxs(ot,{children:[r.jsx(_,{size:"small",variant:"text","aria-label":"Return to chat",onClick:t,icon:r.jsx(Mt,{})}),r.jsx(To,{children:r.jsx(U,{children:"Chat history"})})]})}const To=l.div`
744
+ `;function Ii(e){const{onReturnFromHistory:t}=e;return r.jsxs(it,{children:[r.jsx(_,{size:"small",variant:"text","aria-label":"Return to chat",onClick:t,icon:r.jsx($t,{})}),r.jsx(Ti,{children:r.jsx(U,{children:"Chat history"})})]})}const Ti=l.div`
745
745
  user-select: none;
746
- `;function _o(){const[e,t]=h.useState(N.CHAT),n=Ce(),i=be(),o=()=>{t(N.HISTORY)},a=()=>{t(N.CHAT)},s=async c=>{i.selectChat(c),t(N.CHAT)};return r.jsxs(So,{children:[r.jsxs(at,{isActive:e===N.CHAT,children:[r.jsx(bo,{title:i.title,onCreateNewChat:i.createNewChat,onViewHistory:o,onClose:n.closePanel}),r.jsx(Ui,{})]}),r.jsxs(at,{isActive:e===N.HISTORY,isSliding:!0,children:[r.jsx(Io,{onReturnFromHistory:a}),r.jsx(ho,{onChatSelect:s,onChatRemove:i.removeChat}),r.jsx(Oo,{children:r.jsx(rt,{pinToBottom:!0})})]})]})}function at(e){const{children:t,isActive:n,isSliding:i=!1}=e,o=r.jsx(Ao,{inert:!n,children:t});return i?r.jsx(Bo,{$isExpanded:n,children:o}):o}const So=l.div`
746
+ `;function _i(){const[e,t]=h.useState(N.CHAT),n=ke(),o=Ce(),i=()=>{t(N.HISTORY)},a=()=>{t(N.CHAT)},s=async c=>{o.selectChat(c),t(N.CHAT)};return r.jsxs(Si,{children:[r.jsxs(at,{isActive:e===N.CHAT,children:[r.jsx(bi,{title:o.title,onCreateNewChat:o.createNewChat,onViewHistory:i,onClose:n.closePanel}),r.jsx(Po,{})]}),r.jsxs(at,{isActive:e===N.HISTORY,isSliding:!0,children:[r.jsx(Ii,{onReturnFromHistory:a}),r.jsx(pi,{onChatSelect:s,onChatRemove:o.removeChat}),r.jsx(Oi,{children:r.jsx(rt,{pinToBottom:!0})})]})]})}function at(e){const{children:t,isActive:n,isSliding:o=!1}=e,i=r.jsx(Ai,{inert:!n,children:t});return o?r.jsx(Bi,{$isExpanded:n,children:i}):i}const Si=l.div`
747
747
  position: relative;
748
748
  height: 100%;
749
749
  overflow: clip;
750
- `,Ao=l.div`
750
+ `,Ai=l.div`
751
751
  display: flex;
752
752
  height: 100%;
753
753
  flex-direction: column;
@@ -755,12 +755,12 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
755
755
  border-radius: var(--border-radius-md);
756
756
  background: var(--bg-color);
757
757
  margin-left: var(--spacing-xxs);
758
- `,Oo=l.div`
758
+ `,Oi=l.div`
759
759
  display: flex;
760
760
  flex-direction: column;
761
761
  width: 100%;
762
762
  padding: 0 var(--spacing-xs) var(--spacing-xs);
763
- `,Bo=l.div`
763
+ `,Bi=l.div`
764
764
  position: absolute;
765
765
  inset: 0;
766
766
  transform: translateX(${e=>e.$isExpanded?"0%":"100%"});
@@ -770,4 +770,4 @@ import{g as q,a as l,j as r,f as ae,B as _,r as h,e as ct,U as dt,ai as ut,D as
770
770
  @media (prefers-reduced-motion: reduce) {
771
771
  transition-duration: 0ms;
772
772
  }
773
- `;export{_o as AiPanel};
773
+ `;export{_i as AiPanel};