@qredence/fleet 0.7.0 → 0.7.2

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 (118) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/web/client/assets/{action-swap-roll-BfVrBOVd.js → action-swap-roll-Bek47h-E.js} +1 -1
  3. package/dist/web/client/assets/{alert-dialog-FCppNafx.js → alert-dialog-OoasP5iO.js} +1 -1
  4. package/dist/web/client/assets/{artifacts-panel-Qd6JlHzz.js → artifacts-panel-DVY0-7X0.js} +1 -1
  5. package/dist/web/client/assets/{badge-BjFxrtmB.js → badge-9wr3qUp1.js} +7 -7
  6. package/dist/web/client/assets/{button-BJyg7l5W.js → button-Bqms7ZKX.js} +1 -1
  7. package/dist/web/client/assets/{card-BScRdZNS.js → card-DPCbcrMK.js} +1 -1
  8. package/dist/web/client/assets/{chat-command-palette-CPlJp2cO.js → chat-command-palette-CXS5eTiy.js} +1 -1
  9. package/dist/web/client/assets/{chunk-YOKDWASO-C8deEx7Z.js → chunk-YOKDWASO-Dego39cu.js} +4 -4
  10. package/dist/web/client/assets/{citations-BhyqbxcZ.js → citations-C7USoVdz.js} +1 -1
  11. package/dist/web/client/assets/{command-Bo31U-UD.js → command-s2yLD3tA.js} +1 -1
  12. package/dist/web/client/assets/{create-project-dialog-SDyXTpl-.js → create-project-dialog-C99_Lyjg.js} +1 -1
  13. package/dist/web/client/assets/{dialog-DLIPvl1s.js → dialog-DuCD5hRq.js} +1 -1
  14. package/dist/web/client/assets/{dist-CZDnnosQ.js → dist-QgsZ1U9l.js} +1 -1
  15. package/dist/web/client/assets/{ease-DKi-MOH5.js → ease-2gsl7ABx.js} +1 -1
  16. package/dist/web/client/assets/{fork-picker-dialog-BDleMADF.js → fork-picker-dialog--dV6TE-9.js} +1 -1
  17. package/dist/web/client/assets/globals-BXtzVIWE.css +2 -0
  18. package/dist/web/client/assets/{highlighted-body-KPVGNVTW-CZcNaoxi.js → highlighted-body-KPVGNVTW-CSgDVUQp.js} +1 -1
  19. package/dist/web/client/assets/index-C2EkVtv5.js +13 -0
  20. package/dist/web/client/assets/{input-Ce8yLnXY.js → input-DECT4vz2.js} +1 -1
  21. package/dist/web/client/assets/{input-group-BZLQiZOA.js → input-group-CZlz1ygA.js} +1 -1
  22. package/dist/web/client/assets/{ipython-tool-CuSGRhXl.js → ipython-tool-Bs6ESZe1.js} +1 -1
  23. package/dist/web/client/assets/{layout-constants-Bl6XCvhY.js → layout-constants-C4hoW3YP.js} +1 -1
  24. package/dist/web/client/assets/{markdown-C-Y9gskI.js → markdown-B2tpfUKu.js} +2 -2
  25. package/dist/web/client/assets/{markdown-code-BqFVdovL.js → markdown-code-B5YUmtLX.js} +1 -1
  26. package/dist/web/client/assets/mermaid-HWGCJPDP-BpEVCu9T.js +1 -0
  27. package/dist/web/client/assets/{message-queue-CiptKSb6.js → message-queue-BD2sIUTH.js} +1 -1
  28. package/dist/web/client/assets/{model-selector-list-BHQ-Q8b9.js → model-selector-list-zPZRE3JY.js} +1 -1
  29. package/dist/web/client/assets/{notify-BC0a76VJ.js → notify-mVA6z9Ly.js} +1 -1
  30. package/dist/web/client/assets/{openui-renderer-CH9K7_8t.js → openui-renderer-ByP8yQph.js} +1 -1
  31. package/dist/web/client/assets/{preload-helper-Czpn1I53.js → preload-helper-BZ1Pz5am.js} +1 -1
  32. package/dist/web/client/assets/{prompt-input-IwZOepG7.js → prompt-input-Bnl0HyL6.js} +1 -1
  33. package/dist/web/client/assets/{prompt-suggestions-BRFWFm5y.js → prompt-suggestions-DcgETXtw.js} +1 -1
  34. package/dist/web/client/assets/{provider-label-DNZOLldn.js → provider-label-COVNyoZo.js} +1 -1
  35. package/dist/web/client/assets/{repl-panel-UQN9UFG7.js → repl-panel-BoDNpJOe.js} +1 -1
  36. package/dist/web/client/assets/{resources-panel-kp_UjnpX.js → resources-panel-DD6iWOF3.js} +1 -1
  37. package/dist/web/client/assets/{right-panel-registry-BJG8ubHt.js → right-panel-registry-CIfLdAfS.js} +2 -2
  38. package/dist/web/client/assets/{routes-BXFQmjL9.js → routes-DO93P3Xm.js} +5 -5
  39. package/dist/web/client/assets/{select-COK0Kaq2.js → select-Dp15z1lf.js} +1 -1
  40. package/dist/web/client/assets/{session-reasoning-panel-DrTWp8d4.js → session-reasoning-panel-WMedZp__.js} +1 -1
  41. package/dist/web/client/assets/session-tool-renderer-BFC3-Md4.js +170 -0
  42. package/dist/web/client/assets/{session-tree-panel-deGRKAhX.js → session-tree-panel-CnHOsPzz.js} +1 -1
  43. package/dist/web/client/assets/{settings-dialog-BU1Tw0CQ.js → settings-dialog-BN138nzK.js} +1 -1
  44. package/dist/web/client/assets/{skeleton-D5Y9nBfp.js → skeleton-DNAr5ULI.js} +1 -1
  45. package/dist/web/client/assets/{skeleton-loaders-DOKGa7CW.js → skeleton-loaders-B28mF4tJ.js} +1 -1
  46. package/dist/web/client/assets/{spinner-C3sPnLdu.js → spinner-CSBXk3Lo.js} +1 -1
  47. package/dist/web/client/assets/{subagent-chat-panel-DQEnhU2t.js → subagent-chat-panel-DYKOKRPp.js} +1 -1
  48. package/dist/web/client/assets/subagent-transcript-BCUhqVvi.js +1 -0
  49. package/dist/web/client/assets/{subagent-utils-DTV2RcFl.js → subagent-utils-CM2qX9BG.js} +2 -2
  50. package/dist/web/client/assets/{subagents-panel-B-X7WPUU.js → subagents-panel-CTvtU0Sh.js} +1 -1
  51. package/dist/web/client/assets/{surface-context-DWplCCcO.js → surface-context-VvasJf_6.js} +1 -1
  52. package/dist/web/client/assets/{surfaces-BULKVm-B.js → surfaces-m1vs5aMP.js} +1 -1
  53. package/dist/web/client/assets/{switch-DQETDDJT.js → switch-eqXIzePo.js} +1 -1
  54. package/dist/web/client/assets/{toast-BFeqSeaR.js → toast-DRDVljMF.js} +1 -1
  55. package/dist/web/client/assets/{tool-result-C5Ixe-AJ.js → tool-result-DWUV8hEz.js} +2 -2
  56. package/dist/web/client/assets/{tool-timeline-B4ci1oJg.js → tool-timeline-4k2iSEky.js} +1 -1
  57. package/dist/web/client/assets/{use-reduced-motion-BgG7f9xw.js → use-reduced-motion-BzGFRmoG.js} +1 -1
  58. package/dist/web/client/assets/utils-CFDGLzf6.js +1 -0
  59. package/dist/web/client/assets/{workspace-panel-DDjQuELx.js → workspace-panel-BNeGABPi.js} +1 -1
  60. package/dist/web/client/assets/{workspace-path-nav-DmxBrMV6.js → workspace-path-nav-umvkE4ut.js} +2 -2
  61. package/dist/web/client/bundle-budget.json +5 -5
  62. package/dist/web/server/{_tanstack-start-manifest_v-vL58CVrY-7SDCWIHD.js → _tanstack-start-manifest_v-DTCFS0PG-ARV2V4FW.js} +27 -27
  63. package/dist/web/server/{artifacts-panel-CozDO7ak-5T4W7RME.js → artifacts-panel-Ct2R_4wM-DAPQMI57.js} +14 -14
  64. package/dist/web/server/{chat-command-palette-CLE-L0qp-ZZNKVTSS.js → chat-command-palette-ETZzg35Q-TAV74IAW.js} +9 -9
  65. package/dist/web/server/{chunk-5AYK2KDO.js → chunk-777VIBCH.js} +176 -176
  66. package/dist/web/server/{chunk-7VFULIHV.js → chunk-AAPVQJAD.js} +2 -2
  67. package/dist/web/server/{chunk-D7GSWBRI.js → chunk-BNB7T7P6.js} +2 -2
  68. package/dist/web/server/{chunk-E4YWFQX5.js → chunk-FFGFTGLQ.js} +415 -383
  69. package/dist/web/server/{chunk-EUWNVEIC.js → chunk-FL3FOWSC.js} +118 -108
  70. package/dist/web/server/{chunk-QCDSLD3L.js → chunk-GS5F6X7H.js} +628 -327
  71. package/dist/web/server/{chunk-B7YWDA2F.js → chunk-INRE3X52.js} +2 -2
  72. package/dist/web/server/{chunk-GRGV5FVO.js → chunk-JOCVZVZ3.js} +5 -5
  73. package/dist/web/server/{chunk-NHV77NOI.js → chunk-JU7PCOE7.js} +4 -4
  74. package/dist/web/server/{chunk-RVDWGK6U.js → chunk-KVW6XTN3.js} +14 -9
  75. package/dist/web/server/{chunk-NB3TVOGB.js → chunk-LECHJX4M.js} +483 -481
  76. package/dist/web/server/{chunk-RYU7I34A.js → chunk-M6K66QBV.js} +6 -6
  77. package/dist/web/server/{chunk-SLRV7YNY.js → chunk-R7KUUFDW.js} +4 -4
  78. package/dist/web/server/chunk-SHNODG3C.js +18343 -0
  79. package/dist/web/server/{chunk-PXSOI3XF.js → chunk-SQXJ5TUB.js} +2 -2
  80. package/dist/web/server/{chunk-B5Y7XOIJ.js → chunk-TMQ3MT3D.js} +78 -17
  81. package/dist/web/server/{chunk-B4EBMF5J.js → chunk-UWZYLMEH.js} +2 -2
  82. package/dist/web/server/{chunk-YIJ7D7G5.js → chunk-VTEYQNJE.js} +7 -7
  83. package/dist/web/server/{chunk-F5DJQ3PQ.js → chunk-WPSI5TBE.js} +1528 -2185
  84. package/dist/web/server/{chunk-ABYOWAMD.js → chunk-X76RBZ37.js} +2 -2
  85. package/dist/web/server/{chunk-54UEKLGD.js → chunk-XMAAYUOT.js} +14 -14
  86. package/dist/web/server/{create-project-dialog-CReZdM5g-2V7C5J67.js → create-project-dialog-CqBmLTlA-X6HI6AYR.js} +10 -10
  87. package/dist/web/server/{dist-DVCLWOYT.js → dist-3UIQ7SZN.js} +2 -2
  88. package/dist/web/server/{dist-4A22NBTB.js → dist-ZPEDRNZ4.js} +2 -2
  89. package/dist/web/server/{empty-plugin-adapters-Cqtvkauv-ILKI7W7V.js → empty-plugin-adapters-DOl-E2pL-RKRSN75W.js} +1 -1
  90. package/dist/web/server/{fork-picker-dialog-CXcLEaor-6SVM5RJO.js → fork-picker-dialog-PYNd9ozc-EA7BRLRR.js} +7 -7
  91. package/dist/web/server/{markdown-CShfYRVO-OKGCYPQK.js → markdown-CShfYRVO-22N5LNAN.js} +2 -2
  92. package/dist/web/server/{markdown-code-BDV_2b2T-VZGAECQB.js → markdown-code-BDV_2b2T-KUPHX52W.js} +2 -2
  93. package/dist/web/server/{message-queue-Q_Q6hbqc-AOV2PSCX.js → message-queue-DmSFAI5Y-XDZHJ2Z6.js} +7 -7
  94. package/dist/web/server/{model-selector-list-BOKU5_Z3-III72ZT2.js → model-selector-list-C-Y3p5UM-HTSWVVHP.js} +9 -9
  95. package/dist/web/server/{openui-renderer-VuQOQeAP-XBOR3XGN.js → openui-renderer-C4B1EJxC-QDYQF5LD.js} +11 -11
  96. package/dist/web/server/{prompt-suggestions-EqAaAx6L-723M64XJ.js → prompt-suggestions-EqAaAx6L-B4KCWNZX.js} +1 -1
  97. package/dist/web/server/{repl-panel-DOyUyuQR-IMYO4FKX.js → repl-panel-DOyUyuQR-LRBDRMHW.js} +3 -3
  98. package/dist/web/server/{resources-panel-Cnz-X1bx-TT5KVROR.js → resources-panel-Bo-TmRON-O47AKGEQ.js} +8 -8
  99. package/dist/web/server/{router-C437aaqv-72HBLLJI.js → router-DtS2wXhd-I2SZV7YF.js} +6 -6
  100. package/dist/web/server/{routes-BkVN3m9i-PYNMNLQ5.js → routes-DuSYlASY-U7C32ONE.js} +6 -6
  101. package/dist/web/server/server.js +2410 -1672
  102. package/dist/web/server/{session-reasoning-panel-2_TR5nKM-KA5OY7ZV.js → session-reasoning-panel-BFcZs1pZ-KNHSU5GX.js} +8 -8
  103. package/dist/web/server/{session-tool-renderer-BFEWy2Pk-JTSYUPO5.js → session-tool-renderer-TiFeeJEc-YUZPEEZ4.js} +10 -10
  104. package/dist/web/server/{session-tree-panel-3y9LVA0A-4V4TJX62.js → session-tree-panel-CjsqVYLY-DGZBGY2E.js} +7 -7
  105. package/dist/web/server/{settings-dialog-DgZ8Z5e4-6T5AS2EB.js → settings-dialog-Bj5LrAE8-6BQRLUJT.js} +11 -11
  106. package/dist/web/server/{start-QK6aG02q-EMREW2SB.js → start-cCC--AXu-BBMIT6OU.js} +1 -1
  107. package/dist/web/server/{subagent-chat-panel-B0pmAxCp-DKXNAOUU.js → subagent-chat-panel-DAS4Ne-1-TWIUXSQC.js} +13 -13
  108. package/dist/web/server/{subagents-panel-FUUT0t1i-5ZKJ2QAJ.js → subagents-panel-C3CdUcqw-DFTJTPHA.js} +13 -13
  109. package/dist/web/server/{tool-timeline-C4dgQITK-CFWANSDL.js → tool-timeline-C4dgQITK-IWCLQLWG.js} +3 -3
  110. package/dist/web/server/{workspace-panel-BbI1N4f8-WYOEVH4G.js → workspace-panel-DNs0Ye2U-VFB6X5PK.js} +8 -8
  111. package/package.json +5 -5
  112. package/dist/web/client/assets/globals-DZbMyHfg.css +0 -2
  113. package/dist/web/client/assets/index-D3HpiAnD.js +0 -12
  114. package/dist/web/client/assets/mermaid-HWGCJPDP-CVNXPao6.js +0 -1
  115. package/dist/web/client/assets/session-tool-renderer-mOZdkbiU.js +0 -1389
  116. package/dist/web/client/assets/subagent-transcript-CCpg3uL6.js +0 -1
  117. package/dist/web/client/assets/utils-Dpy9ZFOr.js +0 -1
  118. package/dist/web/server/chunk-XJHYJLGU.js +0 -38412
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{K as r,et as i,tt as a}from"./button-BJyg7l5W.js";import{t as o}from"./utils-Dpy9ZFOr.js";import{T as s,ct as c,et as l,f as u,it as d,nt as f,rt as p,st as m,t as h}from"./createBaseUIEventDetails-DklXWq23.js";import{t as g}from"./useBaseUiId-BlzQUkVG.js";import{t as _}from"./useControlled-CkQSkSv1.js";var v=e(t(),1);function y(e,t){let n=v.useRef(e),r=l(t);p(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var b=`data-valid`,x=`data-invalid`,S={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},C={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},w={valid(e){return e===null?null:e?{[b]:``}:{[x]:``}}},T={invalid:void 0,name:void 0,validityData:{state:S,errors:[],error:``,value:``,initialValue:null},setValidityData:c,disabled:void 0,setTouched:c,setDirty:c,setFilled:c,setFocused:c,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:C,registerFieldControl:c,validation:{getValidationProps:(e,t=m)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:c,getInputControl:()=>null,commit:async()=>{},change:c}},E=v.createContext(T);function D(e=!0){let t=v.useContext(E);if(t.setValidityData===c&&!e)throw Error(f(28));return t}var O=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:c,validationMode:`onSubmit`,submitCountRef:{current:0}});function k(){return v.useContext(O)}var A=v.createContext({controlId:void 0,registerControlId:c,resetControlId:c,labelId:void 0,setLabelId:c,messageIds:[],setMessageIds:c,getDescriptionProps:e=>e});function j(){return v.useContext(A)}function M(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=j(),o=g(),s=d(()=>Symbol()),u=v.useRef(!1),f=v.useRef(!1),m=l(()=>{!u.current||i===c||(u.current=!1,i(s.current,void 0))});return p(()=>{if(!n||i===c){m();return}let e;if(t!==void 0)f.current=!0,e=t;else if(f.current)e=o;else{a();return}if(e===void 0){m();return}u.current=!0,i(s.current,e)},[t,n,i,a,o,s,m]),p(()=>m,[m]),(n?r:void 0)??t??o}function N(e,t,n,r,i=!0,a){let{registerFieldControl:o}=D(),s=d(()=>Symbol());p(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),p(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var P=v.forwardRef(function(e,t){let{render:n,className:o,id:c,name:d,value:f,disabled:m=!1,onValueChange:g,defaultValue:b,autoFocus:x=!1,style:S,...C}=e,{state:T,name:E,disabled:O,setTouched:A,setDirty:P,validityData:F,setFocused:I,setFilled:L,validationMode:R,validation:z}=D(),{clearErrors:B,elementRef:V,submitCountRef:H}=k(),U=O||m,W=E??d,G={...T,disabled:U},{labelId:K}=j(),q=M({id:c}),[J]=_({controlled:f,default:b,name:`FieldControl`,state:`value`}),Y=f!==void 0,X=Y?J:void 0,Z=X==null?void 0:String(X),Q=l(()=>z.inputRef.current?.value);N(z.inputRef,q,Z,Q,!U,d),p(()=>{let e=Z??z.inputRef.current?.value;e!==void 0&&L(e!==``)},[Z,z.inputRef,L]),y(Z,()=>{Z!==void 0&&(B(W),P(Z!==(F.initialValue??``)),z.change(Z))});let $=v.useRef(null),ee=i();return p(()=>{x&&$.current===r(a($.current))&&I(!0)},[x,I]),s(`input`,e,{ref:[t,$],state:G,props:[{id:q,disabled:U,name:W,ref:z.inputRef,"aria-labelledby":K,autoFocus:x,...Y?{value:X}:{defaultValue:b},onChange(e){let t=e.currentTarget.value,n=h(u,e.nativeEvent);g?.(t,n),!Y&&(P(t!==(F.initialValue??``)),L(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(B(W),z.change(t)))},onFocus(){I(!0)},onBlur(e){if(A(!0),I(!1),R===`onBlur`){let t=e.currentTarget.value;z.commit(t),Y&&queueMicrotask(()=>{let e=z.inputRef.current?.value;e!==void 0&&e!==t&&e!==(F.initialValue??``)&&z.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){A(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===V.current&&!e.defaultPrevented){let t=e.currentTarget,n=H.current;ee.start(0,()=>{H.current===n&&z.commit(t.value)})}else z.commit(t)}}},C,e=>z.getValidationProps(U,e)],stateAttributesMapping:w})}),F=n(),I=v.forwardRef(function(e,t){return(0,F.jsx)(P,{ref:t,...e})});function L({className:e,type:t,...n}){return(0,F.jsx)(I,{type:t,"data-slot":`input`,className:o(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}export{k as a,w as c,j as i,y as l,N as n,D as o,M as r,S as s,L as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{K as r,et as i,tt as a}from"./button-Bqms7ZKX.js";import{t as o}from"./utils-CFDGLzf6.js";import{T as s,ct as c,et as l,f as u,it as d,nt as f,rt as p,st as m,t as h}from"./createBaseUIEventDetails-DklXWq23.js";import{t as g}from"./useBaseUiId-BlzQUkVG.js";import{t as _}from"./useControlled-CkQSkSv1.js";var v=e(t(),1);function y(e,t){let n=v.useRef(e),r=l(t);p(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var b=`data-valid`,x=`data-invalid`,S={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},C={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},w={valid(e){return e===null?null:e?{[b]:``}:{[x]:``}}},T={invalid:void 0,name:void 0,validityData:{state:S,errors:[],error:``,value:``,initialValue:null},setValidityData:c,disabled:void 0,setTouched:c,setDirty:c,setFilled:c,setFocused:c,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:C,registerFieldControl:c,validation:{getValidationProps:(e,t=m)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:c,getInputControl:()=>null,commit:async()=>{},change:c}},E=v.createContext(T);function D(e=!0){let t=v.useContext(E);if(t.setValidityData===c&&!e)throw Error(f(28));return t}var O=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:c,validationMode:`onSubmit`,submitCountRef:{current:0}});function k(){return v.useContext(O)}var A=v.createContext({controlId:void 0,registerControlId:c,resetControlId:c,labelId:void 0,setLabelId:c,messageIds:[],setMessageIds:c,getDescriptionProps:e=>e});function j(){return v.useContext(A)}function M(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=j(),o=g(),s=d(()=>Symbol()),u=v.useRef(!1),f=v.useRef(!1),m=l(()=>{!u.current||i===c||(u.current=!1,i(s.current,void 0))});return p(()=>{if(!n||i===c){m();return}let e;if(t!==void 0)f.current=!0,e=t;else if(f.current)e=o;else{a();return}if(e===void 0){m();return}u.current=!0,i(s.current,e)},[t,n,i,a,o,s,m]),p(()=>m,[m]),(n?r:void 0)??t??o}function N(e,t,n,r,i=!0,a){let{registerFieldControl:o}=D(),s=d(()=>Symbol());p(()=>{let c=s.current;if(!i){o(c,void 0);return}o(c,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,o,s,n]),p(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var P=v.forwardRef(function(e,t){let{render:n,className:o,id:c,name:d,value:f,disabled:m=!1,onValueChange:g,defaultValue:b,autoFocus:x=!1,style:S,...C}=e,{state:T,name:E,disabled:O,setTouched:A,setDirty:P,validityData:F,setFocused:I,setFilled:L,validationMode:R,validation:z}=D(),{clearErrors:B,elementRef:V,submitCountRef:H}=k(),U=O||m,W=E??d,G={...T,disabled:U},{labelId:K}=j(),q=M({id:c}),[J]=_({controlled:f,default:b,name:`FieldControl`,state:`value`}),Y=f!==void 0,X=Y?J:void 0,Z=X==null?void 0:String(X),Q=l(()=>z.inputRef.current?.value);N(z.inputRef,q,Z,Q,!U,d),p(()=>{let e=Z??z.inputRef.current?.value;e!==void 0&&L(e!==``)},[Z,z.inputRef,L]),y(Z,()=>{Z!==void 0&&(B(W),P(Z!==(F.initialValue??``)),z.change(Z))});let $=v.useRef(null),ee=i();return p(()=>{x&&$.current===r(a($.current))&&I(!0)},[x,I]),s(`input`,e,{ref:[t,$],state:G,props:[{id:q,disabled:U,name:W,ref:z.inputRef,"aria-labelledby":K,autoFocus:x,...Y?{value:X}:{defaultValue:b},onChange(e){let t=e.currentTarget.value,n=h(u,e.nativeEvent);g?.(t,n),!Y&&(P(t!==(F.initialValue??``)),L(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(B(W),z.change(t)))},onFocus(){I(!0)},onBlur(e){if(A(!0),I(!1),R===`onBlur`){let t=e.currentTarget.value;z.commit(t),Y&&queueMicrotask(()=>{let e=z.inputRef.current?.value;e!==void 0&&e!==t&&e!==(F.initialValue??``)&&z.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){A(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===V.current&&!e.defaultPrevented){let t=e.currentTarget,n=H.current;ee.start(0,()=>{H.current===n&&z.commit(t.value)})}else z.commit(t)}}},C,e=>z.getValidationProps(U,e)],stateAttributesMapping:w})}),F=n(),I=v.forwardRef(function(e,t){return(0,F.jsx)(P,{ref:t,...e})});function L({className:e,type:t,...n}){return(0,F.jsx)(I,{type:t,"data-slot":`input`,className:o(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}export{k as a,w as c,j as i,y as l,N as n,D as o,M as r,S as s,L as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./button-BJyg7l5W.js";import{t as n}from"./utils-Dpy9ZFOr.js";import{t as r}from"./dist-BogNzeK9.js";import{t as i}from"./input-Ce8yLnXY.js";var a=e();function o({className:e,...t}){return(0,a.jsx)(`textarea`,{"data-slot":`textarea`,className:n(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function s({className:e,...t}){return(0,a.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:n(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var c=r(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function l({className:e,align:t=`inline-start`,...r}){return(0,a.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:n(c({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input, textarea`)?.focus()},...r})}var u=r(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function d({className:e,type:r=`button`,variant:i=`ghost`,size:o=`xs`,...s}){return(0,a.jsx)(t,{type:r,"data-size":o,variant:i,className:n(u({size:o}),e),...s})}function f({className:e,...t}){return(0,a.jsx)(i,{"data-slot":`input-group-control`,className:n(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}export{o as a,f as i,l as n,d as r,s as t};
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./button-Bqms7ZKX.js";import{t as n}from"./utils-CFDGLzf6.js";import{t as r}from"./dist-BogNzeK9.js";import{t as i}from"./input-DECT4vz2.js";var a=e();function o({className:e,...t}){return(0,a.jsx)(`textarea`,{"data-slot":`textarea`,className:n(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function s({className:e,...t}){return(0,a.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:n(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var c=r(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function l({className:e,align:t=`inline-start`,...r}){return(0,a.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:n(c({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input, textarea`)?.focus()},...r})}var u=r(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function d({className:e,type:r=`button`,variant:i=`ghost`,size:o=`xs`,...s}){return(0,a.jsx)(t,{type:r,"data-size":o,variant:i,className:n(u({size:o}),e),...s})}function f({className:e,...t}){return(0,a.jsx)(i,{"data-slot":`input-group-control`,className:n(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}export{o as a,f as i,l as n,d as r,s as t};
@@ -1,3 +1,3 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Dpy9ZFOr.js";import{t as i}from"./createLucideIcon-CQY2ECfR.js";var a={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};a.node;var o=i(a),s=e(t(),1);function c(e,t,n){let r=(0,s.useRef)(n);(0,s.useEffect)(()=>{r.current=n},[n]),(0,s.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>r.current(),t);return()=>clearTimeout(n)},[e,t])}var l=n(),u=(0,s.memo)(function({isPending:e,approveLabel:t,rejectLabel:n,onApprove:r,onReject:i}){let[a,o]=(0,s.useState)(null),c=a===`approved`?`Approved`:t??`Next`,u=a===`rejected`?`Skipped`:n??`Skip`,d=()=>{a||(o(`approved`),r?.())},f=()=>{a||(o(`rejected`),i?.())},p=(0,s.useMemo)(()=>a===`approved`?{label:`Waiting`,dots:!0}:a===`rejected`?{label:`Canceled`,dots:!1}:e?{label:`Starting`,dots:!0}:null,[a,e]);return(0,l.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border bg-muted py-1 pr-2 pl-3`,children:[p?(0,l.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[p.label,p.dots&&(0,l.jsxs)(`span`,{className:`inline-flex`,"aria-hidden":`true`,children:[(0,l.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.2s] text-muted-foreground`,children:`.`}),(0,l.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.4s] text-muted-foreground`,children:`.`}),(0,l.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.6s] text-muted-foreground`,children:`.`})]})]}):(0,l.jsx)(`span`,{"aria-hidden":`true`}),(0,l.jsxs)(`div`,{className:`flex gap-1`,children:[(0,l.jsx)(`button`,{type:`button`,onClick:f,disabled:!!a,className:`h-5 rounded-[4px] px-1.5 text-xs text-muted-foreground transition-[background-color,color,transform] duration-150 hover:bg-muted/50 hover:text-foreground active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100`,children:u}),(0,l.jsx)(`button`,{type:`button`,onClick:d,disabled:!!a,className:`h-5 rounded-[4px] bg-primary px-1.5 text-xs font-medium text-primary-foreground transition-[background-color,transform] duration-150 hover:bg-primary/90 active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-primary disabled:active:scale-100`,children:c})]})]})});function d({children:e,as:t=`p`,className:n,duration:i=2,spread:a=100,delay:o=0}){let s={"--chat-shimmer-duration":`${i}s`,"--chat-shimmer-spread":`${a}px`,animationDelay:o>0?`${o}s`:void 0,animationDuration:`${i}s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`};return(0,l.jsx)(t,{className:r(`an-text-shimmer`,`an-text-shimmer--active`,n),style:s,children:e})}var f=s.memo(d);function p(e){let t=0,n=0;for(let r of e)if(r.lines)for(let e of r.lines)e.startsWith(`+`)?t++:e.startsWith(`-`)&&n++;if(t===0&&n===0)return;let r=[];return t>0&&r.push(`+${t}`),n>0&&r.push(`-${n}`),r.join(` `)}function m(e){let t=[];for(let n of e)if(n.lines)for(let e of n.lines)e.startsWith(`+`)?t.push({type:`add`,content:e.slice(1)}):e.startsWith(`-`)?t.push({type:`remove`,content:e.slice(1)}):e.startsWith(` `)&&t.push({type:`context`,content:e.slice(1)});return t}function h(e){return e===`result`?`complete`:`animating`}function g(e){let t=e.toLowerCase();if(t===`thinking`||t===`reasoning`)return`thinking`;if(t===`websearch`||t===`web_search`||t===`grep`||t===`glob`||t===`webfetch`||t===`web_fetch`)return`search`}function _(e,t){switch(e){case`Bash`:return t?.command?String(t.command).slice(0,80):``;case`Edit`:case`Write`:case`Read`:return t?.file_path?String(t.file_path).split(`/`).pop()??``:``;case`Grep`:return t?.pattern?String(t.pattern):``;case`Glob`:return t?.pattern?String(t.pattern):``;case`WebSearch`:case`web_search`:return t?.query?String(t.query):``;case`WebFetch`:case`web_fetch`:return t?.url?String(t.url).slice(0,60):``;default:return``}}function v(e,t){let{toolName:n,args:r={},result:i}=t,a={id:e,type:`tool-call`,toolName:n===`PlanWrite`?`Plan`:n===`TodoWrite`?`Todo`:n,toolDetail:_(n,r),duration:2**53-1,toolVariant:g(n)};if(n===`Bash`&&(a.bashCommand=r?.command?String(r.command):void 0,t.state===`result`&&i)){if(typeof i==`string`)a.bashOutput=i,a.bashSuccess=!0;else if(typeof i==`object`){let e=typeof i?.stdout==`string`?i.stdout:typeof i?.output==`string`?i.output:``,t=typeof i?.stderr==`string`?i.stderr:``;a.bashOutput=[e,t].filter(Boolean).join(e&&t?`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-CFDGLzf6.js";import{t as i}from"./createLucideIcon-CQY2ECfR.js";var a={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};a.node;var o=i(a),s=e(t(),1);function c(e,t,n){let r=(0,s.useRef)(n);(0,s.useEffect)(()=>{r.current=n},[n]),(0,s.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>r.current(),t);return()=>clearTimeout(n)},[e,t])}var l=n(),u=(0,s.memo)(function({isPending:e,approveLabel:t,rejectLabel:n,onApprove:r,onReject:i}){let[a,o]=(0,s.useState)(null),c=a===`approved`?`Approved`:t??`Next`,u=a===`rejected`?`Skipped`:n??`Skip`,d=()=>{a||(o(`approved`),r?.())},f=()=>{a||(o(`rejected`),i?.())},p=(0,s.useMemo)(()=>a===`approved`?{label:`Waiting`,dots:!0}:a===`rejected`?{label:`Canceled`,dots:!1}:e?{label:`Starting`,dots:!0}:null,[a,e]);return(0,l.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border bg-muted py-1 pr-2 pl-3`,children:[p?(0,l.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[p.label,p.dots&&(0,l.jsxs)(`span`,{className:`inline-flex`,"aria-hidden":`true`,children:[(0,l.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.2s] text-muted-foreground`,children:`.`}),(0,l.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.4s] text-muted-foreground`,children:`.`}),(0,l.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.6s] text-muted-foreground`,children:`.`})]})]}):(0,l.jsx)(`span`,{"aria-hidden":`true`}),(0,l.jsxs)(`div`,{className:`flex gap-1`,children:[(0,l.jsx)(`button`,{type:`button`,onClick:f,disabled:!!a,className:`h-5 rounded-[4px] px-1.5 text-xs text-muted-foreground transition-[background-color,color,transform] duration-150 hover:bg-muted/50 hover:text-foreground active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100`,children:u}),(0,l.jsx)(`button`,{type:`button`,onClick:d,disabled:!!a,className:`h-5 rounded-[4px] bg-primary px-1.5 text-xs font-medium text-primary-foreground transition-[background-color,transform] duration-150 hover:bg-primary/90 active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-primary disabled:active:scale-100`,children:c})]})]})});function d({children:e,as:t=`p`,className:n,duration:i=2,spread:a=100,delay:o=0}){let s={"--chat-shimmer-duration":`${i}s`,"--chat-shimmer-spread":`${a}px`,animationDelay:o>0?`${o}s`:void 0,animationDuration:`${i}s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`};return(0,l.jsx)(t,{className:r(`an-text-shimmer`,`an-text-shimmer--active`,n),style:s,children:e})}var f=s.memo(d);function p(e){let t=0,n=0;for(let r of e)if(r.lines)for(let e of r.lines)e.startsWith(`+`)?t++:e.startsWith(`-`)&&n++;if(t===0&&n===0)return;let r=[];return t>0&&r.push(`+${t}`),n>0&&r.push(`-${n}`),r.join(` `)}function m(e){let t=[];for(let n of e)if(n.lines)for(let e of n.lines)e.startsWith(`+`)?t.push({type:`add`,content:e.slice(1)}):e.startsWith(`-`)?t.push({type:`remove`,content:e.slice(1)}):e.startsWith(` `)&&t.push({type:`context`,content:e.slice(1)});return t}function h(e){return e===`result`?`complete`:`animating`}function g(e){let t=e.toLowerCase();if(t===`thinking`||t===`reasoning`)return`thinking`;if(t===`websearch`||t===`web_search`||t===`grep`||t===`glob`||t===`webfetch`||t===`web_fetch`)return`search`}function _(e,t){switch(e){case`Bash`:return t?.command?String(t.command).slice(0,80):``;case`Edit`:case`Write`:case`Read`:return t?.file_path?String(t.file_path).split(`/`).pop()??``:``;case`Grep`:return t?.pattern?String(t.pattern):``;case`Glob`:return t?.pattern?String(t.pattern):``;case`WebSearch`:case`web_search`:return t?.query?String(t.query):``;case`WebFetch`:case`web_fetch`:return t?.url?String(t.url).slice(0,60):``;default:return``}}function v(e,t){let{toolName:n,args:r={},result:i}=t,a={id:e,type:`tool-call`,toolName:n===`PlanWrite`?`Plan`:n===`TodoWrite`?`Todo`:n,toolDetail:_(n,r),duration:2**53-1,toolVariant:g(n)};if(n===`Bash`&&(a.bashCommand=r?.command?String(r.command):void 0,t.state===`result`&&i)){if(typeof i==`string`)a.bashOutput=i,a.bashSuccess=!0;else if(typeof i==`object`){let e=typeof i?.stdout==`string`?i.stdout:typeof i?.output==`string`?i.output:``,t=typeof i?.stderr==`string`?i.stderr:``;a.bashOutput=[e,t].filter(Boolean).join(e&&t?`
2
2
  `:``);let n=i?.exitCode??i?.exit_code;a.bashSuccess=n===void 0||n===0}else a.bashOutput=JSON.stringify(i),a.bashSuccess=!0}if((n===`Edit`||n===`Write`||n===`Read`)&&(a.filePath=r?.file_path?String(r.file_path):void 0),n===`Write`){let e=typeof i?.content==`string`?i.content:typeof r?.content==`string`?r.content:``;if(e){let t=e.split(`
3
3
  `);a.diffStats=`+${t.length}`,a.diffLines=t.map(e=>({type:`add`,content:e}))}}return n===`Edit`&&Array.isArray(i?.structuredPatch)&&(a.diffStats=p(i.structuredPatch),a.diffLines=m(i.structuredPatch)),(n===`WebSearch`||n===`web_search`||n===`Grep`||n===`Glob`)&&(a.searchQuery=r?.query??r?.pattern?String(r?.query??r?.pattern):void 0,a.searchSource=n===`WebSearch`||n===`web_search`?`web`:`code`),a}function y(e){return e===`output-available`?`result`:e===`input-streaming`?`partial-call`:`call`}function b(e,t){let n=y(e.state);return{step:v(e.toolCallId??e.id??t.toLowerCase(),{toolName:t,args:e.input??e.args??{},state:n,result:e.output??e.result}),stepState:h(n)}}function x(e){let t=e.input??e.args??{};return typeof t.code==`string`?t.code:``}function S(e){let t=e.output??e.result;if(!(!t||typeof t!=`object`))return t}function C(...e){for(let t of e)if(t&&t.trim())return t;return``}function w({isPending:e,isBashCell:t,hasError:n,kernelRestarted:r}){return(0,l.jsxs)(`div`,{className:`flex h-7 items-center justify-between pr-2 pl-2.5`,children:[(0,l.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden`,children:[(0,l.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-micro leading-none text-muted-foreground uppercase`,children:[(0,l.jsx)(o,{className:`h-3 w-3`}),t?`shell`:`python`]}),e?(0,l.jsx)(f,{as:`span`,duration:1.2,className:`m-0 inline-flex h-full items-center truncate text-xs leading-none`,children:`Running cell`}):(0,l.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[n?`Cell failed`:`Ran cell`,r&&` · kernel restarted`]})]}),e&&(0,l.jsx)(`svg`,{className:`h-3 w-3 shrink-0 animate-spin text-muted-foreground`,viewBox:`0 0 16 16`,fill:`none`,children:(0,l.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`28`,strokeDashoffset:`7`,strokeLinecap:`round`})})]})}function T({output:e}){return(0,l.jsxs)(`div`,{className:`mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-caption leading-[15px]`,children:[(0,l.jsx)(`span`,{className:`text-micro font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90`,children:`Unattributed background output:`}),(0,l.jsx)(`div`,{className:`mt-0.5 max-h-[140px] overflow-auto whitespace-pre-wrap rounded bg-muted/40 p-1.5 text-muted-foreground`,children:e})]})}function E({step:e,state:t,onComplete:n,approval:r,cellIndex:i,part:a}){c(t===`animating`,e.duration,n);let o=t===`animating`,s=x(a),d=S(a),f=typeof a.backgroundOutput==`string`&&a.backgroundOutput.trim()?a.backgroundOutput:typeof d?.backgroundOutput==`string`&&d.backgroundOutput.trim()?d.backgroundOutput:void 0,p=s.trimStart().startsWith(`%%bash`),m=i===void 0?`IPython`:`In [${i}]`,h=C(d?.result,d?.stdout,d?.stderr,d?.error?.evalue),g=!!d?.error||!!d?.errorEname||d?.status===`error`;return(0,l.jsxs)(`div`,{className:`overflow-hidden rounded-chat-tool border border-border bg-muted`,children:[(0,l.jsx)(w,{isPending:o,isBashCell:p,hasError:g,kernelRestarted:d?.kernelRestarted}),(0,l.jsxs)(`div`,{className:`overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-label leading-[16px]`,children:[(0,l.jsxs)(`div`,{className:`break-all whitespace-pre-wrap`,children:[(0,l.jsxs)(`span`,{className:`mr-2 text-cyan-600 select-none dark:text-cyan-400`,children:[m,`:`]}),(0,l.jsx)(`span`,{className:`text-foreground`,children:s})]}),!o&&h&&(0,l.jsx)(`div`,{className:`mt-1 max-h-[160px] overflow-hidden whitespace-pre-line ${g?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:h}),f&&(0,l.jsx)(T,{output:f})]}),r&&(0,l.jsx)(u,{isPending:o,...r})]})}var D=new Map,O=0;function k(e){if(!e)return++O;let t=D.get(e);if(t)return t;let n=++O;return D.set(e,n),n}var A=(0,s.memo)(function({part:e}){let t=e.input?.approval??e.args?.approval,{step:n,stepState:r}=b(e,`IPython`),i=k(e.toolCallId);return(0,l.jsx)(E,{step:n,state:r,onComplete:()=>{},approval:t,cellIndex:i,part:e})});export{c as a,u as i,b as n,o,f as r,A as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Dpy9ZFOr.js";import{d as i,o as a}from"./ease-DKi-MOH5.js";import{n as o,t as s}from"./use-reduced-motion-BgG7f9xw.js";import{t as c}from"./createLucideIcon-CQY2ECfR.js";import{r as l,t as u}from"./safe-storage-s25GrfpH.js";var d={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};d.node;var f=c(d),p=e(t(),1),m=n(),h={initial:{opacity:0,filter:`blur(6px)`},animate:{opacity:1,filter:`blur(0px)`},exit:e=>e?{}:{opacity:0,filter:`blur(6px)`}},g={initial:{opacity:0},animate:{opacity:1},exit:e=>e?{}:{opacity:0}},_=(0,p.forwardRef)(function({children:e,as:t=`div`,className:n,onMouseLeave:c,pillClassName:l,pillContainerClassName:u,inset:d=20,...f},_){let[v,y]=(0,p.useState)(null),b=(0,p.useId)(),x=s(),S=p.Children.toArray(e).reduce((e,t,n)=>{if(!(0,p.isValidElement)(t))return e;let s=t,c=s.key?String(s.key):`item-${n}`;return e.push((0,p.cloneElement)(s,{key:c,className:r(`relative`,s.props.className),onMouseEnter:()=>{s.props.onMouseEnter?.(),y(c)}},(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(o,{custom:v!==null,children:v===null?null:(0,m.jsx)(i.div,{variants:x?g:h,initial:`initial`,animate:`animate`,exit:`exit`,custom:v!==null,className:r(`pointer-events-none absolute inset-y-0`,u),style:{left:-d,right:-d},children:v===c?(0,m.jsx)(i.div,{layoutId:`shared-bg-${b}`,transition:x?{duration:0}:a,className:r(`pointer-events-none h-full w-full rounded-2xl bg-primary/[0.06]`,l)}):null})}),(0,m.jsx)(`div`,{className:`relative z-10`,children:s.props.children})]}))),e},[]),C=e=>{y(null),c?.(e)};return t===`ul`?(0,m.jsx)(i.ul,{...f,ref:_,layoutRoot:!0,onMouseLeave:C,className:r(`flex w-full flex-col`,n),children:S}):(0,m.jsx)(i.div,{...f,ref:_,layoutRoot:!0,onMouseLeave:C,className:r(`flex w-full flex-col`,n),children:S})});function v(e,t,n){if(typeof window>`u`)return t;let r=u(e);if(r===null)return t;let i=Number(r);return Number.isFinite(i)?n(i):t}function y(e,t){l(e,String(Math.round(t)))}function b({event:e,getNextWidth:t,onWidthChange:n,startWidth:r,startX:i}){e.preventDefault();let a=i??e.clientX,o=e=>{n(t(e.clientX,a,r))},s=()=>{window.removeEventListener(`pointermove`,o),window.removeEventListener(`pointerup`,s)};window.addEventListener(`pointermove`,o),window.addEventListener(`pointerup`,s,{once:!0})}var x=`(max-width: 767px)`,S=.4,C=17.5,w=`${C}rem`;function T(e){return C*e}var E=`hidden min-[960px]:flex`,D=`min-[960px]:hidden`,O=`hidden min-[640px]:block`,k=`min-[640px]:gap-0`;export{w as a,T as c,y as d,_ as f,S as i,b as l,E as n,k as o,f as p,D as r,O as s,x as t,v as u};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-CFDGLzf6.js";import{d as i,o as a}from"./ease-2gsl7ABx.js";import{n as o,t as s}from"./use-reduced-motion-BzGFRmoG.js";import{t as c}from"./createLucideIcon-CQY2ECfR.js";import{r as l,t as u}from"./safe-storage-s25GrfpH.js";var d={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};d.node;var f=c(d),p=e(t(),1),m=n(),h={initial:{opacity:0,filter:`blur(6px)`},animate:{opacity:1,filter:`blur(0px)`},exit:e=>e?{}:{opacity:0,filter:`blur(6px)`}},g={initial:{opacity:0},animate:{opacity:1},exit:e=>e?{}:{opacity:0}},_=(0,p.forwardRef)(function({children:e,as:t=`div`,className:n,onMouseLeave:c,pillClassName:l,pillContainerClassName:u,inset:d=20,...f},_){let[v,y]=(0,p.useState)(null),b=(0,p.useId)(),x=s(),S=p.Children.toArray(e).reduce((e,t,n)=>{if(!(0,p.isValidElement)(t))return e;let s=t,c=s.key?String(s.key):`item-${n}`;return e.push((0,p.cloneElement)(s,{key:c,className:r(`relative`,s.props.className),onMouseEnter:()=>{s.props.onMouseEnter?.(),y(c)}},(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(o,{custom:v!==null,children:v===null?null:(0,m.jsx)(i.div,{variants:x?g:h,initial:`initial`,animate:`animate`,exit:`exit`,custom:v!==null,className:r(`pointer-events-none absolute inset-y-0`,u),style:{left:-d,right:-d},children:v===c?(0,m.jsx)(i.div,{layoutId:`shared-bg-${b}`,transition:x?{duration:0}:a,className:r(`pointer-events-none h-full w-full rounded-2xl bg-primary/[0.06]`,l)}):null})}),(0,m.jsx)(`div`,{className:`relative z-10`,children:s.props.children})]}))),e},[]),C=e=>{y(null),c?.(e)};return t===`ul`?(0,m.jsx)(i.ul,{...f,ref:_,layoutRoot:!0,onMouseLeave:C,className:r(`flex w-full flex-col`,n),children:S}):(0,m.jsx)(i.div,{...f,ref:_,layoutRoot:!0,onMouseLeave:C,className:r(`flex w-full flex-col`,n),children:S})});function v(e,t,n){if(typeof window>`u`)return t;let r=u(e);if(r===null)return t;let i=Number(r);return Number.isFinite(i)?n(i):t}function y(e,t){l(e,String(Math.round(t)))}function b({event:e,getNextWidth:t,onWidthChange:n,startWidth:r,startX:i}){e.preventDefault();let a=i??e.clientX,o=e=>{n(t(e.clientX,a,r))},s=()=>{window.removeEventListener(`pointermove`,o),window.removeEventListener(`pointerup`,s)};window.addEventListener(`pointermove`,o),window.addEventListener(`pointerup`,s,{once:!0})}var x=`(max-width: 767px)`,S=.4,C=17.5,w=`${C}rem`;function T(e){return C*e}var E=`hidden min-[960px]:flex`,D=`min-[960px]:hidden`,O=`hidden min-[640px]:block`,k=`min-[640px]:gap-0`;export{w as a,T as c,y as d,_ as f,S as i,b as l,E as n,k as o,f as p,D as r,O as s,x as t,v as u};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-code-BqFVdovL.js","assets/jsx-runtime-NZYk81nU.js","assets/rolldown-runtime-hePW80VL.js","assets/chunk-YOKDWASO-C8deEx7Z.js","assets/react-Cvdyeg_0.js","assets/react-dom-B7th3XGm.js","assets/clsx-DB0hHKMi.js","assets/preload-helper-Czpn1I53.js","assets/lib-ChrQ49PO.js","assets/dist-CZDnnosQ.js","assets/character-entities-legacy-Wut6vMuj.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{t as n}from"./react-Cvdyeg_0.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{t as i}from"./utils-Dpy9ZFOr.js";import{t as a}from"./preload-helper-Czpn1I53.js";import{i as o}from"./chunk-YOKDWASO-C8deEx7Z.js";var s=t(n(),1),c=e({Markdown:()=>y,MarkdownFrame:()=>_,fixNumberedListBreaks:()=>d,markdownComponents:()=>g,normalizeCodeFenceLanguages:()=>p}),l=r(),u=(0,s.lazy)(()=>a(async()=>{let{HighlightedMarkdown:e}=await import(`./markdown-code-BqFVdovL.js`);return{HighlightedMarkdown:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(({HighlightedMarkdown:e})=>({default:e})));function d(e){return e.replace(/^(\d+)\.\s*\n+\s*\n*/gm,`$1. `)}var f=new Set([`bash`,`diff`,`html`,`js`,`json`,`jsx`,`md`,`markdown`,`sh`,`shell`,`text`,`ts`,`tsx`,`yml`,`yaml`]);function p(e){return e.replace(/```([^\n]*)/g,(e,t)=>{let n=String(t||``).trim().toLowerCase();if(!n)return"```";let r=n.split(/\s+/)[0];return f.has(r)?`\`\`\`${r}`:"```text"})}var m=/^(https?:|mailto:)/i;function h(e,t){if(!(0,s.isValidElement)(e))return!1;let n=e.props;if(typeof n!=`object`||!n)return!1;let r=`node`in n?n.node:void 0,i=typeof r==`object`&&r&&`tagName`in r?r.tagName:void 0;return i===`img`?t:i===`code`&&`data-block`in n||`children`in n&&h(n.children,t)}var g={h1:({children:e,...t})=>(0,l.jsx)(`h1`,{...t,children:e}),h2:({children:e,...t})=>(0,l.jsx)(`h2`,{...t,children:e}),h3:({children:e,...t})=>(0,l.jsx)(`h3`,{...t,children:e}),h4:({children:e,...t})=>(0,l.jsx)(`h4`,{...t,children:e}),p:({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);return r.some(e=>h(e,r.length===1))?(0,l.jsx)(s.Fragment,{children:e}):(0,l.jsx)(`p`,{...n,children:e})},ul:({children:e,...t})=>(0,l.jsx)(`ul`,{...t,children:e}),ol:({children:e,...t})=>(0,l.jsx)(`ol`,{...t,children:e}),li:({children:e,...t})=>(0,l.jsx)(`li`,{...t,children:e}),strong:({children:e,...t})=>(0,l.jsx)(`strong`,{...t,children:e}),a:({href:e,children:t,...n})=>{if(typeof e!=`string`||!m.test(e))return(0,l.jsx)(`span`,{children:t});let r=e.startsWith(`http`);return(0,l.jsx)(`a`,{...n,href:e,target:r?`_blank`:void 0,rel:r?`noopener noreferrer`:void 0,children:t})},blockquote:({children:e,...t})=>(0,l.jsx)(`blockquote`,{...t,children:e}),hr:({...e})=>(0,l.jsx)(`hr`,{...e}),table:({children:e,...t})=>(0,l.jsx)(`div`,{className:`typeset-scroll`,children:(0,l.jsx)(`table`,{...t,children:e})}),th:({children:e,...t})=>(0,l.jsx)(`th`,{...t,children:e}),td:({children:e,...t})=>(0,l.jsx)(`td`,{...t,children:e})};function _({children:e,className:t}){return(0,l.jsx)(`div`,{className:i(`typeset typeset-chat`,`overflow-hidden wrap-break-word`,t),children:e})}function v({content:e,className:t,codeControls:n}){let r=(0,s.useMemo)(()=>p(d(e)),[e]);return(0,l.jsx)(_,{className:t,children:(0,l.jsx)(o,{components:g,controls:{code:n},children:r})})}function y(e){return e.isStreaming||!e.content.includes("```")?(0,l.jsx)(v,{...e}):(0,l.jsx)(s.Suspense,{fallback:(0,l.jsx)(v,{...e}),children:(0,l.jsx)(u,{...e})})}export{c as a,g as i,_ as n,p as o,d as r,y as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-code-B5YUmtLX.js","assets/jsx-runtime-NZYk81nU.js","assets/rolldown-runtime-hePW80VL.js","assets/chunk-YOKDWASO-Dego39cu.js","assets/react-Cvdyeg_0.js","assets/react-dom-B7th3XGm.js","assets/clsx-DB0hHKMi.js","assets/preload-helper-BZ1Pz5am.js","assets/lib-ChrQ49PO.js","assets/dist-QgsZ1U9l.js","assets/character-entities-legacy-Wut6vMuj.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{t as n}from"./react-Cvdyeg_0.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{t as i}from"./utils-CFDGLzf6.js";import{t as a}from"./preload-helper-BZ1Pz5am.js";import{i as o}from"./chunk-YOKDWASO-Dego39cu.js";var s=t(n(),1),c=e({Markdown:()=>y,MarkdownFrame:()=>_,fixNumberedListBreaks:()=>d,markdownComponents:()=>g,normalizeCodeFenceLanguages:()=>p}),l=r(),u=(0,s.lazy)(()=>a(async()=>{let{HighlightedMarkdown:e}=await import(`./markdown-code-B5YUmtLX.js`);return{HighlightedMarkdown:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(({HighlightedMarkdown:e})=>({default:e})));function d(e){return e.replace(/^(\d+)\.\s*\n+\s*\n*/gm,`$1. `)}var f=new Set([`bash`,`diff`,`html`,`js`,`json`,`jsx`,`md`,`markdown`,`sh`,`shell`,`text`,`ts`,`tsx`,`yml`,`yaml`]);function p(e){return e.replace(/```([^\n]*)/g,(e,t)=>{let n=String(t||``).trim().toLowerCase();if(!n)return"```";let r=n.split(/\s+/)[0];return f.has(r)?`\`\`\`${r}`:"```text"})}var m=/^(https?:|mailto:)/i;function h(e,t){if(!(0,s.isValidElement)(e))return!1;let n=e.props;if(typeof n!=`object`||!n)return!1;let r=`node`in n?n.node:void 0,i=typeof r==`object`&&r&&`tagName`in r?r.tagName:void 0;return i===`img`?t:i===`code`&&`data-block`in n||`children`in n&&h(n.children,t)}var g={h1:({children:e,...t})=>(0,l.jsx)(`h1`,{...t,children:e}),h2:({children:e,...t})=>(0,l.jsx)(`h2`,{...t,children:e}),h3:({children:e,...t})=>(0,l.jsx)(`h3`,{...t,children:e}),h4:({children:e,...t})=>(0,l.jsx)(`h4`,{...t,children:e}),p:({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);return r.some(e=>h(e,r.length===1))?(0,l.jsx)(s.Fragment,{children:e}):(0,l.jsx)(`p`,{...n,children:e})},ul:({children:e,...t})=>(0,l.jsx)(`ul`,{...t,children:e}),ol:({children:e,...t})=>(0,l.jsx)(`ol`,{...t,children:e}),li:({children:e,...t})=>(0,l.jsx)(`li`,{...t,children:e}),strong:({children:e,...t})=>(0,l.jsx)(`strong`,{...t,children:e}),a:({href:e,children:t,...n})=>{if(typeof e!=`string`||!m.test(e))return(0,l.jsx)(`span`,{children:t});let r=e.startsWith(`http`);return(0,l.jsx)(`a`,{...n,href:e,target:r?`_blank`:void 0,rel:r?`noopener noreferrer`:void 0,children:t})},blockquote:({children:e,...t})=>(0,l.jsx)(`blockquote`,{...t,children:e}),hr:({...e})=>(0,l.jsx)(`hr`,{...e}),table:({children:e,...t})=>(0,l.jsx)(`div`,{className:`typeset-scroll`,children:(0,l.jsx)(`table`,{...t,children:e})}),th:({children:e,...t})=>(0,l.jsx)(`th`,{...t,children:e}),td:({children:e,...t})=>(0,l.jsx)(`td`,{...t,children:e})};function _({children:e,className:t}){return(0,l.jsx)(`div`,{className:i(`typeset typeset-chat`,`overflow-hidden wrap-break-word`,t),children:e})}function v({content:e,className:t,codeControls:n}){let r=(0,s.useMemo)(()=>p(d(e)),[e]);return(0,l.jsx)(_,{className:t,children:(0,l.jsx)(o,{components:g,controls:{code:n},children:r})})}function y(e){return e.isStreaming||!e.content.includes("```")?(0,l.jsx)(v,{...e}):(0,l.jsx)(s.Suspense,{fallback:(0,l.jsx)(v,{...e}),children:(0,l.jsx)(u,{...e})})}export{c as a,g as i,_ as n,p as o,d as r,y as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-NZYk81nU.js";import{i as t}from"./chunk-YOKDWASO-C8deEx7Z.js";import{c as n,n as r,r as i,s as a}from"./dist-CZDnnosQ.js";import{i as o,n as s,o as c,r as l}from"./markdown-C-Y9gskI.js";var u=r({forgiving:!0}),d=Object.fromEntries(n.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),f=new Set(Object.keys(a)),p=e=>{let t=e.trim().toLowerCase();return d[t]||(f.has(t),t)},m=new Map,h=new Map,g=new Map,_=e=>typeof e==`string`?e:e.name??`custom`,v=(e,t)=>`${e}-${_(t[0])}-${_(t[1])}`,y=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},b=(e,t)=>{let n=v(e,t);if(m.has(n))return m.get(n);let r=i({themes:t,langs:[e],engine:u});return m.set(n,r),r};function x(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=p(e);return f.has(t)},getSupportedLanguages(){return Array.from(f)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=p(t),a=[_(n[0]),_(n[1])],o=y(e,i,a);return h.has(o)?h.get(o):(r&&(g.has(o)||g.set(o,new Set),g.get(o).add(r)),b(f.has(i)?i:`text`,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});h.set(o,r);let s=g.get(o);if(s){for(let e of s)e(r);g.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),g.delete(o)}),null)}}}x();var S=e(),C=x({themes:[`github-light`,`github-dark`]});function w({content:e,className:n,codeControls:r}){let i=c(l(e));return(0,S.jsx)(s,{className:n,children:(0,S.jsx)(t,{components:o,controls:{code:r},plugins:{code:C},children:i})})}export{w as HighlightedMarkdown};
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{i as t}from"./chunk-YOKDWASO-Dego39cu.js";import{c as n,n as r,r as i,s as a}from"./dist-QgsZ1U9l.js";import{i as o,n as s,o as c,r as l}from"./markdown-B2tpfUKu.js";var u=r({forgiving:!0}),d=Object.fromEntries(n.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),f=new Set(Object.keys(a)),p=e=>{let t=e.trim().toLowerCase();return d[t]||(f.has(t),t)},m=new Map,h=new Map,g=new Map,_=e=>typeof e==`string`?e:e.name??`custom`,v=(e,t)=>`${e}-${_(t[0])}-${_(t[1])}`,y=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},b=(e,t)=>{let n=v(e,t);if(m.has(n))return m.get(n);let r=i({themes:t,langs:[e],engine:u});return m.set(n,r),r};function x(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=p(e);return f.has(t)},getSupportedLanguages(){return Array.from(f)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=p(t),a=[_(n[0]),_(n[1])],o=y(e,i,a);return h.has(o)?h.get(o):(r&&(g.has(o)||g.set(o,new Set),g.get(o).add(r)),b(f.has(i)?i:`text`,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});h.set(o,r);let s=g.get(o);if(s){for(let e of s)e(r);g.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),g.delete(o)}),null)}}}x();var S=e(),C=x({themes:[`github-light`,`github-dark`]});function w({content:e,className:n,codeControls:r}){let i=c(l(e));return(0,S.jsx)(s,{className:n,children:(0,S.jsx)(t,{components:o,controls:{code:r},plugins:{code:C},children:i})})}export{w as HighlightedMarkdown};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-YOKDWASO-Dego39cu.js";export{e as Mermaid};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Dpy9ZFOr.js";import{t as i}from"./pencil-Cbgq3ybX.js";import{t as a}from"./x-DEU6H3M-.js";import{t as o}from"./tokens-CtP2s1Y3.js";import{t as s}from"./notify-BC0a76VJ.js";var c=e(t(),1),l=n(),u=[{key:`steering`,label:`Next`},{key:`followUp`,label:`After run`}];function d(e,t){return`${e}:${t}`}function f({queue:e,onDelete:t,onEdit:n,className:f}){let p=e.steering.length+e.followUp.length,[m,h]=(0,c.useState)(null),[g,_]=(0,c.useState)(``);if(p===0)return null;let v=()=>{h(null),_(``)},y=(e,t,n)=>{h(d(e,t)),_(n)},b=async(e,n,r)=>{m===d(e,n)&&v();try{await t?.(e,n,r)===!1&&s.error(`Unable to remove queued message`)}catch{s.error(`Unable to remove queued message`)}},x=async(e,t,r)=>{let i=g.trim();if(i.length===0){await b(e,t,r);return}if(i===r){v();return}try{await n?.(e,t,r,i)===!1?s.error(`Unable to update queued message`):v()}catch{s.error(`Unable to update queued message`)}};return(0,l.jsx)(`section`,{"aria-label":`Queued messages`,className:r(o,`mb-2`,f),children:(0,l.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-muted/30 p-2`,children:[(0,l.jsxs)(`div`,{className:`mb-1 flex items-baseline justify-between px-1 text-xs text-muted-foreground`,children:[(0,l.jsxs)(`span`,{children:[p,` queued`]}),(0,l.jsx)(`span`,{children:`Sent when the run reaches its lane`})]}),(0,l.jsx)(`div`,{className:`space-y-1`,children:u.flatMap(({key:r,label:o})=>e[r].map((e,s)=>{let c=d(r,s);return(0,l.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 rounded-lg bg-background/80 px-2 py-1.5 text-sm`,children:[(0,l.jsx)(`span`,{className:`mt-0.5 shrink-0 text-micro font-medium uppercase tracking-wide text-muted-foreground`,children:o}),m===c?(0,l.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,l.jsx)(`textarea`,{value:g,onChange:e=>_(e.target.value),onKeyDown:t=>{if(t.key===`Escape`){t.preventDefault(),v();return}t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),x(r,s,e))},"aria-label":`Edit queued message: ${e}`,rows:2,className:`min-h-10 w-full resize-y rounded-md border border-border/70 bg-background px-2 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,autoFocus:!0}),(0,l.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[(0,l.jsx)(`button`,{type:`button`,onClick:()=>void x(r,s,e),className:`rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:`Save`}),(0,l.jsx)(`button`,{type:`button`,onClick:v,className:`rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:`Cancel`})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground/80`,children:e}),(0,l.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[n?(0,l.jsx)(`button`,{type:`button`,"aria-label":`Edit queued message: ${e}`,onClick:()=>y(r,s,e),className:`grid size-6 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,l.jsx)(i,{className:`size-3.5`})}):null,t?(0,l.jsx)(`button`,{type:`button`,"aria-label":`Remove queued message: ${e}`,onClick:()=>void b(r,s,e),className:`grid size-6 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,l.jsx)(a,{className:`size-3.5`})}):null]})]})]},`${r}:${s}:${e}`)}))})]})})}export{f as MessageQueue};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-CFDGLzf6.js";import{t as i}from"./pencil-Cbgq3ybX.js";import{t as a}from"./x-DEU6H3M-.js";import{t as o}from"./tokens-CtP2s1Y3.js";import{t as s}from"./notify-mVA6z9Ly.js";var c=e(t(),1),l=n(),u=[{key:`steering`,label:`Next`},{key:`followUp`,label:`After run`}];function d(e,t){return`${e}:${t}`}function f({queue:e,onDelete:t,onEdit:n,className:f}){let p=e.steering.length+e.followUp.length,[m,h]=(0,c.useState)(null),[g,_]=(0,c.useState)(``);if(p===0)return null;let v=()=>{h(null),_(``)},y=(e,t,n)=>{h(d(e,t)),_(n)},b=async(e,n,r)=>{m===d(e,n)&&v();try{await t?.(e,n,r)===!1&&s.error(`Unable to remove queued message`)}catch{s.error(`Unable to remove queued message`)}},x=async(e,t,r)=>{let i=g.trim();if(i.length===0){await b(e,t,r);return}if(i===r){v();return}try{await n?.(e,t,r,i)===!1?s.error(`Unable to update queued message`):v()}catch{s.error(`Unable to update queued message`)}};return(0,l.jsx)(`section`,{"aria-label":`Queued messages`,className:r(o,`mb-2`,f),children:(0,l.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-muted/30 p-2`,children:[(0,l.jsxs)(`div`,{className:`mb-1 flex items-baseline justify-between px-1 text-xs text-muted-foreground`,children:[(0,l.jsxs)(`span`,{children:[p,` queued`]}),(0,l.jsx)(`span`,{children:`Sent when the run reaches its lane`})]}),(0,l.jsx)(`div`,{className:`space-y-1`,children:u.flatMap(({key:r,label:o})=>e[r].map((e,s)=>{let c=d(r,s);return(0,l.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 rounded-lg bg-background/80 px-2 py-1.5 text-sm`,children:[(0,l.jsx)(`span`,{className:`mt-0.5 shrink-0 text-micro font-medium uppercase tracking-wide text-muted-foreground`,children:o}),m===c?(0,l.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,l.jsx)(`textarea`,{value:g,onChange:e=>_(e.target.value),onKeyDown:t=>{if(t.key===`Escape`){t.preventDefault(),v();return}t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),x(r,s,e))},"aria-label":`Edit queued message: ${e}`,rows:2,className:`min-h-10 w-full resize-y rounded-md border border-border/70 bg-background px-2 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,autoFocus:!0}),(0,l.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[(0,l.jsx)(`button`,{type:`button`,onClick:()=>void x(r,s,e),className:`rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:`Save`}),(0,l.jsx)(`button`,{type:`button`,onClick:v,className:`rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:`Cancel`})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground/80`,children:e}),(0,l.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[n?(0,l.jsx)(`button`,{type:`button`,"aria-label":`Edit queued message: ${e}`,onClick:()=>y(r,s,e),className:`grid size-6 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,l.jsx)(i,{className:`size-3.5`})}):null,t?(0,l.jsx)(`button`,{type:`button`,"aria-label":`Remove queued message: ${e}`,onClick:()=>void b(r,s,e),className:`grid size-6 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,l.jsx)(a,{className:`size-3.5`})}):null]})]})]},`${r}:${s}:${e}`)}))})]})})}export{f as MessageQueue};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Dpy9ZFOr.js";import{a as i,d as a}from"./ease-DKi-MOH5.js";import{t as o}from"./check-BTwIaCtI.js";import{t as s}from"./gauge-0Nn96wfZ.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./command-Bo31U-UD.js";var m=e(t(),1),h=n();function g(e,t,n){return Math.min(n,Math.max(t,e))}function _({value:e,onChange:t,min:n=0,max:o=100,step:s=1,label:c,formatValue:l=String,disabled:u=!1,className:d,...f}){let p=(0,m.useId)(),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=Math.max(n,o),S=Math.max(2**-52,s),C=g(e,n,x),w=x===n?0:(C-n)/(x-n),T=w*100,E=w===0?8:0,D=`calc(${T}% + ${20-20*w-E*2.5}px)`,O=`calc(${T}% + ${11-24*w}px)`,k=20-20*w-E*2.5,A=`linear-gradient(to right, transparent calc(${T}% + ${k}px), black calc(${T}% + ${k+2}px))`,j=(0,m.useMemo)(()=>{let e=Math.floor((x-n)/S),t=Array.from({length:e+1},(e,t)=>n+t*S);return t.at(-1)!==x&&t.push(x),t},[n,x,S]),M=l(C),N=l(x),P=(e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0||x===n)return n;let i=n+g((e-r.left)/r.width,0,1)*(x-n);return g(n+Math.round((i-n)/S)*S,n,x)},F=e=>{let r=!0,i=e.key===`ArrowRight`||e.key===`ArrowUp`?1:e.key===`ArrowLeft`||e.key===`ArrowDown`?-1:0;i===0?e.key===`Home`?(e.preventDefault(),t(n)):e.key===`End`?(e.preventDefault(),t(x)):r=!1:(e.preventDefault(),t(g(C+i*S,n,x))),r&&e.stopPropagation()};return(0,h.jsx)(`div`,{className:r(`relative w-full touch-none`,u&&`opacity-50`,d),...f,children:(0,h.jsxs)(`div`,{className:r(`relative h-8 w-full select-none touch-none overflow-hidden rounded-md border border-border bg-background outline-offset-2 transition-colors duration-150`,y&&!u&&`border-foreground/25`,_&&`border-foreground/40 ring-2 ring-ring/60 ring-offset-1 ring-offset-background`),onPointerEnter:()=>b(!0),onPointerLeave:()=>b(!1),onPointerDown:e=>{u||t(P(e.clientX,e.currentTarget))},children:[(0,h.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 z-[1] flex items-center justify-between px-3 pointer-events-none`,style:{WebkitMaskImage:A,maskImage:A},children:j.map(e=>(0,h.jsx)(a.span,{className:`relative flex size-[5px] items-center justify-center rounded-full`,animate:{backgroundColor:e===C?`var(--foreground)`:`var(--muted-foreground)`,opacity:e===C?1:.3},transition:i},e))}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:`absolute inset-y-0 left-0 z-[3] pointer-events-none bg-foreground/[0.08]`,layout:`size`,style:{width:D},transition:i}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:r(`absolute z-[3] w-0.5 rounded-full pointer-events-none`),layout:!0,style:{left:O,top:y||_?7:8,bottom:y||_?7:8},animate:{backgroundColor:_?`var(--foreground)`:y?`color-mix(in srgb, var(--foreground) 50%, transparent)`:`color-mix(in srgb, var(--foreground) 25%, transparent)`},transition:i}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-[2] flex items-center px-2`,children:[c?(0,h.jsx)(`span`,{className:`px-2 text-body text-transparent select-none`,"aria-hidden":`true`,children:c}):null,(0,h.jsx)(`span`,{className:`ml-auto px-2 text-body text-transparent tabular-nums select-none`,style:{minWidth:`${N.length}ch`},"aria-hidden":`true`,children:N})]}),(0,h.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-[4] flex items-center px-2 text-body`,children:[c?(0,h.jsx)(a.span,{className:`px-2`,animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:c}):null,(0,h.jsx)(a.span,{className:`ml-auto px-2 tabular-nums`,style:{minWidth:`${N.length}ch`,textAlign:`right`},animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:M})]}),(0,h.jsx)(`input`,{id:p,type:`range`,min:n,max:x,step:S,value:C,disabled:u,"aria-label":c??`Slider`,"aria-valuetext":M,onChange:e=>t(Number(e.currentTarget.value)),onFocus:()=>v(!0),onBlur:()=>v(!1),onKeyDown:F,className:`absolute inset-0 z-20 m-0 h-full w-full cursor-ew-resize opacity-0 disabled:cursor-not-allowed`})]})})}function v(e){let t=new Map;for(let n of e){let e=t.get(n.provider)??[];e.push(n),t.set(n.provider,e)}return[...t.entries()]}function y({models:e,selectedModel:t,selectedEffort:n,effortLabel:r,onModelChange:i,onEffortChange:a}){let g=(0,m.useMemo)(()=>v(e),[e]);return(0,h.jsxs)(p,{className:`min-h-0 max-h-[min(55vh,28rem)] bg-transparent`,shouldFilter:!0,children:[(0,h.jsx)(c,{placeholder:`Search models…`,"aria-label":`Search models`}),(0,h.jsxs)(f,{className:`min-h-0 flex-1 p-1.5`,children:[(0,h.jsx)(d,{children:`No matching models`}),g.map(([e,n])=>(0,h.jsx)(l,{heading:n[0]?.providerLabel??e,children:n.map(e=>{let n=[e.id,e.name,e.provider,e.providerLabel,e.modelId,...e.keywords??[]].filter(Boolean).join(` `),r=e.id===t?.id;return(0,h.jsxs)(u,{value:n,disabled:e.disabled,onSelect:()=>{e.disabled||i?.(e.id)},className:`items-start gap-2 rounded-lg px-2.5 py-2`,children:[(0,h.jsx)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground`,children:e.icon??(0,h.jsx)(s,{"aria-hidden":`true`,className:`size-4`})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),e.disabled?(0,h.jsx)(`span`,{className:`shrink-0 text-micro uppercase tracking-wide text-muted-foreground`,children:`Unavailable`}):null]}),(0,h.jsxs)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground`,children:[e.modelId??e.id,e.reasoning?` · reasoning`:``]}),e.description?(0,h.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground/80`,children:e.description}):null]}),r?(0,h.jsx)(o,{"aria-hidden":`true`,className:`mt-1 size-4 shrink-0`}):null]},e.id)})},e))]}),t?.reasoning&&t.efforts?.length?(0,h.jsx)(`div`,{className:`shrink-0 border-t border-border/70 p-2`,children:(0,h.jsx)(_,{label:r,value:Math.max(0,t.efforts.findIndex(e=>e.id===n?.id)),onChange:e=>{let n=t.efforts?.[Math.round(e)];n&&!n.disabled&&a?.(n.id)},min:0,max:Math.max(0,t.efforts.length-1),formatValue:e=>t.efforts?.[Math.round(e)]?.name??``})}):null]})}export{y as ModelSelectorList};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-CFDGLzf6.js";import{a as i,d as a}from"./ease-2gsl7ABx.js";import{t as o}from"./check-BTwIaCtI.js";import{t as s}from"./gauge-0Nn96wfZ.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./command-s2yLD3tA.js";var m=e(t(),1),h=n();function g(e,t,n){return Math.min(n,Math.max(t,e))}function _({value:e,onChange:t,min:n=0,max:o=100,step:s=1,label:c,formatValue:l=String,disabled:u=!1,className:d,...f}){let p=(0,m.useId)(),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=Math.max(n,o),S=Math.max(2**-52,s),C=g(e,n,x),w=x===n?0:(C-n)/(x-n),T=w*100,E=w===0?8:0,D=`calc(${T}% + ${20-20*w-E*2.5}px)`,O=`calc(${T}% + ${11-24*w}px)`,k=20-20*w-E*2.5,A=`linear-gradient(to right, transparent calc(${T}% + ${k}px), black calc(${T}% + ${k+2}px))`,j=(0,m.useMemo)(()=>{let e=Math.floor((x-n)/S),t=Array.from({length:e+1},(e,t)=>n+t*S);return t.at(-1)!==x&&t.push(x),t},[n,x,S]),M=l(C),N=l(x),P=(e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0||x===n)return n;let i=n+g((e-r.left)/r.width,0,1)*(x-n);return g(n+Math.round((i-n)/S)*S,n,x)},F=e=>{let r=!0,i=e.key===`ArrowRight`||e.key===`ArrowUp`?1:e.key===`ArrowLeft`||e.key===`ArrowDown`?-1:0;i===0?e.key===`Home`?(e.preventDefault(),t(n)):e.key===`End`?(e.preventDefault(),t(x)):r=!1:(e.preventDefault(),t(g(C+i*S,n,x))),r&&e.stopPropagation()};return(0,h.jsx)(`div`,{className:r(`relative w-full touch-none`,u&&`opacity-50`,d),...f,children:(0,h.jsxs)(`div`,{className:r(`relative h-8 w-full select-none touch-none overflow-hidden rounded-md border border-border bg-background outline-offset-2 transition-colors duration-150`,y&&!u&&`border-foreground/25`,_&&`border-foreground/40 ring-2 ring-ring/60 ring-offset-1 ring-offset-background`),onPointerEnter:()=>b(!0),onPointerLeave:()=>b(!1),onPointerDown:e=>{u||t(P(e.clientX,e.currentTarget))},children:[(0,h.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 z-[1] flex items-center justify-between px-3 pointer-events-none`,style:{WebkitMaskImage:A,maskImage:A},children:j.map(e=>(0,h.jsx)(a.span,{className:`relative flex size-[5px] items-center justify-center rounded-full`,animate:{backgroundColor:e===C?`var(--foreground)`:`var(--muted-foreground)`,opacity:e===C?1:.3},transition:i},e))}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:`absolute inset-y-0 left-0 z-[3] pointer-events-none bg-foreground/[0.08]`,layout:`size`,style:{width:D},transition:i}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:r(`absolute z-[3] w-0.5 rounded-full pointer-events-none`),layout:!0,style:{left:O,top:y||_?7:8,bottom:y||_?7:8},animate:{backgroundColor:_?`var(--foreground)`:y?`color-mix(in srgb, var(--foreground) 50%, transparent)`:`color-mix(in srgb, var(--foreground) 25%, transparent)`},transition:i}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-[2] flex items-center px-2`,children:[c?(0,h.jsx)(`span`,{className:`px-2 text-body text-transparent select-none`,"aria-hidden":`true`,children:c}):null,(0,h.jsx)(`span`,{className:`ml-auto px-2 text-body text-transparent tabular-nums select-none`,style:{minWidth:`${N.length}ch`},"aria-hidden":`true`,children:N})]}),(0,h.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-[4] flex items-center px-2 text-body`,children:[c?(0,h.jsx)(a.span,{className:`px-2`,animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:c}):null,(0,h.jsx)(a.span,{className:`ml-auto px-2 tabular-nums`,style:{minWidth:`${N.length}ch`,textAlign:`right`},animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:M})]}),(0,h.jsx)(`input`,{id:p,type:`range`,min:n,max:x,step:S,value:C,disabled:u,"aria-label":c??`Slider`,"aria-valuetext":M,onChange:e=>t(Number(e.currentTarget.value)),onFocus:()=>v(!0),onBlur:()=>v(!1),onKeyDown:F,className:`absolute inset-0 z-20 m-0 h-full w-full cursor-ew-resize opacity-0 disabled:cursor-not-allowed`})]})})}function v(e){let t=new Map;for(let n of e){let e=t.get(n.provider)??[];e.push(n),t.set(n.provider,e)}return[...t.entries()]}function y({models:e,selectedModel:t,selectedEffort:n,effortLabel:r,onModelChange:i,onEffortChange:a}){let g=(0,m.useMemo)(()=>v(e),[e]);return(0,h.jsxs)(p,{className:`min-h-0 max-h-[min(55vh,28rem)] bg-transparent`,shouldFilter:!0,children:[(0,h.jsx)(c,{placeholder:`Search models…`,"aria-label":`Search models`}),(0,h.jsxs)(f,{className:`min-h-0 flex-1 p-1.5`,children:[(0,h.jsx)(d,{children:`No matching models`}),g.map(([e,n])=>(0,h.jsx)(l,{heading:n[0]?.providerLabel??e,children:n.map(e=>{let n=[e.id,e.name,e.provider,e.providerLabel,e.modelId,...e.keywords??[]].filter(Boolean).join(` `),r=e.id===t?.id;return(0,h.jsxs)(u,{value:n,disabled:e.disabled,onSelect:()=>{e.disabled||i?.(e.id)},className:`items-start gap-2 rounded-lg px-2.5 py-2`,children:[(0,h.jsx)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground`,children:e.icon??(0,h.jsx)(s,{"aria-hidden":`true`,className:`size-4`})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),e.disabled?(0,h.jsx)(`span`,{className:`shrink-0 text-micro uppercase tracking-wide text-muted-foreground`,children:`Unavailable`}):null]}),(0,h.jsxs)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground`,children:[e.modelId??e.id,e.reasoning?` · reasoning`:``]}),e.description?(0,h.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground/80`,children:e.description}):null]}),r?(0,h.jsx)(o,{"aria-hidden":`true`,className:`mt-1 size-4 shrink-0`}):null]},e.id)})},e))]}),t?.reasoning&&t.efforts?.length?(0,h.jsx)(`div`,{className:`shrink-0 border-t border-border/70 p-2`,children:(0,h.jsx)(_,{label:r,value:Math.max(0,t.efforts.findIndex(e=>e.id===n?.id)),onChange:e=>{let n=t.efforts?.[Math.round(e)];n&&!n.disabled&&a?.(n.id)},min:0,max:Math.max(0,t.efforts.length-1),formatValue:e=>t.efforts?.[Math.round(e)]?.name??``})}):null]})}export{y as ModelSelectorList};
@@ -1 +1 @@
1
- import{n as e}from"./toast-BFeqSeaR.js";function t(t,n){return e.add({title:t,type:n})}var n=Object.assign(e=>t(e),{success:e=>t(e,`success`),error:e=>t(e,`error`),message:e=>t(e,`info`)});export{n as t};
1
+ import{n as e}from"./toast-DRDVljMF.js";function t(t,n){return e.add({title:t,type:n})}var n=Object.assign(e=>t(e),{success:e=>t(e,`success`),error:e=>t(e,`error`),message:e=>t(e,`info`)});export{n as t};