@qredence/fleet 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/web/client/assets/DialogTitle-BlVq-tcv.js +1 -0
  3. package/dist/web/client/assets/FloatingPortal-D8-EPDs2.js +1 -0
  4. package/dist/web/client/assets/activity-BPIKUzOU.js +1 -0
  5. package/dist/web/client/assets/agents-CGjUBYX7.js +2 -0
  6. package/dist/web/client/assets/agents-page-CTuFJL9H.js +1 -0
  7. package/dist/web/client/assets/alert-CzWGeumf.js +1 -0
  8. package/dist/web/client/assets/alert-dialog-D-e1Pr4q.js +1 -0
  9. package/dist/web/client/assets/artifacts-panel-6JEdy6jU.js +1 -0
  10. package/dist/web/client/assets/badge-CzQFgmVK.js +1 -0
  11. package/dist/web/client/assets/chat-command-palette-Bxr5EkO6.js +1 -0
  12. package/dist/web/client/assets/chat-hpzV6IA6.js +57 -0
  13. package/dist/web/client/assets/chat-queries-CfZiupub.js +3 -0
  14. package/dist/web/client/assets/clock-3-BwWCSCm_.js +1 -0
  15. package/dist/web/client/assets/{command-imgUMV3r.js → command-xo-NK4xO.js} +1 -1
  16. package/dist/web/client/assets/connectors-CFxLqG2x.js +2 -0
  17. package/dist/web/client/assets/connectors-page-DQJdoAnl.js +1 -0
  18. package/dist/web/client/assets/create-project-dialog-Db-WhUmP.js +1 -0
  19. package/dist/web/client/assets/dialog-CK8dym6z.js +1 -0
  20. package/dist/web/client/assets/{fork-picker-dialog-Cgi48NnT.js → fork-picker-dialog-DSaFeUii.js} +1 -1
  21. package/dist/web/client/assets/globals-DJhWyayo.css +2 -0
  22. package/dist/web/client/assets/index-C9FHZDGw.js +13 -0
  23. package/dist/web/client/assets/{input-7g8_nw-Z.js → input-CBoTMPC_.js} +1 -1
  24. package/dist/web/client/assets/{input-group-Nq03Qums.js → input-group-BFubAtz9.js} +1 -1
  25. package/dist/web/client/assets/mcp-connections-section-DEo6Kemv.js +2 -0
  26. package/dist/web/client/assets/message-queue-Btjt9wK2.js +1 -0
  27. package/dist/web/client/assets/{model-selector-list-Cp687pdm.js → model-selector-list-CbDAT0Rw.js} +1 -1
  28. package/dist/web/client/assets/mutation-Da9zdeWr.js +1 -0
  29. package/dist/web/client/assets/notify-BIL0-CGy.js +1 -0
  30. package/dist/web/client/assets/open-panel-action-message-SdA1VU42.js +1 -0
  31. package/dist/web/client/assets/openui-renderer-DG-iML7M.js +291 -0
  32. package/dist/web/client/assets/pencil-Cbgq3ybX.js +1 -0
  33. package/dist/web/client/assets/plus-DUP2JPVG.js +1 -0
  34. package/dist/web/client/assets/product-page-header-Ck6I13CE.js +1 -0
  35. package/dist/web/client/assets/provider-catalog-CLEDlH_v.js +1 -0
  36. package/dist/web/client/assets/provider-label-BItazQ6H.js +1 -0
  37. package/dist/web/client/assets/right-panel-context-CjX-HkDO.js +1 -0
  38. package/dist/web/client/assets/right-panel-registry-BAJ6TuEY.js +2 -0
  39. package/dist/web/client/assets/rotate-ccw-DLkfsmG9.js +1 -0
  40. package/dist/web/client/assets/routes-ja_liP8Z.js +14 -0
  41. package/dist/web/client/assets/select-DYh951qi.js +1 -0
  42. package/dist/web/client/assets/{session-activity-panel-Bc4-HSfb.js → session-activity-panel-DwaXiSrS.js} +1 -1
  43. package/dist/web/client/assets/{session-insights-panel-D0v_DKcb.js → session-insights-panel-BXEmuJKf.js} +1 -1
  44. package/dist/web/client/assets/{session-tool-renderer-C7mYeUOs.js → session-tool-renderer-DEABxZG3.js} +25 -25
  45. package/dist/web/client/assets/{session-tree-panel-By9m9tGB.js → session-tree-panel-5QgMvXoX.js} +1 -1
  46. package/dist/web/client/assets/settings-dialog-DiikSLhF.js +1 -0
  47. package/dist/web/client/assets/sparkles-CASAe1AI.js +1 -0
  48. package/dist/web/client/assets/{subagent-chat-panel-DsPmLZSf.js → subagent-chat-panel-R2RoX1Yt.js} +1 -1
  49. package/dist/web/client/assets/subagent-transcript-DVZhMo7a.js +1 -0
  50. package/dist/web/client/assets/{subagents-panel-gQ9BLfV3.js → subagents-panel-CMMRUP8F.js} +1 -1
  51. package/dist/web/client/assets/switch-BrxDfsX6.js +1 -0
  52. package/dist/web/client/assets/toast-BNWkgZ0u.js +1 -0
  53. package/dist/web/client/assets/{tool-output-normalizer-CADgEiI4.js → tool-output-normalizer-DDU09Zc6.js} +1 -1
  54. package/dist/web/client/assets/tool-part-normalizer-CF6bmJ0s.js +4 -0
  55. package/dist/web/client/assets/tool-result-7qREIVv_.js +5 -0
  56. package/dist/web/client/assets/tool-timeline-CGhwMeNl.js +2 -0
  57. package/dist/web/client/assets/trash-sm2UyOxe.js +1 -0
  58. package/dist/web/client/assets/types-gIgIxnnG.js +1 -0
  59. package/dist/web/client/assets/useNavigate-CVhM7pag.js +1 -0
  60. package/dist/web/client/assets/useRender-CzJUrRlB.js +1 -0
  61. package/dist/web/client/assets/useScrollLock-BcsteNzT.js +1 -0
  62. package/dist/web/client/assets/with-selector-B_VDO56x.js +1 -0
  63. package/dist/web/client/bundle-budget.json +6 -6
  64. package/dist/web/server/{_tanstack-start-manifest_v-BiNPG4xt-BZTMSM2I.js → _tanstack-start-manifest_v-B6ne-00G-OFX7UD4K.js} +44 -23
  65. package/dist/web/server/agents-BwzqhPjK-ANFHE5AG.js +22 -0
  66. package/dist/web/server/agents-page-DEqPV-eG-BR5MR74O.js +215 -0
  67. package/dist/web/server/{artifacts-panel-CqGBNU4q-UHNMC7PK.js → artifacts-panel-DLO8OfXb-B2ZWCDFP.js} +27 -17
  68. package/dist/web/server/{chat-command-palette-B94-zIEz-ES2ZB4ZF.js → chat-command-palette-CaDQAMAu-KDH7BTDS.js} +22 -13
  69. package/dist/web/server/chunk-2ETDIMNM.js +40 -0
  70. package/dist/web/server/{chunk-2VKVSL6Y.js → chunk-35RIM6VP.js} +128 -127
  71. package/dist/web/server/{chunk-SI5IQSG4.js → chunk-5IE54MRG.js} +8 -7
  72. package/dist/web/server/chunk-5MOXRFX6.js +826 -0
  73. package/dist/web/server/{chunk-FB2QLQTN.js → chunk-6AFVCERK.js} +12 -13
  74. package/dist/web/server/chunk-6GYLXDX3.js +588 -0
  75. package/dist/web/server/chunk-7DQQMT5V.js +8993 -0
  76. package/dist/web/server/chunk-APOS34PW.js +8965 -0
  77. package/dist/web/server/{chunk-YQO36OP6.js → chunk-AXN2OBPF.js} +2 -4
  78. package/dist/web/server/{chunk-E6T36NM5.js → chunk-B5FKCW75.js} +36 -353
  79. package/dist/web/server/chunk-BD7YKYWL.js +1007 -0
  80. package/dist/web/server/{chunk-BAHZXA4D.js → chunk-BZ2EAUZZ.js} +10 -12
  81. package/dist/web/server/chunk-CE7U5QB2.js +42 -0
  82. package/dist/web/server/{chunk-LTTBT3J7.js → chunk-FNV3WZXL.js} +5 -9
  83. package/dist/web/server/{chunk-2FHYWKDN.js → chunk-FSQWWR2M.js} +46 -16
  84. package/dist/web/server/chunk-FT7HNDR5.js +143 -0
  85. package/dist/web/server/chunk-GNXIDE26.js +44 -0
  86. package/dist/web/server/{chunk-EAKPTSWR.js → chunk-HAFELESQ.js} +5 -7
  87. package/dist/web/server/{chunk-K67IDUAI.js → chunk-HUHUPGHT.js} +42 -32
  88. package/dist/web/server/{chunk-WSK55TKE.js → chunk-KBMRRJQN.js} +96 -10
  89. package/dist/web/server/chunk-KDCSEISZ.js +6890 -0
  90. package/dist/web/server/chunk-KSGGSGOA.js +50 -0
  91. package/dist/web/server/chunk-OO7NBFQQ.js +15 -0
  92. package/dist/web/server/{chunk-EL2JCDAM.js → chunk-PQVTLG3E.js} +9 -9
  93. package/dist/web/server/{chunk-LQM6QR7S.js → chunk-Q4ECIATK.js} +61 -47
  94. package/dist/web/server/{chunk-CZLGB3NE.js → chunk-R4BS3KYI.js} +2 -4
  95. package/dist/web/server/chunk-RX2ZJARF.js +73 -0
  96. package/dist/web/server/chunk-TOJA3X5N.js +421 -0
  97. package/dist/web/server/chunk-TQ2RECTH.js +193 -0
  98. package/dist/web/server/{chunk-ABMGW6QH.js → chunk-TTNONWZZ.js} +15871 -15660
  99. package/dist/web/server/chunk-TXZDDJCT.js +5115 -0
  100. package/dist/web/server/{chunk-SGAQVAYL.js → chunk-UDUG3MYZ.js} +2 -2
  101. package/dist/web/server/{chunk-5GUEYYYO.js → chunk-V2GCVTDP.js} +4583 -13665
  102. package/dist/web/server/{chunk-OAYEN3JV.js → chunk-VDEUVEWL.js} +2253 -1
  103. package/dist/web/server/chunk-VM3U6PUU.js +769 -0
  104. package/dist/web/server/connectors-C0xm91Ss-DJVBGD73.js +22 -0
  105. package/dist/web/server/connectors-page-B6tJNZ6c-R5K4NSAT.js +66 -0
  106. package/dist/web/server/{create-project-dialog-CFPX6Ihl-EO4XTINS.js → create-project-dialog-PFPHHWIV-GH7JR5IK.js} +25 -14
  107. package/dist/web/server/{fork-picker-dialog-B2RBFzoZ-R6GXPSPL.js → fork-picker-dialog-DFpKOdAw-JPLJSYYU.js} +7 -10
  108. package/dist/web/server/{markdown-BvCfOB26-VDH4YOQD.js → markdown-Cc8V9dOF-JTNTJKQU.js} +5 -6
  109. package/dist/web/server/{markdown-code-SYc-BQvp-MR4FXT5C.js → markdown-code-gaRnbgNM-V5LIRYCD.js} +7 -8
  110. package/dist/web/server/{message-queue-D32rLiJo-HEBRGH5B.js → message-queue-nQ2_kU82-KKSLYR4S.js} +7 -14
  111. package/dist/web/server/{model-selector-list-DKzt_xEN-5ZPU6XDY.js → model-selector-list-By_G7_Hr-GXT27BZO.js} +12 -14
  112. package/dist/web/server/{openui-renderer-CeVtOdYl-PY37PCJI.js → openui-renderer-B9D8-Av--LFZP4U5V.js} +20 -13
  113. package/dist/web/server/{prompt-suggestions-CpTK_fHV-Q4ILLZKC.js → prompt-suggestions-B67Uy5Rk-5SMTSIFQ.js} +5 -4
  114. package/dist/web/server/{repl-panel-1kSS1UGd-DDM5ADGZ.js → repl-panel-1kSS1UGd-POXRYDDJ.js} +2 -3
  115. package/dist/web/server/{resources-panel-S4NHlpz7-NF7WYYSR.js → resources-panel-CTzOOKPz-5G6RS2D6.js} +18 -10
  116. package/dist/web/server/router-CnBux_Ld-YTVBMJFL.js +23 -0
  117. package/dist/web/server/routes-BUGzvQoO-WW43X7W2.js +124 -0
  118. package/dist/web/server/server.js +3 -3
  119. package/dist/web/server/{session-activity-panel-Bz2GrdMk-PCOXG46X.js → session-activity-panel-f0d3fCm7-I6L5IKFQ.js} +18 -10
  120. package/dist/web/server/{session-insights-panel-CfMX2NRu-6HWZTTAC.js → session-insights-panel-BiVObm_6-AP4FITT7.js} +2 -12
  121. package/dist/web/server/{session-reasoning-panel-CpiTdyQz-O3B5CDKS.js → session-reasoning-panel-QIt_xjP0-FKJWMNHO.js} +17 -9
  122. package/dist/web/server/session-tool-renderer-Cg_ZPHxS-BNQKNJNZ.js +34 -0
  123. package/dist/web/server/{session-tree-panel-CzkE0RFB-P4KWA7S2.js → session-tree-panel-B--el8O5-NZOZJM5L.js} +18 -11
  124. package/dist/web/server/{settings-dialog-BUgVNpr1-THSYIOZL.js → settings-dialog-D_eJN2ia-W47Y474K.js} +102 -790
  125. package/dist/web/server/{subagent-chat-panel-mw3kEFfK-CDYX7LST.js → subagent-chat-panel-C9nWP21E-D5C2TTYD.js} +23 -15
  126. package/dist/web/server/{subagents-panel-2ZJfYrXG-NDJKHJHD.js → subagents-panel-fAKvBNRG-O7QHXNE2.js} +24 -17
  127. package/dist/web/server/{workspace-panel-xznrPDLt-QCJRZOF3.js → workspace-panel-CZMNMU63-SYOSM3B7.js} +23 -15
  128. package/package.json +1 -1
  129. package/dist/web/client/assets/DialogTitle-RY2UDuCY.js +0 -1
  130. package/dist/web/client/assets/FloatingPortal-XC0MCNnD.js +0 -1
  131. package/dist/web/client/assets/action-swap-BWRUNKQA.js +0 -1
  132. package/dist/web/client/assets/alert-dialog-DGNvg0B1.js +0 -1
  133. package/dist/web/client/assets/artifacts-panel-BGXpKRJ7.js +0 -1
  134. package/dist/web/client/assets/badge-DM06QVqB.js +0 -57
  135. package/dist/web/client/assets/chat-command-palette-PenyaZBw.js +0 -1
  136. package/dist/web/client/assets/create-project-dialog-C00d5yCq.js +0 -1
  137. package/dist/web/client/assets/dialog-zCNOQI63.js +0 -1
  138. package/dist/web/client/assets/globals-BuMuB_ea.css +0 -2
  139. package/dist/web/client/assets/index-BqBdQGWs.js +0 -13
  140. package/dist/web/client/assets/message-queue-sSljtjYz.js +0 -1
  141. package/dist/web/client/assets/mutation-DOi2Qgfa.js +0 -1
  142. package/dist/web/client/assets/notify-Cqdu6EV8.js +0 -1
  143. package/dist/web/client/assets/openui-renderer-BdYTcn-_.js +0 -291
  144. package/dist/web/client/assets/provider-label-QrVOwKBO.js +0 -1
  145. package/dist/web/client/assets/right-panel-context-DHKWoetk.js +0 -1
  146. package/dist/web/client/assets/right-panel-registry-BaLZiKny.js +0 -2
  147. package/dist/web/client/assets/routes-BkFkhfO3.js +0 -16
  148. package/dist/web/client/assets/select-BhV4ikeN.js +0 -1
  149. package/dist/web/client/assets/settings-dialog-Dpt4Ha_m.js +0 -2
  150. package/dist/web/client/assets/sparkles-BwVa9zQJ.js +0 -1
  151. package/dist/web/client/assets/subagent-transcript-CNQ9wGk2.js +0 -1
  152. package/dist/web/client/assets/switch-C7Myu-Dt.js +0 -1
  153. package/dist/web/client/assets/toast-DlbKi6K-.js +0 -1
  154. package/dist/web/client/assets/tool-part-normalizer-CYK62WZM.js +0 -4
  155. package/dist/web/client/assets/tool-result-bjAGZ2qm.js +0 -5
  156. package/dist/web/client/assets/tool-timeline-eNqH1zj7.js +0 -2
  157. package/dist/web/client/assets/types-D5hZ8IyV.js +0 -1
  158. package/dist/web/client/assets/useRender-Bbk_fl72.js +0 -1
  159. package/dist/web/server/chunk-2PAW6K4Q.js +0 -56
  160. package/dist/web/server/chunk-7L5PCCYR.js +0 -2287
  161. package/dist/web/server/chunk-FB3UHLLN.js +0 -49
  162. package/dist/web/server/chunk-OSPDNT7S.js +0 -25404
  163. package/dist/web/server/router-DVKxZik_-254GZAJW.js +0 -30
  164. package/dist/web/server/routes-BTxAklRp-UM7ZTLLP.js +0 -140
  165. package/dist/web/server/session-tool-renderer-BZiOxtt1-T3ZGAQKX.js +0 -26
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{$ as r,Q as i,W as a}from"./FloatingPortal-XC0MCNnD.js";import{t as o}from"./utils-oBThwhjm.js";import{F as s,I as c,M as l,N as u,O as d,a as f,j as p}from"./useButton-CvcmqA2s.js";import{f as m,t as h}from"./createBaseUIEventDetails-DIxvaz-Y.js";import{t as g}from"./useBaseUiId-lKfDDIcw.js";import{t as _}from"./useControlled-CkQSkSv1.js";var v=e(t(),1);function y(e,t){let n=v.useRef(e),r=d(t);l(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var b=`data-valid`,x=`data-invalid`,S={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},C={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},w={valid(e){return e===null?null:e?{[b]:``}:{[x]:``}}},T={invalid:void 0,name:void 0,validityData:{state:S,errors:[],error:``,value:``,initialValue:null},setValidityData:c,disabled:void 0,setTouched:c,setDirty:c,setFilled:c,setFocused:c,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:C,registerFieldControl:c,validation:{getValidationProps:(e,t=s)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:c,getInputControl:()=>null,commit:async()=>{},change:c}},E=v.createContext(T);function D(e=!0){let t=v.useContext(E);if(t.setValidityData===c&&!e)throw Error(p(28));return t}var O=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:c,validationMode:`onSubmit`,submitCountRef:{current:0}});function k(){return v.useContext(O)}var A=v.createContext({controlId:void 0,registerControlId:c,resetControlId:c,labelId:void 0,setLabelId:c,messageIds:[],setMessageIds:c,getDescriptionProps:e=>e});function j(){return v.useContext(A)}function M(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=j(),o=g(),s=u(()=>Symbol()),f=v.useRef(!1),p=v.useRef(!1),m=d(()=>{!f.current||i===c||(f.current=!1,i(s.current,void 0))});return l(()=>{if(!n||i===c){m();return}let e;if(t!==void 0)p.current=!0,e=t;else if(p.current)e=o;else{a();return}if(e===void 0){m();return}f.current=!0,i(s.current,e)},[t,n,i,a,o,s,m]),l(()=>m,[m]),(n?r:void 0)??t??o}function N(e,t,n,r,i=!0,a){let{registerFieldControl:o}=D(),s=u(()=>Symbol());l(()=>{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]),l(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var P=v.forwardRef(function(e,t){let{render:n,className:o,id:s,name:c,value:u,disabled:p=!1,onValueChange:g,defaultValue:b,autoFocus:x=!1,style:S,...C}=e,{state:T,name:E,disabled:O,setTouched:A,setDirty:P,validityData:F,setFocused:I,setFilled:L,validationMode:R,validation:z}=D(),{clearErrors:B,elementRef:V,submitCountRef:H}=k(),U=O||p,W=E??c,G={...T,disabled:U},{labelId:K}=j(),q=M({id:s}),[J]=_({controlled:u,default:b,name:`FieldControl`,state:`value`}),Y=u!==void 0,X=Y?J:void 0,Z=X==null?void 0:String(X),Q=d(()=>z.inputRef.current?.value);N(z.inputRef,q,Z,Q,!U,c),l(()=>{let e=Z??z.inputRef.current?.value;e!==void 0&&L(e!==``)},[Z,z.inputRef,L]),y(Z,()=>{Z!==void 0&&(B(W),P(Z!==(F.initialValue??``)),z.change(Z))});let $=v.useRef(null),ee=i();return l(()=>{x&&$.current===a(r($.current))&&I(!0)},[x,I]),f(`input`,e,{ref:[t,$],state:G,props:[{id:q,disabled:U,name:W,ref:z.inputRef,"aria-labelledby":K,autoFocus:x,...Y?{value:X}:{defaultValue:b},onChange(e){let t=e.currentTarget.value,n=h(m,e.nativeEvent);g?.(t,n),!Y&&(P(t!==(F.initialValue??``)),L(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(B(W),z.change(t)))},onFocus(){I(!0)},onBlur(e){if(A(!0),I(!1),R===`onBlur`){let t=e.currentTarget.value;z.commit(t),Y&&queueMicrotask(()=>{let e=z.inputRef.current?.value;e!==void 0&&e!==t&&e!==(F.initialValue??``)&&z.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){A(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===V.current&&!e.defaultPrevented){let t=e.currentTarget,n=H.current;ee.start(0,()=>{H.current===n&&z.commit(t.value)})}else z.commit(t)}}},C,e=>z.getValidationProps(U,e)],stateAttributesMapping:w})}),F=n(),I=v.forwardRef(function(e,t){return(0,F.jsx)(P,{ref:t,...e})});function L({className:e,type:t,...n}){return(0,F.jsx)(I,{type:t,"data-slot":`input`,className:o(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}export{k as a,w as c,j as i,y as l,N as n,D as o,M as r,S as s,L as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-oBThwhjm.js";import{F as i,I as a,M as o,N as s,O as c,a as l,j as u}from"./useButton-CvcmqA2s.js";import{f as d,t as f}from"./createBaseUIEventDetails-DIxvaz-Y.js";import{$ as p,Q as m,W as h}from"./FloatingPortal-D8-EPDs2.js";import{t as g}from"./useBaseUiId-lKfDDIcw.js";import{t as _}from"./useControlled-CkQSkSv1.js";var v=e(t(),1);function y(e,t){let n=v.useRef(e),r=c(t);o(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}var b=`data-valid`,x=`data-invalid`,S={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},C={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},w={valid(e){return e===null?null:e?{[b]:``}:{[x]:``}}},T={invalid:void 0,name:void 0,validityData:{state:S,errors:[],error:``,value:``,initialValue:null},setValidityData:a,disabled:void 0,setTouched:a,setDirty:a,setFilled:a,setFocused:a,validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:C,registerFieldControl:a,validation:{getValidationProps:(e,t=i)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:a,getInputControl:()=>null,commit:async()=>{},change:a}},E=v.createContext(T);function D(e=!0){let t=v.useContext(E);if(t.setValidityData===a&&!e)throw Error(u(28));return t}var O=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:a,validationMode:`onSubmit`,submitCountRef:{current:0}});function k(){return v.useContext(O)}var A=v.createContext({controlId:void 0,registerControlId:a,resetControlId:a,labelId:void 0,setLabelId:a,messageIds:[],setMessageIds:a,getDescriptionProps:e=>e});function j(){return v.useContext(A)}function M(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:l}=j(),u=g(),d=s(()=>Symbol()),f=v.useRef(!1),p=v.useRef(!1),m=c(()=>{!f.current||i===a||(f.current=!1,i(d.current,void 0))});return o(()=>{if(!n||i===a){m();return}let e;if(t!==void 0)p.current=!0,e=t;else if(p.current)e=u;else{l();return}if(e===void 0){m();return}f.current=!0,i(d.current,e)},[t,n,i,l,u,d,m]),o(()=>m,[m]),(n?r:void 0)??t??u}function N(e,t,n,r,i=!0,a){let{registerFieldControl:c}=D(),l=s(()=>Symbol());o(()=>{let o=l.current;if(!i){c(o,void 0);return}c(o,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,i,r,t,a,c,l,n]),o(()=>{let e=l.current;return()=>{c(e,void 0)}},[c,l])}var P=v.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:s,disabled:u=!1,onValueChange:g,defaultValue:b,autoFocus:x=!1,style:S,...C}=e,{state:T,name:E,disabled:O,setTouched:A,setDirty:P,validityData:F,setFocused:I,setFilled:L,validationMode:R,validation:z}=D(),{clearErrors:B,elementRef:V,submitCountRef:H}=k(),U=O||u,W=E??a,G={...T,disabled:U},{labelId:K}=j(),q=M({id:i}),[J]=_({controlled:s,default:b,name:`FieldControl`,state:`value`}),Y=s!==void 0,X=Y?J:void 0,Z=X==null?void 0:String(X),Q=c(()=>z.inputRef.current?.value);N(z.inputRef,q,Z,Q,!U,a),o(()=>{let e=Z??z.inputRef.current?.value;e!==void 0&&L(e!==``)},[Z,z.inputRef,L]),y(Z,()=>{Z!==void 0&&(B(W),P(Z!==(F.initialValue??``)),z.change(Z))});let $=v.useRef(null),ee=m();return o(()=>{x&&$.current===h(p($.current))&&I(!0)},[x,I]),l(`input`,e,{ref:[t,$],state:G,props:[{id:q,disabled:U,name:W,ref:z.inputRef,"aria-labelledby":K,autoFocus:x,...Y?{value:X}:{defaultValue:b},onChange(e){let t=e.currentTarget.value,n=f(d,e.nativeEvent);g?.(t,n),!Y&&(P(t!==(F.initialValue??``)),L(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(B(W),z.change(t)))},onFocus(){I(!0)},onBlur(e){if(A(!0),I(!1),R===`onBlur`){let t=e.currentTarget.value;z.commit(t),Y&&queueMicrotask(()=>{let e=z.inputRef.current?.value;e!==void 0&&e!==t&&e!==(F.initialValue??``)&&z.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){A(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===V.current&&!e.defaultPrevented){let t=e.currentTarget,n=H.current;ee.start(0,()=>{H.current===n&&z.commit(t.value)})}else z.commit(t)}}},C,e=>z.getValidationProps(U,e)],stateAttributesMapping:w})}),F=n(),I=v.forwardRef(function(e,t){return(0,F.jsx)(P,{ref:t,...e})});function L({className:e,type:t,...n}){return(0,F.jsx)(I,{type:t,"data-slot":`input`,className:r(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}export{k as a,y as c,j as i,N as n,D as o,M as r,w as s,L as t};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./utils-oBThwhjm.js";import{t as n}from"./button-CWYjn8Zk.js";import{t as r}from"./dist-BogNzeK9.js";import{t as i}from"./input-7g8_nw-Z.js";var a=e();function o({className:e,...n}){return(0,a.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:t(`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 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),...n})}var s=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 c({className:e,align:n=`inline-start`,...r}){return(0,a.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":n,className:t(s({align:n}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input`)?.focus()},...r})}var l=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 u({className:e,type:r=`button`,variant:i=`ghost`,size:o=`xs`,...s}){return(0,a.jsx)(n,{type:r,"data-size":o,variant:i,className:t(l({size:o}),e),...s})}function d({className:e,...n}){return(0,a.jsx)(i,{"data-slot":`input-group-control`,className:t(`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),...n})}export{d as i,c as n,u as r,o as t};
1
+ import{t as e}from"./jsx-runtime-NZYk81nU.js";import{t}from"./utils-oBThwhjm.js";import{t as n}from"./button-CWYjn8Zk.js";import{t as r}from"./dist-BogNzeK9.js";import{t as i}from"./input-CBoTMPC_.js";var a=e();function o({className:e,...n}){return(0,a.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:t(`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 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),...n})}var s=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 c({className:e,align:n=`inline-start`,...r}){return(0,a.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":n,className:t(s({align:n}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`[data-slot='input-group-control'], input`)?.focus()},...r})}var l=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 u({className:e,type:r=`button`,variant:i=`ghost`,size:o=`xs`,...s}){return(0,a.jsx)(n,{type:r,"data-size":o,variant:i,className:t(l({size:o}),e),...s})}function d({className:e,...n}){return(0,a.jsx)(i,{"data-slot":`input-group-control`,className:t(`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),...n})}export{d as i,c as n,u as r,o as t};
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-oBThwhjm.js";import{t as i}from"./select-DYh951qi.js";import{t as a}from"./createLucideIcon-CQY2ECfR.js";import{t as o}from"./loader-circle-BmKYM_C4.js";import{t as s}from"./plug-wCz-036u.js";import{t as c}from"./plus-DUP2JPVG.js";import{t as l}from"./rotate-ccw-DLkfsmG9.js";import{t as u}from"./trash-sm2UyOxe.js";import{t as d}from"./button-CWYjn8Zk.js";import{n as f,t as p}from"./alert-CzWGeumf.js";import{t as m}from"./input-CBoTMPC_.js";import{a as h,n as g,r as _,t as v}from"./switch-BrxDfsX6.js";import{f as y,o as b}from"./tokens-DinEQBG4.js";import{t as x}from"./spinner-B5TaKP7k.js";import{t as S}from"./notify-BIL0-CGy.js";var C={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};C.node;var w=a(C),T=e(t(),1),E=n();function D({className:e,interactive:t,padding:n,tone:i,...a}){return(0,E.jsx)(`div`,{className:r(y({interactive:t,padding:n,tone:i}),e),...a})}function O({icon:e,title:t,subtitle:n,trailing:i,className:a,interactive:o=!0,tone:s=`default`,truncateSubtitle:c=!0,truncateTitle:l=!0}){return(0,E.jsxs)(D,{tone:s,padding:`md`,interactive:o,className:r(`items-center gap-3`,a),children:[e?(0,E.jsx)(`div`,{className:`flex size-8 shrink-0 items-center justify-center rounded-md border border-border/40 bg-background/60 text-foreground/70`,children:e}):null,(0,E.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,E.jsx)(`div`,{className:r(`text-sm font-medium text-foreground`,l&&`truncate`),children:t}),n?(0,E.jsx)(`div`,{className:r(`mt-0.5 text-xs text-muted-foreground`,c?`truncate`:`leading-normal`),children:n}):null]}),i?(0,E.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:i}):null]})}function k({actions:e,children:t,description:n,title:r}){return(0,E.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,E.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,E.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,E.jsx)(`h3`,{className:`text-lg font-medium text-balance`,children:r}),(0,E.jsx)(`p`,{className:`mt-1 text-sm text-pretty text-muted-foreground`,children:n})]}),e?(0,E.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5 pt-0.5`,children:e}):null]}),(0,E.jsx)(`div`,{className:`flex flex-col gap-3`,children:t})]})}function A({dirty:e,disabled:t,onRevert:n,onSave:i,saving:a}){return(0,E.jsxs)(E.Fragment,{children:[e?(0,E.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-compact`,className:`text-muted-foreground transition-transform active:scale-[0.96]`,disabled:t||a,onClick:n,"aria-label":`Revert changes`,children:(0,E.jsx)(l,{})}):null,(0,E.jsxs)(d,{type:`button`,variant:`outline`,size:`compact`,className:r(b,`transition-transform active:scale-[0.96]`,e&&`border-primary/30 text-primary`),disabled:!e||t||a,onClick:i,children:[a?(0,E.jsx)(o,{className:`animate-spin`,"data-icon":`inline-start`}):(0,E.jsx)(w,{"data-icon":`inline-start`}),`Commit`]})]})}function j({className:e,...t}){return(0,E.jsx)(`textarea`,{"data-slot":`textarea`,className:r(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function M(e){switch(e.status){case`connected`:return`Connected`;case`anonymous`:return`Available without sign-in`;case`needs_auth`:return`Sign-in required`;case`disabled`:return`Disabled`;default:return e.status}}function N(e){let t=e.transport===`http`?e.url:e.commandPreview;return[e.source===`builtin`?`Built-in`:`User`,e.transport===`http`?`HTTP`:`stdio`,M(e),t].filter(e=>!!e).join(` · `)}function P({connections:e,description:t=`Connect built-in and user MCP servers. Tokens stay on the server; this list only shows status and environment-variable names.`,isLoading:n,isPending:r,onOAuth:a,onRemove:o,onUpsert:l,title:y=`MCP`}){let[b,C]=(0,T.useState)(!1),[w,D]=(0,T.useState)(`http`),[A,M]=(0,T.useState)(``),[P,F]=(0,T.useState)(``),[I,L]=(0,T.useState)(!0),[R,z]=(0,T.useState)(``),[B,V]=(0,T.useState)(``),[H,U]=(0,T.useState)(``),[W,G]=(0,T.useState)(``),[K,q]=(0,T.useState)(``),[J,Y]=(0,T.useState)(null),X=()=>{M(``),F(``),L(!0),z(``),V(``),U(``),G(``),q(``),D(`http`),C(!1)},Z=async()=>{if(!l)return;let e=A.trim();try{if(w===`http`)await l({name:e,transport:`http`,url:P.trim(),...!I&&R.trim()?{bearerTokenEnvVar:R.trim()}:{oauth:!0},force:!0});else{let t=H.split(/\s+/).map(e=>e.trim()).filter(Boolean),n=K.split(`
2
+ `).map(e=>e.trim()).filter(Boolean).flatMap(e=>{let t=e.indexOf(`=`);if(t<=0)return[];let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();return!n||!r?[]:[{child:n,source:r}]});await l({name:e,transport:`stdio`,command:B.trim(),...t.length>0?{args:t}:{},...W.trim()?{cwd:W.trim()}:{},...n.length>0?{env:n}:{},force:!0})}S.success(`MCP connection saved`),X()}catch(e){S.error(e instanceof Error?e.message:`Could not save MCP connection`)}},Q=async e=>{if(o)try{await o({name:e}),S.success(`Removed ${e}`),Y(null)}catch(e){S.error(e instanceof Error?e.message:`Could not remove MCP connection`)}},$=async e=>{if(a)try{await a({name:e,action:`logout`}),S.success(`Signed out of ${e}`)}catch(e){S.error(e instanceof Error?e.message:`Could not sign out`)}};return(0,E.jsxs)(k,{title:y,description:t,actions:(0,E.jsxs)(d,{type:`button`,size:`compact`,variant:`outline`,disabled:r||b,onClick:()=>C(!0),children:[(0,E.jsx)(c,{"data-icon":`inline-start`}),`Add server`]}),children:[n?(0,E.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,E.jsx)(x,{className:`size-3.5`}),`Loading MCP connections…`]}):null,b?(0,E.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-xl border p-4`,children:[(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`Name`}),(0,E.jsx)(m,{value:A,onChange:e=>M(e.target.value),"aria-label":`MCP server name`})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`Transport`}),(0,E.jsx)(i,{value:w,onValueChange:e=>D(e),options:[{label:`HTTP`,value:`http`},{label:`stdio`,value:`stdio`}]})]}),w===`http`?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`URL`}),(0,E.jsx)(m,{value:P,onChange:e=>F(e.target.value),"aria-label":`MCP server URL`})]}),(0,E.jsxs)(g,{orientation:`horizontal`,className:`items-center justify-between`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(h,{children:`OAuth`}),(0,E.jsx)(_,{children:`Sign in from Prime Agent's terminal after saving this server.`})]}),(0,E.jsx)(v,{checked:I,onCheckedChange:e=>{L(e),e&&z(``)},"aria-label":`Use OAuth`})]}),I?null:(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`Bearer token environment variable`}),(0,E.jsx)(m,{value:R,onChange:e=>z(e.target.value),"aria-label":`Bearer token environment variable`,placeholder:`MCP_BEARER_TOKEN`})]})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`Command`}),(0,E.jsx)(m,{value:B,onChange:e=>V(e.target.value),"aria-label":`MCP command`})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`Arguments`}),(0,E.jsx)(m,{value:H,onChange:e=>U(e.target.value),"aria-label":`MCP command arguments`})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`Working directory`}),(0,E.jsx)(m,{value:W,onChange:e=>G(e.target.value),"aria-label":`MCP working directory`}),(0,E.jsx)(_,{children:`Must stay inside the current workspace.`})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(h,{children:`Environment mappings`}),(0,E.jsx)(j,{value:K,onChange:e=>q(e.target.value),"aria-label":`MCP environment mappings`,placeholder:`CHILD=SOURCE`}),(0,E.jsx)(_,{children:`One CHILD=SOURCE pair per line. Only variable names are stored.`})]})]}),(0,E.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,E.jsx)(d,{type:`button`,size:`compact`,variant:`ghost`,onClick:X,children:`Cancel`}),(0,E.jsxs)(d,{type:`button`,size:`compact`,disabled:r||!A.trim(),onClick:()=>void Z(),children:[r?(0,E.jsx)(x,{"data-icon":`inline-start`}):null,`Save`]})]})]}):null,!n&&e.length===0&&!b?(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No MCP connections yet.`}):null,(0,E.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map(e=>(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsx)(O,{icon:(0,E.jsx)(s,{className:`size-4`}),title:e.label,subtitle:N(e),trailing:(0,E.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[e.usesOAuth&&e.status!==`needs_auth`?(0,E.jsx)(d,{type:`button`,size:`compact`,variant:`ghost`,disabled:r||!a,onClick:()=>{$(e.name)},children:`Sign out`}):null,e.source===`user`?J===e.name?(0,E.jsx)(d,{type:`button`,size:`compact`,variant:`destructive`,disabled:r,onClick:()=>{Q(e.name)},children:`Confirm remove`}):(0,E.jsx)(d,{type:`button`,size:`compact`,variant:`ghost`,disabled:r||!o,"aria-label":`Remove ${e.name}`,onClick:()=>Y(e.name),children:(0,E.jsx)(u,{className:`size-3.5`})}):null]})}),e.error?(0,E.jsx)(p,{className:`px-3 py-2`,children:(0,E.jsx)(f,{className:`text-xs text-pretty`,children:e.error})}):null,e.usesOAuth&&e.status===`needs_auth`?(0,E.jsx)(p,{className:`px-3 py-2`,children:(0,E.jsxs)(f,{className:`text-xs text-pretty`,children:[`MCP OAuth sign-in from Fleet settings is unavailable. Launch Prime Agent in a terminal using the same configuration directory as Fleet and complete sign-in for `,e.label,` there. Restart Fleet afterward to reload the credentials.`]})}):null]},`${e.source}:${e.name}`))})]})}export{D as a,O as i,A as n,k as r,P as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-oBThwhjm.js";import{t as i}from"./pencil-Cbgq3ybX.js";import{t as a}from"./x-DEU6H3M-.js";import{t as o}from"./tokens-DinEQBG4.js";import{t as s}from"./notify-BIL0-CGy.js";var c=e(t(),1),l=n(),u=[{key:`steering`,label:`Next`},{key:`followUp`,label:`After run`}];function d(e,t){return`${e}:${t}`}function f({queue:e,onDelete:t,onEdit:n,className:f}){let p=e.steering.length+e.followUp.length,[m,h]=(0,c.useState)(null),[g,_]=(0,c.useState)(``);if(p===0)return null;let v=()=>{h(null),_(``)},y=(e,t,n)=>{h(d(e,t)),_(n)},b=async(e,n,r)=>{m===d(e,n)&&v();try{await t?.(e,n,r)===!1&&s.error(`Unable to remove queued message`)}catch{s.error(`Unable to remove queued message`)}},x=async(e,t,r)=>{let i=g.trim();if(i.length===0){await b(e,t,r);return}if(i===r){v();return}try{await n?.(e,t,r,i)===!1?s.error(`Unable to update queued message`):v()}catch{s.error(`Unable to update queued message`)}};return(0,l.jsx)(`section`,{"aria-label":`Queued messages`,className:r(o,`mb-2`,f),children:(0,l.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-muted/30 p-2`,children:[(0,l.jsxs)(`div`,{className:`mb-1 flex items-baseline justify-between px-1 text-xs text-muted-foreground`,children:[(0,l.jsxs)(`span`,{children:[p,` queued`]}),(0,l.jsx)(`span`,{children:`Sent when the run reaches its lane`})]}),(0,l.jsx)(`div`,{className:`space-y-1`,children:u.flatMap(({key:r,label:o})=>e[r].map((e,s)=>{let c=d(r,s);return(0,l.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 rounded-lg bg-background/80 px-2 py-1.5 text-sm`,children:[(0,l.jsx)(`span`,{className:`mt-0.5 shrink-0 text-micro font-medium uppercase tracking-wide text-muted-foreground`,children:o}),m===c?(0,l.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,l.jsx)(`textarea`,{value:g,onChange:e=>_(e.target.value),onKeyDown:t=>{if(t.key===`Escape`){t.preventDefault(),v();return}t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),x(r,s,e))},"aria-label":`Edit queued message: ${e}`,rows:2,className:`min-h-10 w-full resize-y rounded-md border border-border/70 bg-background px-2 py-1 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,autoFocus:!0}),(0,l.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[(0,l.jsx)(`button`,{type:`button`,onClick:()=>void x(r,s,e),className:`rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:`Save`}),(0,l.jsx)(`button`,{type:`button`,onClick:v,className:`rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:`Cancel`})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-foreground/80`,children:e}),(0,l.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[n?(0,l.jsx)(`button`,{type:`button`,"aria-label":`Edit queued message: ${e}`,onClick:()=>y(r,s,e),className:`grid size-6 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,l.jsx)(i,{className:`size-3.5`})}):null,t?(0,l.jsx)(`button`,{type:`button`,"aria-label":`Remove queued message: ${e}`,onClick:()=>void b(r,s,e),className:`grid size-6 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:(0,l.jsx)(a,{className:`size-3.5`})}):null]})]})]},`${r}:${s}:${e}`)}))})]})})}export{f as MessageQueue};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-oBThwhjm.js";import{a as i,u as a}from"./ease-DYVhTl2n.js";import{t as o}from"./check-BTwIaCtI.js";import{t as s}from"./gauge-0Nn96wfZ.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./command-imgUMV3r.js";var m=e(t(),1),h=n();function g(e,t,n){return Math.min(n,Math.max(t,e))}function _({value:e,onChange:t,min:n=0,max:o=100,step:s=1,label:c,formatValue:l=String,disabled:u=!1,className:d,...f}){let p=(0,m.useId)(),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=Math.max(n,o),S=Math.max(2**-52,s),C=g(e,n,x),w=x===n?0:(C-n)/(x-n),T=w*100,E=w===0?8:0,D=`calc(${T}% + ${20-20*w-E*2.5}px)`,O=`calc(${T}% + ${11-24*w}px)`,k=20-20*w-E*2.5,A=`linear-gradient(to right, transparent calc(${T}% + ${k}px), black calc(${T}% + ${k+2}px))`,j=(0,m.useMemo)(()=>{let e=Math.floor((x-n)/S),t=Array.from({length:e+1},(e,t)=>n+t*S);return t.at(-1)!==x&&t.push(x),t},[n,x,S]),M=l(C),N=l(x),P=(e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0||x===n)return n;let i=n+g((e-r.left)/r.width,0,1)*(x-n);return g(n+Math.round((i-n)/S)*S,n,x)},F=e=>{let r=!0,i=e.key===`ArrowRight`||e.key===`ArrowUp`?1:e.key===`ArrowLeft`||e.key===`ArrowDown`?-1:0;i===0?e.key===`Home`?(e.preventDefault(),t(n)):e.key===`End`?(e.preventDefault(),t(x)):r=!1:(e.preventDefault(),t(g(C+i*S,n,x))),r&&e.stopPropagation()};return(0,h.jsx)(`div`,{className:r(`relative w-full touch-none`,u&&`opacity-50`,d),...f,children:(0,h.jsxs)(`div`,{className:r(`relative h-8 w-full select-none touch-none overflow-hidden rounded-md border border-border bg-background outline-offset-2 transition-colors duration-150`,y&&!u&&`border-foreground/25`,_&&`border-foreground/40 ring-2 ring-ring/60 ring-offset-1 ring-offset-background`),onPointerEnter:()=>b(!0),onPointerLeave:()=>b(!1),onPointerDown:e=>{u||t(P(e.clientX,e.currentTarget))},children:[(0,h.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 z-[1] flex items-center justify-between px-3 pointer-events-none`,style:{WebkitMaskImage:A,maskImage:A},children:j.map(e=>(0,h.jsx)(a.span,{className:`relative flex size-[5px] items-center justify-center rounded-full`,animate:{backgroundColor:e===C?`var(--foreground)`:`var(--muted-foreground)`,opacity:e===C?1:.3},transition:i},e))}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:`absolute inset-y-0 left-0 z-[3] pointer-events-none bg-foreground/[0.08]`,layout:`size`,style:{width:D},transition:i}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:r(`absolute z-[3] w-0.5 rounded-full pointer-events-none`),layout:!0,style:{left:O,top:y||_?7:8,bottom:y||_?7:8},animate:{backgroundColor:_?`var(--foreground)`:y?`color-mix(in srgb, var(--foreground) 50%, transparent)`:`color-mix(in srgb, var(--foreground) 25%, transparent)`},transition:i}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-[2] flex items-center px-2`,children:[c?(0,h.jsx)(`span`,{className:`px-2 text-body text-transparent select-none`,"aria-hidden":`true`,children:c}):null,(0,h.jsx)(`span`,{className:`ml-auto px-2 text-body text-transparent tabular-nums select-none`,style:{minWidth:`${N.length}ch`},"aria-hidden":`true`,children:N})]}),(0,h.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-[4] flex items-center px-2 text-body`,children:[c?(0,h.jsx)(a.span,{className:`px-2`,animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:c}):null,(0,h.jsx)(a.span,{className:`ml-auto px-2 tabular-nums`,style:{minWidth:`${N.length}ch`,textAlign:`right`},animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:M})]}),(0,h.jsx)(`input`,{id:p,type:`range`,min:n,max:x,step:S,value:C,disabled:u,"aria-label":c??`Slider`,"aria-valuetext":M,onChange:e=>t(Number(e.currentTarget.value)),onFocus:()=>v(!0),onBlur:()=>v(!1),onKeyDown:F,className:`absolute inset-0 z-20 m-0 h-full w-full cursor-ew-resize opacity-0 disabled:cursor-not-allowed`})]})})}function v(e){let t=new Map;for(let n of e){let e=t.get(n.provider)??[];e.push(n),t.set(n.provider,e)}return[...t.entries()]}function y({models:e,selectedModel:t,selectedEffort:n,effortLabel:r,onModelChange:i,onEffortChange:a}){let g=(0,m.useMemo)(()=>v(e),[e]);return(0,h.jsxs)(p,{className:`min-h-0 max-h-[min(55dvh,28rem)] bg-transparent`,shouldFilter:!0,children:[(0,h.jsx)(c,{placeholder:`Search models…`,"aria-label":`Search models`}),(0,h.jsxs)(f,{className:`max-h-48 min-h-0 flex-1 p-1.5`,children:[(0,h.jsx)(d,{children:e.length===0?`No models added yet. Add models in Settings → LLM Models.`:`No matching models`}),g.map(([e,n])=>(0,h.jsx)(l,{heading:n[0]?.providerLabel??e,children:n.map(e=>{let n=[e.id,e.name,e.provider,e.providerLabel,e.modelId,...e.keywords??[]].filter(Boolean).join(` `),r=e.id===t?.id;return(0,h.jsxs)(u,{value:n,disabled:e.disabled,onSelect:()=>{e.disabled||i?.(e.id)},className:`items-start gap-2 rounded-lg px-2.5 py-2`,children:[(0,h.jsx)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground`,children:e.icon??(0,h.jsx)(s,{"aria-hidden":`true`,className:`size-4`})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),e.disabled?(0,h.jsx)(`span`,{className:`shrink-0 text-micro uppercase tracking-wide text-muted-foreground`,children:`Unavailable`}):null]}),(0,h.jsxs)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground`,children:[e.modelId??e.id,e.reasoning?` · reasoning`:``]}),e.description?(0,h.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground/80`,children:e.description}):null]}),r?(0,h.jsx)(o,{"aria-hidden":`true`,className:`mt-1 size-4 shrink-0`}):null]},e.id)})},e))]}),t?.reasoning&&t.efforts?.length?(0,h.jsx)(`div`,{className:`shrink-0 border-t border-border/70 p-2`,children:(0,h.jsx)(_,{label:r,value:Math.max(0,t.efforts.findIndex(e=>e.id===n?.id)),onChange:e=>{let n=t.efforts?.[Math.round(e)];n&&!n.disabled&&a?.(n.id)},min:0,max:Math.max(0,t.efforts.length-1),formatValue:e=>t.efforts?.[Math.round(e)]?.name??``})}):null]})}export{y as ModelSelectorList};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./utils-oBThwhjm.js";import{a as i,u as a}from"./ease-DYVhTl2n.js";import{t as o}from"./check-BTwIaCtI.js";import{t as s}from"./gauge-0Nn96wfZ.js";import{a as c,i as l,o as u,r as d,s as f,t as p}from"./command-xo-NK4xO.js";var m=e(t(),1),h=n();function g(e,t,n){return Math.min(n,Math.max(t,e))}function _({value:e,onChange:t,min:n=0,max:o=100,step:s=1,label:c,formatValue:l=String,disabled:u=!1,className:d,...f}){let p=(0,m.useId)(),[_,v]=(0,m.useState)(!1),[y,b]=(0,m.useState)(!1),x=Math.max(n,o),S=Math.max(2**-52,s),C=g(e,n,x),w=x===n?0:(C-n)/(x-n),T=w*100,E=w===0?8:0,D=`calc(${T}% + ${20-20*w-E*2.5}px)`,O=`calc(${T}% + ${11-24*w}px)`,k=20-20*w-E*2.5,A=`linear-gradient(to right, transparent calc(${T}% + ${k}px), black calc(${T}% + ${k+2}px))`,j=(0,m.useMemo)(()=>{let e=Math.floor((x-n)/S),t=Array.from({length:e+1},(e,t)=>n+t*S);return t.at(-1)!==x&&t.push(x),t},[n,x,S]),M=l(C),N=l(x),P=(e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0||x===n)return n;let i=n+g((e-r.left)/r.width,0,1)*(x-n);return g(n+Math.round((i-n)/S)*S,n,x)},F=e=>{let r=!0,i=e.key===`ArrowRight`||e.key===`ArrowUp`?1:e.key===`ArrowLeft`||e.key===`ArrowDown`?-1:0;i===0?e.key===`Home`?(e.preventDefault(),t(n)):e.key===`End`?(e.preventDefault(),t(x)):r=!1:(e.preventDefault(),t(g(C+i*S,n,x))),r&&e.stopPropagation()};return(0,h.jsx)(`div`,{className:r(`relative w-full touch-none`,u&&`opacity-50`,d),...f,children:(0,h.jsxs)(`div`,{className:r(`relative h-8 w-full select-none touch-none overflow-hidden rounded-md border border-border bg-background outline-offset-2 transition-colors duration-150`,y&&!u&&`border-foreground/25`,_&&`border-foreground/40 ring-2 ring-ring/60 ring-offset-1 ring-offset-background`),onPointerEnter:()=>b(!0),onPointerLeave:()=>b(!1),onPointerDown:e=>{u||t(P(e.clientX,e.currentTarget))},children:[(0,h.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 z-[1] flex items-center justify-between px-3 pointer-events-none`,style:{WebkitMaskImage:A,maskImage:A},children:j.map(e=>(0,h.jsx)(a.span,{className:`relative flex size-[5px] items-center justify-center rounded-full`,animate:{backgroundColor:e===C?`var(--foreground)`:`var(--muted-foreground)`,opacity:e===C?1:.3},transition:i},e))}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:`absolute inset-y-0 left-0 z-[3] pointer-events-none bg-foreground/[0.08]`,layout:`size`,style:{width:D},transition:i}),(0,h.jsx)(a.div,{"aria-hidden":`true`,className:r(`absolute z-[3] w-0.5 rounded-full pointer-events-none`),layout:!0,style:{left:O,top:y||_?7:8,bottom:y||_?7:8},animate:{backgroundColor:_?`var(--foreground)`:y?`color-mix(in srgb, var(--foreground) 50%, transparent)`:`color-mix(in srgb, var(--foreground) 25%, transparent)`},transition:i}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-[2] flex items-center px-2`,children:[c?(0,h.jsx)(`span`,{className:`px-2 text-body text-transparent select-none`,"aria-hidden":`true`,children:c}):null,(0,h.jsx)(`span`,{className:`ml-auto px-2 text-body text-transparent tabular-nums select-none`,style:{minWidth:`${N.length}ch`},"aria-hidden":`true`,children:N})]}),(0,h.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-[4] flex items-center px-2 text-body`,children:[c?(0,h.jsx)(a.span,{className:`px-2`,animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:c}):null,(0,h.jsx)(a.span,{className:`ml-auto px-2 tabular-nums`,style:{minWidth:`${N.length}ch`,textAlign:`right`},animate:{color:y||_?`var(--foreground)`:`var(--muted-foreground)`},transition:i,children:M})]}),(0,h.jsx)(`input`,{id:p,type:`range`,min:n,max:x,step:S,value:C,disabled:u,"aria-label":c??`Slider`,"aria-valuetext":M,onChange:e=>t(Number(e.currentTarget.value)),onFocus:()=>v(!0),onBlur:()=>v(!1),onKeyDown:F,className:`absolute inset-0 z-20 m-0 h-full w-full cursor-ew-resize opacity-0 disabled:cursor-not-allowed`})]})})}function v(e){let t=new Map;for(let n of e){let e=t.get(n.provider)??[];e.push(n),t.set(n.provider,e)}return[...t.entries()]}function y({models:e,selectedModel:t,selectedEffort:n,effortLabel:r,onModelChange:i,onEffortChange:a}){let g=(0,m.useMemo)(()=>v(e),[e]);return(0,h.jsxs)(p,{className:`min-h-0 max-h-[min(55dvh,28rem)] bg-transparent`,shouldFilter:!0,children:[(0,h.jsx)(c,{placeholder:`Search models…`,"aria-label":`Search models`}),(0,h.jsxs)(f,{className:`max-h-48 min-h-0 flex-1 p-1.5`,children:[(0,h.jsx)(d,{children:e.length===0?`No models added yet. Add models in Settings → LLM Models.`:`No matching models`}),g.map(([e,n])=>(0,h.jsx)(l,{heading:n[0]?.providerLabel??e,children:n.map(e=>{let n=[e.id,e.name,e.provider,e.providerLabel,e.modelId,...e.keywords??[]].filter(Boolean).join(` `),r=e.id===t?.id;return(0,h.jsxs)(u,{value:n,disabled:e.disabled,onSelect:()=>{e.disabled||i?.(e.id)},className:`items-start gap-2 rounded-lg px-2.5 py-2`,children:[(0,h.jsx)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground`,children:e.icon??(0,h.jsx)(s,{"aria-hidden":`true`,className:`size-4`})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),e.disabled?(0,h.jsx)(`span`,{className:`shrink-0 text-micro uppercase tracking-wide text-muted-foreground`,children:`Unavailable`}):null]}),(0,h.jsxs)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground`,children:[e.modelId??e.id,e.reasoning?` · reasoning`:``]}),e.description?(0,h.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-muted-foreground/80`,children:e.description}):null]}),r?(0,h.jsx)(o,{"aria-hidden":`true`,className:`mt-1 size-4 shrink-0`}):null]},e.id)})},e))]}),t?.reasoning&&t.efforts?.length?(0,h.jsx)(`div`,{className:`shrink-0 border-t border-border/70 p-2`,children:(0,h.jsx)(_,{label:r,value:Math.max(0,t.efforts.findIndex(e=>e.id===n?.id)),onChange:e=>{let n=t.efforts?.[Math.round(e)];n&&!n.disabled&&a?.(n.id)},min:0,max:Math.max(0,t.efforts.length-1),formatValue:e=>t.efforts?.[Math.round(e)]?.name??``})}):null]})}export{y as ModelSelectorList};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./with-selector-B_VDO56x.js";function i(e){return e[e.length-1]}function a(e,t){return typeof e==`function`?e(t):e}var o=Object.prototype.hasOwnProperty;function s(e){for(let t in e)if(o.call(e,t))return!0;return!1}var c=()=>Object.create(null),l=(e,t)=>u(e,t,!0);function u(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let a=Array.isArray(e)&&Array.isArray(t);if(!a&&!(d(e)&&d(t)))return t;let s=Object.keys(e),l=s.length,f=Object.keys(t),p=f.length;if(a?l!==e.length||p!==t.length||l&&i(s)!==`${l-1}`||p&&i(f)!==`${p-1}`:l!==Object.getOwnPropertyNames(e).length||p!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let m=0,h,g,_;if(a){for(;m<p&&(_=m,g=e[_],h=t[_],h=g===h?g:typeof g==`object`?u(g,h,n,r):h,h===g);m++);if(m===p&&l===p)return e}else{let i=l===p,a=!0;for(;m<p;m++){_=f[m],g=e[_];let c=t[_];h=g===c?g:typeof g==`object`?u(g,c,n,r):c,i&&=h===g&&(s[m]===_||o.call(e,_)),a&&=Object.is(h,c),s[m]=h}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(a)return t}let v=a?f.fill(0):n?c():{};for(let i=0;i<p;i++)_=a?i:f[i],a?(g=e[_],i>m&&(h=t[_],h=g===h?g:typeof g==`object`?u(g,h,n,r):h),v[_]=i<m?g:h):v[_]=s[i];return v}function d(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function f(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!f(a,o,n,r))return!1}return!0}if(d(e)&&d(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!f(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!f(e[a],t[a],n,r)))return!1;return i===0}return!1}function p(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var m=/[\x00-\x1f\x7f"<>`{}]/g;function h(e){return e.replace(m,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function g(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return h(t)}var _=[`http:`,`https:`,`mailto:`,`tel:`];function v(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var y=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function b(e,t){if(!e)return!1;if(y.test(e))return!0;let n=v(e);return n?!t.has(n):!1}var ee={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},te=/[&><\u2028\u2029]/g;function ne(e){return e.replace(te,e=>ee[e])}function re(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=g(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=g(r?e.slice(r):e)}return t}function x(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ie(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function S(e){return e.replace(/\/{2,}/g,`/`)}function C(e){return e===`/`?e:e.replace(/^\/+/,``)}function w(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function T(e){return w(C(e))}function E(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function D(e,t,n=`never`,r){if(t.includes(`//`)&&(t=S(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let a=t===`.`,o;if(r){o=a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else{for(e.includes(`//`)&&(e=S(e)),s=e.split(`/`);s.length>1&&i(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.length>1?s.pop():s=[``]:r===`.`||s.push(r)}}s.length>1&&(i(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=s.join(`/`),l=(a?S(c):c)||`/`;return o&&r&&r.set(o,l),l}function O(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function k(e){return e==null||e===``}function A(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function j(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&k(f)){if(c===`/`&&!d)continue;f=``}o+=c+A(s,f,r)+(d||``)}}return o+a||`/`}var M=`Error preloading route! ☝️`,N=e(t(),1),P=n(),F=()=>!0,I=()=>!1;function ae({children:e,fallback:t=null}){return(0,P.jsx)(N.Fragment,{children:L()?e:t})}function L(e=!0){return N.useSyncExternalStore(oe,F,e?I:F)}function oe(){return()=>{}}var R=N.createContext(null);function se(e){return N.useContext(R)}var ce=e(r(),1);function le(e,t){return e===t}function ue(e,t=e=>e,n){let r=n?.compare??le,i=(0,N.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,N.useCallback)(()=>e.get(),[e]);return(0,ce.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function de(...e){let t=N.useRef(e),n=t.current;return e.forEach((e,t)=>{f(n[t],e,!1,!0)||(n[t]=e)}),t.current}function z(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(M)})}var fe={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function pe(e,t){let n=typeof e==`string`&&v(e);if(n)return t.has(n)?e:null}function me(e,t,n,r,i){let a=E(e.pathname,r),o=E(t.pathname,r);return(n?.exact?a!==o:!(a.startsWith(o)&&(a.length===o.length||a[o.length]===`/`)))||(n?.includeSearch??!0)&&!f(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function he(e,t,n){let r=se(),i=N.useRef(null),a=N.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:m,ignoreBlocker:h,disabled:g,target:_,onClick:y,onBlur:b,onFocus:ee,onMouseEnter:te,onMouseLeave:ne,onTouchStart:re}=e,x=L(!!o?.includeHash),[ie,S,C]=de(e.search,e.params,o),[w,T]=N.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,ie,S,e.state,e.mask,e.unsafeRelative]),E=N.useMemo(()=>{let e=pe(s,r.protocolAllowlist);if(e!==void 0){let t=[e??void 0];return()=>t}let t,n;return e=>{w._fromLocation||(T._fromLocation=e);let i=r.buildLocation(T),a=xe(i,r,g);return(!t||t[0]!==a)&&(t=[a,!(g||a&&!v(a))&&void 0],n=[a,!0]),t[1]!==void 0&&me(e,i,C,r.basepath,x)?n:t}},[C,g,x,w,T,r,s]),[D,O]=ue(r.stores.location,E,fe),k=O===void 0&&D,A=g||D===void 0,j=N.useRef(!1),M=e.reloadDocument||k||A?!1:c??r.options.defaultPreload,P=l??r.options.defaultPreloadDelay??0,F=N.useCallback(e=>{let t=e?.isIntersecting;if(!(t??M===`intent`)){t===!1&&V(i);return}if(!P){z(r,w);return}B.has(i)||B.set(i,setTimeout(()=>{B.delete(i),z(r,w)},P))},[r,w,i,M,P]);N.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,z(r,w));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&F(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),V(i)}},[r,w,M,F,i]);let I=ye(e,n);if(I.ref=t?a:i,k)return I.href=k,I;let ae=e=>{let t=_??e.currentTarget.getAttribute(`target`);!A&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...w,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:m,ignoreBlocker:h}))},oe=()=>{M===`intent`&&z(r,w)},R=()=>{M===`intent`&&V(i)};return I.onClick=H(y,ae),I.onBlur=H(b,R),I.onFocus=H(ee,F),I.onMouseEnter=H(te,F),I.onMouseLeave=H(ne,R),I.onTouchStart=H(re,oe),be(I,e,O,D,A,n)}var ge={},_e={className:`active`},ve=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function ye(e,t){let n={};for(let r in e)ve.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function be(e,t,n,r,i,o){let{activeProps:s,inactiveProps:c,className:l,style:u,target:d}=t,f=a(n?s:c,{})??(n?_e:ge);Object.assign(e,f),e.href=r,o!==`a`&&(e.disabled=i),e.target=d;let p=f.style;(u||p)&&(e.style=u&&p?{...u,...p}:u||p);let m=f.className;return(l||m)&&(e.className=l?m?`${l} ${m}`:l:m),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var B=new WeakMap,V=e=>{clearTimeout(B.get(e)),B.delete(e)},H=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function xe(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!((r.external||i!==r.publicHref)&&b(i,t.protocolAllowlist)))return i}var Se=N.memo(N.forwardRef((e,t)=>{let n=e._asChild||`a`,r=he(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return N.createElement(n,r,i)}),Ce);function Ce(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!ve.has(r)||!f(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var we=N.createContext(void 0),Te=e=>{let t=N.useContext(we);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ee=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,P.jsx)(we.Provider,{value:e,children:t})),De={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},U=new class{#e=De;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Oe(e){setTimeout(e,0)}var ke=typeof window>`u`||`Deno`in globalThis;function W(){}function Ae(e,t){return typeof e==`function`?e(t):e}function je(e){return typeof e==`number`&&e>=0&&e!==1/0}function Me(e,t){return Math.max(e+(t||0)-Date.now(),0)}function G(e,t){return typeof e==`function`?e(t):e}function Ne(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Fe(o,t.options))return!1}else if(!q(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Pe(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(K(t.options.mutationKey)!==K(a))return!1}else if(!q(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Fe(e,t){return(t?.queryKeyHashFn||K)(e)}function K(e){return JSON.stringify(e,(e,t)=>J(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function q(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!q(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!q(e[r],t[r]))return!1;return!0}return!1}var Ie=Object.prototype.hasOwnProperty;function Le(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ze(e)&&ze(t);if(!r&&!(J(e)&&J(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Ie.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Le(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Re(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ze(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function J(e){if(!Be(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!Be(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Be(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ve(e){return new Promise(t=>{U.setTimeout(t,e)})}function He(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Le(e,t)}function Ue(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function We(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Y=Symbol();function Ge(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Y?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ke(e,t){return typeof e==`function`?e(...t):!!e}function qe(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Je=()=>ke,X=()=>Je(),Z=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ye=new class extends Z{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Xe=Oe;function Ze(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Xe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Q=Ze(),$=new class extends Z{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Qe(e){return Math.min(1e3*2**e,3e4)}function $e(e){return(e??`online`)!==`online`||$.isOnline()}var et=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function tt(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(W);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new et(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Ye.isFocused()&&(e.networkMode===`always`||$.isOnline())&&e.canRun(),p=()=>$e(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(X()?0:3),a=e.retryDelay??Qe,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),Ve(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var nt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),je(this.gcTime)&&(this.#e=U.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(X()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(U.clearTimeout(this.#e),this.#e=void 0)}};function rt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{qe(e,()=>t.signal,()=>n=!0)},u=Ge(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?We:Ue;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?at:it,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:it(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function it(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function at(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ot=class extends nt{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=lt(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=lt(this.options);e.data!==void 0&&(this.setState(ct(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=He(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(W).catch(W):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>G(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Y||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>G(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Me(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ge(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?rt(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=tt({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof et&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof et){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...st(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ct(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Q.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function st(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$e(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ct(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function lt(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ut=class extends nt{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||dt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=tt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Q.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function dt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}export{p as $,se as A,w as B,Y as C,Te as D,Ee as E,O as F,f as G,ie as H,j as I,a as J,x as K,D as L,ae as M,L as N,Se as O,S as P,b as Q,T as R,Ke as S,U as T,c as U,_ as V,re as W,s as X,v as Y,o as Z,W as _,$ as a,G as b,Z as c,K as d,i as et,Fe as f,Ne as g,Pe as h,st as i,R as j,ue as k,X as l,je as m,dt as n,y as nt,Q as o,ke as p,ne as q,ot as r,u as rt,Ye as s,ut as t,l as tt,Ae as u,q as v,Me as w,Re as x,He as y,C as z};
@@ -0,0 +1 @@
1
+ import{n as e}from"./toast-BNWkgZ0u.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};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-CQY2ECfR.js";import{y as i}from"./chat-hpzV6IA6.js";var a={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};a.node;var o=r(a),s=e(t(),1),c=(0,s.createContext)(null);function l({children:e,didCatch:t,error:n,resetErrorBoundary:r}){let i=(0,s.useMemo)(()=>({didCatch:t,error:n,resetErrorBoundary:r}),[t,n,r]);return(0,s.createElement)(c.Provider,{value:i},e)}var u={didCatch:!1,error:null},d=class extends s.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=u}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{didCatch:t}=this.state;t&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(u))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.didCatch&&f(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(u))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,s.createElement)(n,e);else if(`fallback`in this.props)o=r;else throw a}return(0,s.createElement)(l,{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary},o)}};function f(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var p=n();function m({error:e,resetErrorBoundary:t}){let n=e instanceof Error?e.message:String(e);return(0,p.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-destructive/20 bg-destructive/5 p-4 text-sm text-destructive`,children:[(0,p.jsx)(`p`,{className:`font-medium`,children:`Unable to render this view`}),(0,p.jsx)(`p`,{className:`text-xs opacity-70`,children:n}),(0,p.jsx)(`button`,{type:`button`,onClick:t,className:`text-destructive-foreground mt-1 rounded-md bg-destructive px-3 py-1 text-xs font-medium transition-opacity hover:opacity-90`,children:`Retry`})]})}function h({children:e,fallback:t,onReset:n,resetKeys:r}){return(0,p.jsx)(d,{FallbackComponent:t?()=>t:m,onReset:n,resetKeys:r,children:e})}var g=new Map([{id:`context`,description:`Show how much of the model's context window the session has used`,handling:`local`,autoExecutable:!0},{id:`session`,description:`Show the current session's identifier and display name`,handling:`local`,autoExecutable:!0},{id:`copy`,description:`Copy the agent's last reply to the clipboard`,handling:`local`,autoExecutable:!0},{id:`share`,description:`Copy the whole conversation transcript to the clipboard`,handling:`local`,autoExecutable:!0},{id:`hotkeys`,description:`Show the keyboard shortcuts`,handling:`local`,autoExecutable:!0},{id:`changelog`,description:`Show what changed in recent Fleet Prime releases`,handling:`local`,autoExecutable:!0},{id:`system-prompt`,description:`Show the exact system prompt sent to the model`,handling:`local`,autoExecutable:!0},{id:`logs`,description:`Show where the runtime's log files are stored`,handling:`local`,autoExecutable:!0},{id:`agents`,description:`List the saved sessions`,handling:`local`,autoExecutable:!0},{id:`traces`,description:`Preview, upload, or configure Fleet Prime traces`,argumentHint:`[status|on|off|preview|upload]`,handling:`local`,autoExecutable:!1},{id:`model`,description:`Switch which AI model answers, or open the model picker`,argumentHint:`[provider/id]`,handling:`local`,autoExecutable:!1},{id:`effort`,description:`Set how much reasoning effort the model spends, or open the effort picker`,argumentHint:`[level]`,handling:`local`,autoExecutable:!1},{id:`fast`,description:`Toggle fast mode`,handling:`local`,autoExecutable:!1},{id:`settings`,description:`Open the app's Settings`,handling:`local`,autoExecutable:!1},{id:`mcp`,description:`Open the MCP server connections in Settings`,handling:`local`,autoExecutable:!1},{id:`export`,description:`Export the session to a file`,argumentHint:`[path]`,handling:`local`,autoExecutable:!1},{id:`name`,description:`Rename the current session`,argumentHint:`[name]`,handling:`local`,autoExecutable:!1},{id:`tree`,description:`Show the session's branch tree so another branch can be selected`,handling:`local`,autoExecutable:!1},{id:`fork`,description:`Create a new session forked from an earlier user message`,argumentHint:`[message-entry-id]`,handling:`local`,autoExecutable:!1},{id:`clone`,description:`Duplicate the current session at its current position`,handling:`local`,autoExecutable:!1},{id:`login`,description:`Open provider sign-in`,handling:`local`,autoExecutable:!1},{id:`logout`,description:`Open provider sign-out`,handling:`local`,autoExecutable:!1},{id:`reload`,description:`Reload keybindings, extensions, skills, prompts, and themes`,handling:`local`,autoExecutable:!1},{id:`new`,description:`Start a new chat session`,handling:`local`,autoExecutable:!1},{id:`compact`,description:`Compact the session context to free room in the model's context window`,argumentHint:`[instructions]`,handling:`session`,autoExecutable:!1},{id:`goal`,description:`Set or view a persistent goal for the session`,argumentHint:`[objective]`,handling:`session`,autoExecutable:!1}].map(e=>[e.id,e]));function _(e){return e===void 0?void 0:g.get(e)}var v=`fleet-prime:open-panel:`;function y(e){return`${v}${JSON.stringify(e)}`}function b(e){if(e.startsWith(v))try{return i.parse(JSON.parse(e.slice(23)))}catch{return}}export{o as a,h as i,y as n,_ as r,b as t};