@qredence/fleet 0.5.9 → 0.5.11

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 (121) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/web/client/assets/agent-activity-CwMDU7aP.js +1 -0
  3. package/dist/web/client/assets/artifacts-panel-CQmFEF_H.js +1 -0
  4. package/dist/web/client/assets/{button-BV9NafmI.js → button-BR2WWrFo.js} +1 -1
  5. package/dist/web/client/assets/{chat-command-palette-C_HgND2N.js → chat-command-palette-CmHTS3rs.js} +1 -1
  6. package/dist/web/client/assets/{chat-DdPRGn-U.js → chat-yh02zgA7.js} +2 -2
  7. package/dist/web/client/assets/{citations-BQ_pr_9_.js → citations-C_tPOJE_.js} +1 -1
  8. package/dist/web/client/assets/{command-Cx-UYeQ9.js → command-DPfiaYUL.js} +1 -1
  9. package/dist/web/client/assets/{dialog-Dh7WpGIu.js → dialog-BEZuZhzk.js} +1 -1
  10. package/dist/web/client/assets/{fleet-message-queue-DPBMIZSU.js → fleet-message-queue-DUz6Hfrf.js} +1 -1
  11. package/dist/web/client/assets/{fleet-pi-tool-renderer-DMjrKLi2.js → fleet-pi-tool-renderer-BEDIO3al.js} +4 -4
  12. package/dist/web/client/assets/fleet-reasoning-panel-CbkO7u-v.js +1 -0
  13. package/dist/web/client/assets/{fleet-subagent-list-BnRnrWKS.js → fleet-subagent-list-iKUtLJKZ.js} +1 -1
  14. package/dist/web/client/assets/fleet-tool-timeline-C8heL7ae.js +1 -0
  15. package/dist/web/client/assets/{fork-picker-dialog-CAhWx0G5.js → fork-picker-dialog-ByBOGVsa.js} +1 -1
  16. package/dist/web/client/assets/globals-B_I1Eq1u.css +2 -0
  17. package/dist/web/client/assets/horizontal-resize-qK6eRhIG.js +1 -0
  18. package/dist/web/client/assets/{index-CwtZA4hF.js → index-C1zOjrMK.js} +3 -3
  19. package/dist/web/client/assets/{input-Bol3TP4v.js → input-0wwjWjKq.js} +1 -1
  20. package/dist/web/client/assets/{input-group-D5gi9zBK.js → input-group-BFDsCVS9.js} +1 -1
  21. package/dist/web/client/assets/{ipython-tool-BrMePqD-.js → ipython-tool-ldJ9F1Cw.js} +1 -1
  22. package/dist/web/client/assets/model-selector-list-DsKTuAgS.js +1 -0
  23. package/dist/web/client/assets/{notify-BnNaNaBU.js → notify-DgMKgZZW.js} +1 -1
  24. package/dist/web/client/assets/{openui-renderer-nuOkzdau.js → openui-renderer-J3dhPpL4.js} +5 -5
  25. package/dist/web/client/assets/prompt-input-qPIXZ-Rb.js +1 -0
  26. package/dist/web/client/assets/prompt-suggestions-Cc--lSNR.js +1 -0
  27. package/dist/web/client/assets/{provider-catalog-CO1GxLYe.js → provider-catalog-D8G66gwc.js} +1 -1
  28. package/dist/web/client/assets/{provider-label-B0E-wWFV.js → provider-label-Dpr7djG9.js} +1 -1
  29. package/dist/web/client/assets/repl-panel-DsPX04Xr.js +1 -0
  30. package/dist/web/client/assets/{resources-panel-Bo8dfUdm.js → resources-panel-D867-goy.js} +1 -1
  31. package/dist/web/client/assets/right-panel-registry-DewpBWHM.js +2 -0
  32. package/dist/web/client/assets/routes-vNkVToAF.js +16 -0
  33. package/dist/web/client/assets/safe-storage-s25GrfpH.js +1 -0
  34. package/dist/web/client/assets/session-insights-panel-YnaXvTpi.js +1 -0
  35. package/dist/web/client/assets/settings-dialog-B-v4me3Y.js +1 -0
  36. package/dist/web/client/assets/skeleton-loaders-C9vHwAYV.js +1 -0
  37. package/dist/web/client/assets/{subagent-chat-panel-Ck06wcIJ.js → subagent-chat-panel-DkVUumrP.js} +1 -1
  38. package/dist/web/client/assets/subagent-transcript-D8wmQxXe.js +1 -0
  39. package/dist/web/client/assets/subagents-panel-BMp2Ego0.js +1 -0
  40. package/dist/web/client/assets/{surfaces-cW-gp56p.js → surfaces-DI-U-_2a.js} +1 -1
  41. package/dist/web/client/assets/{switch-J2Lvo_tF.js → switch-9rTeg6J6.js} +1 -1
  42. package/dist/web/client/assets/{toast-BzAKULar.js → toast-Bt9p2OL4.js} +1 -1
  43. package/dist/web/client/assets/tool-result-DfnPN0FQ.js +4 -0
  44. package/dist/web/client/assets/ui-preferences-CImQGZm_.js +1 -0
  45. package/dist/web/client/assets/virtualized-turn-list-DMJENRY0.js +6 -0
  46. package/dist/web/client/assets/{workspace-panel-DI1W3ce9.js → workspace-panel-G6yMpKJ8.js} +1 -1
  47. package/dist/web/client/bundle-budget.json +6 -6
  48. package/dist/web/server/{_tanstack-start-manifest_v-DkghjPW8-5E6WBVI6.js → _tanstack-start-manifest_v-po4woX6g-AUGCOEZ2.js} +20 -19
  49. package/dist/web/server/{agent-activity-B-JMvecd-SLE3GGY2.js → agent-activity-CS2rbF_C-A3R26CYH.js} +2 -2
  50. package/dist/web/server/{artifacts-panel-D20iI9ud-YGBYV6NF.js → artifacts-panel-8GGUCtOd-X5TNKTY2.js} +17 -17
  51. package/dist/web/server/{chat-command-palette-DmDvAEZe-CONFK6YH.js → chat-command-palette-Dgl5tqWn-72LLEWUD.js} +7 -7
  52. package/dist/web/server/{chunk-K5ESTT4A.js → chunk-7MDZVLIY.js} +11 -3
  53. package/dist/web/server/{chunk-EBCYJSBR.js → chunk-7SD2ZSEA.js} +3 -3
  54. package/dist/web/server/{chunk-BTXNB4CP.js → chunk-ABBWBBSS.js} +13 -13
  55. package/dist/web/server/{chunk-VMYYWXF4.js → chunk-AGFRJQZ7.js} +2 -2
  56. package/dist/web/server/{chunk-FZMWPQNE.js → chunk-BXWAUTTH.js} +4 -4
  57. package/dist/web/server/{chunk-54II5QXQ.js → chunk-ETTDO4UO.js} +6 -3
  58. package/dist/web/server/{chunk-EHNIN245.js → chunk-GETSIVNU.js} +5 -5
  59. package/dist/web/server/{chunk-NRDG2ISJ.js → chunk-GGT2ZKDB.js} +49 -49
  60. package/dist/web/server/{chunk-X2R5YPQZ.js → chunk-IJPCV6DH.js} +3 -2
  61. package/dist/web/server/{chunk-TFHXOWFX.js → chunk-JQDLJ7KI.js} +20 -20
  62. package/dist/web/server/{chunk-VHBFU4TG.js → chunk-JUROEEWM.js} +43 -14
  63. package/dist/web/server/{chunk-WQDG5ZM2.js → chunk-KOUEJ3NU.js} +2 -2
  64. package/dist/web/server/{chunk-JICJWC33.js → chunk-LZ4Q5KUJ.js} +10 -10
  65. package/dist/web/server/{chunk-W6IZDM2G.js → chunk-MIW4LJTV.js} +4 -4
  66. package/dist/web/server/{chunk-2TRF62K5.js → chunk-N6NOTURM.js} +3 -3
  67. package/dist/web/server/{chunk-5XX7RKJ6.js → chunk-NXJ32VFR.js} +5 -5
  68. package/dist/web/server/{chunk-EFNPNSDO.js → chunk-O4OTWWPF.js} +7 -7
  69. package/dist/web/server/{chunk-X6RKK47S.js → chunk-P6UMR32I.js} +2 -2
  70. package/dist/web/server/{chunk-QJQZLBLU.js → chunk-P7H2OPKF.js} +3 -3
  71. package/dist/web/server/{chunk-MLPLZVON.js → chunk-RNOJACWQ.js} +54 -30
  72. package/dist/web/server/chunk-SZJUXVWG.js +40 -0
  73. package/dist/web/server/{chunk-ZCJXHV2R.js → chunk-UAPNEWCA.js} +4 -4
  74. package/dist/web/server/{chunk-WVBBA2VV.js → chunk-WILCIZYU.js} +195 -11
  75. package/dist/web/server/{chunk-FED63ZHU.js → chunk-WKV2Z4KO.js} +10 -5
  76. package/dist/web/server/{chunk-TGZIE2T6.js → chunk-WM4PUT6M.js} +4 -4
  77. package/dist/web/server/{chunk-56NGD3FN.js → chunk-WYL2DW5R.js} +2 -2
  78. package/dist/web/server/{chunk-IMK45Q23.js → chunk-XKKXXG6N.js} +3 -3
  79. package/dist/web/server/{chunk-ANL4B775.js → chunk-XLNCWZMZ.js} +2 -2
  80. package/dist/web/server/{chunk-ZVL6TBG5.js → chunk-YKVGQBZA.js} +13 -9
  81. package/dist/web/server/{chunk-IFHABBJO.js → chunk-YXXRP3NS.js} +18 -10
  82. package/dist/web/server/{fleet-message-queue-BvMcWtLo-6CMMI73U.js → fleet-message-queue-j0DCU5Xy-5HKBHMPV.js} +5 -5
  83. package/dist/web/server/{fleet-pi-tool-renderer-CgbmlIoe-7MSJLEGU.js → fleet-pi-tool-renderer-umKunT3K-O4GBH35V.js} +5 -5
  84. package/dist/web/server/{fleet-reasoning-panel-D_K48UOT-GN2PA6KT.js → fleet-reasoning-panel-BxC2COxi-GPLMQSTT.js} +9 -9
  85. package/dist/web/server/{fleet-subagent-list-5luKtpds-3OTVFHJQ.js → fleet-subagent-list-CpSYzCIq-JDH2LHSS.js} +1 -1
  86. package/dist/web/server/{fleet-tool-timeline-DwRqQgOj-HUFLGMDV.js → fleet-tool-timeline-IB36_PB2-XJENTO6I.js} +1 -1
  87. package/dist/web/server/{fork-picker-dialog-DfSRzUI5-EBRK5HNO.js → fork-picker-dialog-DlINz9UQ-UWIXFDJX.js} +5 -5
  88. package/dist/web/server/{model-selector-list-wCp4_UWC-2NQUCAM3.js → model-selector-list-OYnzNbyu-HBGCNF2L.js} +10 -10
  89. package/dist/web/server/{openui-renderer-BNLpfzyj-JUPJXUWF.js → openui-renderer-Cj7kfqyL-EKJ6JTTQ.js} +9 -9
  90. package/dist/web/server/{prompt-suggestions-BOmHi4-J-C563CHFU.js → prompt-suggestions-D4AEEY7K-RZSP7PWV.js} +3 -3
  91. package/dist/web/server/{repl-panel-yyxhwe4c-7U6HXYPS.js → repl-panel-D5KsoJik-BQKO53JO.js} +9 -9
  92. package/dist/web/server/{resources-panel-j4fAIi9g-5C267IXV.js → resources-panel-CE5pD4vy-V5FXBTYC.js} +2 -2
  93. package/dist/web/server/{router-dnEmu1cU-LUH74TAC.js → router-Ci1wxI7I-E2AYMNON.js} +255 -78
  94. package/dist/web/server/{routes-Ci5_8lws-F54KB46D.js → routes-CRpm9-Sa-IYK6MUJO.js} +720 -549
  95. package/dist/web/server/server.js +2 -2
  96. package/dist/web/server/{session-insights-panel-BHZyKDTo-LRMAMA3O.js → session-insights-panel-CUhdgvRt-VB2HUCQP.js} +4 -4
  97. package/dist/web/server/{settings-dialog-CdFpyzR--JVYIS5OD.js → settings-dialog-BvkgNflv-GPJ6COQO.js} +22 -18
  98. package/dist/web/server/{subagent-chat-panel-DVgf-whR-6G2ASMGU.js → subagent-chat-panel-CMuvW9Sd-M5TEEGQW.js} +14 -14
  99. package/dist/web/server/{subagents-panel-D2CN0IYy-3L6ZNQ3Q.js → subagents-panel-DgfB6_Yy-4INEPE3Y.js} +16 -16
  100. package/dist/web/server/{workspace-panel-BOs-58Cv-SWQBMZSB.js → workspace-panel-bpwj-Veu-Q2CEJMN4.js} +4 -3
  101. package/package.json +1 -1
  102. package/dist/web/client/assets/agent-activity-CDcDNVC6.js +0 -1
  103. package/dist/web/client/assets/artifacts-panel-N4k9VcJr.js +0 -1
  104. package/dist/web/client/assets/fleet-reasoning-panel-MtbSdoCv.js +0 -1
  105. package/dist/web/client/assets/fleet-tool-timeline-COzPrwr8.js +0 -1
  106. package/dist/web/client/assets/generative-text-renderer-CzwNIs3b.js +0 -6
  107. package/dist/web/client/assets/globals-C7ovVTh2.css +0 -2
  108. package/dist/web/client/assets/horizontal-resize-Bl3AyBJg.js +0 -1
  109. package/dist/web/client/assets/model-selector-list-CJY9pyt2.js +0 -1
  110. package/dist/web/client/assets/prompt-input-BpuTiX7Z.js +0 -1
  111. package/dist/web/client/assets/prompt-suggestions-CXM6knMK.js +0 -1
  112. package/dist/web/client/assets/repl-panel-BDQ5MEgV.js +0 -1
  113. package/dist/web/client/assets/right-panel-registry-DOyEvIMD.js +0 -2
  114. package/dist/web/client/assets/routes-DkefU9yA.js +0 -16
  115. package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +0 -1
  116. package/dist/web/client/assets/settings-dialog-B6rt69m_.js +0 -1
  117. package/dist/web/client/assets/skeleton-loaders-DjGv9LLA.js +0 -1
  118. package/dist/web/client/assets/subagent-transcript-BwCv3nTL.js +0 -1
  119. package/dist/web/client/assets/subagents-panel-BkOorzzy.js +0 -1
  120. package/dist/web/client/assets/tool-result-Cp13oeRn.js +0 -4
  121. package/dist/web/client/assets/ui-preferences-DUEFuJFj.js +0 -1
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{et as r,z as i}from"./button-BV9NafmI.js";import{G as a,O as o,ct as s,et as c,f as l,it as u,nt as d,rt as f,st as p,t as m}from"./createBaseUIEventDetails-DV0dQrBX.js";import{t as h}from"./useBaseUiId-CHqXB2UQ.js";import{t as g}from"./utils-Eg7xtNmV.js";import{t as _}from"./useControlled-CJJ9BOQB.js";var v=e(t(),1),y={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},b={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},x={valid(e){return e===null?null:e?{"data-valid":``}:{"data-invalid":``}}},S={invalid:void 0,name:void 0,validityData:{state:y,errors:[],error:``,value:``,initialValue:null},setValidityData:s,disabled:void 0,setTouched:s,setDirty:s,setFilled:s,setFocused:s,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:b,registerFieldControl:s,validation:{getValidationProps:(e,t=p)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:s,getInputControl:()=>null,commit:async()=>{},change:s}},C=v.createContext(S);function w(e=!0){let t=v.useContext(C);if(t.setValidityData===s&&!e)throw Error(d(28));return t}function T(e,t,n,r,i=!0,a){let{registerFieldControl:o}=w(),s=u(()=>Symbol());f(()=>{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]),f(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var E=v.createContext({controlId:void 0,registerControlId:s,labelId:void 0,setLabelId:s,messageIds:[],setMessageIds:s,getDescriptionProps:e=>e});function D(){return v.useContext(E)}function O(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=D(),l=h(t),d=n?i:void 0,p=u(()=>Symbol()),m=v.useRef(!1),g=v.useRef(t!=null),_=c(()=>{!m.current||o===s||(m.current=!1,o(p.current,void 0))});return f(()=>{if(o===s)return;let e;if(n){let n=r?.current;e=a(n)&&n.closest(`label`)!=null?t??null:d??l}else if(t!=null)g.current=!0,e=t;else if(g.current)e=l;else{_();return}if(e===void 0){_();return}m.current=!0,o(p.current,e)},[t,r,d,o,n,l,p,_]),v.useEffect(()=>_,[_]),i??l}var k=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:s,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function A(){return v.useContext(k)}var j=v.forwardRef(function(e,t){let{render:n,className:a,id:s,name:u,value:d,disabled:p=!1,onValueChange:h,defaultValue:g,autoFocus:y=!1,style:b,...S}=e,{state:C,name:E,disabled:k,setTouched:j,setDirty:M,validityData:N,setFocused:P,setFilled:F,validationMode:I,validation:L}=w(),{clearErrors:R}=A(),z=k||p,B=E??u,V={...C,disabled:z},{labelId:H}=D(),U=O({id:s});f(()=>{let e=d!=null;L.inputRef.current?.value||e&&d!==``?F(!0):e&&d===``&&F(!1)},[L.inputRef,F,d]);let W=v.useRef(null);f(()=>{y&&W.current===i(r(W.current))&&P(!0)},[y,P]);let[G]=_({controlled:d,default:g,name:`FieldControl`,state:`value`}),K=d!==void 0,q=K?G:void 0,J=c(()=>L.inputRef.current?.value);return T(L.inputRef,U,q,J,!z,u),o(`input`,e,{ref:[t,W],state:V,props:[{id:U,disabled:z,name:B,ref:L.inputRef,"aria-labelledby":H,autoFocus:y,...K?{value:q}:{defaultValue:g},onChange(e){let t=e.currentTarget.value;h?.(t,m(l,e.nativeEvent)),M(t!==(N.initialValue??``)),F(t!==``),e.nativeEvent.defaultPrevented||(R(B),L.change(t))},onFocus(){P(!0)},onBlur(e){j(!0),P(!1),I===`onBlur`&&L.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(j(!0),L.commit(e.currentTarget.value))}},S,e=>L.getValidationProps(z,e)],stateAttributesMapping:x})}),M=n(),N=v.forwardRef(function(e,t){return(0,M.jsx)(j,{ref:t,...e})});function P({className:e,type:t,...n}){return(0,M.jsx)(N,{type:t,"data-slot":`input`,className:g(`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{T as a,D as i,A as n,w as o,O as r,x as s,P as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{et as r,z as i}from"./button-BR2WWrFo.js";import{G as a,O as o,ct as s,et as c,f as l,it as u,nt as d,rt as f,st as p,t as m}from"./createBaseUIEventDetails-DV0dQrBX.js";import{t as h}from"./useBaseUiId-CHqXB2UQ.js";import{t as g}from"./utils-Eg7xtNmV.js";import{t as _}from"./useControlled-CJJ9BOQB.js";var v=e(t(),1),y={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},b={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},x={valid(e){return e===null?null:e?{"data-valid":``}:{"data-invalid":``}}},S={invalid:void 0,name:void 0,validityData:{state:y,errors:[],error:``,value:``,initialValue:null},setValidityData:s,disabled:void 0,setTouched:s,setDirty:s,setFilled:s,setFocused:s,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:b,registerFieldControl:s,validation:{getValidationProps:(e,t=p)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:s,getInputControl:()=>null,commit:async()=>{},change:s}},C=v.createContext(S);function w(e=!0){let t=v.useContext(C);if(t.setValidityData===s&&!e)throw Error(d(28));return t}function T(e,t,n,r,i=!0,a){let{registerFieldControl:o}=w(),s=u(()=>Symbol());f(()=>{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]),f(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var E=v.createContext({controlId:void 0,registerControlId:s,labelId:void 0,setLabelId:s,messageIds:[],setMessageIds:s,getDescriptionProps:e=>e});function D(){return v.useContext(E)}function O(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=D(),l=h(t),d=n?i:void 0,p=u(()=>Symbol()),m=v.useRef(!1),g=v.useRef(t!=null),_=c(()=>{!m.current||o===s||(m.current=!1,o(p.current,void 0))});return f(()=>{if(o===s)return;let e;if(n){let n=r?.current;e=a(n)&&n.closest(`label`)!=null?t??null:d??l}else if(t!=null)g.current=!0,e=t;else if(g.current)e=l;else{_();return}if(e===void 0){_();return}m.current=!0,o(p.current,e)},[t,r,d,o,n,l,p,_]),v.useEffect(()=>_,[_]),i??l}var k=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:s,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function A(){return v.useContext(k)}var j=v.forwardRef(function(e,t){let{render:n,className:a,id:s,name:u,value:d,disabled:p=!1,onValueChange:h,defaultValue:g,autoFocus:y=!1,style:b,...S}=e,{state:C,name:E,disabled:k,setTouched:j,setDirty:M,validityData:N,setFocused:P,setFilled:F,validationMode:I,validation:L}=w(),{clearErrors:R}=A(),z=k||p,B=E??u,V={...C,disabled:z},{labelId:H}=D(),U=O({id:s});f(()=>{let e=d!=null;L.inputRef.current?.value||e&&d!==``?F(!0):e&&d===``&&F(!1)},[L.inputRef,F,d]);let W=v.useRef(null);f(()=>{y&&W.current===i(r(W.current))&&P(!0)},[y,P]);let[G]=_({controlled:d,default:g,name:`FieldControl`,state:`value`}),K=d!==void 0,q=K?G:void 0,J=c(()=>L.inputRef.current?.value);return T(L.inputRef,U,q,J,!z,u),o(`input`,e,{ref:[t,W],state:V,props:[{id:U,disabled:z,name:B,ref:L.inputRef,"aria-labelledby":H,autoFocus:y,...K?{value:q}:{defaultValue:g},onChange(e){let t=e.currentTarget.value;h?.(t,m(l,e.nativeEvent)),M(t!==(N.initialValue??``)),F(t!==``),e.nativeEvent.defaultPrevented||(R(B),L.change(t))},onFocus(){P(!0)},onBlur(e){j(!0),P(!1),I===`onBlur`&&L.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(j(!0),L.commit(e.currentTarget.value))}},S,e=>L.getValidationProps(z,e)],stateAttributesMapping:x})}),M=n(),N=v.forwardRef(function(e,t){return(0,M.jsx)(j,{ref:t,...e})});function P({className:e,type:t,...n}){return(0,M.jsx)(N,{type:t,"data-slot":`input`,className:g(`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{T as a,D as i,A as n,w as o,O as r,x as s,P as t};
@@ -1 +1 @@
1
- import"./rolldown-runtime-hePW80VL.js";import{i as e}from"./bundle-mjs-DKHVkVWu.js";import{t}from"./jsx-runtime-NZYk81nU.js";import{n,t as r}from"./button-BV9NafmI.js";import{t as i}from"./utils-Eg7xtNmV.js";import{t as a}from"./input-Bol3TP4v.js";e();var o=t();function s({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:i(`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=n(`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`,...n}){return(0,o.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:i(c({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input, textarea`)?.focus()},...n})}var u=n(`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:t=`button`,variant:n=`ghost`,size:a=`xs`,...s}){return(0,o.jsx)(r,{type:t,"data-size":a,variant:n,className:i(u({size:a}),e),...s})}function f({className:e,...t}){return(0,o.jsx)(a,{"data-slot":`input-group-control`,className:i(`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{f as i,l as n,d as r,s as t};
1
+ import"./rolldown-runtime-hePW80VL.js";import{i as e}from"./bundle-mjs-DKHVkVWu.js";import{t}from"./jsx-runtime-NZYk81nU.js";import{n,t as r}from"./button-BR2WWrFo.js";import{t as i}from"./utils-Eg7xtNmV.js";import{t as a}from"./input-0wwjWjKq.js";e();var o=t();function s({className:e,...t}){return(0,o.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:i(`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=n(`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`,...n}){return(0,o.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:i(c({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input, textarea`)?.focus()},...n})}var u=n(`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:t=`button`,variant:n=`ghost`,size:a=`xs`,...s}){return(0,o.jsx)(r,{type:t,"data-size":a,variant:n,className:i(u({size:a}),e),...s})}function f({className:e,...t}){return(0,o.jsx)(a,{"data-slot":`input-group-control`,className:i(`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{f as i,l as n,d as r,s as t};
@@ -1,3 +1,3 @@
1
1
  import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-Eg7xtNmV.js";import{t as i}from"./createLucideIcon-DwxZHm0M.js";import"./cn-C8c0S2mI.js";var a=i(`code-xml`,[[`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`}]]),o=e(t(),1),s=n();function c({children:e,as:t=`p`,className:n,duration:i=2,spread:a=100,delay:o=0}){let c={"--an-shimmer-duration":`${i}s`,"--an-shimmer-spread":`${a}px`,animationDelay:o>0?`${o}s`:void 0,animationDuration:`${i}s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`};return(0,s.jsx)(t,{className:r(`an-text-shimmer`,`an-text-shimmer--active`,n),style:c,children:e})}var l=o.memo(c);function u(e,t,n){let r=(0,o.useRef)(n);(0,o.useEffect)(()=>{r.current=n},[n]),(0,o.useEffect)(()=>{if(!e)return;let n=setTimeout(()=>r.current(),t);return()=>clearTimeout(n)},[e,t])}function d(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 f(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 p(e){return e===`result`?`complete`:`animating`}function m(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 h(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 g(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:h(n,r),duration:2**53-1,toolVariant:m(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
- `);a.diffStats=`+${t.length}`,a.diffLines=t.map(e=>({type:`add`,content:e}))}}if(n===`Edit`&&Array.isArray(i?.structuredPatch)&&(a.diffStats=d(i.structuredPatch),a.diffLines=f(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`),n.toLowerCase()===`thinking`||n.toLowerCase()===`reasoning`){let e=typeof r?.thought==`string`?r.thought:typeof r?.text==`string`?r.text:void 0,t=typeof i==`string`?i:i&&typeof i==`object`&&typeof i.text==`string`?i.text:typeof i==`object`&&i&&typeof i.thought==`string`?i.thought:void 0;a.thoughtContent=e??t}return a}function _(e){return e===`output-available`?`result`:e===`input-streaming`?`partial-call`:`call`}function v(e,t){let n=_(e.state);return{step:g(e.toolCallId??e.id??t.toLowerCase(),{toolName:t,args:e.input??e.args??{},state:n,result:e.output??e.result}),stepState:p(n)}}var y=(0,o.memo)(function({isPending:e,approveLabel:t,rejectLabel:n,onApprove:r,onReject:i}){let[a,c]=(0,o.useState)(null),l=a===`approved`?`Approved`:t??`Next`,u=a===`rejected`?`Skipped`:n??`Skip`,d=()=>{a||(c(`approved`),r?.())},f=()=>{a||(c(`rejected`),i?.())},p=(0,o.useMemo)(()=>a===`approved`?{label:`Waiting`,dots:!0}:a===`rejected`?{label:`Canceled`,dots:!1}:e?{label:`Starting`,dots:!0}:null,[a,e]);return(0,s.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border bg-an-tool-background py-1 pr-2 pl-3`,children:[p?(0,s.jsxs)(`span`,{className:`text-xs text-an-tool-color-muted`,children:[p.label,p.dots&&(0,s.jsxs)(`span`,{className:`inline-flex`,"aria-hidden":`true`,children:[(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.2s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.4s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.6s] text-an-tool-color-muted`,children:`.`})]})]}):(0,s.jsx)(`span`,{"aria-hidden":`true`}),(0,s.jsxs)(`div`,{className:`flex gap-1`,children:[(0,s.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-an-tool-color active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100`,children:u}),(0,s.jsx)(`button`,{type:`button`,onClick:d,disabled:!!a,className:`h-5 rounded-[4px] bg-an-primary-color px-1.5 text-xs font-medium text-an-send-button-color transition-[background-color,transform] duration-150 hover:bg-an-primary-color/90 active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-an-primary-color disabled:active:scale-100`,children:l})]})]})});function b(e){let t=e.input??e.args??{};return typeof t.code==`string`?t.code:``}function x(e){let t=e.output??e.result;if(!(!t||typeof t!=`object`))return t}function S(...e){for(let t of e)if(t&&t.trim())return t;return``}function C({isPending:e,isBashCell:t,hasError:n,kernelRestarted:r}){return(0,s.jsxs)(`div`,{className:`flex h-7 items-center justify-between pr-2 pl-2.5`,children:[(0,s.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden`,children:[(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px] leading-none text-muted-foreground uppercase`,children:[(0,s.jsx)(a,{className:`h-3 w-3`}),t?`shell`:`python`]}),e?(0,s.jsx)(l,{as:`span`,duration:1.2,className:`m-0 inline-flex h-full items-center truncate text-xs leading-none`,children:`Running cell`}):(0,s.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[n?`Cell failed`:`Ran cell`,r&&` · kernel restarted`]})]}),e&&(0,s.jsx)(`svg`,{className:`h-3 w-3 shrink-0 animate-spin text-muted-foreground`,viewBox:`0 0 16 16`,fill:`none`,children:(0,s.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`28`,strokeDashoffset:`7`,strokeLinecap:`round`})})]})}function w({output:e}){return(0,s.jsxs)(`div`,{className:`mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-[11px] leading-[15px]`,children:[(0,s.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90`,children:`Unattributed background output:`}),(0,s.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 T({step:e,state:t,onComplete:n,approval:r,cellIndex:i,part:a}){u(t===`animating`,e.duration,n);let o=t===`animating`,c=b(a),l=x(a),d=typeof a.backgroundOutput==`string`&&a.backgroundOutput.trim()?a.backgroundOutput:typeof l?.backgroundOutput==`string`&&l.backgroundOutput.trim()?l.backgroundOutput:void 0,f=c.trimStart().startsWith(`%%bash`),p=i===void 0?`IPython`:`In [${i}]`,m=S(l?.result,l?.stdout,l?.stderr,l?.error?.evalue),h=!!l?.error||!!l?.errorEname||l?.status===`error`;return(0,s.jsxs)(`div`,{className:`overflow-hidden rounded-an-tool-border-radius border border-border bg-an-tool-background`,children:[(0,s.jsx)(C,{isPending:o,isBashCell:f,hasError:h,kernelRestarted:l?.kernelRestarted}),(0,s.jsxs)(`div`,{className:`overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-[12px] leading-[16px]`,children:[(0,s.jsxs)(`div`,{className:`break-all whitespace-pre-wrap`,children:[(0,s.jsxs)(`span`,{className:`mr-2 text-cyan-600 select-none dark:text-cyan-400`,children:[p,`:`]}),(0,s.jsx)(`span`,{className:`text-foreground`,children:c})]}),!o&&m&&(0,s.jsx)(`div`,{className:`mt-1 max-h-[160px] overflow-hidden whitespace-pre-line ${h?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:m}),d&&(0,s.jsx)(w,{output:d})]}),r&&(0,s.jsx)(y,{isPending:o,...r})]})}var E=new Map,D=0;function O(e){if(!e)return++D;let t=E.get(e);if(t)return t;let n=++D;return E.set(e,n),n}var k=(0,o.memo)(function({part:e}){let t=e.input?.approval??e.args?.approval,{step:n,stepState:r}=v(e,`IPython`),i=O(e.toolCallId);return(0,s.jsx)(T,{step:n,state:r,onComplete:()=>{},approval:t,cellIndex:i,part:e})});export{l as a,u as i,y as n,a as o,v as r,k as t};
3
+ `);a.diffStats=`+${t.length}`,a.diffLines=t.map(e=>({type:`add`,content:e}))}}if(n===`Edit`&&Array.isArray(i?.structuredPatch)&&(a.diffStats=d(i.structuredPatch),a.diffLines=f(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`),n.toLowerCase()===`thinking`||n.toLowerCase()===`reasoning`){let e=typeof r?.thought==`string`?r.thought:typeof r?.text==`string`?r.text:void 0,t=typeof i==`string`?i:i&&typeof i==`object`&&typeof i.text==`string`?i.text:typeof i==`object`&&i&&typeof i.thought==`string`?i.thought:void 0;a.thoughtContent=e??t}return a}function _(e){return e===`output-available`?`result`:e===`input-streaming`?`partial-call`:`call`}function v(e,t){let n=_(e.state);return{step:g(e.toolCallId??e.id??t.toLowerCase(),{toolName:t,args:e.input??e.args??{},state:n,result:e.output??e.result}),stepState:p(n)}}var y=(0,o.memo)(function({isPending:e,approveLabel:t,rejectLabel:n,onApprove:r,onReject:i}){let[a,c]=(0,o.useState)(null),l=a===`approved`?`Approved`:t??`Next`,u=a===`rejected`?`Skipped`:n??`Skip`,d=()=>{a||(c(`approved`),r?.())},f=()=>{a||(c(`rejected`),i?.())},p=(0,o.useMemo)(()=>a===`approved`?{label:`Waiting`,dots:!0}:a===`rejected`?{label:`Canceled`,dots:!1}:e?{label:`Starting`,dots:!0}:null,[a,e]);return(0,s.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border bg-an-tool-background py-1 pr-2 pl-3`,children:[p?(0,s.jsxs)(`span`,{className:`text-xs text-an-tool-color-muted`,children:[p.label,p.dots&&(0,s.jsxs)(`span`,{className:`inline-flex`,"aria-hidden":`true`,children:[(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.2s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.4s] text-an-tool-color-muted`,children:`.`}),(0,s.jsx)(`span`,{className:`animate-[loading-dots_1.4s_infinite_0.6s] text-an-tool-color-muted`,children:`.`})]})]}):(0,s.jsx)(`span`,{"aria-hidden":`true`}),(0,s.jsxs)(`div`,{className:`flex gap-1`,children:[(0,s.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-an-tool-color active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-transparent disabled:active:scale-100`,children:u}),(0,s.jsx)(`button`,{type:`button`,onClick:d,disabled:!!a,className:`h-5 rounded-[4px] bg-an-primary-color px-1.5 text-xs font-medium text-an-send-button-color transition-[background-color,transform] duration-150 hover:bg-an-primary-color/90 active:scale-[0.98] disabled:opacity-60 disabled:hover:bg-an-primary-color disabled:active:scale-100`,children:l})]})]})});function b(e){let t=e.input??e.args??{};return typeof t.code==`string`?t.code:``}function x(e){let t=e.output??e.result;if(!(!t||typeof t!=`object`))return t}function S(...e){for(let t of e)if(t&&t.trim())return t;return``}function C({isPending:e,isBashCell:t,hasError:n,kernelRestarted:r}){return(0,s.jsxs)(`div`,{className:`flex h-7 items-center justify-between pr-2 pl-2.5`,children:[(0,s.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden`,children:[(0,s.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.625rem] leading-none text-muted-foreground uppercase`,children:[(0,s.jsx)(a,{className:`h-3 w-3`}),t?`shell`:`python`]}),e?(0,s.jsx)(l,{as:`span`,duration:1.2,className:`m-0 inline-flex h-full items-center truncate text-xs leading-none`,children:`Running cell`}):(0,s.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[n?`Cell failed`:`Ran cell`,r&&` · kernel restarted`]})]}),e&&(0,s.jsx)(`svg`,{className:`h-3 w-3 shrink-0 animate-spin text-muted-foreground`,viewBox:`0 0 16 16`,fill:`none`,children:(0,s.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`28`,strokeDashoffset:`7`,strokeLinecap:`round`})})]})}function w({output:e}){return(0,s.jsxs)(`div`,{className:`mt-1.5 border-t border-dashed border-border/70 pt-1.5 font-mono text-[0.6875rem] leading-[15px]`,children:[(0,s.jsx)(`span`,{className:`text-[0.625rem] font-semibold uppercase tracking-wider text-amber-600/90 dark:text-amber-400/90`,children:`Unattributed background output:`}),(0,s.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 T({step:e,state:t,onComplete:n,approval:r,cellIndex:i,part:a}){u(t===`animating`,e.duration,n);let o=t===`animating`,c=b(a),l=x(a),d=typeof a.backgroundOutput==`string`&&a.backgroundOutput.trim()?a.backgroundOutput:typeof l?.backgroundOutput==`string`&&l.backgroundOutput.trim()?l.backgroundOutput:void 0,f=c.trimStart().startsWith(`%%bash`),p=i===void 0?`IPython`:`In [${i}]`,m=S(l?.result,l?.stdout,l?.stderr,l?.error?.evalue),h=!!l?.error||!!l?.errorEname||l?.status===`error`;return(0,s.jsxs)(`div`,{className:`overflow-hidden rounded-an-tool-border-radius border border-border bg-an-tool-background`,children:[(0,s.jsx)(C,{isPending:o,isBashCell:f,hasError:h,kernelRestarted:l?.kernelRestarted}),(0,s.jsxs)(`div`,{className:`overflow-hidden border-t border-border bg-background px-2.5 py-1.5 font-mono text-[0.75rem] leading-[16px]`,children:[(0,s.jsxs)(`div`,{className:`break-all whitespace-pre-wrap`,children:[(0,s.jsxs)(`span`,{className:`mr-2 text-cyan-600 select-none dark:text-cyan-400`,children:[p,`:`]}),(0,s.jsx)(`span`,{className:`text-foreground`,children:c})]}),!o&&m&&(0,s.jsx)(`div`,{className:`mt-1 max-h-[160px] overflow-hidden whitespace-pre-line ${h?`text-red-600 dark:text-red-400`:`text-muted-foreground`}`,children:m}),d&&(0,s.jsx)(w,{output:d})]}),r&&(0,s.jsx)(y,{isPending:o,...r})]})}var E=new Map,D=0;function O(e){if(!e)return++D;let t=E.get(e);if(t)return t;let n=++D;return E.set(e,n),n}var k=(0,o.memo)(function({part:e}){let t=e.input?.approval??e.args?.approval,{step:n,stepState:r}=v(e,`IPython`),i=O(e.toolCallId);return(0,s.jsx)(T,{step:n,state:r,onComplete:()=>{},approval:t,cellIndex:i,part:e})});export{l as a,u as i,y as n,a as o,v as r,k as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./bundle-mjs-DKHVkVWu.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{a as r,d as i}from"./ease-u56MhKYS.js";import{t as a}from"./utils-Eg7xtNmV.js";import{t as o}from"./check-JjHKAZas.js";import{t as s}from"./gauge-DNpstbBn.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./command-DPfiaYUL.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:a(`relative w-full touch-none`,u&&`opacity-50`,d),...f,children:(0,h.jsxs)(`div`,{className:a(`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)(i.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:r},e))}),(0,h.jsx)(i.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:r}),(0,h.jsx)(i.div,{"aria-hidden":`true`,className:a(`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:r}),(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-[0.8125rem] text-transparent select-none`,"aria-hidden":`true`,children:c}):null,(0,h.jsx)(`span`,{className:`ml-auto px-2 text-[0.8125rem] 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-[0.8125rem]`,children:[c?(0,h.jsx)(i.span,{className:`px-2`,animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:r,children:c}):null,(0,h.jsx)(i.span,{className:`ml-auto px-2 tabular-nums`,style:{minWidth:`${N.length}ch`,textAlign:`right`},animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:r,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-[0.625rem] 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-BzAKULar.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-Bt9p2OL4.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};