@redocly/openapi-docs 3.24.0-next.6 → 3.24.0-next.7

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 (29) hide show
  1. package/dist/redocly-openapi-docs.min.AiChatProvider-gAsQoX30.js +32 -0
  2. package/dist/{redocly-openapi-docs.min.AiChatSqliteDBStorage-C5E-x8f4.js → redocly-openapi-docs.min.AiChatSqliteDBStorage-CnYt8ojK.js} +1 -1
  3. package/dist/{redocly-openapi-docs.min.AiPanel-Z2Zw-OOK.js → redocly-openapi-docs.min.AiPanel-Bvkd__SH.js} +119 -119
  4. package/dist/{redocly-openapi-docs.min.SqliteDBStorage-B6uym4Oj.js → redocly-openapi-docs.min.SqliteDBStorage-C6xTN7YJ.js} +1 -1
  5. package/dist/{redocly-openapi-docs.min.ai-chat-mappers-y6k4QA37.js → redocly-openapi-docs.min.ai-chat-mappers-3WKBUVis.js} +1 -1
  6. package/dist/redocly-openapi-docs.min.external-resolver-4BBxclf5.js +2 -0
  7. package/dist/{redocly-openapi-docs.min.index-D5tgmAoY.js → redocly-openapi-docs.min.index-C4nhoQHY.js} +1 -1
  8. package/dist/redocly-openapi-docs.min.index-DswpnLh3.js +7564 -0
  9. package/dist/redocly-openapi-docs.min.index-IvDdPWpQ.js +1 -0
  10. package/dist/redocly-openapi-docs.min.index-qqKTpI_q.js +1 -0
  11. package/dist/redocly-openapi-docs.min.js +1 -1
  12. package/dist/redocly-openapi-docs.min.lint-DxrZW_dt.js +181 -0
  13. package/dist/{redocly-openapi-docs.min.lint-graphql-CAO-eUMC.js → redocly-openapi-docs.min.lint-graphql-BJaf-iso.js} +1 -1
  14. package/dist/redocly-openapi-docs.min.respect-run-BxLhw6rg.js +78 -0
  15. package/dist/{redocly-openapi-docs.min.standalone-C6JXws-S.js → redocly-openapi-docs.min.standalone-DYNn4rpC.js} +1088 -1063
  16. package/dist/redocly-openapi-docs.min.tauri-path-DkXXjCOS.js +1 -0
  17. package/dist/{redocly-openapi-docs.min.useAiChatQueries-CYikEfuU.js → redocly-openapi-docs.min.useAiChatQueries-DA3WodeG.js} +127 -106
  18. package/lib/components/Replay/Replay.js +1 -1
  19. package/lib/services/config-options/normalizeOptions.js +1 -1
  20. package/lib/utils/dom.js +1 -1
  21. package/package.json +5 -5
  22. package/dist/redocly-openapi-docs.min.AiChatProvider-C_OmERaa.js +0 -32
  23. package/dist/redocly-openapi-docs.min.external-resolver-6xHVd9y7.js +0 -2
  24. package/dist/redocly-openapi-docs.min.index-B2kW1MJX.js +0 -1
  25. package/dist/redocly-openapi-docs.min.index-DHNqz_Gi.js +0 -7694
  26. package/dist/redocly-openapi-docs.min.index-DkqHu0CX.js +0 -1
  27. package/dist/redocly-openapi-docs.min.lint-CmpdR_qH.js +0 -181
  28. package/dist/redocly-openapi-docs.min.respect-run-DjAvzRiR.js +0 -78
  29. package/dist/redocly-openapi-docs.min.tauri-path-DySEV5MH.js +0 -1
@@ -1,35 +1,35 @@
1
- import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D as ut,h as pt,m as ue,n as ft,ay as ht,az as xt,ab as G,d as gt}from"./redocly-openapi-docs.min.standalone-C6JXws-S.js";import{y as pe,f as mt,z as fe,q as he,m as vt,n as yt,B as wt,C as jt,E as te,F as ne,G as bt,H as Ct,S as F,J as re,K as kt,L as It,M as xe,N as _t,O as Tt,R as ie,P as St,Q as oe,U as ge,s as me,V as se,W as N,X as At,Y as Ot,Z as Vt,_ as Bt,$ as zt}from"./redocly-openapi-docs.min.index-DHNqz_Gi.js";import{z as Mt,B as $t,C as Ft,E as Et,F as Rt,G as Nt,H as ve,I as C,J as ye,K as Dt,L as Lt,M as H,N as Pt,O as Ut,P as Gt,Q as V,R as Ht,S as D}from"./redocly-openapi-docs.min.useAiChatQueries-CYikEfuU.js";function Z(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Kt=45e3,Wt=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"})}),Zt=a(Wt).attrs({"data-component-name":"icons/SubtractIcon/SubtractIcon"})`
1
+ import{g as W,a as l,j as r,r as h,ah as E,f as lt,B as A,e as ct,U as dt,ai as ut,D as pt,h as ft,m as pe,n as ht,aD as xt,aE as gt,ae as H,d as mt}from"./redocly-openapi-docs.min.standalone-DYNn4rpC.js";import{z as fe,f as Z,B as he,C as vt,e as yt,q as xe,m as wt,n as jt,E as bt,F as Ct,G as ne,H as re,J as kt,K as It,S as $,L as ie,M as Tt,N as _t,O as ge,P as St,Q as At,R as oe,U as Ot,V as ae,W as me,t as ve,X as se,Y as N,Z as Vt,_ as Bt,$ as zt,a0 as Mt,a1 as Ft}from"./redocly-openapi-docs.min.index-DswpnLh3.js";import{B as $t,C as Rt,E as Et,F as Nt,G as Dt,H as Pt,I as Lt,J as ye,K as C,L as we,M as Ut,N as Ht,O as G,P as Gt,Q as Kt,R as Wt,S as V,U as Zt,V as D}from"./redocly-openapi-docs.min.useAiChatQueries-DA3WodeG.js";function Y(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})=>W(e)};
4
4
  }
5
5
 
6
6
  height: ${({size:e})=>e||"16px"};
7
7
  width: ${({size:e})=>e||"16px"};
8
- `,Yt=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:"M13.0094 7.61066L3.38435 2.79816C3.30892 2.76043 3.22418 2.74532 3.14035 2.75463C3.05652 2.76394 2.97717 2.79729 2.91186 2.85066C2.84948 2.90294 2.80292 2.97158 2.77742 3.04886C2.75191 3.12615 2.74847 3.20902 2.76748 3.28816L3.92685 7.56253H8.87498V8.43753H3.92685L2.74998 12.6988C2.73214 12.7649 2.73006 12.8342 2.7439 12.9013C2.75774 12.9683 2.78712 13.0312 2.82968 13.0848C2.87223 13.1384 2.92677 13.1813 2.98891 13.21C3.05106 13.2387 3.11907 13.2524 3.18748 13.25C3.25597 13.2496 3.3234 13.2331 3.38435 13.2019L13.0094 8.38941C13.081 8.35269 13.1412 8.29692 13.1832 8.22821C13.2252 8.15951 13.2474 8.08055 13.2474 8.00003C13.2474 7.91951 13.2252 7.84056 13.1832 7.77185C13.1412 7.70315 13.081 7.64737 13.0094 7.61066Z",fill:"white"})}),qt=a(Yt).attrs({"data-component-name":"icons/SendIcon/SendIcon"})`
8
+ `,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:"M13.0094 7.61066L3.38435 2.79816C3.30892 2.76043 3.22418 2.74532 3.14035 2.75463C3.05652 2.76394 2.97717 2.79729 2.91186 2.85066C2.84948 2.90294 2.80292 2.97158 2.77742 3.04886C2.75191 3.12615 2.74847 3.20902 2.76748 3.28816L3.92685 7.56253H8.87498V8.43753H3.92685L2.74998 12.6988C2.73214 12.7649 2.73006 12.8342 2.7439 12.9013C2.75774 12.9683 2.78712 13.0312 2.82968 13.0848C2.87223 13.1384 2.92677 13.1813 2.98891 13.21C3.05106 13.2387 3.11907 13.2524 3.18748 13.25C3.25597 13.2496 3.3234 13.2331 3.38435 13.2019L13.0094 8.38941C13.081 8.35269 13.1412 8.29692 13.1832 8.22821C13.2252 8.15951 13.2474 8.08055 13.2474 8.00003C13.2474 7.91951 13.2252 7.84056 13.1832 7.77185C13.1412 7.70315 13.081 7.64737 13.0094 7.61066Z",fill:"white"})}),Xt=l(Qt).attrs({"data-component-name":"icons/SendIcon/SendIcon"})`
9
9
  path {
10
10
  fill: ${({color:e})=>W(e)};
11
11
  }
12
12
 
13
13
  height: ${({size:e})=>e||"16px"};
14
14
  width: ${({size:e})=>e||"16px"};
15
- `,Jt=e=>r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",...e,children:r.jsx("path",{d:"M10.5 3.5V10.5H3.5V3.5H10.5ZM10.5 2.625H3.5C3.26794 2.625 3.04538 2.71719 2.88128 2.88128C2.71719 3.04538 2.625 3.26794 2.625 3.5V10.5C2.625 10.7321 2.71719 10.9546 2.88128 11.1187C3.04538 11.2828 3.26794 11.375 3.5 11.375H10.5C10.7321 11.375 10.9546 11.2828 11.1187 11.1187C11.2828 10.9546 11.375 10.7321 11.375 10.5V3.5C11.375 3.26794 11.2828 3.04538 11.1187 2.88128C10.9546 2.71719 10.7321 2.625 10.5 2.625Z"})}),Qt=a(Jt).attrs({"data-component-name":"icons/StopIcon/StopIcon"})`
15
+ `,en=e=>r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",fill:"none",...e,children:r.jsx("path",{d:"M10.5 3.5V10.5H3.5V3.5H10.5ZM10.5 2.625H3.5C3.26794 2.625 3.04538 2.71719 2.88128 2.88128C2.71719 3.04538 2.625 3.26794 2.625 3.5V10.5C2.625 10.7321 2.71719 10.9546 2.88128 11.1187C3.04538 11.2828 3.26794 11.375 3.5 11.375H10.5C10.7321 11.375 10.9546 11.2828 11.1187 11.1187C11.2828 10.9546 11.375 10.7321 11.375 10.5V3.5C11.375 3.26794 11.2828 3.04538 11.1187 2.88128C10.9546 2.71719 10.7321 2.625 10.5 2.625Z"})}),tn=l(en).attrs({"data-component-name":"icons/StopIcon/StopIcon"})`
16
16
  path {
17
17
  fill: ${({color:e})=>W(e)};
18
18
  }
19
19
 
20
20
  height: ${({size:e})=>e||"16px"};
21
21
  width: ${({size:e})=>e||"16px"};
22
- `,Xt=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"})})]})]}),en=a(Xt).attrs({"data-component-name":"icons/GeminiIcon/GeminiIcon"})`
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
23
  height: ${({size:e})=>e||"16px"};
24
24
  width: ${({size:e})=>e||"16px"};
25
- `;function tn(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 nn=a(tn).attrs({"data-component-name":"icons/NewChatIcon/NewChatIcon"})`
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
26
  path {
27
27
  fill: ${({color:e})=>W(e)};
28
28
  }
29
29
 
30
30
  height: ${({size:e="14px"})=>e};
31
31
  width: ${({size:e="14px"})=>e};
32
- `,Y=a.div`
32
+ `,q=l.div`
33
33
  width: var(--search-ai-thinking-dot-size);
34
34
  height: var(--search-ai-thinking-dot-size);
35
35
  border-radius: 50%;
@@ -60,20 +60,20 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
60
60
  transform: scale(1);
61
61
  }
62
62
  }
63
- `,we=280;function je(){const[e,t]=h.useState(()=>pe().getIndexingActivityState().inProgress);return h.useEffect(()=>pe().subscribe("indexing-activity",n=>{t(n.inProgress)}),[]),r.jsx(rn,{$open:e,children:r.jsx(on,{children:r.jsx(sn,{$open:e,"aria-hidden":!e,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(an,{role:"status","aria-live":"polite","aria-label":"Indexing in progress...",children:[r.jsx("div",{children:r.jsx(Y,{})}),r.jsx(ln,{children:"Indexing in progress..."})]})})})})})}const rn=a.div`
63
+ `,je=280;function be(){const[e,t]=h.useState(()=>fe().getIndexingActivityState().inProgress);return h.useEffect(()=>fe().subscribe("indexing-activity",n=>{t(n.inProgress)}),[]),r.jsx(sn,{$open:e,children:r.jsx(ln,{children:r.jsx(cn,{$open:e,"aria-hidden":!e,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(dn,{role:"status","aria-live":"polite","aria-label":"Indexing in progress...",children:[r.jsx("div",{children:r.jsx(q,{})}),r.jsx(un,{children:"Indexing in progress..."})]})})})})})}const sn=l.div`
64
64
  display: grid;
65
65
  grid-template-rows: ${({$open:e})=>e?"1fr":"0fr"};
66
- transition: grid-template-rows ${we}ms ease-out;
67
- `,on=a.div`
66
+ transition: grid-template-rows ${je}ms ease-out;
67
+ `,ln=l.div`
68
68
  min-height: 0;
69
69
  overflow: hidden;
70
- `,sn=a.div`
70
+ `,cn=l.div`
71
71
  opacity: ${({$open:e})=>e?1:0};
72
- transition: opacity ${we}ms ease-out;
72
+ transition: opacity ${je}ms ease-out;
73
73
  pointer-events: ${({$open:e})=>e?"auto":"none"};
74
74
  padding: var(--spacing-xs);
75
75
  padding-top: var(--spacing-xxs);
76
- `,an=a.div`
76
+ `,dn=l.div`
77
77
  width: 100%;
78
78
  display: flex;
79
79
  align-items: center;
@@ -83,10 +83,10 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
83
83
  border-radius: var(--border-radius);
84
84
  font-size: var(--font-size-sm);
85
85
  line-height: var(--line-height-sm);
86
- `,ln=a.div`
86
+ `,un=l.div`
87
87
  flex: 1;
88
88
  min-width: 0;
89
- `;function cn({placeholder:e="Ask anything...",className:t,disabled:n,isStreaming:i=!1,onStop:o,modelSelector:s,value:l,onValueChange:c,onSubmit:d,textareaRef:u}){const p=l.trim(),f=!n&&p.length>0&&!i,g=!n&&p.length>0,m=w=>{c(w.target.value)},v=()=>{!p||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(dn,{className:t,$isActive:g,children:[r.jsx(un,{ref:u,rows:1,maxLength:Kt,placeholder:e,value:l,disabled:n,spellCheck:!1,onChange:m,onKeyDown:y}),r.jsxs(pn,{children:[s,i&&o?r.jsx(hn,{type:"button",size:"small","aria-label":"Stop generating",icon:r.jsx(Qt,{color:"var(--icon-color-on-color)"}),onClick:j}):r.jsx(fn,{type:"button",size:"small","aria-label":"Send message",icon:r.jsx(qt,{color:"var(--icon-color-on-color)"}),onClick:v,disabled:!f})]})]})}const dn=a.div`
89
+ `;function pn({placeholder:e="Ask anything...",className:t,disabled:n,isStreaming:i=!1,onStop:o,modelSelector:a,value:s,onValueChange:c,onSubmit:d,textareaRef:u}){const p=s.trim(),f=!n&&p.length>0&&!i,x=!n&&p.length>0,g=w=>{c(w.target.value)},v=()=>{!p||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(fn,{className:t,$isActive:x,children:[r.jsx(hn,{ref:u,rows:1,maxLength:Yt,placeholder:e,value:s,disabled:n,spellCheck:!1,onChange:g,onKeyDown:y}),r.jsxs(xn,{children:[a,i&&o?r.jsx(mn,{type:"button",size:"small","aria-label":"Stop generating",icon:r.jsx(tn,{color:"var(--icon-color-on-color)"}),onClick:j}):r.jsx(gn,{type:"button",size:"small","aria-label":"Send message",icon:r.jsx(Xt,{color:"var(--icon-color-on-color)"}),onClick:v,disabled:!f})]})]})}const fn=l.div`
90
90
  display: flex;
91
91
  flex-direction: column;
92
92
  gap: var(--spacing-xs);
@@ -105,13 +105,13 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
105
105
  var(--replay-ai-gradient-soft) border-box;
106
106
  }
107
107
 
108
- ${({$isActive:e})=>e&&at`
108
+ ${({$isActive:e})=>e&&lt`
109
109
  border-color: transparent;
110
110
  background:
111
111
  linear-gradient(var(--layer-color), var(--layer-color)) padding-box,
112
112
  var(--replay-ai-gradient-soft) border-box;
113
113
  `}
114
- `,un=a.textarea`
114
+ `,hn=l.textarea`
115
115
  max-height: 150px;
116
116
  min-height: var(--search-ai-conversation-input-min-height);
117
117
 
@@ -131,12 +131,12 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
131
131
  color: var(--text-color-helper);
132
132
  text-indent: 2px;
133
133
  }
134
- `,pn=a.div`
134
+ `,xn=l.div`
135
135
  display: flex;
136
136
  justify-content: space-between;
137
137
  align-items: center;
138
138
  gap: var(--spacing-xs);
139
- `,fn=a(A)`
139
+ `,gn=l(A)`
140
140
  box-sizing: border-box;
141
141
  background: var(--search-ai-gradient);
142
142
 
@@ -146,17 +146,17 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
146
146
  width: 24px;
147
147
  height: 24px;
148
148
  }
149
- `,hn=a(A)`
149
+ `,mn=l(A)`
150
150
  box-sizing: border-box;
151
151
  background: var(--color-warm-grey-9);
152
152
  border-radius: var(--border-radius-xxl);
153
- `,xn=new Set(["collection","workflow","step","operation","workflow-run"]);function be(e){return`replay://step?${new URLSearchParams({collectionId:e.collectionId.trim(),workflowId:e.workflowId.trim(),stepId:e.stepId.trim()}).toString()}`}function M(e,t){const n=e.get(t);if(n==null)return null;const i=n.trim();return i.length>0?i:null}function gn(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="replay:")return null;const n=t.hostname.toLowerCase();if(!xn.has(n))return null;const i=t.searchParams;switch(n){case"collection":{const o=M(i,"collectionId");return o?{kind:"collection",collectionId:o}:null}case"workflow":{const o=M(i,"collectionId"),s=M(i,"workflowId");return!o||!s?null:{kind:"workflow",collectionId:o,workflowId:s}}case"step":{const o=M(i,"collectionId"),s=M(i,"workflowId"),l=M(i,"stepId");return!o||!s||!l?null:{kind:"step",collectionId:o,workflowId:s,stepId:l}}case"operation":{const o=M(i,"operationId");return o?{kind:"operation",operationId:o}:null}case"workflow-run":{const o=M(i,"collectionId"),s=M(i,"workflowId");return!o||!s?null:{kind:"workflow-run",collectionId:o,workflowId:s}}default:return null}}function mn(e,t,n){switch(n.kind){case"collection":t.openCollectionTab({collectionId:n.collectionId,activeTabName:fe.COLLECTION_SETTINGS});break;case"workflow":t.openWorkflowTab({collectionId:n.collectionId,workflowId:n.workflowId,activeTabName:fe.WORKFLOW_SETTINGS});break;case"step":t.openStepTabFromCollection({collectionId:n.collectionId,workflowId:n.workflowId,stepId:n.stepId,state:mt.Normal});break;case"workflow-run":t.openWorkflowRunTab({collectionId:n.collectionId,workflowId:n.workflowId});break;case"operation":{const i=Mt(e,n.operationId);if(!i.ok){console.warn("[executeReplayChatLink] Operation not resolved",{operationId:n.operationId,message:i.message});return}$t(e,Ft(i.value),t);break}}}function vn(e,t,n){const i=gn(n);i&&mn(e,t,i)}function Ce(){const e=he(),{getApiOperation:t}=vt(),{handleTabChange:n,addNewTab:i,openCollectionTab:o,openWorkflowTab:s,openStepTabFromCollection:l,openWorkflowRunTab:c}=yt();return h.useCallback(d=>{const u=d.target;if(!(u instanceof Element))return;const p=u.closest("a[href]");if(!(p instanceof HTMLAnchorElement))return;const f=p.getAttribute("href");f?.startsWith("replay:")&&(d.preventDefault(),d.stopPropagation(),vn(e,{getApiOperation:t,handleTabChange:n,addNewTab:i,openCollectionTab:o,openWorkflowTab:s,openStepTabFromCollection:l,openWorkflowRunTab:c},f))},[e,t,n,i,o,s,l,c])}class yn{diff(t,n,i={}){let o;typeof i=="function"?(o=i,i={}):"callback"in i&&(o=i.callback);const s=this.castInput(t,i),l=this.castInput(n,i),c=this.removeEmpty(this.tokenize(s,i)),d=this.removeEmpty(this.tokenize(l,i));return this.diffWithOptionsObj(c,d,i,o)}diffWithOptionsObj(t,n,i,o){var s;const l=x=>{if(x=this.postProcess(x,i),o){setTimeout(function(){o(x)},0);return}else return x},c=n.length,d=t.length;let u=1,p=c+d;i.maxEditLength!=null&&(p=Math.min(p,i.maxEditLength));const f=(s=i.timeout)!==null&&s!==void 0?s:1/0,g=Date.now()+f,m=[{oldPos:-1,lastComponent:void 0}];let v=this.extractCommon(m[0],n,t,0,i);if(m[0].oldPos+1>=d&&v+1>=c)return l(this.buildValues(m[0].lastComponent,n,t));let j=-1/0,y=1/0;const w=()=>{for(let x=Math.max(j,-u);x<=Math.min(y,u);x+=2){let S;const z=m[x-1],_=m[x+1];z&&(m[x-1]=void 0);let U=!1;if(_){const T=_.oldPos-x;U=_&&0<=T&&T<c}const K=z&&z.oldPos+1<d;if(!U&&!K){m[x]=void 0;continue}if(!K||U&&z.oldPos<_.oldPos?S=this.addToPath(_,!0,!1,0,i):S=this.addToPath(z,!1,!0,1,i),v=this.extractCommon(S,n,t,x,i),S.oldPos+1>=d&&v+1>=c)return l(this.buildValues(S.lastComponent,n,t))||!0;m[x]=S,S.oldPos+1>=d&&(y=Math.min(y,x-1)),v+1>=c&&(j=Math.max(j,x+1))}u++};if(o)(function x(){setTimeout(function(){if(u>p||Date.now()>g)return o(void 0);w()||x()},0)})();else for(;u<=p&&Date.now()<=g;){const x=w();if(x)return x}}addToPath(t,n,i,o,s){const l=t.lastComponent;return l&&!s.oneChangePerToken&&l.added===n&&l.removed===i?{oldPos:t.oldPos+o,lastComponent:{count:l.count+1,added:n,removed:i,previousComponent:l.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:i,previousComponent:l}}}extractCommon(t,n,i,o,s){const l=n.length,c=i.length;let d=t.oldPos,u=d-o,p=0;for(;u+1<l&&d+1<c&&this.equals(i[d+1],n[u+1],s);)u++,d++,p++,s.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!s.oneChangePerToken&&(t.lastComponent={count:p,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 s;for(;t;)o.push(t),s=t.previousComponent,delete t.previousComponent,t=s;o.reverse();const l=o.length;let c=0,d=0,u=0;for(;c<l;c++){const p=o[c];if(p.removed)p.value=this.join(i.slice(u,u+p.count)),u+=p.count;else{if(!p.added&&this.useLongestToken){let f=n.slice(d,d+p.count);f=f.map(function(g,m){const v=i[u+m];return v.length>g.length?v:g}),p.value=this.join(f)}else p.value=this.join(n.slice(d,d+p.count));d+=p.count,p.added||(u+=p.count)}}return o}}class wn extends yn{constructor(){super(...arguments),this.tokenize=Cn}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
153
+ `,vn=new Set(["collection","workflow","step","operation","workflow-run"]);function Ce(e){return`replay://step?${new URLSearchParams({collectionId:e.collectionId.trim(),workflowId:e.workflowId.trim(),stepId:e.stepId.trim()}).toString()}`}function B(e,t){const n=e.get(t);if(n==null)return null;const i=n.trim();return i.length>0?i:null}function yn(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="replay:")return null;const n=t.hostname.toLowerCase();if(!vn.has(n))return null;const i=t.searchParams;switch(n){case"collection":{const o=B(i,"collectionId");return o?{kind:"collection",collectionId:o}:null}case"workflow":{const o=B(i,"collectionId"),a=B(i,"workflowId");return!o||!a?null:{kind:"workflow",collectionId:o,workflowId:a}}case"step":{const o=B(i,"collectionId"),a=B(i,"workflowId"),s=B(i,"stepId");return!o||!a||!s?null:{kind:"step",collectionId:o,workflowId:a,stepId:s}}case"operation":{const o=B(i,"operationId");return o?{kind:"operation",operationId:o}:null}case"workflow-run":{const o=B(i,"collectionId"),a=B(i,"workflowId");if(!o||!a)return null;const s=B(i,"historyId"),c=s==="null"||s==="undefined"?null:s;return{kind:"workflow-run",collectionId:o,workflowId:a,...c?{historyId:c}:{}}}default:return null}}function wn(e,t,n){return e.tabsState.tabs.get({noproxy:!0}).findIndex(({data:i})=>vt(i,yt.WorkflowRun)&&i.collectionId===t&&i.workflowId===n)}function jn(e,t,n,i={}){switch(n.kind){case"collection":t.openCollectionTab({collectionId:n.collectionId,activeTabName:he.COLLECTION_SETTINGS});break;case"workflow":t.openWorkflowTab({collectionId:n.collectionId,workflowId:n.workflowId,activeTabName:he.WORKFLOW_SETTINGS});break;case"step":t.openStepTabFromCollection({collectionId:n.collectionId,workflowId:n.workflowId,stepId:n.stepId,state:Z.Normal});break;case"workflow-run":{const o=i.workflowRunHistoryIds?.[Nt(n.collectionId,n.workflowId)]??[],a=n.historyId&&o.includes(n.historyId)?n.historyId:o.at(-1)??n.historyId;if(a){t.openWorkflowRunTabFromHistory(a,{state:Z.Normal});break}const s=wn(e,n.collectionId,n.workflowId);if(s!==-1){e.tabsState.tabs.get({noproxy:!0})[s].state===Z.Preview&&t.changeTabState(s,Z.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}Rt(e,Et(o.value),t);break}}}function bn(e,t,n,i={}){const o=yn(n);o&&jn(e,t,o,i)}function ke({workflowRunHistoryIds:e}={}){const t=xe(),{getApiOperation:n}=wt(),{handleTabChange:i,addNewTab:o,openCollectionTab:a,openWorkflowTab:s,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,changeTabState:p}=jt();return h.useCallback(f=>{const x=f.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:")&&(f.preventDefault(),f.stopPropagation(),bn(t,{getApiOperation:n,handleTabChange:i,addNewTab:o,openCollectionTab:a,openWorkflowTab:s,openStepTabFromCollection:c,openWorkflowRunTab:d,openWorkflowRunTabFromHistory:u,changeTabState:p},v,{workflowRunHistoryIds:e}))},[e,t,n,i,o,a,s,c,d,u,p])}class Cn{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,p=c+d;i.maxEditLength!=null&&(p=Math.min(p,i.maxEditLength));const f=(a=i.timeout)!==null&&a!==void 0?a:1/0,x=Date.now()+f,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 S;const M=g[m-1],T=g[m+1];M&&(g[m-1]=void 0);let U=!1;if(T){const _=T.oldPos-m;U=T&&0<=_&&_<c}const K=M&&M.oldPos+1<d;if(!U&&!K){g[m]=void 0;continue}if(!K||U&&M.oldPos<T.oldPos?S=this.addToPath(T,!0,!1,0,i):S=this.addToPath(M,!1,!0,1,i),v=this.extractCommon(S,n,t,m,i),S.oldPos+1>=d&&v+1>=c)return s(this.buildValues(S.lastComponent,n,t))||!0;g[m]=S,S.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>p||Date.now()>x)return o(void 0);w()||m()},0)})();else for(;u<=p&&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,p=0;for(;u+1<s&&d+1<c&&this.equals(i[d+1],n[u+1],a);)u++,d++,p++,a.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!a.oneChangePerToken&&(t.lastComponent={count:p,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 p=o[c];if(p.removed)p.value=this.join(i.slice(u,u+p.count)),u+=p.count;else{if(!p.added&&this.useLongestToken){let f=n.slice(d,d+p.count);f=f.map(function(x,g){const v=i[u+g];return v.length>x.length?v:x}),p.value=this.join(f)}else p.value=this.join(n.slice(d,d+p.count));d+=p.count,p.added||(u+=p.count)}}return o}}class kn extends Cn{constructor(){super(...arguments),this.tokenize=_n}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
154
154
  `))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
155
155
  `))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
156
156
  `)&&(t=t.slice(0,-1)),n.endsWith(`
157
- `)&&(n=n.slice(0,-1))),super.equals(t,n,i)}}const jn=new wn;function bn(e,t,n){return jn.diff(e,t,n)}function Cn(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
158
- `));const n=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let o=0;o<i.length;o++){const s=i[o];o%2&&!t.newlineIsToken?n[n.length-1]+=s:n.push(s)}return n}const kn=500;function In(e,t){const n=_n(e,t);if(n.length===0)return[];const i=[];let o=0;for(;o<n.length;){let s=o;const l=n[o].type==="context";for(;s<n.length&&n[s].type==="context"===l;)s++;const c=n.slice(o,s);i.push({start:o,end:s,rows:c,hasAdditions:c.some(d=>d.type==="add"),hasRemovals:c.some(d=>d.type==="remove")}),o=s}return i}function _n(e,t){if(e===void 0)return t===void 0?[]:L(t,"add");if(t===void 0)return L(e,"remove");if(e===t)return L(t,"context");const n=Tn(e,t);return n?n.flatMap(i=>L(i.value,i.added?"add":i.removed?"remove":"context")):[...L(e,"remove"),...L(t,"add")]}function Tn(e,t){try{return bn(e,t,{timeout:kn})}catch{return}}function L(e,t){const n=e.split(`
159
- `);return n.length>1&&n[n.length-1]===""&&n.pop(),n.map(i=>({type:t,text:i}))}const ke=1,Ie=e=>e&&e.hasAdditions!==e.hasRemovals,_e=e=>e&&(e.hasAdditions||e.hasRemovals);function Sn(e,t,n){if(e.hasAdditions||e.hasRemovals)return q(e.rows);const i=n[t-1],o=n[t+1],s=Ie(i)?ke:0,l=Ie(o)?ke:0;if(s+l>=e.rows.length)return q(e.rows);const c=e.rows.slice(0,s),d=l>0?e.rows.slice(-l):[],u=[];return u.push(...q(c)),_e(i)&&_e(o)&&u.push({kind:"separator"}),u.push(...q(d)),u}function q(e){return e.map(t=>({kind:"row",row:t}))}const An=200;function Te({oldValue:e,newValue:t}){const n=h.useMemo(()=>In(e,t),[e,t]),i=h.useMemo(()=>n.flatMap(Sn),[n]);return h.useMemo(()=>n.some(o=>o.hasAdditions||o.hasRemovals),[n])?r.jsx(Vn,{$maxHeight:An,children:i.map((o,s)=>{if(o.kind==="separator")return r.jsx(Fn,{children:r.jsx(Se,{children:"\xB7\xB7\xB7"})},s);const{row:l}=o,c=On(l.type);return r.jsxs(c,{children:[r.jsxs($n,{children:[l.type==="remove"&&r.jsx(Zt,{size:"12px"}),l.type==="add"&&r.jsx(wt,{size:"12px"})]}),r.jsx(Se,{children:l.text===""?" ":l.text})]},s)})}):null}function On(e){return e==="remove"?Bn:e==="add"?zn:Mn}const Vn=a.div`
157
+ `)&&(n=n.slice(0,-1))),super.equals(t,n,i)}}const In=new kn;function Tn(e,t,n){return In.diff(e,t,n)}function _n(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
158
+ `));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 Sn=500;function An(e,t){const n=On(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 On(e,t){if(e===void 0)return t===void 0?[]:P(t,"add");if(t===void 0)return P(e,"remove");if(e===t)return P(t,"context");const n=Vn(e,t);return n?n.flatMap(i=>P(i.value,i.added?"add":i.removed?"remove":"context")):[...P(e,"remove"),...P(t,"add")]}function Vn(e,t){try{return Tn(e,t,{timeout:Sn})}catch{return}}function P(e,t){const n=e.split(`
159
+ `);return n.length>1&&n[n.length-1]===""&&n.pop(),n.map(i=>({type:t,text:i}))}const Ie=1,Te=e=>e&&e.hasAdditions!==e.hasRemovals,_e=e=>e&&(e.hasAdditions||e.hasRemovals);function Bn(e,t,n){if(e.hasAdditions||e.hasRemovals)return J(e.rows);const i=n[t-1],o=n[t+1],a=Te(i)?Ie:0,s=Te(o)?Ie:0;if(a+s>=e.rows.length)return J(e.rows);const c=e.rows.slice(0,a),d=s>0?e.rows.slice(-s):[],u=[];return u.push(...J(c)),_e(i)&&_e(o)&&u.push({kind:"separator"}),u.push(...J(d)),u}function J(e){return e.map(t=>({kind:"row",row:t}))}const zn=200;function Se({oldValue:e,newValue:t}){const n=h.useMemo(()=>An(e,t),[e,t]),i=h.useMemo(()=>n.flatMap(Bn),[n]);return h.useMemo(()=>n.some(o=>o.hasAdditions||o.hasRemovals),[n])?r.jsx(Fn,{$maxHeight:zn,children:i.map((o,a)=>{if(o.kind==="separator")return r.jsx(Dn,{children:r.jsx(Ae,{children:"\xB7\xB7\xB7"})},a);const{row:s}=o,c=Mn(s.type);return r.jsxs(c,{children:[r.jsxs(Nn,{children:[s.type==="remove"&&r.jsx(Jt,{size:"12px"}),s.type==="add"&&r.jsx(bt,{size:"12px"})]}),r.jsx(Ae,{children:s.text===""?" ":s.text})]},a)})}):null}function Mn(e){return e==="remove"?$n:e==="add"?Rn:En}const Fn=l.div`
160
160
  display: flex;
161
161
  flex-direction: column;
162
162
  width: 100%;
@@ -167,29 +167,29 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
167
167
  &::-webkit-scrollbar-track {
168
168
  margin: var(--spacing-xxs) 0;
169
169
  }
170
- `,J=a.div`
170
+ `,Q=l.div`
171
171
  display: flex;
172
172
  font-size: var(--font-size-sm);
173
173
  line-height: var(--line-height-sm);
174
174
  font-weight: var(--font-weight-regular);
175
175
  padding-right: var(--spacing-xxs);
176
- `,Bn=a(J)`
176
+ `,$n=l(Q)`
177
177
  background: var(--admonition-danger-bg-color);
178
178
  color: var(--color-raspberry-7);
179
- `,zn=a(J)`
179
+ `,Rn=l(Q)`
180
180
  background: var(--admonition-success-bg-color);
181
181
  color: var(--color-green-7);
182
- `,Mn=a(J)`
182
+ `,En=l(Q)`
183
183
  background: transparent;
184
184
  color: var(--text-color-secondary);
185
- `,$n=a.span`
185
+ `,Nn=l.span`
186
186
  display: flex;
187
187
  align-items: center;
188
188
  justify-content: center;
189
189
  min-width: 16px;
190
190
  height: 20px;
191
191
  flex-shrink: 0;
192
- `,Se=a.span`
192
+ `,Ae=l.span`
193
193
  width: 100%;
194
194
  min-width: 0;
195
195
  line-height: var(--line-height-sm);
@@ -197,9 +197,9 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
197
197
  font-weight: var(--font-weight-regular);
198
198
  white-space: pre-wrap;
199
199
  word-break: break-all;
200
- `,Fn=a(J)`
200
+ `,Dn=l(Q)`
201
201
  user-select: none;
202
- `,En=e=>typeof e!="object"||e===null?!1:"kind"in e&&e.kind==="batch"?"changes"in e?Array.isArray(e.changes)&&e.changes.every(Ae):!1:Ae(e);function Ae(e){return typeof e!="object"||e===null||!("id"in e)||!("target"in e)||!("included"in e)||!("kind"in e)?!1:e.kind==="single"}const Rn={approveLabel:"Approve",denyLabel:"Deny"};function Nn(e,t){const n=k(t,"action");if(n){const o=Et[n];if(o)return o}return Rt[e]||Rn}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 Oe(e,t){if(!(typeof t>"u"))return e?`${e}: ${t}`:t}function Dn(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 Ln(e,t){if(!e||typeof e!="object")return;const n=Q(e,te),i=Q(n,ne);if(!(t in i))return;const o=i[t];if(Array.isArray(o)&&o.length!==0&&o.every(En))return o}function Ve(e,t){return Nt(e)&&ve(e)&&e.toolCallId===t}function Pn(e,t,n){const i=e.parts.map(c=>Ve(c,t)?{...c,input:Un(c.input,n)}:c),o=e.metadata&&typeof e.metadata=="object"?e.metadata:{},s=Q(o,te),l={...Q(s,ne),[t]:jt(n)};return{...e,parts:i,metadata:{...o,[te]:{...s,[ne]:l}}}}function Q(e,t){const n=e[t];return typeof n=="object"&&n!==null?n:{}}function Un(e,t){if(!e||!("changes"in e)||!Array.isArray(e.changes))return e;const{changes:n,...i}=e;return{...i,changes:n.map((o,s)=>({...o,approved:t[s]?.included??!1}))}}function Gn({preview:e,isIncluded:t,onToggle:n,readOnly:i}){if(e.kind==="batch")return r.jsx(Be,{isIncluded:t,onToggle:n,readOnly:i,primaryLabel:e.target.type,children:r.jsx(tr,{children:e.changes.map(c=>r.jsx(Te,{oldValue:Oe(c.target.key,c.oldValue),newValue:Oe(c.target.key,c.newValue)},c.id))})});const{target:o,oldValue:s,newValue:l}=e;return r.jsx(Be,{isIncluded:t,onToggle:n,readOnly:i,primaryLabel:o.key??o.type,categoryLabel:o.key?o.type:void 0,children:r.jsx(Te,{oldValue:s,newValue:l})})}function Be({isIncluded:e,onToggle:t,readOnly:n,primaryLabel:i,categoryLabel:o,children:s}){return r.jsxs(Hn,{$dimmed:n&&!e,children:[r.jsxs(Kn,{children:[n?r.jsx(Qn,{children:e?r.jsx(Xn,{size:"16px"}):r.jsx(er,{size:"16px"})}):r.jsxs(qn,{children:[r.jsx(Yn,{checked:e}),r.jsx(Jn,{type:"checkbox",checked:e,onChange:t})]}),r.jsx(Wn,{children:i}),o?r.jsx(Zn,{children:o}):null]}),s]})}const Hn=a.div`
202
+ `,Pn=e=>typeof e!="object"||e===null?!1:"kind"in e&&e.kind==="batch"?"changes"in e?Array.isArray(e.changes)&&e.changes.every(Oe):!1:Oe(e);function Oe(e){return typeof e!="object"||e===null||!("id"in e)||!("target"in e)||!("included"in e)||!("kind"in e)?!1:e.kind==="single"}const Ln={approveLabel:"Approve",denyLabel:"Deny"};function Un(e,t){const n=k(t,"action");if(n){const o=Dt[n];if(o)return o}return Pt[e]||Ln}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 Ve(e,t){if(!(typeof t>"u"))return e?`${e}: ${t}`:t}function Hn(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 Gn(e,t){if(!e||typeof e!="object")return;const n=X(e,ne),i=X(n,re);if(!(t in i))return;const o=i[t];if(Array.isArray(o)&&o.length!==0&&o.every(Pn))return o}function Be(e,t){return Lt(e)&&ye(e)&&e.toolCallId===t}function Kn(e,t,n){const i=e.parts.map(c=>Be(c,t)?{...c,input:Wn(c.input,n)}:c),o=e.metadata&&typeof e.metadata=="object"?e.metadata:{},a=X(o,ne),s={...X(a,re),[t]:Ct(n)};return{...e,parts:i,metadata:{...o,[ne]:{...a,[re]:s}}}}function X(e,t){const n=e[t];return typeof n=="object"&&n!==null?n:{}}function Wn(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 Zn({preview:e,isIncluded:t,onToggle:n,readOnly:i}){if(e.kind==="batch")return r.jsx(ze,{isIncluded:t,onToggle:n,readOnly:i,primaryLabel:e.target.type,children:r.jsx(or,{children:e.changes.map(c=>r.jsx(Se,{oldValue:Ve(c.target.key,c.oldValue),newValue:Ve(c.target.key,c.newValue)},c.id))})});const{target:o,oldValue:a,newValue:s}=e;return r.jsx(ze,{isIncluded:t,onToggle:n,readOnly:i,primaryLabel:o.key??o.type,categoryLabel:o.key?o.type:void 0,children:r.jsx(Se,{oldValue:a,newValue:s})})}function ze({isIncluded:e,onToggle:t,readOnly:n,primaryLabel:i,categoryLabel:o,children:a}){return r.jsxs(Yn,{$dimmed:n&&!e,children:[r.jsxs(qn,{children:[n?r.jsx(nr,{children:e?r.jsx(rr,{size:"16px"}):r.jsx(ir,{size:"16px"})}):r.jsxs(er,{children:[r.jsx(Xn,{checked:e}),r.jsx(tr,{type:"checkbox",checked:e,onChange:t})]}),r.jsx(Jn,{children:i}),o?r.jsx(Qn,{children:o}):null]}),a]})}const Yn=l.div`
203
203
  display: flex;
204
204
  flex-direction: column;
205
205
  gap: var(--spacing-xs);
@@ -211,12 +211,12 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
211
211
  &:last-child {
212
212
  border-bottom: none;
213
213
  }
214
- `,Kn=a.div`
214
+ `,qn=l.div`
215
215
  display: flex;
216
216
  align-items: center;
217
217
  gap: var(--spacing-xs);
218
218
  min-width: 0;
219
- `,Wn=a.span`
219
+ `,Jn=l.span`
220
220
  flex: 1;
221
221
  min-width: 0;
222
222
  color: var(--text-color-primary);
@@ -226,24 +226,24 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
226
226
  overflow: hidden;
227
227
  text-overflow: ellipsis;
228
228
  white-space: nowrap;
229
- `,Zn=a.span`
229
+ `,Qn=l.span`
230
230
  flex-shrink: 0;
231
231
  font-family: var(--code-block-font-family, var(--font-family-monospace, monospace));
232
232
  font-size: var(--font-size-sm);
233
233
  font-weight: var(--font-weight-regular);
234
234
  line-height: var(--line-height-sm);
235
235
  color: var(--text-color-secondary);
236
- `,Yn=a(Ct).attrs({"aria-hidden":!0})`
236
+ `,Xn=l(It).attrs({"aria-hidden":!0})`
237
237
  --checkbox-border-color: var(--color-blueberry-6);
238
238
  --checkbox-box-color: var(--color-blueberry-6);
239
239
  --checkbox-box-color-active: var(--color-blueberry-6);
240
- `,qn=a.span`
240
+ `,er=l.span`
241
241
  position: relative;
242
242
  display: inline-flex;
243
243
  flex-shrink: 0;
244
244
  width: 16px;
245
245
  height: 16px;
246
- `,Jn=a.input`
246
+ `,tr=l.input`
247
247
  position: absolute;
248
248
  inset: 0;
249
249
  width: 16px;
@@ -251,26 +251,26 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
251
251
  margin: 0;
252
252
  opacity: 0;
253
253
  cursor: pointer;
254
- `,Qn=a.span`
254
+ `,nr=l.span`
255
255
  display: inline-flex;
256
256
  flex-shrink: 0;
257
257
  width: 16px;
258
258
  height: 16px;
259
259
  align-items: center;
260
260
  justify-content: center;
261
- `,Xn=a(lt)`
261
+ `,rr=l(ct)`
262
262
  color: var(--color-success-base);
263
- `,er=a(bt)`
263
+ `,ir=l(kt)`
264
264
  color: var(--text-color-description);
265
- `,tr=a.div`
265
+ `,or=l.div`
266
266
  display: flex;
267
267
  flex-direction: column;
268
268
  gap: var(--spacing-xxs);
269
269
  min-width: 0;
270
- `;function ze({previews:e,handleToggle:t,readOnly:n}){return e.length===0?null:r.jsx(nr,{children:e.map((i,o)=>r.jsx(Gn,{preview:i,isIncluded:i.included,onToggle:t?()=>t(o):void 0,readOnly:n},i.id))})}const nr=a.div`
270
+ `;function Me({previews:e,handleToggle:t,readOnly:n}){return e.length===0?null:r.jsx(ar,{children:e.map((i,o)=>r.jsx(Zn,{preview:i,isIncluded:i.included,onToggle:t?()=>t(o):void 0,readOnly:n},i.id))})}const ar=l.div`
271
271
  display: flex;
272
272
  flex-direction: column;
273
- `,rr={update_step:sr,update_security:ar,run_request:dr,web_search:ur,manage_environment:lr,manage_collection:cr};function ir(e,t){const n=rr[e];return n?n(t):or(e)}function or(e){return[{kind:"text",text:e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}]}function sr(e){return Me(e,"Update step")}function ar(e){return Me(e,"Update security")}function Me(e,t){const{collectionId:n,workflowId:i,stepId:o}=pr(e);return!n||!i||!o?I(t):$e(`${t} `,be({collectionId:n,workflowId:i,stepId:o}),o)}function I(e){return[{kind:"text",text:e}]}function O(e,t){return t?`${e} "${t}"`:e}function $e(e,t,n){return[{kind:"text",text:e},{kind:"link",href:t,label:n}]}function lr(e){const t=k(e,"action"),n=k(e,"environment"),i=n?` in environment "${n}"`:"";switch(t){case"add_environment":return I(O("Add environment",n));case"set_active_environment":return I(n?`Switch active environment to ${n}`:"Switch active environment");case"upsert_input":return I(O("Set input",k(e,"name"))+i);case"remove_input":return I(O("Remove input",k(e,"inputName"))+i);case"upsert_server":return I(O("Set server",k(e,"apiId"))+i);case"remove_server":return I(O("Remove server",k(e,"apiId"))+i);default:return I("Manage environment")}}function cr(e){switch(k(e,"action")){case"create_collection":return I(O("Create collection",k(e,"title")));case"delete_collection":return I(O("Delete collection",k(e,"collectionId")));case"create_workflow":return I(O("Create workflow",k(e,"name")));case"delete_workflow":return I(O("Delete workflow",k(e,"workflowId")));case"create_step":return I(O("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"):$e("Delete step ",be({collectionId:t,workflowId:n,stepId:i}),i)}case"save_tab_to_collection":return I(O("Save tab as step",k(e,"newStepName")));default:return I("Manage collection")}}function dr(){return[{kind:"text",text:"Run current request"}]}function ur(e){return[{kind:"text",text:"Search the web at "},{kind:"link",href:e.url,label:e.url}]}function pr(e){return{collectionId:ae(e,"collectionId"),workflowId:ae(e,"workflowId"),stepId:ae(e,"stepId")}}function ae(e,t){if(!e||!(t in e))return null;const n=e[t];return typeof n=="string"&&n.trim()||null}function Fe({toolName:e,input:t}){const n=ir(e,t),i=Ce();return r.jsx(fr,{onClick:i,children:r.jsx(hr,{children:n.map((o,s)=>o.kind==="text"?r.jsx("span",{children:o.text},s):r.jsx(xr,{href:o.href,children:o.label},s))})})}const fr=a.div`
273
+ `,sr={update_step:dr,update_security:ur,run_request:hr,web_search:xr,manage_environment:pr,manage_collection:fr};function lr(e,t){const n=sr[e];return n?n(t):cr(e)}function cr(e){return[{kind:"text",text:e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}]}function dr(e){return Fe(e,"Update step")}function ur(e){return Fe(e,"Update security")}function Fe(e,t){const{collectionId:n,workflowId:i,stepId:o}=gr(e);return!n||!i||!o?I(t):$e(`${t} `,Ce({collectionId:n,workflowId:i,stepId:o}),o)}function I(e){return[{kind:"text",text:e}]}function O(e,t){return t?`${e} "${t}"`:e}function $e(e,t,n){return[{kind:"text",text:e},{kind:"link",href:t,label:n}]}function pr(e){const t=k(e,"action"),n=k(e,"environment"),i=n?` in environment "${n}"`:"";switch(t){case"add_environment":return I(O("Add environment",n));case"set_active_environment":return I(n?`Switch active environment to ${n}`:"Switch active environment");case"upsert_input":return I(O("Set input",k(e,"name"))+i);case"remove_input":return I(O("Remove input",k(e,"inputName"))+i);case"upsert_server":return I(O("Set server",k(e,"apiId"))+i);case"remove_server":return I(O("Remove server",k(e,"apiId"))+i);default:return I("Manage environment")}}function fr(e){switch(k(e,"action")){case"create_collection":return I(O("Create collection",k(e,"title")));case"delete_collection":return I(O("Delete collection",k(e,"collectionId")));case"create_workflow":return I(O("Create workflow",k(e,"name")));case"delete_workflow":return I(O("Delete workflow",k(e,"workflowId")));case"create_step":return I(O("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"):$e("Delete step ",Ce({collectionId:t,workflowId:n,stepId:i}),i)}case"save_tab_to_collection":return I(O("Save tab as step",k(e,"newStepName")));default:return I("Manage collection")}}function hr(){return[{kind:"text",text:"Run current request"}]}function xr(e){return[{kind:"text",text:"Search the web at "},{kind:"link",href:e.url,label:e.url}]}function gr(e){return{collectionId:le(e,"collectionId"),workflowId:le(e,"workflowId"),stepId:le(e,"stepId")}}function le(e,t){if(!e||!(t in e))return null;const n=e[t];return typeof n=="string"&&n.trim()||null}function Re({toolName:e,input:t}){const n=lr(e,t),i=ke();return r.jsx(mr,{onClick:i,children:r.jsx(vr,{children:n.map((o,a)=>o.kind==="text"?r.jsx("span",{children:o.text},a):r.jsx(yr,{href:o.href,children:o.label},a))})})}const mr=l.div`
274
274
  display: flex;
275
275
  flex-direction: column;
276
276
  gap: 0;
@@ -280,13 +280,13 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
280
280
  &:not(:last-child) {
281
281
  border-bottom: 1px solid var(--border-color-secondary);
282
282
  }
283
- `,hr=a.span`
283
+ `,vr=l.span`
284
284
  font-family: var(--font-family-base);
285
285
  font-size: var(--font-size-sm);
286
286
  font-weight: var(--font-weight-regular);
287
287
  line-height: var(--line-height-sm);
288
288
  color: var(--text-color-primary);
289
- `,xr=a.a`
289
+ `,yr=l.a`
290
290
  color: var(--link-color-primary);
291
291
  cursor: pointer;
292
292
  text-decoration: none;
@@ -294,7 +294,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
294
294
  &:hover {
295
295
  color: var(--link-color-primary, var(--text-color-link));
296
296
  }
297
- `;function b({id:e,targetType:t,targetKey:n,oldValue:i,newValue:o}){return{kind:"single",id:e,target:n===void 0?{type:t}:{type:t,key:n},oldValue:i,newValue:o,included:!0}}function $(e,t){return b({id:e,targetType:t,oldValue:void 0,newValue:void 0})}function P({data:e,baseId:t,targetType:n,batchTargetKey:i,getOldValue:o,getNewValue:s=(c,d)=>String(d??""),resolveTargetKey:l=c=>c}){const c=Object.entries(e).filter(([,p])=>p!==void 0);if(c.length===0)return $(t,n);if(c.length>=2){const p=c.map(([f,g])=>b({id:`${t}:${f}`,targetType:n,targetKey:l(f),oldValue:o(f),newValue:s(f,g)}));return{kind:"batch",id:t,target:i!==void 0?{type:n,key:i}:{type:n},changes:p,included:!0}}const[d,u]=c[0];return b({id:t,targetType:n,targetKey:l(d),oldValue:o(d),newValue:s(d,u)})}function gr({store:e,input:t}){if(!mr(t))return[];const n=new Map,i=o=>{const s=n.get(o);if(s)return s;const l=ye(e,t.collectionId,t.workflowId,o),c=l.ok?l.value:null,d=c?Array.from(c.security.get({noproxy:!0})):[];return n.set(o,d),d};return t.changes.map((o,s)=>{const l=o.stepId?.trim(),c=l||t.stepId;return vr(i(c),o,s,l)})}function mr(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 E(e,t){return e?t?`${e}: ${t}`:e:t}function vr(e,t,n,i){const o=`security[${n}]`;switch(t.action){case C.ADD:{const{type:s,schemeId:l,data:c}=t;return!c||Object.keys(c).length===0?b({id:o,targetType:s,targetKey:E(i,l),oldValue:void 0,newValue:s}):P({data:c,baseId:o,targetType:s,batchTargetKey:E(i,l),getOldValue:()=>{},resolveTargetKey:d=>E(i,d)})}case C.UPDATE:{const{type:s,schemeId:l,data:c}=t,d=t.index!==void 0?e[t.index]:void 0;return!c||Object.keys(c).length===0?b({id:o,targetType:s,targetKey:E(i,l),oldValue:Ne(d),newValue:s}):P({data:c,baseId:o,targetType:s,batchTargetKey:E(i,l),getOldValue:u=>d?yr(d,u):void 0,resolveTargetKey:u=>E(i,u)})}case C.REMOVE:{const s=Dt(e,t),l=s.ok?s.entry:void 0;return b({id:o,targetType:l?.securityType??"Security",targetKey:E(i,De(l)),oldValue:Ne(l),newValue:void 0})}}}function yr(e,t){switch(e.securityType){case F.NoAuth:return;case F.OAuth2:return Ee(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:Ee(n,t)}default:{const n=e[e.securityType];return Re(n,t)}}}function Ee(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 Ne(e){if(!e||e.securityType===F.NoAuth)return;const t=De(e);return t?`${e.securityType} (${t})`:e.securityType}function De(e){return!e||e.securityType===F.NoAuth?void 0:e[e.securityType]?.schemeName||void 0}function wr({store:e,input:t}){if(!jr(t))return[];const n=ye(e,t.collectionId,t.workflowId,t.stepId),i=n.ok?n.value:null;return t.changes.map((o,s)=>br(i,o,s))}function jr(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 br(e,t,n){const i=t.id??`${t.field}[${n}]`;switch(t.field){case"method":case"url":case"description":return Cr(e,t,i);case"parameters":return kr(e,t,i);case"outputs":return Ir(e,t,i);case"body":return _r(e,t,i);case"successCriteria":return Tr(e,t,i)}}function Cr(e,t,n){const i=Z(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:Le(e,t.field),newValue:t.data});case C.REMOVE:return b({id:n,targetType:i,oldValue:Le(e,t.field),newValue:void 0})}}function kr(e,t,n){switch(t.action){case C.ADD:{if(!t.data)return $(n,"parameter");const{in:i,name:o,value:s}=t.data;return b({id:n,targetType:Z(i),targetKey:o,oldValue:void 0,newValue:s})}case C.UPDATE:{if(!t.id&&!t.data?.name)return $(n,"parameter");const i=Pe(e,t),o=t.data?.in??i?.in??"parameter";return b({id:n,targetType:Z(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 $(n,"parameter");const i=Pe(e,t),o=t.data?.in??i?.in??"parameter";return b({id:n,targetType:Z(o),targetKey:i?.key??t.data?.name,oldValue:i?i.value??"":void 0,newValue:void 0})}}}function Ir(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?Ke(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 $(n,"Output");let i=t.id&&e?Ke(e,t.id):void 0;return!i&&e&&t.data?.name&&(i=Or(e,t.data.name)),b({id:n,targetType:"Output",targetKey:i?.key??t.data?.name,oldValue:i?.value,newValue:void 0})}}}function _r(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"?le(i.content,i.contentType):ee(i[o]),resolveTargetKey:o=>o==="content"?void 0:o});case C.UPDATE:{const o=e?.requestBody.type.get(),s=i.contentType??o;return P({data:i,baseId:n,targetType:"Body",getOldValue:l=>{if(e){if(l==="content")return le(e.requestBody.content.get(),o)||void 0;if(l==="contentType")return o}},getNewValue:l=>l==="content"?le(i.content,s):ee(i[l]),resolveTargetKey:l=>l==="content"?void 0:l})}case C.REMOVE:{const o=e?re({contentType:e.requestBody.type.get(),content:e.requestBody.content.get()}):void 0;return b({id:n,targetType:"Body",oldValue:o,newValue:void 0})}}}function Tr(e,t,n){switch(t.action){case C.ADD:return t.data?P({data:t.data,baseId:n,targetType:"successCriteria",getOldValue:()=>{},getNewValue:i=>ee(t.data[i])}):$(n,"successCriteria");case C.UPDATE:{if(!t.data)return $(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=>ee(t.data[o])})}case C.REMOVE:{if(typeof t.id!="string")return $(n,"successCriteria");const i=e?Ge(e,t.id):void 0;return b({id:n,targetType:"successCriteria",targetKey:i?.condition,oldValue:i?re(i):void 0,newValue:void 0})}}}function Le(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 Pe(e,t){let n=t.id&&e?Sr(e,t.id):null;return!n&&e&&t.data?.name&&(n=Ar(e,t.data.name)),n}function Ue(e,t){for(const n of["path","query","header","cookie"]){const i=e.parameters[Lt[n]].get().find(o=>kt(o)&&t(o));if(i)return i}return null}function Sr(e,t){return Ue(e,n=>n.id===t)}function Ar(e,t){return Ue(e,n=>n.key===t)}function Ge(e,t){return e.successCriteria.get().find(n=>n.condition===t)}function He(e,t){for(const n of e.outputs.get())if(t(n))return{key:X(n.key),value:X(n.value)}}function Ke(e,t){return He(e,n=>X(n.id)===t)}function Or(e,t){return He(e,n=>X(n.key)===t)}function X(e){return typeof e=="string"?e:e.get()}function ee(e){return e==null?"":typeof e=="string"?e:re(e)}function le(e,t){if(!e||t!==It.JSON)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const Vr={update_security:gr,update_step:wr};function We(e,t){const n=he(),i=h.useMemo(()=>{const d=e?Vr[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,s]=h.useState(()=>Object.fromEntries(i.map(d=>[d.id,d.included]))),l=h.useMemo(()=>i.map(d=>({...d,included:o[d.id]??d.included})),[i,o]),c=h.useCallback(d=>{s(typeof d=="function"?u=>{const p=i.map(f=>({...f,included:u[f.id]??f.included}));return Object.fromEntries(d(p).map(f=>[f.id,f.included]))}:Object.fromEntries(d.map(u=>[u.id,u.included])))},[i]);return{previews:l,setPreviews:c}}function Br({toolCallId:e,toolName:t,input:n,onApprove:i,onDeny:o}){const{updateMessages:s}=H(),{previews:l,setPreviews:c}=We(t,n),{includedCount:d,totalCount:u}=h.useMemo(()=>({includedCount:l.filter(v=>v.included).length,totalCount:l.length}),[l]),{approveLabel:p,denyLabel:f}=h.useMemo(()=>Nn(t,n),[t,n]),g=h.useCallback(()=>{s(v=>{const j=[];for(let y=0;y<v.length;y++){const w=v[y],{parts:x}=w,S=w.role==="assistant",z=x.some(_=>Ve(_,e));if(S&&z){const _=Pn(w,e,l);j.push({index:y,message:_})}}return j}),i()},[l,i,s,e]),m=h.useCallback(v=>{c(j=>j.map((y,w)=>w===v?{...y,included:!y.included}:y))},[c]);return r.jsxs(zr,{children:[r.jsx(Fe,{toolName:t,input:n}),l.length?r.jsx(Mr,{children:r.jsx(ze,{previews:l,handleToggle:m})}):null,l.length?r.jsx(xe,{}):null,r.jsxs($r,{children:[u>1?r.jsxs(Fr,{children:[d," of ",u," selected"]}):null,r.jsx(Er,{size:"small",variant:"secondary",onClick:o,children:f}),r.jsx(Rr,{size:"small",variant:"primary",onClick:g,disabled:u>0?d===0:!1,children:p})]})]})}const zr=a.div`
297
+ `;function b({id:e,targetType:t,targetKey:n,oldValue:i,newValue:o}){return{kind:"single",id:e,target:n===void 0?{type:t}:{type:t,key:n},oldValue:i,newValue:o,included:!0}}function F(e,t){return b({id:e,targetType:t,oldValue:void 0,newValue:void 0})}function L({data:e,baseId:t,targetType:n,batchTargetKey:i,getOldValue:o,getNewValue:a=(c,d)=>String(d??""),resolveTargetKey:s=c=>c}){const c=Object.entries(e).filter(([,p])=>p!==void 0);if(c.length===0)return F(t,n);if(c.length>=2){const p=c.map(([f,x])=>b({id:`${t}:${f}`,targetType:n,targetKey:s(f),oldValue:o(f),newValue:a(f,x)}));return{kind:"batch",id:t,target:i!==void 0?{type:n,key:i}:{type:n},changes:p,included:!0}}const[d,u]=c[0];return b({id:t,targetType:n,targetKey:s(d),oldValue:o(d),newValue:a(d,u)})}function wr({store:e,input:t}){if(!jr(t))return[];const n=new Map,i=o=>{const a=n.get(o);if(a)return a;const s=we(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 br(i(c),o,a,s)})}function jr(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 R(e,t){return e?t?`${e}: ${t}`:e:t}function br(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?b({id:o,targetType:a,targetKey:R(i,s),oldValue:void 0,newValue:a}):L({data:c,baseId:o,targetType:a,batchTargetKey:R(i,s),getOldValue:()=>{},resolveTargetKey:d=>R(i,d)})}case C.UPDATE:{const{type:a,schemeId:s,data:c}=t,d=t.index!==void 0?e[t.index]:void 0;return!c||Object.keys(c).length===0?b({id:o,targetType:a,targetKey:R(i,s),oldValue:De(d),newValue:a}):L({data:c,baseId:o,targetType:a,batchTargetKey:R(i,s),getOldValue:u=>d?Cr(d,u):void 0,resolveTargetKey:u=>R(i,u)})}case C.REMOVE:{const a=Ut(e,t),s=a.ok?a.entry:void 0;return b({id:o,targetType:s?.securityType??"Security",targetKey:R(i,Pe(s)),oldValue:De(s),newValue:void 0})}}}function Cr(e,t){switch(e.securityType){case $.NoAuth:return;case $.OAuth2:return Ee(e[$.OAuth2],t);case $.OpenIDConnect:{const n=e[$.OpenIDConnect];return t==="openIdConnectUrl"?n.openIdConnectUrl||void 0:t==="userInfoUrl"?n.userInfoUrl||void 0:Ee(n,t)}default:{const n=e[e.securityType];return Ne(n,t)}}}function Ee(e,t){if(t==="grantType")return e.grantType||void 0;if(!e.grantType)return;const n=e[e.grantType];return Ne(n,t)}function Ne(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=Pe(e);return t?`${e.securityType} (${t})`:e.securityType}function Pe(e){return!e||e.securityType===$.NoAuth?void 0:e[e.securityType]?.schemeName||void 0}function kr({store:e,input:t}){if(!Ir(t))return[];const n=we(e,t.collectionId,t.workflowId,t.stepId),i=n.ok?n.value:null;return t.changes.map((o,a)=>Tr(i,o,a))}function Ir(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 Tr(e,t,n){const i=t.id??`${t.field}[${n}]`;switch(t.field){case"method":case"url":case"description":return _r(e,t,i);case"parameters":return Sr(e,t,i);case"outputs":return Ar(e,t,i);case"body":return Or(e,t,i);case"successCriteria":return Vr(e,t,i)}}function _r(e,t,n){const i=Y(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:Le(e,t.field),newValue:t.data});case C.REMOVE:return b({id:n,targetType:i,oldValue:Le(e,t.field),newValue:void 0})}}function Sr(e,t,n){switch(t.action){case C.ADD:{if(!t.data)return F(n,"parameter");const{in:i,name:o,value:a}=t.data;return b({id:n,targetType:Y(i),targetKey:o,oldValue:void 0,newValue:a})}case C.UPDATE:{if(!t.id&&!t.data?.name)return F(n,"parameter");const i=Ue(e,t),o=t.data?.in??i?.in??"parameter";return b({id:n,targetType:Y(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 F(n,"parameter");const i=Ue(e,t),o=t.data?.in??i?.in??"parameter";return b({id:n,targetType:Y(o),targetKey:i?.key??t.data?.name,oldValue:i?i.value??"":void 0,newValue:void 0})}}}function Ar(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 F(n,"Output");let i=t.id&&e?We(e,t.id):void 0;return!i&&e&&t.data?.name&&(i=Mr(e,t.data.name)),b({id:n,targetType:"Output",targetKey:i?.key??t.data?.name,oldValue:i?.value,newValue:void 0})}}}function Or(e,t,n){const{data:i}=t;switch(t.action){case C.ADD:return L({data:i,baseId:n,targetType:"Body",getOldValue:()=>{},getNewValue:o=>o==="content"?ce(i.content,i.contentType):te(i[o]),resolveTargetKey:o=>o==="content"?void 0:o});case C.UPDATE:{const o=e?.requestBody.type.get(),a=i.contentType??o;return L({data:i,baseId:n,targetType:"Body",getOldValue:s=>{if(e){if(s==="content")return ce(e.requestBody.content.get(),o)||void 0;if(s==="contentType")return o}},getNewValue:s=>s==="content"?ce(i.content,a):te(i[s]),resolveTargetKey:s=>s==="content"?void 0:s})}case C.REMOVE:{const o=e?ie({contentType:e.requestBody.type.get(),content:e.requestBody.content.get()}):void 0;return b({id:n,targetType:"Body",oldValue:o,newValue:void 0})}}}function Vr(e,t,n){switch(t.action){case C.ADD:return t.data?L({data:t.data,baseId:n,targetType:"successCriteria",getOldValue:()=>{},getNewValue:i=>te(t.data[i])}):F(n,"successCriteria");case C.UPDATE:{if(!t.data)return F(n,"successCriteria");const i=typeof t.id=="string"&&e?Ge(e,t.id):void 0;return L({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=>te(t.data[o])})}case C.REMOVE:{if(typeof t.id!="string")return F(n,"successCriteria");const i=e?Ge(e,t.id):void 0;return b({id:n,targetType:"successCriteria",targetKey:i?.condition,oldValue:i?ie(i):void 0,newValue:void 0})}}}function Le(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?Br(e,t.id):null;return!n&&e&&t.data?.name&&(n=zr(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 Br(e,t){return He(e,n=>n.id===t)}function zr(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:ee(n.key),value:ee(n.value)}}function We(e,t){return Ke(e,n=>ee(n.id)===t)}function Mr(e,t){return Ke(e,n=>ee(n.key)===t)}function ee(e){return typeof e=="string"?e:e.get()}function te(e){return e==null?"":typeof e=="string"?e:ie(e)}function ce(e,t){if(!e||t!==_t.JSON)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const Fr={update_security:wr,update_step:kr};function Ze(e,t){const n=xe(),i=h.useMemo(()=>{const d=e?Fr[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 p=i.map(f=>({...f,included:u[f.id]??f.included}));return Object.fromEntries(d(p).map(f=>[f.id,f.included]))}:Object.fromEntries(d.map(u=>[u.id,u.included])))},[i]);return{previews:s,setPreviews:c}}function $r({toolCallId:e,toolName:t,input:n,onApprove:i,onDeny:o}){const{updateMessages:a}=G(),{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:p,denyLabel:f}=h.useMemo(()=>Un(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,S=w.role==="assistant",M=m.some(T=>Be(T,e));if(S&&M){const T=Kn(w,e,s);j.push({index:y,message:T})}}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(Rr,{children:[r.jsx(Re,{toolName:t,input:n}),s.length?r.jsx(Er,{children:r.jsx(Me,{previews:s,handleToggle:g})}):null,s.length?r.jsx(ge,{}):null,r.jsxs(Nr,{children:[u>1?r.jsxs(Dr,{children:[d," of ",u," selected"]}):null,r.jsx(Pr,{size:"small",variant:"secondary",onClick:o,children:f}),r.jsx(Lr,{size:"small",variant:"primary",onClick:x,disabled:u>0?d===0:!1,children:p})]})]})}const Rr=l.div`
298
298
  display: flex;
299
299
  color: var(--text-color-primary);
300
300
  flex-direction: column;
@@ -305,34 +305,34 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
305
305
  border: 1px solid var(--border-color-secondary);
306
306
  background: var(--layer-color);
307
307
  line-height: var(--line-height-sm);
308
- `,Mr=a.div`
308
+ `,Er=l.div`
309
309
  display: flex;
310
310
  flex-direction: column;
311
311
  gap: var(--spacing-xs);
312
312
  min-width: 0;
313
- `,$r=a.div`
313
+ `,Nr=l.div`
314
314
  display: flex;
315
315
  flex-wrap: wrap;
316
316
  justify-content: flex-end;
317
317
  align-items: center;
318
318
  padding: 0 var(--spacing-sm) var(--spacing-xs) var(--spacing-sm);
319
319
  gap: var(--spacing-xxs);
320
- `,Fr=a.span`
320
+ `,Dr=l.span`
321
321
  flex: 1;
322
322
  font-size: var(--font-size-sm);
323
323
  font-weight: var(--font-weight-regular);
324
324
  line-height: var(--line-height-sm);
325
325
  color: var(--text-color-secondary);
326
- `,Er=a(A)`
326
+ `,Pr=l(A)`
327
327
  background: none;
328
- `,Rr=a(A)`
328
+ `,Lr=l(A)`
329
329
  border: 1px solid var(--button-bg-color);
330
330
  padding-top: 0;
331
331
  padding-bottom: 0;
332
332
  &:disabled {
333
333
  border: 1px solid var(--button-border-color-disabled);
334
334
  }
335
- `;function Nr({approvalId:e,toolCallId:t,toolName:n,input:i}){const{addToolApprovalResponse:o}=H(),s=h.useCallback(()=>{o({id:e,approved:!0})},[e,o]),l=h.useCallback(()=>{o({id:e,approved:!1})},[e,o]);return r.jsx(Br,{onApprove:s,onDeny:l,toolCallId:t,toolName:n,input:i})}function Dr({toolName:e,toolCallId:t,input:n,isDenied:i,messageMetadata:o,onUndo:s}){const l=h.useMemo(()=>Ln(o,t),[o,t]),{previews:c}=We(l?void 0:e,n),d=h.useMemo(()=>{const f=l??c;if(i)return f.map(m=>({...m,included:!1}));const g=Dn(n);return f.map((m,v)=>({...m,included:g[v]??m.included}))},[l,c,n,i]);if(d.length===0)return null;const u=d.filter(f=>f.included).length,p=u===0?"Nothing applied":`${u} ${u===1?"change":"changes"} applied`;return r.jsxs(Lr,{children:[r.jsx(Fe,{toolName:e,input:n}),r.jsx(Pr,{children:r.jsx(ze,{previews:d,readOnly:!0})}),r.jsx(xe,{}),r.jsxs(Ur,{children:[r.jsx(Gr,{children:p}),s?r.jsx(Hr,{size:"small",variant:"outlined",onClick:s,children:"Undo"}):null]})]})}const Lr=a.div`
335
+ `;function Ur({approvalId:e,toolCallId:t,toolName:n,input:i}){const{addToolApprovalResponse:o}=G(),a=h.useCallback(()=>{o({id:e,approved:!0})},[e,o]),s=h.useCallback(()=>{o({id:e,approved:!1})},[e,o]);return r.jsx($r,{onApprove:a,onDeny:s,toolCallId:t,toolName:n,input:i})}function Hr({toolName:e,toolCallId:t,input:n,isDenied:i,messageMetadata:o,onUndo:a}){const s=h.useMemo(()=>Gn(o,t),[o,t]),{previews:c}=Ze(s?void 0:e,n),d=h.useMemo(()=>{const f=s??c;if(i)return f.map(g=>({...g,included:!1}));const x=Hn(n);return f.map((g,v)=>({...g,included:x[v]??g.included}))},[s,c,n,i]);if(d.length===0)return null;const u=d.filter(f=>f.included).length,p=u===0?"Nothing applied":`${u} ${u===1?"change":"changes"} applied`;return r.jsxs(Gr,{children:[r.jsx(Re,{toolName:e,input:n}),r.jsx(Kr,{children:r.jsx(Me,{previews:d,readOnly:!0})}),r.jsx(ge,{}),r.jsxs(Wr,{children:[r.jsx(Zr,{children:p}),a?r.jsx(Yr,{size:"small",variant:"outlined",onClick:a,children:"Undo"}):null]})]})}const Gr=l.div`
336
336
  display: flex;
337
337
  color: var(--text-color-primary);
338
338
  flex-direction: column;
@@ -342,50 +342,50 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
342
342
  border: 1px solid var(--border-color-secondary);
343
343
  background: var(--layer-color);
344
344
  line-height: var(--line-height-sm);
345
- `,Pr=a.div`
345
+ `,Kr=l.div`
346
346
  display: flex;
347
347
  flex-direction: column;
348
348
  min-width: 0;
349
- `,Ur=a.div`
349
+ `,Wr=l.div`
350
350
  display: flex;
351
351
  justify-content: space-between;
352
352
  align-items: center;
353
353
  padding: var(--spacing-xs) var(--spacing-sm);
354
354
  gap: var(--spacing-xs);
355
- `,Gr=a.span`
355
+ `,Zr=l.span`
356
356
  font-size: var(--font-size-sm);
357
357
  font-weight: var(--font-weight-regular);
358
358
  line-height: var(--line-height-sm);
359
359
  color: var(--text-color-secondary);
360
- `,Hr=a(A)`
360
+ `,Yr=l(A)`
361
361
  padding-top: 0;
362
362
  padding-bottom: 0;
363
- `;function Kr({items:e,isLast:t}){const[n,i]=h.useState(t),o=h.useCallback(()=>{i(l=>!l)},[]),s=h.useMemo(()=>e.filter(l=>l.kind==="action"),[e]);return r.jsxs(Zr,{children:[r.jsxs(Yr,{type:"button",onClick:o,"aria-expanded":n,children:[r.jsx(qr,{children:n?r.jsx(ct,{size:"12px",color:"var(--icon-color-additional)"}):r.jsx(dt,{size:"12px",color:"var(--icon-color-additional)"})}),r.jsxs(Jr,{children:[s.length," ",s.length===1?"action":"actions"]})]}),n&&r.jsx(Qr,{children:s.map((l,c)=>r.jsx(Wr,{text:l.text},c))})]})}function Wr({text:e}){return r.jsxs(Xr,{children:[r.jsxs(ei,{children:[r.jsx(ti,{"aria-hidden":!0}),r.jsx(ni,{children:r.jsx(ri,{"aria-hidden":!0})}),r.jsx(Ze,{"aria-hidden":!0})]}),r.jsx(ii,{children:e})]})}const Zr=a.div`
363
+ `;function qr({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(Xr,{type:"button",onClick:o,"aria-expanded":n,children:[r.jsx(ei,{children:n?r.jsx(dt,{size:"12px",color:"var(--icon-color-additional)"}):r.jsx(ut,{size:"12px",color:"var(--icon-color-additional)"})}),r.jsxs(ti,{children:[a.length," ",a.length===1?"action":"actions"]})]}),n&&r.jsx(ni,{children:a.map((s,c)=>r.jsx(Jr,{text:s.text},c))})]})}function Jr({text:e}){return r.jsxs(ri,{children:[r.jsxs(ii,{children:[r.jsx(oi,{"aria-hidden":!0}),r.jsx(ai,{children:r.jsx(si,{"aria-hidden":!0})}),r.jsx(Ye,{"aria-hidden":!0})]}),r.jsx(li,{children:e})]})}const Qr=l.div`
364
364
  display: flex;
365
365
  flex-direction: column;
366
366
  width: 100%;
367
367
  min-width: 0;
368
- `,Yr=a.button`
368
+ `,Xr=l.button`
369
369
  display: flex;
370
370
  align-items: center;
371
371
  cursor: pointer;
372
372
  user-select: none;
373
373
  width: fit-content;
374
374
  padding: 0;
375
- `,qr=a.span`
375
+ `,ei=l.span`
376
376
  display: flex;
377
377
  align-items: center;
378
378
  flex-shrink: 0;
379
- `,Jr=a.span`
379
+ `,ti=l.span`
380
380
  font-size: var(--font-size-sm);
381
381
  font-weight: var(--font-weight-regular);
382
382
  line-height: var(--line-height-sm);
383
383
  color: var(--text-color-description);
384
- `,Qr=a.div`
384
+ `,ni=l.div`
385
385
  display: flex;
386
386
  flex-direction: column;
387
387
  gap: 0;
388
- `,Ze=a.span`
388
+ `,Ye=l.span`
389
389
  display: block;
390
390
  width: 1px;
391
391
  flex-shrink: 0;
@@ -393,7 +393,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
393
393
  background: var(--border-color-secondary);
394
394
  flex: 1 1 auto;
395
395
  min-height: 8px;
396
- `,Xr=a.div`
396
+ `,ri=l.div`
397
397
  display: flex;
398
398
  flex-direction: row;
399
399
  align-items: stretch;
@@ -401,11 +401,11 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
401
401
  min-width: 0;
402
402
 
403
403
  &:last-child {
404
- ${Ze} {
404
+ ${Ye} {
405
405
  display: none;
406
406
  }
407
407
  }
408
- `,ei=a.div`
408
+ `,ii=l.div`
409
409
  display: flex;
410
410
  flex-direction: column;
411
411
  align-items: center;
@@ -414,14 +414,14 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
414
414
  flex: 0 0 auto;
415
415
  align-self: stretch;
416
416
  min-height: 0;
417
- `,ti=a.span`
417
+ `,oi=l.span`
418
418
  display: block;
419
419
  width: 1px;
420
420
  height: 4px;
421
421
  flex: 0 0 auto;
422
422
  flex-shrink: 0;
423
423
  background: var(--border-color-secondary);
424
- `,ni=a.div`
424
+ `,ai=l.div`
425
425
  width: 12px;
426
426
  height: 12px;
427
427
  flex: 0 0 auto;
@@ -429,7 +429,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
429
429
  display: flex;
430
430
  align-items: center;
431
431
  justify-content: center;
432
- `,ri=a.span`
432
+ `,si=l.span`
433
433
  width: 4px;
434
434
  height: 4px;
435
435
  flex-shrink: 0;
@@ -437,7 +437,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
437
437
  box-sizing: border-box;
438
438
  border: 1px solid var(--border-color-secondary);
439
439
  background: transparent;
440
- `,ii=a.span`
440
+ `,li=l.span`
441
441
  flex: 1;
442
442
  min-width: 0;
443
443
  align-self: flex-start;
@@ -445,11 +445,11 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
445
445
  font-weight: var(--font-weight-regular);
446
446
  line-height: var(--line-height-sm);
447
447
  color: var(--text-color-helper);
448
- `;function oi({items:e,messageMetadata:t}){return r.jsx(ai,{children:e.map((n,i)=>{if(n.kind==="reasoning-block"){const l=i===e.length-1;return r.jsx(Kr,{items:n.items,isLast:l},n.key)}if(n.kind==="text")return r.jsx(si,{rawMarkdown:n.text},n.key);const{part:o}=n,s=Pt(o.type);return s&&ve(o)?r.jsx(Nr,{approvalId:o.approval.id,toolCallId:o.toolCallId,toolName:s,input:o.input},n.key):s&&Ut(o)?r.jsx(Dr,{toolName:s,toolCallId:o.toolCallId,input:o.input,isDenied:o.state==="output-denied",messageMetadata:t},n.key):null})})}function si({rawMarkdown:e}){const t=Ce();return r.jsx(li,{onClick:t,children:r.jsx(_t,{rawMarkdown:e,parser:Tt})})}const ai=a.div`
448
+ `;function ci({items:e,messageMetadata:t}){return r.jsx(ui,{children:e.map((n,i)=>{if(n.kind==="reasoning-block"){const s=i===e.length-1;return r.jsx(qr,{items:n.items,isLast:s},n.key)}if(n.kind==="text")return r.jsx(di,{rawMarkdown:n.text,workflowRunHistoryIds:n.workflowRunHistoryIds},n.key);const{part:o}=n,a=Gt(o.type);return a&&ye(o)?r.jsx(Ur,{approvalId:o.approval.id,toolCallId:o.toolCallId,toolName:a,input:o.input},n.key):a&&Kt(o)?r.jsx(Hr,{toolName:a,toolCallId:o.toolCallId,input:o.input,isDenied:o.state==="output-denied",messageMetadata:t},n.key):null})})}function di({rawMarkdown:e,workflowRunHistoryIds:t}){const n=ke({workflowRunHistoryIds:t});return r.jsx(pi,{onClick:n,children:r.jsx(St,{rawMarkdown:e,parser:At})})}const ui=l.div`
449
449
  display: flex;
450
450
  flex-direction: column;
451
451
  gap: var(--spacing-xs);
452
- `,li=a.div`
452
+ `,pi=l.div`
453
453
  white-space: normal;
454
454
 
455
455
  max-width: 100%;
@@ -462,27 +462,27 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
462
462
  p:last-child {
463
463
  margin-bottom: 0;
464
464
  }
465
- `,Ye=a.div`
465
+ `,qe=l.div`
466
466
  font-family: var(--font-family-base);
467
467
  font-size: var(--font-size-sm);
468
468
  line-height: var(--line-height-sm);
469
469
  color: var(--text-color-primary);
470
- `;function ci(){return r.jsxs(di,{children:[r.jsx(Y,{}),r.jsx(Y,{}),r.jsx(Y,{})]})}const di=a.div`
470
+ `;function fi(){return r.jsxs(hi,{children:[r.jsx(q,{}),r.jsx(q,{}),r.jsx(q,{})]})}const hi=l.div`
471
471
  display: flex;
472
472
  align-items: center;
473
473
  justify-content: space-between;
474
474
  width: 24px;
475
475
  height: 24px;
476
- `;function ui(){return r.jsxs(pi,{children:[r.jsx(ci,{}),r.jsx(fi,{children:"Thinking"})]})}const pi=a.div`
476
+ `;function xi(){return r.jsxs(gi,{children:[r.jsx(fi,{}),r.jsx(mi,{children:"Thinking"})]})}const gi=l.div`
477
477
  display: flex;
478
478
  align-items: center;
479
479
  gap: var(--spacing-xxs);
480
- `,fi=a.span`
480
+ `,mi=l.span`
481
481
  font-family: var(--font-family-base);
482
482
  font-size: var(--font-size-sm);
483
483
  line-height: var(--line-height-sm);
484
484
  color: var(--text-color-helper);
485
- `;function hi({items:e}){return r.jsx(h.Fragment,{children:e.map(t=>t.kind!=="text"?null:r.jsx(Ye,{children:t.text},t.key))})}const xi="Something went wrong. Please try again.";function gi(e){return e?.message?.trim()||xi}function mi({message:e,isLastMessage:t}){const{chatStatus:n,chatError:i}=H(),{role:o,parts:s}=e,l=o===V.ASSISTANT,c=h.useMemo(()=>Gt(s),[s]),d=c.length>0,u=n==="error"&&t&&l&&!d;return!d&&!u?null:r.jsx(qe,{$role:o,children:r.jsx(yi,{isFailedEmptyAssistant:u,chatError:i,isAssistant:l,contentItems:c,messageMetadata:e.metadata})})}function vi(){return r.jsx(qe,{$role:V.ASSISTANT,children:r.jsx(ce,{children:r.jsx(ui,{})})})}function yi({isFailedEmptyAssistant:e,chatError:t,isAssistant:n,contentItems:i,messageMetadata:o}){return e?r.jsx(ce,{children:r.jsx(Ye,{children:gi(t)})}):r.jsx(ce,{children:n?r.jsx(oi,{items:i,messageMetadata:o}):r.jsx(hi,{items:i})})}const qe=a.div`
485
+ `;function vi({items:e}){return r.jsx(h.Fragment,{children:e.map(t=>t.kind!=="text"?null:r.jsx(qe,{children:t.text},t.key))})}const yi="Something went wrong. Please try again.";function wi(e){return e?.message?.trim()||yi}function ji({message:e,isLastMessage:t}){const{chatStatus:n,chatError:i}=G(),{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(Ci,{isFailedEmptyAssistant:u,chatError:i,isAssistant:s,contentItems:c,messageMetadata:e.metadata})})}function bi(){return r.jsx(Je,{$role:V.ASSISTANT,children:r.jsx(de,{children:r.jsx(xi,{})})})}function Ci({isFailedEmptyAssistant:e,chatError:t,isAssistant:n,contentItems:i,messageMetadata:o}){return e?r.jsx(de,{children:r.jsx(qe,{children:wi(t)})}):r.jsx(de,{children:n?r.jsx(ci,{items:i,messageMetadata:o}):r.jsx(vi,{items:i})})}const Je=l.div`
486
486
  display: flex;
487
487
  flex-direction: column;
488
488
  padding: var(--spacing-xs) var(--spacing-sm);
@@ -497,22 +497,22 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
497
497
  word-wrap: break-word;
498
498
  white-space: pre-wrap;
499
499
  max-width: 100%;
500
- `,ce=a.div`
500
+ `,de=l.div`
501
501
  display: flex;
502
502
  flex-direction: column;
503
503
  gap: var(--spacing-xxs);
504
504
  min-width: 0;
505
505
  width: 100%;
506
- `;function wi(){const{messages:e,isStreaming:t}=H(),n=e.at(-1),i=h.useMemo(()=>{const o=n?.role===V.ASSISTANT,s=n?.parts.at(-1)?.type==="text";return t&&!(o&&s)},[t,n?.parts,n?.role]);return r.jsxs(ji,{children:[e.map((o,s)=>r.jsx(Je,{$role:o.role,children:r.jsx(Qe,{$role:o.role,children:r.jsx(mi,{message:o,isLastMessage:s===e.length-1})})},o.id)),i&&r.jsx(Je,{$role:V.ASSISTANT,children:r.jsx(Qe,{$role:V.ASSISTANT,children:r.jsx(vi,{})})})]})}const ji=a.div`
506
+ `;function ki(){const{messages:e,isStreaming:t}=G(),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(Ii,{children:[e.map((o,a)=>r.jsx(Qe,{$role:o.role,children:r.jsx(Xe,{$role:o.role,children:r.jsx(ji,{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(bi,{})})})]})}const Ii=l.div`
507
507
  display: flex;
508
508
  flex-direction: column;
509
509
  gap: var(--spacing-xs);
510
510
  width: 100%;
511
- `,Je=a.div`
511
+ `,Qe=l.div`
512
512
  display: flex;
513
513
  width: 100%;
514
514
  justify-content: ${({$role:e})=>e===V.USER?"flex-end":"flex-start"};
515
- `,Qe=a.div`
515
+ `,Xe=l.div`
516
516
  display: flex;
517
517
  flex-direction: column;
518
518
  align-items: ${({$role:e})=>e===V.USER?"flex-end":"stretch"};
@@ -520,17 +520,17 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
520
520
  min-width: 0;
521
521
  width: 100%;
522
522
  max-width: 100%;
523
- `;function bi(e){const t=h.useRef(void 0);return h.useEffect(()=>{t.current=e}),t.current}const Xe=a.div`
523
+ `;function Ti(e){const t=h.useRef(void 0);return h.useEffect(()=>{t.current=e}),t.current}const et=l.div`
524
524
  display: flex;
525
525
  flex-direction: column;
526
526
  flex: 1;
527
527
  width: 100%;
528
528
  overflow: auto;
529
529
  padding: var(--spacing-xs);
530
- `,Ci=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"})]})})]}),ki=a(Ci)`
530
+ `,_i=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"})]})})]}),Si=l(_i)`
531
531
  height: ${({size:e})=>e||"14px"};
532
532
  width: ${({size:e})=>e||"14px"};
533
- `;function Ii(e){const t="var(--font-size-base)";switch(e){case ie:return r.jsx(ki,{size:t});case oe.OPENAI:return r.jsx(xt,{size:t,color:"var(--text-color-primary)"});case oe.GEMINI:return r.jsx(en,{size:t});case oe.ANTHROPIC:return r.jsx(ht,{size:t,color:"var(--replay-claude-icon-color)"})}}function _i({models:e,selectedModelId:t,placement:n,onModelSelect:i,onSettingsOpen:o}){const s=e.find(f=>f.id===t),l=s?.label??"Replay AI",c=s?.id,d=e.filter(f=>f.provider===ie),u=e.filter(f=>f.provider!==ie),p=d.length>0&&u.length>0;return r.jsx(Oi,{children:r.jsx(Vi,{trigger:r.jsx(Ti,{label:l}),placement:n,alignment:"start",withArrow:!0,children:r.jsxs(Bi,{children:[r.jsxs($i,{children:[d.map(f=>r.jsx(et,{model:f,activeModelId:c,onModelSelect:i},f.id)),p&&r.jsx(tt,{"aria-hidden":!0}),u.length>0&&r.jsx(r.Fragment,{children:u.map(f=>r.jsx(et,{model:f,activeModelId:c,onModelSelect:i},f.id))})]}),o&&e.length>0&&r.jsx(tt,{"aria-hidden":!0}),o&&r.jsx(Fi,{prefix:r.jsx(St,{size:"var(--font-size-base)",color:"var(--text-color-secondary)"}),content:"Manage models",onAction:()=>o("ai-providers")})]})})})}function Ti({label:e,icon:t,onClick:n,onKeyDown:i}){return r.jsxs(Si,{onClick:n,onKeyDown:i,children:[r.jsx(Ai,{children:e}),t]})}function et({model:e,activeModelId:t,onModelSelect:n}){const i=e.id===t;return r.jsx(ue,{prefix:Ii(e.provider),suffix:i?r.jsx(Mi,{size:"var(--font-size-base)",color:"var(--text-color-primary)"}):void 0,onAction:()=>n(e.id),active:i,children:r.jsx(zi,{children:e.label})})}const Si=a.div`
533
+ `;function Ai(e){const t="var(--font-size-base)";switch(e){case oe:return r.jsx(Si,{size:t});case ae.OPENAI:return r.jsx(gt,{size:t,color:"var(--text-color-primary)"});case ae.GEMINI:return r.jsx(rn,{size:t});case ae.ANTHROPIC:return r.jsx(xt,{size:t,color:"var(--replay-claude-icon-color)"})}}function Oi({models:e,selectedModelId:t,placement:n,onModelSelect:i,onSettingsOpen:o}){const a=e.find(f=>f.id===t),s=a?.label??"Replay AI",c=a?.id,d=e.filter(f=>f.provider===oe),u=e.filter(f=>f.provider!==oe),p=d.length>0&&u.length>0;return r.jsx(Mi,{children:r.jsx(Fi,{trigger:r.jsx(Vi,{label:s}),placement:n,alignment:"start",withArrow:!0,children:r.jsxs($i,{children:[r.jsxs(Ni,{children:[d.map(f=>r.jsx(tt,{model:f,activeModelId:c,onModelSelect:i},f.id)),p&&r.jsx(nt,{"aria-hidden":!0}),u.length>0&&r.jsx(r.Fragment,{children:u.map(f=>r.jsx(tt,{model:f,activeModelId:c,onModelSelect:i},f.id))})]}),o&&e.length>0&&r.jsx(nt,{"aria-hidden":!0}),o&&r.jsx(Di,{prefix:r.jsx(Ot,{size:"var(--font-size-base)",color:"var(--text-color-secondary)"}),content:"Manage models",onAction:()=>o("ai-providers")})]})})})}function Vi({label:e,icon:t,onClick:n,onKeyDown:i}){return r.jsxs(Bi,{onClick:n,onKeyDown:i,children:[r.jsx(zi,{children:e}),t]})}function tt({model:e,activeModelId:t,onModelSelect:n}){const i=e.id===t;return r.jsx(pe,{prefix:Ai(e.provider),suffix:i?r.jsx(Ei,{size:"var(--font-size-base)",color:"var(--text-color-primary)"}):void 0,onAction:()=>n(e.id),active:i,children:r.jsx(Ri,{children:e.label})})}const Bi=l.div`
534
534
  display: flex;
535
535
  align-items: center;
536
536
  min-width: 0;
@@ -545,7 +545,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
545
545
  &:hover {
546
546
  background: var(--layer-color-active);
547
547
  }
548
- `,Ai=a.span`
548
+ `,zi=l.span`
549
549
  overflow: hidden;
550
550
  text-overflow: ellipsis;
551
551
  font-family: var(--font-family-base);
@@ -554,13 +554,13 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
554
554
  line-height: var(--line-height-base);
555
555
  color: var(--text-color-primary);
556
556
  white-space: nowrap;
557
- `,Oi=a.div`
557
+ `,Mi=l.div`
558
558
  --dropdown-menu-padding-top: 0;
559
559
 
560
560
  min-width: 0;
561
561
  flex: 1;
562
562
  position: relative;
563
- `,Vi=a(ut)`
563
+ `,Fi=l(pt)`
564
564
  width: 100%;
565
565
  min-width: 0;
566
566
  flex: 1;
@@ -569,7 +569,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
569
569
  width: 100%;
570
570
  max-width: 200px;
571
571
  }
572
- `,Bi=a(pt)`
572
+ `,$i=l(ft)`
573
573
  --dropdown-menu-item-gap: calc(var(--spacing-unit) / 2);
574
574
  --dropdown-menu-item-padding-vertical: var(--spacing-xxs);
575
575
  --dropdown-menu-item-padding-horizontal: var(--spacing-xs);
@@ -578,31 +578,31 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
578
578
  margin: 5px 0;
579
579
  border-radius: var(--border-radius-lg);
580
580
  background: var(--bg-color);
581
- `,zi=a.span`
581
+ `,Ri=l.span`
582
582
  flex: 1;
583
583
  min-width: 0;
584
584
  overflow: hidden;
585
585
  text-overflow: ellipsis;
586
586
  white-space: nowrap;
587
- `,Mi=a(ft)`
587
+ `,Ei=l(ht)`
588
588
  margin-left: var(--spacing-xxs);
589
- `,tt=a.li`
589
+ `,nt=l.li`
590
590
  flex-shrink: 0;
591
591
  list-style: none;
592
592
  width: 100%;
593
593
  height: 1px;
594
594
  margin: 0;
595
595
  background: var(--border-color-secondary);
596
- `,$i=a.li`
596
+ `,Ni=l.li`
597
597
  display: flex;
598
598
  flex-direction: column;
599
599
  gap: var(--dropdown-menu-item-gap);
600
600
  list-style: none;
601
601
  min-height: 0;
602
602
  overflow-y: auto;
603
- `,Fi=a(ue)`
603
+ `,Di=l(pe)`
604
604
  flex-shrink: 0;
605
- `;function Ei(){const{chatId:e,isLoading:t,pendingComposerPreset:n,clearPendingComposerPreset:i,availableModels:o,selectedModelId:s,selectModel:l,onSettingsOpen:c}=ge(),{messages:d,isStreaming:u,sendMessage:p,stopGeneration:f}=H(),{isOpen:g}=me(),[m,v]=h.useState(""),j=h.useRef(null),y=h.useRef(null),w=h.useRef(!0),x=d.length>0,S=bi(d.length),z=S!==void 0&&S>0&&!x,_=h.useCallback((T="smooth")=>{y.current&&y.current.scrollTo({top:y.current.scrollHeight,behavior:T})},[]),U=h.useCallback(()=>{const T=y.current;T&&T.scrollHeight-T.scrollTop-T.clientHeight<50&&(w.current=!0)},[]);h.useEffect(()=>{const T=y.current;if(!T)return;const de=st=>{st.deltaY<0&&(w.current=!1)};return T.addEventListener("wheel",de,{passive:!0}),()=>T.removeEventListener("wheel",de)},[]);const K=h.useCallback(async()=>{m&&(v(""),w.current=!0,await p(m),j.current&&requestAnimationFrame(()=>j.current?.focus()))},[p,m]);return h.useEffect(()=>{g&&(j.current&&j.current.focus(),w.current=!0,_())},[g,d.length,_]),h.useEffect(()=>{u&&w.current&&_()}),h.useEffect(function(){g&&j.current&&(j.current.focus(),_("instant"))},[e,g,_]),h.useEffect(function(){!g||n===null||(v(n),i())},[g,n,i]),r.jsxs(Xe,{children:[r.jsx(Ri,{ref:y,$isExpanded:t||x,$isAnimated:u||z,onScroll:U,children:t?r.jsx(Ni,{children:r.jsx(se,{size:"20px"})}):r.jsx(wi,{})}),r.jsx(cn,{value:m,onValueChange:v,onSubmit:K,isStreaming:u,onStop:f,textareaRef:j,modelSelector:r.jsx(_i,{models:o,selectedModelId:s,placement:x?"top":"bottom",onModelSelect:l,onSettingsOpen:c})})]})}const Ri=a.div`
605
+ `;function Pi(){const{chatId:e,isLoading:t,pendingComposerPreset:n,clearPendingComposerPreset:i,availableModels:o,selectedModelId:a,selectModel:s,onSettingsOpen:c}=me(),{messages:d,isStreaming:u,sendMessage:p,stopGeneration:f}=G(),{isOpen:x}=ve(),[g,v]=h.useState(""),j=h.useRef(null),y=h.useRef(null),w=h.useRef(!0),m=d.length>0,S=Ti(d.length),M=S!==void 0&&S>0&&!m,T=h.useCallback((_="smooth")=>{y.current&&y.current.scrollTo({top:y.current.scrollHeight,behavior:_})},[]),U=h.useCallback(()=>{const _=y.current;_&&_.scrollHeight-_.scrollTop-_.clientHeight<50&&(w.current=!0)},[]);h.useEffect(()=>{const _=y.current;if(!_)return;const ue=st=>{st.deltaY<0&&(w.current=!1)};return _.addEventListener("wheel",ue,{passive:!0}),()=>_.removeEventListener("wheel",ue)},[]);const K=h.useCallback(async()=>{g&&(v(""),w.current=!0,await p(g),j.current&&requestAnimationFrame(()=>j.current?.focus()))},[p,g]);return h.useEffect(()=>{x&&(j.current&&j.current.focus(),w.current=!0,T())},[x,d.length,T]),h.useEffect(()=>{u&&w.current&&T()}),h.useEffect(function(){x&&j.current&&(j.current.focus(),T("instant"))},[e,x,T]),h.useEffect(function(){!x||n===null||(v(n),i())},[x,n,i]),r.jsxs(et,{children:[r.jsx(Li,{ref:y,$isExpanded:t||m,$isAnimated:u||M,onScroll:U,children:t?r.jsx(Ui,{children:r.jsx(se,{size:"20px"})}):r.jsx(ki,{})}),r.jsx(pn,{value:g,onValueChange:v,onSubmit:K,isStreaming:u,onStop:f,textareaRef:j,modelSelector:r.jsx(Oi,{models:o,selectedModelId:a,placement:m?"top":"bottom",onModelSelect:s,onSettingsOpen:c})})]})}const Li=l.div`
606
606
  flex: ${({$isExpanded:e})=>e?1:0};
607
607
  width: 100%;
608
608
  overflow: auto;
@@ -610,48 +610,48 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
610
610
  transition-property: flex;
611
611
  transition-duration: ${e=>e.$isAnimated?"var(--replay-transition-duration)":"0s"};
612
612
  transition-timing-function: var(--replay-transition-timing-function);
613
- `,Ni=a.div`
613
+ `,Ui=l.div`
614
614
  display: flex;
615
615
  justify-content: center;
616
616
  height: 100%;
617
617
  padding-top: var(--spacing-lg);
618
- `,B={TODAY:"today",YESTERDAY:"yesterday",LAST_WEEK:"last_week",LAST_MONTH:"last_month",OLDER:"older"},Di={[B.TODAY]:"Today",[B.YESTERDAY]:"Yesterday",[B.LAST_WEEK]:"Last 7 days",[B.LAST_MONTH]:"Last 30 days",[B.OLDER]:"Older"};function Li(e,t=Date.now()){const n=N(e).startOf("day"),i=N(t).startOf("day"),o=N(t).subtract(1,"day").startOf("day"),s=N(t).subtract(7,"day").startOf("day"),l=N(t).subtract(30,"day").startOf("day");return n.isSame(i,"day")?B.TODAY:n.isSame(o,"day")?B.YESTERDAY:!n.isBefore(s,"day")&&n.isBefore(o,"day")?B.LAST_WEEK:!n.isBefore(l,"day")&&n.isBefore(s,"day")?B.LAST_MONTH:B.OLDER}function Pi(e){const t=[];for(const n of e){const i=Li(n.updatedAt),o=t[t.length-1];!o||o.bucket!==i?t.push({bucket:i,chats:[n]}):o.chats.push(n)}return t}function Ui(e){const{scrollRef:t,sentinelRef:n,hasNextPage:i,isFetchingNextPage:o,fetchNextPage:s,observerResetKey:l}=e;h.useLayoutEffect(()=>{const c=t.current,d=n.current;if(!c||!d)return;const u=new IntersectionObserver(p=>{const f=p[0];f&&f.isIntersecting&&i&&(o||s())},{root:c,rootMargin:"80px"});return u.observe(d),()=>{u.disconnect()}},[l,s,i,o,t,n])}const nt=a(Xe)`
618
+ `,z={TODAY:"today",YESTERDAY:"yesterday",LAST_WEEK:"last_week",LAST_MONTH:"last_month",OLDER:"older"},Hi={[z.TODAY]:"Today",[z.YESTERDAY]:"Yesterday",[z.LAST_WEEK]:"Last 7 days",[z.LAST_MONTH]:"Last 30 days",[z.OLDER]:"Older"};function Gi(e,t=Date.now()){const n=N(e).startOf("day"),i=N(t).startOf("day"),o=N(t).subtract(1,"day").startOf("day"),a=N(t).subtract(7,"day").startOf("day"),s=N(t).subtract(30,"day").startOf("day");return n.isSame(i,"day")?z.TODAY:n.isSame(o,"day")?z.YESTERDAY:!n.isBefore(a,"day")&&n.isBefore(o,"day")?z.LAST_WEEK:!n.isBefore(s,"day")&&n.isBefore(a,"day")?z.LAST_MONTH:z.OLDER}function Ki(e){const t=[];for(const n of e){const i=Gi(n.updatedAt),o=t[t.length-1];!o||o.bucket!==i?t.push({bucket:i,chats:[n]}):o.chats.push(n)}return t}function Wi(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(p=>{const f=p[0];f&&f.isIntersecting&&i&&(o||a())},{root:c,rootMargin:"80px"});return u.observe(d),()=>{u.disconnect()}},[s,a,i,o,t,n])}const rt=l(et)`
619
619
  gap: var(--spacing-xxs);
620
620
  user-select: none;
621
- `,Gi=a.div`
621
+ `,Zi=l.div`
622
622
  display: flex;
623
623
  flex-direction: column;
624
624
  gap: var(--spacing-xs);
625
- `,Hi=a.div`
625
+ `,Yi=l.div`
626
626
  display: flex;
627
627
  flex-direction: column;
628
628
  gap: var(--spacing-xxs);
629
- `,Ki=a(nt)`
629
+ `,qi=l(rt)`
630
630
  display: flex;
631
631
  flex-grow: 1;
632
632
  align-items: center;
633
633
  flex-direction: column;
634
634
  padding: var(--spacing-md);
635
- `,Wi=a.div`
635
+ `,Ji=l.div`
636
636
  display: flex;
637
637
  flex-grow: 1;
638
638
  align-items: center;
639
639
  justify-content: center;
640
- `,Zi=a.div`
640
+ `,Qi=l.div`
641
641
  display: flex;
642
642
  flex-direction: column;
643
643
  align-items: center;
644
644
  max-width: 75%;
645
645
  gap: var(--spacing-xxs);
646
- `,Yi=a.div`
646
+ `,Xi=l.div`
647
647
  display: flex;
648
648
  justify-content: center;
649
649
  padding: var(--spacing-xs);
650
- `,qi=a(G)`
650
+ `,eo=l(H)`
651
651
  padding-left: var(--spacing-xs);
652
652
  font-size: var(--font-size-sm);
653
653
  color: var(--color-warm-grey-7);
654
- `,Ji=a.div`
654
+ `,to=l.div`
655
655
  display: flex;
656
656
  flex-grow: 1;
657
657
 
@@ -659,7 +659,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
659
659
  flex-grow: 1;
660
660
  min-width: 0;
661
661
  }
662
- `,Qi=a.div`
662
+ `,no=l.div`
663
663
  display: flex;
664
664
  align-items: center;
665
665
  justify-content: space-between;
@@ -682,19 +682,19 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
682
682
  display: inline-flex;
683
683
  }
684
684
  }
685
- `,Xi=a(G)`
685
+ `,ro=l(H)`
686
686
  overflow: hidden;
687
687
  white-space: nowrap;
688
688
  text-overflow: ellipsis;
689
- `,eo=a.div`
689
+ `,io=l.div`
690
690
  height: 1px;
691
691
  flex-shrink: 0;
692
- `;function to(e){const{chat:t,onSelect:n,onRemove:i}=e;return r.jsx(Ji,{children:r.jsx(R,{tip:N(t.updatedAt).format("MMM DD, YYYY, hh:mm:ss A"),className:"expanded",children:r.jsxs(Qi,{role:"button",onClick:()=>n?.(t.id),children:[r.jsx(Xi,{children:t.title??"New chat"}),r.jsx(A,{variant:"ghost",size:"small",tone:"danger",icon:r.jsx(At,{}),onClick:o=>{o.stopPropagation(),i?.(t.id)}})]})})})}function no(e){const{group:t,onChatSelect:n,onChatRemove:i}=e;return r.jsxs(Hi,{children:[r.jsx(qi,{children:Di[t.bucket]}),t.chats.map(o=>r.jsx(to,{chat:o,onSelect:n,onRemove:i},o.id))]})}function ro(){return r.jsx(Wi,{children:r.jsxs(Zi,{children:[r.jsx(G,{textAlign:"center",fontWeight:"var(--font-weight-semibold)",children:"No chat history"}),r.jsx(G,{textAlign:"center",children:"Ask questions or let the assistant take action for you."})]})})}function io(){return r.jsx(Ki,{children:r.jsx(se,{})})}const oo=50;function so(e){const{onChatSelect:t,onChatRemove:n}=e,i=h.useRef(null),o=h.useRef(null),{data:s,isPending:l,hasNextPage:c,isFetchingNextPage:d,fetchNextPage:u}=Ht(oo),p=h.useMemo(()=>(s?.pages??[]).flatMap(g=>g.items),[s?.pages]),f=h.useMemo(()=>Pi(p),[p]);return Ui({scrollRef:i,sentinelRef:o,hasNextPage:c,isFetchingNextPage:d,fetchNextPage:u,observerResetKey:s?.pages.length}),l&&!s?r.jsx(io,{}):p.length===0?r.jsx(ro,{}):r.jsxs(nt,{ref:i,children:[r.jsx(Gi,{children:f.map(g=>r.jsx(no,{group:g,onChatSelect:t,onChatRemove:n},`${g.bucket}-${g.chats[0]?.id??""}`))}),c&&r.jsx(eo,{ref:o,"aria-hidden":!0}),d&&r.jsx(Yi,{children:r.jsx(se,{})})]})}function ao(){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 s=new ResizeObserver(o);return s.observe(i),()=>s.disconnect()},[]),{ref:e,value:t}}function lo(e){const{ref:t,value:n}=ao();return r.jsx(co,{children:r.jsx(R,{tip:e.value,className:"no-overflow",disabled:!n,children:r.jsx(uo,{ref:t,children:e.value})})})}const co=a.div`
692
+ `;function oo(e){const{chat:t,onSelect:n,onRemove:i}=e;return r.jsx(to,{children:r.jsx(E,{tip:N(t.updatedAt).format("MMM DD, YYYY, hh:mm:ss A"),className:"expanded",children:r.jsxs(no,{role:"button",onClick:()=>n?.(t.id),children:[r.jsx(ro,{children:t.title??"New chat"}),r.jsx(A,{variant:"ghost",size:"small",tone:"danger",icon:r.jsx(Vt,{}),onClick:o=>{o.stopPropagation(),i?.(t.id)}})]})})})}function ao(e){const{group:t,onChatSelect:n,onChatRemove:i}=e;return r.jsxs(Yi,{children:[r.jsx(eo,{children:Hi[t.bucket]}),t.chats.map(o=>r.jsx(oo,{chat:o,onSelect:n,onRemove:i},o.id))]})}function so(){return r.jsx(Ji,{children:r.jsxs(Qi,{children:[r.jsx(H,{textAlign:"center",fontWeight:"var(--font-weight-semibold)",children:"No chat history"}),r.jsx(H,{textAlign:"center",children:"Ask questions or let the assistant take action for you."})]})})}function lo(){return r.jsx(qi,{children:r.jsx(se,{})})}const co=50;function uo(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(co),p=h.useMemo(()=>(a?.pages??[]).flatMap(x=>x.items),[a?.pages]),f=h.useMemo(()=>Ki(p),[p]);return Wi({scrollRef:i,sentinelRef:o,hasNextPage:c,isFetchingNextPage:d,fetchNextPage:u,observerResetKey:a?.pages.length}),s&&!a?r.jsx(lo,{}):p.length===0?r.jsx(so,{}):r.jsxs(rt,{ref:i,children:[r.jsx(Zi,{children:f.map(x=>r.jsx(ao,{group:x,onChatSelect:t,onChatRemove:n},`${x.bucket}-${x.chats[0]?.id??""}`))}),c&&r.jsx(io,{ref:o,"aria-hidden":!0}),d&&r.jsx(Xi,{children:r.jsx(se,{})})]})}function po(){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 fo(e){const{ref:t,value:n}=po();return r.jsx(ho,{children:r.jsx(E,{tip:e.value,className:"no-overflow",disabled:!n,children:r.jsx(xo,{ref:t,children:e.value})})})}const ho=l.div`
693
693
  overflow: hidden;
694
694
  .tooltip-no-overflow {
695
695
  overflow: hidden;
696
696
  }
697
- `,uo=a.div`
697
+ `,xo=l.div`
698
698
  color: var(--text-color-primary);
699
699
  font-size: var(--font-size-base);
700
700
  line-height: var(--line-height-base);
@@ -702,7 +702,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
702
702
  white-space: nowrap;
703
703
  text-overflow: ellipsis;
704
704
  user-select: none;
705
- `;function rt(e){const{children:t,buttons:n}=e;return r.jsxs(po,{children:[r.jsx(fo,{children:t}),n&&r.jsx(ho,{children:n})]})}const po=a.div`
705
+ `;function it(e){const{children:t,buttons:n}=e;return r.jsxs(go,{children:[r.jsx(mo,{children:t}),n&&r.jsx(vo,{children:n})]})}const go=l.div`
706
706
  display: flex;
707
707
  flex-direction: row;
708
708
  align-items: center;
@@ -710,28 +710,28 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
710
710
  gap: var(--spacing-xs);
711
711
  width: 100%;
712
712
  flex-shrink: 0;
713
- `,fo=a.div`
713
+ `,mo=l.div`
714
714
  display: flex;
715
715
  align-items: center;
716
716
  gap: var(--spacing-xs);
717
717
  min-width: 0;
718
718
  flex: 1;
719
- `,ho=a.div`
719
+ `,vo=l.div`
720
720
  display: flex;
721
721
  align-items: center;
722
722
  gap: 2px;
723
- `;function xo(e){const{title:t,onCreateNewChat:n,onViewHistory:i,onClose:o}=e,s=r.jsxs(r.Fragment,{children:[r.jsx(R,{tip:"New chat",children:r.jsx(A,{size:"small",variant:"text","aria-label":"Create new chat",onClick:n,icon:r.jsx(nn,{})})}),r.jsx(R,{tip:"Chat history",children:r.jsx(A,{size:"small",variant:"text","aria-label":"View chat history",onClick:i,icon:r.jsx(Vt,{})})}),r.jsx(mo,{children:r.jsx(Bt,{})}),r.jsx(R,{tip:"Close",arrowPosition:"left",children:r.jsx(A,{variant:"text",size:"small","aria-label":"Close panel",icon:r.jsx(gt,{}),onClick:o})})]});return r.jsxs(rt,{buttons:s,children:[r.jsx(go,{children:r.jsx(Ot,{size:"14px"})}),r.jsx(lo,{value:t})]})}const go=a.div`
723
+ `;function yo(e){const{title:t,onCreateNewChat:n,onViewHistory:i,onClose:o}=e,a=r.jsxs(r.Fragment,{children:[r.jsx(E,{tip:"New chat",children:r.jsx(A,{size:"small",variant:"text","aria-label":"Create new chat",onClick:n,icon:r.jsx(an,{})})}),r.jsx(E,{tip:"Chat history",children:r.jsx(A,{size:"small",variant:"text","aria-label":"View chat history",onClick:i,icon:r.jsx(zt,{})})}),r.jsx(jo,{children:r.jsx(Mt,{})}),r.jsx(E,{tip:"Close",arrowPosition:"left",children:r.jsx(A,{variant:"text",size:"small","aria-label":"Close panel",icon:r.jsx(mt,{}),onClick:o})})]});return r.jsxs(it,{buttons:a,children:[r.jsx(wo,{children:r.jsx(Bt,{size:"14px"})}),r.jsx(fo,{value:t})]})}const wo=l.div`
724
724
  display: flex;
725
- `,mo=a.div`
725
+ `,jo=l.div`
726
726
  display: flex;
727
727
  height: 14px;
728
- `;function vo(e){const{onReturnFromHistory:t}=e;return r.jsxs(rt,{children:[r.jsx(A,{size:"small",variant:"text","aria-label":"Return to chat",onClick:t,icon:r.jsx(zt,{})}),r.jsx(yo,{children:r.jsx(G,{children:"Chat history"})})]})}const yo=a.div`
728
+ `;function bo(e){const{onReturnFromHistory:t}=e;return r.jsxs(it,{children:[r.jsx(A,{size:"small",variant:"text","aria-label":"Return to chat",onClick:t,icon:r.jsx(Ft,{})}),r.jsx(Co,{children:r.jsx(H,{children:"Chat history"})})]})}const Co=l.div`
729
729
  user-select: none;
730
- `;function wo(){const[e,t]=h.useState(D.CHAT),n=me(),i=ge(),o=()=>{t(D.HISTORY)},s=()=>{t(D.CHAT)},l=async c=>{i.selectChat(c),t(D.CHAT)};return r.jsxs(jo,{children:[r.jsxs(it,{isActive:e===D.CHAT,children:[r.jsx(xo,{title:i.title,onCreateNewChat:i.createNewChat,onViewHistory:o,onClose:n.closePanel}),r.jsx(Ei,{}),r.jsx(ot,{children:r.jsx(je,{})})]}),r.jsxs(it,{isActive:e===D.HISTORY,isSliding:!0,children:[r.jsx(vo,{onReturnFromHistory:s}),r.jsx(so,{onChatSelect:l,onChatRemove:i.removeChat}),r.jsx(ot,{children:r.jsx(je,{})})]})]})}function it(e){const{children:t,isActive:n,isSliding:i=!1}=e,o=r.jsx(bo,{inert:!n,children:t});return i?r.jsx(Co,{$isExpanded:n,children:o}):o}const jo=a.div`
730
+ `;function ko(){const[e,t]=h.useState(D.CHAT),n=ve(),i=me(),o=()=>{t(D.HISTORY)},a=()=>{t(D.CHAT)},s=async c=>{i.selectChat(c),t(D.CHAT)};return r.jsxs(Io,{children:[r.jsxs(ot,{isActive:e===D.CHAT,children:[r.jsx(yo,{title:i.title,onCreateNewChat:i.createNewChat,onViewHistory:o,onClose:n.closePanel}),r.jsx(Pi,{}),r.jsx(at,{children:r.jsx(be,{})})]}),r.jsxs(ot,{isActive:e===D.HISTORY,isSliding:!0,children:[r.jsx(bo,{onReturnFromHistory:a}),r.jsx(uo,{onChatSelect:s,onChatRemove:i.removeChat}),r.jsx(at,{children:r.jsx(be,{})})]})]})}function ot(e){const{children:t,isActive:n,isSliding:i=!1}=e,o=r.jsx(To,{inert:!n,children:t});return i?r.jsx(_o,{$isExpanded:n,children:o}):o}const Io=l.div`
731
731
  position: relative;
732
732
  height: 100%;
733
733
  overflow: clip;
734
- `,bo=a.div`
734
+ `,To=l.div`
735
735
  display: flex;
736
736
  height: 100%;
737
737
  flex-direction: column;
@@ -739,7 +739,7 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
739
739
  border-radius: var(--border-radius-md);
740
740
  background: var(--bg-color);
741
741
  margin-left: var(--spacing-xxs);
742
- `,Co=a.div`
742
+ `,_o=l.div`
743
743
  position: absolute;
744
744
  inset: 0;
745
745
  transform: translateX(${e=>e.$isExpanded?"0%":"100%"});
@@ -749,6 +749,6 @@ import{g as W,a,j as r,r as h,ae as R,f as at,B as A,e as lt,O as ct,af as dt,D
749
749
  @media (prefers-reduced-motion: reduce) {
750
750
  transition-duration: 0ms;
751
751
  }
752
- `,ot=a.div`
752
+ `,at=l.div`
753
753
  width: 100%;
754
- `;export{wo as AiPanel};
754
+ `;export{ko as AiPanel};