@qredence/fleet 0.1.0 → 0.5.1

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 (110) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +8 -1
  3. package/dist/web/client/assets/artifacts-panel-CX62LQ13.js +1 -0
  4. package/dist/web/client/assets/artifacts-utils-N_kUFbz2.js +1 -0
  5. package/dist/web/client/assets/bot-Bs7QWJ2q.js +1 -0
  6. package/dist/web/client/assets/{chat-C64Sv6V-.js → chat-CsepBQwy.js} +5 -5
  7. package/dist/web/client/assets/{chat-command-palette-HpsmKfLO.js → chat-command-palette-C4sSf8Kg.js} +1 -1
  8. package/dist/web/client/assets/collapsible-DmyYcezk.js +1 -0
  9. package/dist/web/client/assets/command-CB6emP8m.js +2 -0
  10. package/dist/web/client/assets/conversation-turns-ByFoWPXe.js +6 -0
  11. package/dist/web/client/assets/ease-vFBiNFNK.js +9 -0
  12. package/dist/web/client/assets/{fleet-pi-tool-renderer-ZKiX6Ob_.js → fleet-pi-tool-renderer-BD_ZAjlG.js} +28 -30
  13. package/dist/web/client/assets/globals-CqqQdk2S.css +2 -0
  14. package/dist/web/client/assets/horizontal-resize-C1TpRLNC.js +1 -0
  15. package/dist/web/client/assets/index-DweoFRMs.js +12 -0
  16. package/dist/web/client/assets/{input-Clyn18XG.js → input-CqC82Agz.js} +1 -1
  17. package/dist/web/client/assets/{input-group-MxDAWX3j.js → input-group-H0TG-mkU.js} +1 -1
  18. package/dist/web/client/assets/ipython-tool-BfeIa0nK.js +3 -0
  19. package/dist/web/client/assets/markdown-DG7pUdsX.js +2 -0
  20. package/dist/web/client/assets/{markdown-code-pIaEVDUU.js → markdown-code-BgMzpy7O.js} +1 -1
  21. package/dist/web/client/assets/notify-Duj26eeZ.js +1 -0
  22. package/dist/web/client/assets/{openui-renderer-NLUpAS3h.js → openui-renderer-DlUo6ehT.js} +5 -5
  23. package/dist/web/client/assets/openui-utils-DawGoQNp.js +1 -0
  24. package/dist/web/client/assets/prime-agent-artifacts-CHGb5V_j.js +5 -0
  25. package/dist/web/client/assets/{provider-catalog-Gx9qaHBM.js → provider-catalog-BZhZuKSz.js} +1 -1
  26. package/dist/web/client/assets/provider-label-jKm8v18u.js +1 -0
  27. package/dist/web/client/assets/range-vSJ7Ux_5.js +2 -0
  28. package/dist/web/client/assets/repl-panel-DiGS6uCw.js +1 -0
  29. package/dist/web/client/assets/resource-helpers-ULlyU8qK.js +2 -0
  30. package/dist/web/client/assets/resources-panel-DSU7VGX2.js +1 -0
  31. package/dist/web/client/assets/routes-CxlNCi_v.js +16 -0
  32. package/dist/web/client/assets/session-insights-panel-DwmwiikS.js +1 -0
  33. package/dist/web/client/assets/settings-dialog-CkfpTKfM.js +1 -0
  34. package/dist/web/client/assets/skeleton-loaders-fStjEeRP.js +1 -0
  35. package/dist/web/client/assets/square-terminal-BYTN_I86.js +1 -0
  36. package/dist/web/client/assets/subagents-panel-DGnsK6Nx.js +1 -0
  37. package/dist/web/client/assets/{switch-ojzdMno9.js → switch-BFEBpUEU.js} +1 -1
  38. package/dist/web/client/assets/{tool-result-QvhjpNGX.js → tool-result-CBzwwUE9.js} +3 -3
  39. package/dist/web/client/assets/ui-preferences-DUEFuJFj.js +1 -0
  40. package/dist/web/client/assets/workspace-panel-CjdXlEvd.js +1 -0
  41. package/dist/web/client/assets/workspace-path-nav-C0AQNZyy.js +1 -0
  42. package/dist/web/server/{_tanstack-start-manifest_v-puvdGuy--7AY277Z5.js → _tanstack-start-manifest_v-bDUlyKY0-KFW35JRO.js} +25 -18
  43. package/dist/web/server/{artifacts-panel-knpQvJ-q-WJLZ76QB.js → artifacts-panel-D9w1DHAN-FGRDCYU2.js} +37 -70
  44. package/dist/web/server/{chat-command-palette-CPv5GmGJ-22J32S6P.js → chat-command-palette-BaenPkCN-BHSOPGU4.js} +16 -14
  45. package/dist/web/server/{chunk-OADQILSQ.js → chunk-2U7PWSJX.js} +49 -47
  46. package/dist/web/server/{chunk-ZX3XOSYO.js → chunk-3GSFXWL5.js} +2 -2
  47. package/dist/web/server/{chunk-IFV5M33X.js → chunk-3IKSPTYI.js} +12 -26
  48. package/dist/web/server/{chunk-W7LNJCRJ.js → chunk-44IVTHDV.js} +18 -10
  49. package/dist/web/server/{chunk-I3FDTJFO.js → chunk-46VQY7SG.js} +6 -87
  50. package/dist/web/server/{chunk-WTYNN6EV.js → chunk-54II5QXQ.js} +23 -1
  51. package/dist/web/server/{chunk-PRT4QYOB.js → chunk-5AVQZ4AZ.js} +1 -35
  52. package/dist/web/server/chunk-6GMKRR3C.js +161 -0
  53. package/dist/web/server/chunk-74QOI457.js +45 -0
  54. package/dist/web/server/chunk-AQ66E5OW.js +33 -0
  55. package/dist/web/server/{chunk-TTQ75CXC.js → chunk-AZZHUVJR.js} +88 -23
  56. package/dist/web/server/{chunk-KAWYGHDN.js → chunk-B2F6MLVZ.js} +23 -1
  57. package/dist/web/server/{chunk-C7EKOPZU.js → chunk-DO3TVNGA.js} +87 -87
  58. package/dist/web/server/chunk-EIVNRYP3.js +48 -0
  59. package/dist/web/server/{chunk-UBUXV2TW.js → chunk-FBOO3G67.js} +6 -6
  60. package/dist/web/server/{chunk-MK3P3OBZ.js → chunk-FVWDJNXR.js} +5 -5
  61. package/dist/web/server/chunk-G5BCQQ5N.js +34 -0
  62. package/dist/web/server/{chunk-4KFMONRT.js → chunk-H64JLONZ.js} +9 -9
  63. package/dist/web/server/{chunk-KDSISV4P.js → chunk-HBZ6YKRB.js} +2 -50
  64. package/dist/web/server/{chunk-5277VI3D.js → chunk-KPNGZR2R.js} +12 -74
  65. package/dist/web/server/chunk-M2FGGPNA.js +376 -0
  66. package/dist/web/server/{chunk-KVHPE5XH.js → chunk-MDYA4NXK.js} +22 -8
  67. package/dist/web/server/chunk-NFRJDPB3.js +52 -0
  68. package/dist/web/server/chunk-P66QQWUM.js +67 -0
  69. package/dist/web/server/{fleet-pi-tool-renderer-5vYFNeZS-IHKMLT7W.js → chunk-PCJ5EKFE.js} +40 -392
  70. package/dist/web/server/{chunk-APN3LVRT.js → chunk-PWK2HJIV.js} +27 -30
  71. package/dist/web/server/{chunk-XXNFEXDU.js → chunk-QJBEWT4E.js} +2 -70
  72. package/dist/web/server/{chunk-JD6EWZCU.js → chunk-VHCAD46L.js} +48 -48
  73. package/dist/web/server/chunk-Y6LJ4WBI.js +1797 -0
  74. package/dist/web/server/{chunk-NGI44XRR.js → chunk-ZEVZFLIY.js} +1 -1
  75. package/dist/web/server/fleet-pi-tool-renderer-lJvZWmBJ-4M5YI6VS.js +35 -0
  76. package/dist/web/server/{fork-picker-dialog-BZzfxdQd-C6SPHFAW.js → fork-picker-dialog-BZzfxdQd-Y725VJ7G.js} +2 -2
  77. package/dist/web/server/{markdown-Ct_q4D-z-VFWZRBTY.js → markdown-Boni3lHk-AZGKDNAR.js} +1 -1
  78. package/dist/web/server/{markdown-code-C_ih1bX1-5CIWT3CH.js → markdown-code-BrWukbg3-D2GN4Y77.js} +2 -2
  79. package/dist/web/server/{openui-renderer-BT5jL0Yf-XYLLN5U6.js → openui-renderer-Cg4RSE9k-7BTJIYZJ.js} +12 -11
  80. package/dist/web/server/repl-panel-BEQrC2ef-V3YEZ7EO.js +117 -0
  81. package/dist/web/server/{resources-panel-DNCVHTIg-PJYMXVGE.js → resources-panel-CwKh4U9f-D3VDEMDW.js} +6 -6
  82. package/dist/web/server/{router-DDxOMz3K-HRBXILHM.js → router-CEahIUpn-SRG7XKIH.js} +131 -21
  83. package/dist/web/server/{routes-BX4Tv-6R-FHIZYUWW.js → routes-BznemByz-F4DJAYIM.js} +1371 -2499
  84. package/dist/web/server/server.js +2 -2
  85. package/dist/web/server/{session-insights-panel-gYkkAE8H-W4O74Z7H.js → session-insights-panel-JfeTHE0d-3HZB3ZWI.js} +2 -2
  86. package/dist/web/server/{settings-dialog-BTBFLQ1P-ZENQ4KWK.js → settings-dialog-DgeBMORv-7SRSENPM.js} +47 -61
  87. package/dist/web/server/subagents-panel-CzZe3co7-2VZ5JTWF.js +332 -0
  88. package/dist/web/server/{chunk-5SZXUN3Y.js → workspace-panel-y54P79_B-VPIYUXF6.js} +29 -16
  89. package/package.json +11 -3
  90. package/dist/web/client/assets/artifacts-panel-8TyrNBM_.js +0 -1
  91. package/dist/web/client/assets/collapsible-WCSnxhr2.js +0 -1
  92. package/dist/web/client/assets/command-DgfiCKcY.js +0 -2
  93. package/dist/web/client/assets/globals-BmxtUHFx.css +0 -2
  94. package/dist/web/client/assets/horizontal-resize-B76jjn5v.js +0 -1
  95. package/dist/web/client/assets/index-0pBr_bKy.js +0 -12
  96. package/dist/web/client/assets/markdown-BXWmNJo7.js +0 -2
  97. package/dist/web/client/assets/prime-agent-artifacts-k9JiTDZM.js +0 -5
  98. package/dist/web/client/assets/provider-brand-icon-VCebsuTD.js +0 -1
  99. package/dist/web/client/assets/range-KAaLzImH.js +0 -2
  100. package/dist/web/client/assets/resources-panel-BWuKeyrb.js +0 -1
  101. package/dist/web/client/assets/routes-BPRw0UzV.js +0 -20
  102. package/dist/web/client/assets/session-insights-panel-CPymkzZT.js +0 -1
  103. package/dist/web/client/assets/settings-dialog-6p8mjg8t.js +0 -1
  104. package/dist/web/client/assets/shared-DAI9OAw0.js +0 -2
  105. package/dist/web/client/assets/skeleton-loaders-qxIkJKCA.js +0 -1
  106. package/dist/web/client/assets/workspace-panel-C67-fqw4.js +0 -1
  107. package/dist/web/client/assets/workspace-path-nav-BrQHo6es.js +0 -9
  108. package/dist/web/server/chunk-KJ4UUAEU.js +0 -83
  109. package/dist/web/server/workspace-panel-BNAXF57q-EQCBPEG4.js +0 -28
  110. package/dist/web/server/{chunk-AQWTGP35.js → chunk-FE4KN6T2.js} +5 -5
@@ -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-0At5xSyU.js";import{K as a,at as o,ct as s,it as c,k as l,lt as u,n as d,p as f,rt as p,tt as m}from"./x-BgciQ7_C.js";import{t as h}from"./useBaseUiId-B9f7fokB.js";import{t as g}from"./utils-Eg7xtNmV.js";import{t as _}from"./useControlled-CoY1jSuL.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:u,disabled:void 0,setTouched:u,setDirty:u,setFilled:u,setFocused:u,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:b,registerFieldControl:u,validation:{getValidationProps:(e,t=s)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:u,getInputControl:()=>null,commit:async()=>{},change:u}},C=v.createContext(S);function w(e=!0){let t=v.useContext(C);if(t.setValidityData===u&&!e)throw Error(p(28));return t}var T=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:u,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function E(){return v.useContext(T)}var D=v.createContext({controlId:void 0,registerControlId:u,labelId:void 0,setLabelId:u,messageIds:[],setMessageIds:u,getDescriptionProps:e=>e});function O(){return v.useContext(D)}function k(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:s}=O(),l=h(t),d=n?i:void 0,f=o(()=>Symbol()),p=v.useRef(!1),g=v.useRef(t!=null),_=m(()=>{!p.current||s===u||(p.current=!1,s(f.current,void 0))});return c(()=>{if(s===u)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}p.current=!0,s(f.current,e)},[t,r,d,s,n,l,f,_]),v.useEffect(()=>_,[_]),i??l}function A(e,t,n,r,i=!0,a){let{registerFieldControl:s}=w(),l=o(()=>Symbol());c(()=>{let o=l.current;if(!i){s(o,void 0);return}s(o,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,s,l,n]),c(()=>{let e=l.current;return()=>{s(e,void 0)}},[s,l])}var j=v.forwardRef(function(e,t){let{render:n,className:a,id:o,name:s,value:u,disabled:p=!1,onValueChange:h,defaultValue:g,autoFocus:y=!1,style:b,...S}=e,{state:C,name:T,disabled:D,setTouched:j,setDirty:M,validityData:N,setFocused:P,setFilled:F,validationMode:I,validation:L}=w(),{clearErrors:R}=E(),z=D||p,B=T??s,V={...C,disabled:z},{labelId:H}=O(),U=k({id:o});c(()=>{let e=u!=null;L.inputRef.current?.value||e&&u!==``?F(!0):e&&u===``&&F(!1)},[L.inputRef,F,u]);let W=v.useRef(null);c(()=>{y&&W.current===i(r(W.current))&&P(!0)},[y,P]);let[G]=_({controlled:u,default:g,name:`FieldControl`,state:`value`}),K=u!==void 0,q=K?G:void 0,J=m(()=>L.inputRef.current?.value);return A(L.inputRef,U,q,J,!z,s),l(`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,d(f,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{E as a,O as i,A as n,w as o,k 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-0At5xSyU.js";import{K as a,at as o,ct as s,it as c,k as l,lt as u,n as d,p as f,rt as p,tt as m}from"./x-BgciQ7_C.js";import{t as h}from"./useBaseUiId-B9f7fokB.js";import{t as g}from"./utils-Eg7xtNmV.js";import{t as _}from"./useControlled-CoY1jSuL.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:u,disabled:void 0,setTouched:u,setDirty:u,setFilled:u,setFocused:u,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:b,registerFieldControl:u,validation:{getValidationProps:(e,t=s)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:u,getInputControl:()=>null,commit:async()=>{},change:u}},C=v.createContext(S);function w(e=!0){let t=v.useContext(C);if(t.setValidityData===u&&!e)throw Error(p(28));return t}function T(e,t,n,r,i=!0,a){let{registerFieldControl:s}=w(),l=o(()=>Symbol());c(()=>{let o=l.current;if(!i){s(o,void 0);return}s(o,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,s,l,n]),c(()=>{let e=l.current;return()=>{s(e,void 0)}},[s,l])}var E=v.createContext({controlId:void 0,registerControlId:u,labelId:void 0,setLabelId:u,messageIds:[],setMessageIds:u,getDescriptionProps:e=>e});function D(){return v.useContext(E)}function O(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:s}=D(),l=h(t),d=n?i:void 0,f=o(()=>Symbol()),p=v.useRef(!1),g=v.useRef(t!=null),_=m(()=>{!p.current||s===u||(p.current=!1,s(f.current,void 0))});return c(()=>{if(s===u)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}p.current=!0,s(f.current,e)},[t,r,d,s,n,l,f,_]),v.useEffect(()=>_,[_]),i??l}var k=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:u,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function A(){return v.useContext(k)}var j=v.forwardRef(function(e,t){let{render:n,className:a,id:o,name:s,value:u,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??s,V={...C,disabled:z},{labelId:H}=D(),U=O({id:o});c(()=>{let e=u!=null;L.inputRef.current?.value||e&&u!==``?F(!0):e&&u===``&&F(!1)},[L.inputRef,F,u]);let W=v.useRef(null);c(()=>{y&&W.current===i(r(W.current))&&P(!0)},[y,P]);let[G]=_({controlled:u,default:g,name:`FieldControl`,state:`value`}),K=u!==void 0,q=K?G:void 0,J=m(()=>L.inputRef.current?.value);return T(L.inputRef,U,q,J,!z,s),l(`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,d(f,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{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{n as r,t as i}from"./button-0At5xSyU.js";import{t as a}from"./utils-Eg7xtNmV.js";import{t as o}from"./createLucideIcon-DwxZHm0M.js";import{t as s}from"./input-Clyn18XG.js";var c=o(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),l=e(t(),1),u=n(),d=(0,l.createContext)(null),f=(0,l.createContext)(null),p=(0,l.createContext)(null);function m({chatPanelData:e,children:t,onOpenUIAction:n,settingsActions:r,workspaceTree:i}){let a=(0,l.useMemo)(()=>({...e,onOpenUIAction:n}),[e,n]);return(0,u.jsx)(p.Provider,{value:r,children:(0,u.jsx)(f.Provider,{value:i,children:(0,u.jsx)(d.Provider,{value:a,children:t})})})}function h(){let e=(0,l.useContext)(d);if(!e)throw Error(`useChatPanelDataContext must be used within RightPanelProvider`);return e}function g(){let e=(0,l.useContext)(f);if(!e)throw Error(`useWorkspaceTreeContext must be used within RightPanelProvider`);return e}function _(){let e=(0,l.useContext)(p);if(!e)throw Error(`useSettingsActionsContext must be used within RightPanelProvider`);return e}function v({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:a(`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 y=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 b({className:e,align:t=`inline-start`,...n}){return(0,u.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:a(y({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input, textarea`)?.focus()},...n})}var x=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 S({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...o}){return(0,u.jsx)(i,{type:t,"data-size":r,variant:n,className:a(x({size:r}),e),...o})}function C({className:e,...t}){return(0,u.jsx)(s,{"data-slot":`input-group-control`,className:a(`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{m as a,g as c,C as i,c as l,b as n,h as o,S as r,_ as s,v 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{n as r,t as i}from"./button-0At5xSyU.js";import{t as a}from"./utils-Eg7xtNmV.js";import{t as o}from"./createLucideIcon-DwxZHm0M.js";import{t as s}from"./input-CqC82Agz.js";var c=o(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),l=e(t(),1),u=n(),d=(0,l.createContext)(null),f=(0,l.createContext)(null),p=(0,l.createContext)(null);function m({chatPanelData:e,children:t,onOpenUIAction:n,settingsActions:r,workspaceTree:i}){let a=(0,l.useMemo)(()=>({...e,onOpenUIAction:n}),[e,n]);return(0,u.jsx)(p.Provider,{value:r,children:(0,u.jsx)(f.Provider,{value:i,children:(0,u.jsx)(d.Provider,{value:a,children:t})})})}function h(){let e=(0,l.useContext)(d);if(!e)throw Error(`useChatPanelDataContext must be used within RightPanelProvider`);return e}function g(){let e=(0,l.useContext)(f);if(!e)throw Error(`useWorkspaceTreeContext must be used within RightPanelProvider`);return e}function _(){let e=(0,l.useContext)(p);if(!e)throw Error(`useSettingsActionsContext must be used within RightPanelProvider`);return e}function v({className:e,...t}){return(0,u.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:a(`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 y=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 b({className:e,align:t=`inline-start`,...n}){return(0,u.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:a(y({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input, textarea`)?.focus()},...n})}var x=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 S({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...o}){return(0,u.jsx)(i,{type:t,"data-size":r,variant:n,className:a(x({size:r}),e),...o})}function C({className:e,...t}){return(0,u.jsx)(s,{"data-slot":`input-group-control`,className:a(`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{m as a,g as c,C as i,c as l,b as n,h as o,S as r,_ as s,v as t};
@@ -0,0 +1,3 @@
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
+ `:``);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({step:e,state:t,onComplete:n,approval:r,cellIndex:i,part:o}){u(t===`animating`,e.duration,n);let c=t===`animating`,d=b(o),f=x(o),p=d.trimStart().startsWith(`%%bash`),m=i===void 0?`IPython`:`In [${i}]`,h=S(f?.result,f?.stdout,f?.stderr,f?.error?.evalue),g=!!f?.error||!!f?.errorEname||f?.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.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`}),p?`shell`:`python`]}),c?(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:[g?`Cell failed`:`Ran cell`,f?.kernelRestarted&&` · kernel restarted`]})]}),c&&(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`})})]}),(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:[m,`:`]}),(0,s.jsx)(`span`,{className:`text-foreground`,children:d})]}),!c&&h&&(0,s.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})]}),r&&(0,s.jsx)(y,{isPending:c,...r})]})}var w=new Map,T=0;function E(e){if(!e)return++T;let t=w.get(e);if(t)return t;let n=++T;return w.set(e,n),n}var D=(0,o.memo)(function({part:e}){let t=e.input?.approval??e.args?.approval,{step:n,stepState:r}=v(e,`IPython`),i=E(e.toolCallId);return(0,s.jsx)(C,{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,D as t};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-code-BgMzpy7O.js","assets/jsx-runtime-NZYk81nU.js","assets/rolldown-runtime-hePW80VL.js","assets/chunk-BO2N2NFS-BnzHCiyQ.js","assets/bundle-mjs-DKHVkVWu.js","assets/react-dom-Bwxum3ti.js","assets/preload-helper-Czpn1I53.js","assets/lib-ChrQ49PO.js","assets/dist-H-qlGkmT.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{i as n}from"./bundle-mjs-DKHVkVWu.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";import{t as i}from"./utils-Eg7xtNmV.js";import{t as a}from"./preload-helper-Czpn1I53.js";import{r as o}from"./chunk-BO2N2NFS-BnzHCiyQ.js";import"./cn-C8c0S2mI.js";var s=e({Markdown:()=>y,MarkdownFrame:()=>_,fixNumberedListBreaks:()=>d,markdownComponents:()=>g,normalizeCodeFenceLanguages:()=>p}),c=t(n(),1),l=r(),u=(0,c.lazy)(()=>a(async()=>{let{HighlightedMarkdown:e}=await import(`./markdown-code-BgMzpy7O.js`);return{HighlightedMarkdown:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).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,c.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`,{className:`an-md-h1 mt-3 mb-1.5 text-base font-semibold`,...t,children:e}),h2:({children:e,...t})=>(0,l.jsx)(`h2`,{className:`an-md-h2 mt-3 mb-1.5 text-base font-semibold`,...t,children:e}),h3:({children:e,...t})=>(0,l.jsx)(`h3`,{className:`an-md-h3 mt-2 mb-1 text-sm font-semibold`,...t,children:e}),h4:({children:e,...t})=>(0,l.jsx)(`h4`,{className:`an-md-h4 mt-2 mb-1 text-sm font-medium`,...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)(c.Fragment,{children:e}):(0,l.jsx)(`p`,{className:`an-md-p text-sm leading-relaxed text-an-foreground/80`,...n,children:e})},ul:({children:e,...t})=>(0,l.jsx)(`ul`,{className:`an-md-ul mb-2 flex list-outside list-disc flex-col gap-0.5 pl-4 text-sm text-an-foreground/80`,...t,children:e}),ol:({children:e,...t})=>(0,l.jsx)(`ol`,{className:`an-md-ol mb-2 flex list-outside list-decimal flex-col gap-0.5 pl-5 text-sm text-an-foreground/80`,...t,children:e}),li:({children:e,...t})=>(0,l.jsx)(`li`,{className:`an-md-li pl-0.5 text-sm text-an-foreground/80`,...t,children:e}),strong:({children:e,...t})=>(0,l.jsx)(`strong`,{className:`font-medium text-an-foreground`,...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,className:`an-md-link text-an-primary-color underline-offset-2 hover:underline`,children:t})},blockquote:({children:e,...t})=>(0,l.jsx)(`blockquote`,{className:`an-md-blockquote mb-2 border-l-2 border-an-border-color pl-3 text-sm text-an-foreground/70 italic`,...t,children:e}),hr:({...e})=>(0,l.jsx)(`hr`,{className:`an-md-hr my-4 border-an-border-color`,...e}),table:({children:e,...t})=>(0,l.jsx)(`div`,{className:`my-3 overflow-x-auto rounded-an-tool-border-radius border border-an-border-color`,children:(0,l.jsx)(`table`,{className:`an-md-table w-full text-sm [&>thead]:bg-an-tool-background [&>thead>tr>th]:bg-an-tool-background`,...t,children:e})}),th:({children:e,...t})=>(0,l.jsx)(`th`,{className:`bg-an-background-secondary px-3 py-2 text-left font-medium`,...t,children:e}),td:({children:e,...t})=>(0,l.jsx)(`td`,{className:`border-t border-an-border-color px-3 py-2 text-an-foreground/80`,...t,children:e})};function _({children:e,className:t}){return(0,l.jsx)(`div`,{className:i(`an-markdown`,`overflow-hidden wrap-break-word`,`[&_li>p]:mb-0 [&_li>p]:inline`,t),children:e})}function v({content:e,className:t,codeControls:n}){let r=p(d(e));return(0,l.jsx)(_,{className:t,children:(0,l.jsx)(o,{components:g,controls:{code:n},children:r})})}function y(e){return e.content.includes("```")?(0,l.jsx)(c.Suspense,{fallback:(0,l.jsx)(v,{...e}),children:(0,l.jsx)(u,{...e})}):(0,l.jsx)(v,{...e})}export{s 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{r as t}from"./chunk-BO2N2NFS-BnzHCiyQ.js";import{c as n,n as r,r as i,s as a}from"./dist-H-qlGkmT.js";import{i as o,n as s,o as c,r as l}from"./markdown-BXWmNJo7.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{r as t}from"./chunk-BO2N2NFS-BnzHCiyQ.js";import{c as n,n as r,r as i,s as a}from"./dist-H-qlGkmT.js";import{i as o,n as s,o as c,r as l}from"./markdown-DG7pUdsX.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{n as e}from"./toast-C4s7FYYa.js";import{t}from"./createLucideIcon-DwxZHm0M.js";var n=t(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]);function r(t,n){return e.add({title:t,type:n})}var i=Object.assign(e=>r(e),{success:e=>r(e,`success`),error:e=>r(e,`error`),message:e=>r(e,`info`)});export{n,i as t};