@shepai/cli 1.155.0 → 1.156.0-pr488.8a7af1c

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 (161) hide show
  1. package/README.md +258 -161
  2. package/package.json +1 -1
  3. package/web/.next/BUILD_ID +1 -1
  4. package/web/.next/build-manifest.json +2 -2
  5. package/web/.next/fallback-build-manifest.json +2 -2
  6. package/web/.next/prerender-manifest.json +3 -3
  7. package/web/.next/required-server-files.js +3 -3
  8. package/web/.next/required-server-files.json +3 -3
  9. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  10. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  11. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  12. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +26 -26
  13. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  14. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +29 -29
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  17. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  18. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  19. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
  25. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  26. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  28. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  29. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  30. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +26 -26
  31. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  32. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +29 -29
  34. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  37. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  38. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  40. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  41. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  42. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  43. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  44. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +26 -26
  46. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  49. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  50. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/_global-error.html +2 -2
  52. package/web/.next/server/app/_global-error.rsc +1 -1
  53. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  54. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  55. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  56. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  57. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  58. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +5 -5
  59. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  60. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  62. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  63. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/skills/page/server-reference-manifest.json +10 -10
  65. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  66. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/tools/page/server-reference-manifest.json +10 -10
  68. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  69. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/version/page/server-reference-manifest.json +5 -5
  71. package/web/.next/server/app/version/page.js.nft.json +1 -1
  72. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  74. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  75. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  76. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  77. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  78. package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js +1 -1
  79. package/web/.next/server/chunks/ssr/[root-of-the-server]__17ed7ed1._.js.map +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__28d0d265._.js +2 -2
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  82. package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js +1 -1
  83. package/web/.next/server/chunks/ssr/[root-of-the-server]__42bf1807._.js.map +1 -1
  84. package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +1 -1
  85. package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js +1 -1
  87. package/web/.next/server/chunks/ssr/[root-of-the-server]__88f7e8e6._.js.map +1 -1
  88. package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
  89. package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +1 -1
  90. package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +1 -1
  91. package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js +1 -1
  92. package/web/.next/server/chunks/ssr/[root-of-the-server]__f80bfc75._.js.map +1 -1
  93. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js +1 -1
  94. package/web/.next/server/chunks/ssr/[root-of-the-server]__f8dd4422._.js.map +1 -1
  95. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  96. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  97. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  98. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  99. package/web/.next/server/chunks/ssr/_3a0b989f._.js +2 -2
  100. package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +1 -1
  101. package/web/.next/server/chunks/ssr/{_dd0d2cda._.js → _5268c9d4._.js} +2 -2
  102. package/web/.next/server/chunks/ssr/{_dd0d2cda._.js.map → _5268c9d4._.js.map} +1 -1
  103. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  104. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  105. package/web/.next/server/chunks/ssr/_5f69c13f._.js +1 -1
  106. package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +1 -1
  107. package/web/.next/server/chunks/ssr/_7c5b97c6._.js +1 -1
  108. package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +1 -1
  109. package/web/.next/server/chunks/ssr/_82c57f10._.js +1 -1
  110. package/web/.next/server/chunks/ssr/_82c57f10._.js.map +1 -1
  111. package/web/.next/server/chunks/ssr/_9495d50b._.js +1 -1
  112. package/web/.next/server/chunks/ssr/_9495d50b._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +1 -1
  114. package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +1 -1
  115. package/web/.next/server/chunks/ssr/_ac4a3873._.js +1 -1
  116. package/web/.next/server/chunks/ssr/_c6e43431._.js +3 -0
  117. package/web/.next/server/chunks/ssr/{_2c7d0c36._.js.map → _c6e43431._.js.map} +1 -1
  118. package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +1 -1
  119. package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/_cb5a021e._.js +1 -1
  121. package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +1 -1
  122. package/web/.next/server/chunks/ssr/_d86175ae._.js +1 -1
  123. package/web/.next/server/chunks/ssr/_d86175ae._.js.map +1 -1
  124. package/web/.next/server/chunks/ssr/_d8bedf13._.js +1 -1
  125. package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +1 -1
  126. package/web/.next/server/chunks/ssr/{_71e47f04._.js → _f2204314._.js} +2 -2
  127. package/web/.next/server/chunks/ssr/{_71e47f04._.js.map → _f2204314._.js.map} +1 -1
  128. package/web/.next/server/chunks/ssr/_fa7efce3._.js +2 -2
  129. package/web/.next/server/chunks/ssr/_fa7efce3._.js.map +1 -1
  130. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  131. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js +1 -1
  133. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_cdc632e3.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js +1 -1
  135. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_39ca0924.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  137. package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js +1 -1
  138. package/web/.next/server/chunks/ssr/src_presentation_web_components_357e3eb0._.js.map +1 -1
  139. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  140. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  141. package/web/.next/server/pages/500.html +2 -2
  142. package/web/.next/server/server-reference-manifest.js +1 -1
  143. package/web/.next/server/server-reference-manifest.json +45 -45
  144. package/web/.next/static/chunks/{d1fa9a48542437bd.js → 6db2f5818835c3eb.js} +1 -1
  145. package/web/.next/static/chunks/6f4c7b4da4dae6d4.js +1 -0
  146. package/web/.next/static/chunks/{f6085a3750b6d8f4.js → 7a0766bb2c9ce893.js} +1 -1
  147. package/web/.next/static/chunks/{60bc4daf6904d5a0.js → 83778345402f72a6.js} +1 -1
  148. package/web/.next/static/chunks/8f8369dc69944e35.js +1 -0
  149. package/web/.next/static/chunks/{f50d8e1825fae0fe.js → 9113311d5bd909e7.js} +1 -1
  150. package/web/.next/static/chunks/{de8a83cc1a08a5f1.js → 93d9ad1a97777cad.js} +2 -2
  151. package/web/.next/static/chunks/{21c8953d720bddcc.js → 967aa50e04ce8f55.js} +1 -1
  152. package/web/.next/static/chunks/{711a2468a2ea3c85.js → 9c354819b44ea955.js} +1 -1
  153. package/web/.next/static/chunks/{97c18bb438f775cf.js → ad61026f9de5bd84.js} +2 -2
  154. package/web/.next/static/chunks/{450bfeed79bb1648.js → cfd109fc4bb4645e.js} +1 -1
  155. package/web/.next/static/chunks/{1a1dc6a09c911b70.js → ff97fa59eb8b60ea.js} +1 -1
  156. package/web/.next/server/chunks/ssr/_2c7d0c36._.js +0 -3
  157. package/web/.next/static/chunks/08fe461cb16fced0.js +0 -1
  158. package/web/.next/static/chunks/b3109b268c02449c.js +0 -1
  159. /package/web/.next/static/{gvtDuAeM3WKFc9kJihv1y → TA4ybUB49vq8l75PKCVSf}/_buildManifest.js +0 -0
  160. /package/web/.next/static/{gvtDuAeM3WKFc9kJihv1y → TA4ybUB49vq8l75PKCVSf}/_clientMiddlewareManifest.json +0 -0
  161. /package/web/.next/static/{gvtDuAeM3WKFc9kJihv1y → TA4ybUB49vq8l75PKCVSf}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),a=e.i(23925),r=e.i(26370),i=e.i(38573),l=e.i(49228),o=e.i(3645);let s=(0,o.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),d=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var p=e.i(10714),p=p,m=e.i(3214),h=e.i(30702);let f=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var g=e.i(58860),x=e.i(48109),v=e.i(60112),b=e.i(31777),w=e.i(41957),y=e.i(51911),S=e.i(26036),j=e.i(27069),C=e.i(91967),k=e.i(87342),I=e.i(5978),M=e.i(22528),N=e.i(66033),P=e.i(53532),R=e.i(41687),E=e.i(56720),T=e.i(13123),A=e.i(52740),D=e.i(39979),F=e.i(87620),L=e.i(86874),H=e.i(29297),B=e.i(36589),z=e.i(5192),_=e.i(23405),V=e.i(1693),W=e.i(73772),O=e.i(13044),U=[" ","Enter","ArrowUp","ArrowDown"],K=[" ","Enter"],q="Select",[G,$,Y]=(0,k.createCollection)(q),[Z,X]=(0,M.createContextScope)(q,[Y,A.createPopperScope]),Q=(0,A.createPopperScope)(),[J,ee]=Z(q),[et,en]=Z(q),ea=e=>{let{__scopeSelect:a,children:r,open:i,defaultOpen:l,onOpenChange:o,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=Q(a),[v,b]=n.useState(null),[w,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,N.useDirection)(u),[k,I]=(0,B.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:q}),[M,P]=(0,B.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:q}),R=n.useRef(null),E=!v||g||!!v.closest("form"),[D,F]=n.useState(new Set),L=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(A.Root,{...x,children:(0,t.jsxs)(J,{required:f,scope:a,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,T.useId)(),value:M,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[(0,t.jsx)(G.Provider,{scope:a,children:(0,t.jsx)(et,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{F(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{F(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:r})}),E?(0,t.jsxs)(eU,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===M?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},L):null]})})};ea.displayName=q;var er="SelectTrigger",ei=n.forwardRef((e,a)=>{let{__scopeSelect:r,disabled:i=!1,...l}=e,o=Q(r),s=ee(er,r),d=s.disabled||i,c=(0,I.useComposedRefs)(a,s.onTriggerChange),u=$(r),p=n.useRef("touch"),[m,h,f]=eq(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eG(t,e,n);void 0!==a&&s.onValueChange(a.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(A.Anchor,{asChild:!0,...o,children:(0,t.jsx)(F.Primitive.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eK(s.value)?"":void 0,...l,ref:c,onClick:(0,C.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,C.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&U.includes(e.key)&&(g(),e.preventDefault())})})})});ei.displayName=er;var el="SelectValue",eo=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:r,style:i,children:l,placeholder:o="",...s}=e,d=ee(el,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,I.useComposedRefs)(n,d.onValueNodeChange);return(0,z.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(F.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eK(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});eo.displayName=el;var es=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:r,...i}=e;return(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:r||"▼"})});es.displayName="SelectIcon";var ed=e=>(0,t.jsx)(D.Portal,{asChild:!0,...e});ed.displayName="SelectPortal";var ec="SelectContent",eu=n.forwardRef((e,a)=>{let r=ee(ec,e.__scopeSelect),[i,l]=n.useState();return((0,z.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),r.open)?(0,t.jsx)(ef,{...e,ref:a}):i?S.createPortal((0,t.jsx)(ep,{scope:e.__scopeSelect,children:(0,t.jsx)(G.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});eu.displayName=ec;var[ep,em]=Z(ec),eh=(0,L.createSlot)("SelectContent.RemoveScroll"),ef=n.forwardRef((e,a)=>{let{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...b}=e,w=ee(ec,r),[y,S]=n.useState(null),[j,k]=n.useState(null),M=(0,I.useComposedRefs)(a,e=>S(e)),[N,T]=n.useState(null),[A,D]=n.useState(null),F=$(r),[L,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,W.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[a]=n.slice(-1),r=document.activeElement;for(let n of e)if(n===r||(n?.scrollIntoView({block:"nearest"}),n===t&&j&&(j.scrollTop=0),n===a&&j&&(j.scrollTop=j.scrollHeight),n?.focus(),document.activeElement!==r))return},[F,j]),_=n.useCallback(()=>z([N,y]),[z,N,y]);n.useEffect(()=>{L&&_()},[L,_]);let{onOpenChange:V,triggerPointerDownPosRef:U}=w;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||V(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,V,U]),n.useEffect(()=>{let e=()=>V(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[V]);let[K,q]=eq(e=>{let t=F().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eG(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),G=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&(T(e),a&&(B.current=!0))},[w.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&D(e)},[w.value]),X="popper"===i?ex:eg,Q=X===ex?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ep,{scope:r,content:y,viewport:j,onViewportChange:k,itemRefCallback:G,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:L,searchRef:K,children:(0,t.jsx)(O.RemoveScroll,{as:eh,allowPinchZoom:!0,children:(0,t.jsx)(E.FocusScope,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,C.composeEventHandlers)(l,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(P.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...b,...Q,onPlaced:()=>H(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:(0,C.composeEventHandlers)(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,a=t.indexOf(n);t=t.slice(a+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});ef.displayName="SelectContentImpl";var eg=n.forwardRef((e,a)=>{let{__scopeSelect:r,onPlaced:i,...l}=e,o=ee(ec,r),s=em(ec,r),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,I.useComposedRefs)(a,e=>p(e)),h=$(r),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&b){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=b.getBoundingClientRect();if("rtl"!==o.dir){let r=a.left-t.left,i=n.left-r,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let r=t.right-a.right,i=window.innerWidth-n.right-r,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let r=h(),l=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),w=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,w),S=window.getComputedStyle(x),C=parseInt(S.paddingTop,10),k=parseInt(S.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=r.length>0&&v===r[r.length-1].ref.current;d.style.bottom="0px";let t=Math.max(l-I,M+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=r.length>0&&v===r[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(w-N)+"px",x.scrollTop=N-I+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,o.trigger,o.valueNode,d,u,x,v,b,o.dir,i]);(0,z.useLayoutEffect)(()=>y(),[y]);let[S,C]=n.useState();(0,z.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let k=n.useCallback(e=>{e&&!0===g.current&&(y(),w?.(),g.current=!1)},[y,w]);return(0,t.jsx)(ev,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,t.jsx)(F.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});eg.displayName="SelectItemAlignedPosition";var ex=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:r="start",collisionPadding:i=10,...l}=e,o=Q(a);return(0,t.jsx)(A.Content,{...o,...l,ref:n,align:r,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ex.displayName="SelectPopperPosition";var[ev,eb]=Z(ec,{}),ew="SelectViewport",ey=n.forwardRef((e,a)=>{let{__scopeSelect:r,nonce:i,...l}=e,o=em(ew,r),s=eb(ew,r),d=(0,I.useComposedRefs)(a,o.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(G.Slot,{scope:r,children:(0,t.jsx)(F.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,C.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:a}=s;if(a?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,r=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(r<a){let i=r+e,l=Math.min(a,i),o=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ey.displayName=ew;var eS="SelectGroup",[ej,eC]=Z(eS),ek=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=(0,T.useId)();return(0,t.jsx)(ej,{scope:a,id:i,children:(0,t.jsx)(F.Primitive.div,{role:"group","aria-labelledby":i,...r,ref:n})})});ek.displayName=eS;var eI="SelectLabel",eM=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=eC(eI,a);return(0,t.jsx)(F.Primitive.div,{id:i.id,...r,ref:n})});eM.displayName=eI;var eN="SelectItem",[eP,eR]=Z(eN),eE=n.forwardRef((e,a)=>{let{__scopeSelect:r,value:i,disabled:l=!1,textValue:o,...s}=e,d=ee(eN,r),c=em(eN,r),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,I.useComposedRefs)(a,e=>c.itemRefCallback?.(e,i,l)),x=(0,T.useId)(),v=n.useRef("touch"),b=()=>{l||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eP,{scope:r,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(G.ItemSlot,{scope:r,value:i,disabled:l,textValue:p,children:(0,t.jsx)(F.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:(0,C.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,C.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,C.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:(0,C.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:(0,C.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,C.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,C.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,C.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(K.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});eE.displayName=eN;var eT="SelectItemText",eA=n.forwardRef((e,a)=>{let{__scopeSelect:r,className:i,style:l,...o}=e,s=ee(eT,r),d=em(eT,r),c=eR(eT,r),u=en(eT,r),[p,m]=n.useState(null),h=(0,I.useComposedRefs)(a,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,z.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(o.children,s.valueNode):null]})});eA.displayName=eT;var eD="SelectItemIndicator",eF=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return eR(eD,a).isSelected?(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...r,ref:n}):null});eF.displayName=eD;var eL="SelectScrollUpButton",eH=n.forwardRef((e,a)=>{let r=em(eL,e.__scopeSelect),i=eb(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){o(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eH.displayName=eL;var eB="SelectScrollDownButton",ez=n.forwardRef((e,a)=>{let r=em(eB,e.__scopeSelect),i=eb(eB,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ez.displayName=eB;var e_=n.forwardRef((e,a)=>{let{__scopeSelect:r,onAutoScroll:i,...l}=e,o=em("SelectScrollButton",r),s=n.useRef(null),d=$(r),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,z.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,C.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,C.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),eV=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...r,ref:n})});eV.displayName="SelectSeparator";var eW="SelectArrow",eO=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=Q(a),l=ee(eW,a),o=em(eW,a);return l.open&&"popper"===o.position?(0,t.jsx)(A.Arrow,{...i,...r,ref:n}):null});eO.displayName=eW;var eU=n.forwardRef(({__scopeSelect:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(i,l),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==a&&t){let n=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.select,{...r,style:{...V.VISUALLY_HIDDEN_STYLES,...r.style},ref:o,defaultValue:a})});function eK(e){return""===e||void 0===e}function eq(e){let t=(0,H.useCallbackRef)(e),a=n.useRef(""),r=n.useRef(0),i=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{a.current="",window.clearTimeout(r.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(r.current),[]),[a,i,l]}function eG(e,t,n){var a,r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(a=e,r=Math.max(l,0),a.map((e,t)=>a[(r+t)%a.length]));1===i.length&&(o=o.filter(e=>e!==n));let s=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}eU.displayName="SelectBubbleInput",e.s(["Arrow",()=>eO,"Content",()=>eu,"Group",()=>ek,"Icon",()=>es,"Item",()=>eE,"ItemIndicator",()=>eF,"ItemText",()=>eA,"Label",()=>eM,"Portal",()=>ed,"Root",()=>ea,"ScrollDownButton",()=>ez,"ScrollUpButton",()=>eH,"Select",()=>ea,"SelectArrow",()=>eO,"SelectContent",()=>eu,"SelectGroup",()=>ek,"SelectIcon",()=>es,"SelectItem",()=>eE,"SelectItemIndicator",()=>eF,"SelectItemText",()=>eA,"SelectLabel",()=>eM,"SelectPortal",()=>ed,"SelectScrollDownButton",()=>ez,"SelectScrollUpButton",()=>eH,"SelectSeparator",()=>eV,"SelectTrigger",()=>ei,"SelectValue",()=>eo,"SelectViewport",()=>ey,"Separator",()=>eV,"Trigger",()=>ei,"Value",()=>eo,"Viewport",()=>ey,"createSelectScope",()=>X],83830);var e$=e.i(83830),e$=e$,eY=e.i(99105),eZ=e.i(48829);let eX=e$.Root;e$.Group;let eQ=e$.Value,eJ=n.forwardRef(({className:e,children:n,...a},r)=>(0,t.jsxs)(e$.Trigger,{ref:r,className:(0,b.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[n,(0,t.jsx)(e$.Icon,{asChild:!0,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eJ.displayName=e$.Trigger.displayName;let e0=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollUpButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eZ.ChevronUp,{className:"h-4 w-4"})}));e0.displayName=e$.ScrollUpButton.displayName;let e1=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollDownButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4"})}));e1.displayName=e$.ScrollDownButton.displayName;let e2=n.forwardRef(({className:e,children:n,position:a="popper",...r},i)=>(0,t.jsx)(e$.Portal,{children:(0,t.jsxs)(e$.Content,{ref:i,className:(0,b.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...r,children:[(0,t.jsx)(e0,{}),(0,t.jsx)(e$.Viewport,{className:(0,b.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e1,{})]})}));e2.displayName=e$.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Label,{ref:a,className:(0,b.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=e$.Label.displayName;let e3=n.forwardRef(({className:e,children:n,...r},i)=>(0,t.jsxs)(e$.Item,{ref:i,className:(0,b.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(e$.ItemIndicator,{children:(0,t.jsx)(a.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(e$.ItemText,{children:n})]}));e3.displayName=e$.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Separator,{ref:a,className:(0,b.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=e$.Separator.displayName;var e5=e.i(21023);let e4=(0,e5.createServerReference)("40daf589ee139db9b96c4d5cb933ec0e8dbb8f71f9",e5.callServer,void 0,e5.findSourceMapURL,"updateSettingsAction");var e8=e.i(17406),e9=e.i(98804),e6=e.i(44229),e7=e.i(83902);function te(e){return(0,t.jsx)(e6.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function tt({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ta({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e9.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ti({className:e,...n}){return(0,t.jsx)(e7.Rocket,{className:(0,b.cn)("h-4 w-4",e),...n})}tt.displayName="VsCodeIcon",tn.displayName="CursorEditorIcon",ta.displayName="WindsurfIcon",tr.displayName="ZedIcon",ti.displayName="AntigravityIcon";let tl={vscode:tt,cursor:tn,windsurf:ta,zed:tr,antigravity:ti};var to=e.i(41413),ts=e.i(77624),td=["PageUp","PageDown"],tc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tu={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tp="Slider",[tm,th,tf]=(0,k.createCollection)(tp),[tg,tx]=(0,M.createContextScope)(tp,[tf]),[tv,tb]=tg(tp),tw=n.forwardRef((e,a)=>{let{name:r,min:i=0,max:l=100,step:o=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),b=n.useRef(0),w="horizontal"===s,[y=[],S]=(0,B.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let a,r=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(a=Math.pow(10,r)))/a,d=(0,j.clamp)(s,[i,l]);S((e=[])=>{let a=function(e=[],t,n){let a=[...e];return a[n]=t,a.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(a,c*o))return e;{b.current=a.indexOf(d);let t=String(a)!==String(e);return t&&n&&h(a),t?a:e}})}return(0,t.jsx)(tv,{scope:e.__scopeSlider,name:r,disabled:d,min:i,max:l,valueIndexToChangeRef:b,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tm.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tm.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?tj:tC,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:a,onPointerDown:(0,C.composeEventHandlers)(x.onPointerDown,()=>{d||(k.current=y)}),min:i,max:l,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),a=Math.min(...n);return n.indexOf(a)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,b.current)},onSlideEnd:d?void 0:function(){let e=k.current[b.current];y[b.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&I(i,0,{commit:!0}),onEndKeyDown:()=>!d&&I(l,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=td.includes(e.key)||e.shiftKey&&tc.includes(e.key),a=b.current;I(y[a]+o*(n?10:1)*t,a,{commit:!0})}}})})})})});tw.displayName=tp;var[ty,tS]=tg(tp,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tj=n.forwardRef((e,a)=>{let{min:r,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,I.useComposedRefs)(a,e=>h(e)),g=n.useRef(void 0),x=(0,N.useDirection)(l),v="ltr"===x,b=v&&!o||!v&&o;function w(e){let t=g.current||m.getBoundingClientRect(),n=tF([0,t.width],b?[r,i]:[i,r]);return g.current=t,n(e-t.left)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(tk,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);s?.(t)},onSlideMove:e=>{let t=w(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tu[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,a)=>{let{min:r,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,I.useComposedRefs)(a,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tF([0,t.height],f?[i,r]:[r,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tk,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);o?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tu[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tk=n.forwardRef((e,n)=>{let{__scopeSlider:a,onSlideStart:r,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tb(tp,a);return(0,t.jsx)(F.Primitive.span,{...c,ref:n,onKeyDown:(0,C.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):td.concat(tc).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,C.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:(0,C.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,C.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tI="SliderTrack",tM=n.forwardRef((e,n)=>{let{__scopeSlider:a,...r}=e,i=tb(tI,a);return(0,t.jsx)(F.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:n})});tM.displayName=tI;var tN="SliderRange",tP=n.forwardRef((e,a)=>{let{__scopeSlider:r,...i}=e,l=tb(tN,r),o=tS(tN,r),s=n.useRef(null),d=(0,I.useComposedRefs)(a,s),c=l.values.length,u=l.values.map(e=>tD(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(F.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tP.displayName=tN;var tR="SliderThumb",tE=n.forwardRef((e,a)=>{let r=th(e.__scopeSlider),[i,l]=n.useState(null),o=(0,I.useComposedRefs)(a,e=>l(e)),s=n.useMemo(()=>i?r().findIndex(e=>e.ref.current===i):-1,[r,i]);return(0,t.jsx)(tT,{...e,ref:o,index:s})}),tT=n.forwardRef((e,a)=>{var r,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tb(tR,u),g=tS(tR,u),[x,v]=n.useState(null),b=(0,I.useComposedRefs)(a,e=>v(e)),w=!x||f.form||!!x.closest("form"),y=(0,ts.useSize)(x),S=f.values[p],j=void 0===S?0:tD(S,f.min,f.max),k=(r=p,(i=f.values.length)>2?`Value ${r+1} of ${i}`:2===i?["Minimum","Maximum"][r]:void 0),M=y?.[g.size],N=M?(l=M,o=j,s=g.direction,c=tF([0,50],[0,d=l/2]),(d-c(o)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${j}% + ${N}px)`},children:[(0,t.jsx)(tm.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(F.Primitive.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":f.min,"aria-valuenow":S,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:b,style:void 0===S?{display:"none"}:e.style,onFocus:(0,C.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),w&&(0,t.jsx)(tA,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tE.displayName=tR;var tA=n.forwardRef(({__scopeSlider:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(l,i),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==a&&t){let n=new Event("input",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.input,{style:{display:"none"},...r,ref:o,defaultValue:a})});function tD(e,t,n){return(0,j.clamp)(100/(n-t)*(e-t),[0,100])}function tF(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}tA.displayName="RadioBubbleInput",e.s(["Range",()=>tP,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tP,"SliderThumb",()=>tE,"SliderTrack",()=>tM,"Thumb",()=>tE,"Track",()=>tM,"createSliderScope",()=>tx],29991);var tL=e.i(29991),tL=tL;function tH({className:e,defaultValue:a,value:r,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(r)?r:Array.isArray(a)?a:[i,l],[r,a,i,l]);return(0,t.jsxs)(tL.Root,{"data-slot":"slider",defaultValue:a,value:r,min:i,max:l,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...o,children:[(0,t.jsx)(tL.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(tL.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tL.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tB=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tz=tB.length-1;function t_(e){let t=0,n=Math.abs(e-tB[0]);for(let a=1;a<tB.length;a++){let r=Math.abs(e-tB[a]);r<n&&(n=r,t=a)}return t}function tV({id:e,testId:a,value:r,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===r?o:parseInt(r,10))||o,[p,m]=(0,n.useState)(()=>t_(u)),h=t_(u);h!==p&&tB[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tB[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tH,{id:e,"data-testid":a,min:0,max:tz,step:1,value:[p],onValueChange:f,onValueCommit:()=>l(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tB[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tW=[{value:e8.EditorType.VsCode,label:"VS Code"},{value:e8.EditorType.Cursor,label:"Cursor"},{value:e8.EditorType.Windsurf,label:"Windsurf"},{value:e8.EditorType.Zed,label:"Zed"},{value:e8.EditorType.Antigravity,label:"Antigravity"}],tO=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tU=[{id:"agent",label:"Agent",icon:r.Bot},{id:"environment",label:"Environment",icon:i.Terminal},{id:"workflow",label:"Workflow",icon:l.GitBranch},{id:"ci",label:"CI",icon:s},{id:"stage-timeouts",label:"Timeouts",icon:g.Timer},{id:"notifications",label:"Notifications",icon:d},{id:"feature-flags",label:"Flags",icon:c},{id:"interactive-agent",label:"Chat",icon:x.MessageSquare},{id:"database",label:"Database",icon:u}];function tK({label:e,description:n,htmlFor:a,children:r}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(w.Label,{htmlFor:a,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r})]})}function tq({label:e,description:n,id:a,testId:r,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tK,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(y.Switch,{id:a,"data-testid":r,checked:i,onCheckedChange:l,disabled:o,className:(0,b.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tG({icon:e,title:n,description:a,badge:r,testId:i,children:l}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),r?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:r}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function t$({id:e,testId:n,value:a,onChange:r,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===a?void 0:parseInt(a,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{r(String(Math.max(o,(u??parseInt(l,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(p.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:a,placeholder:l,onChange:e=>{r(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(l,10),r(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(m.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tY({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function tZ({children:e,links:n}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=n&&n.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:n.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(h.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tX({settings:e,shepHome:o,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:y}=function(){let[e,t]=(0,n.useTransition)(),[a,r]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1),o=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(r(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(r(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&a&&(s.current=!0,o.current||(r(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,a]),{showSaving:a,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e4(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),S=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[j,C]=(0,n.useState)(e.agent.type),[k,I]=(0,n.useState)(e.environment.defaultEditor),[M,N]=(0,n.useState)(e.environment.shellPreference),[P,R]=(0,n.useState)(e.environment.terminalPreference??e8.TerminalType.System),E=m?m.filter(e=>e.available):[{id:e8.TerminalType.System,name:"System Terminal",available:!0}],[T,A]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[D,F]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[L,H]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[B,z]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[_,V]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[W,O]=(0,n.useState)(e.workflow.enableEvidence),[U,K]=(0,n.useState)(e.workflow.commitEvidence),[q,G]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[$,Y]=(0,n.useState)(!1!==e.workflow.hideCiStatus),[Z,X]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[Q,J]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[ee,et]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[en,ea]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),er=e.workflow.stageTimeouts,[ei,el]=(0,n.useState)(String(Math.round((er?.analyzeMs??18e5)/1e3))),[eo,es]=(0,n.useState)(String(Math.round((er?.requirementsMs??18e5)/1e3))),[ed,ec]=(0,n.useState)(String(Math.round((er?.researchMs??18e5)/1e3))),[eu,ep]=(0,n.useState)(String(Math.round((er?.planMs??18e5)/1e3))),[em,eh]=(0,n.useState)(String(Math.round((er?.implementMs??18e5)/1e3))),[ef,eg]=(0,n.useState)(String(Math.round((er?.mergeMs??18e5)/1e3))),ex=e.workflow.analyzeRepoTimeouts,[ev,eb]=(0,n.useState)(String(Math.round((ex?.analyzeMs??6e5)/1e3))),ew=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[ey,eS]=(0,n.useState)(ew.enabled),[ej,eC]=(0,n.useState)(String(ew.autoTimeoutMinutes)),[ek,eI]=(0,n.useState)(String(ew.maxConcurrentSessions)),[eM,eN]=(0,n.useState)(e.notifications.inApp.enabled),[eP,eR]=(0,n.useState)({...e.notifications.events}),[eE,eT]=(0,n.useState)({...S}),eA=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eD=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eF=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eL=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eH=er?.analyzeMs!=null?String(Math.round(er.analyzeMs/1e3)):"",eB=er?.requirementsMs!=null?String(Math.round(er.requirementsMs/1e3)):"",ez=er?.researchMs!=null?String(Math.round(er.researchMs/1e3)):"",e_=er?.planMs!=null?String(Math.round(er.planMs/1e3)):"",eV=er?.implementMs!=null?String(Math.round(er.implementMs/1e3)):"",eW=er?.mergeMs!=null?String(Math.round(er.mergeMs/1e3)):"",eO=ex?.analyzeMs!=null?String(Math.round(ex.analyzeMs/1e3)):"";function eU(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eK(e){if(void 0===e)return;let t=eU(e);return null!=t?1e3*t:void 0}function eq(e={}){let t=eU(e.ciTimeout??Q);return{workflow:{openPrOnImplementationComplete:e.openPr??T,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??D,allowPrd:e.allowPrd??L,allowPlan:e.allowPlan??B,allowMerge:e.allowMerge??_},enableEvidence:e.enableEvidence??W,commitEvidence:e.commitEvidence??U,ciWatchEnabled:e.ciWatchEnabled??q,hideCiStatus:e.hideCiStatus??$,ciMaxFixAttempts:eU(e.ciMaxFix??Z),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eU(e.ciLogMax??ee),ciWatchPollIntervalSeconds:eU(e.ciPollInterval??en),stageTimeouts:{analyzeMs:eK(e.analyzeTimeout??ei),requirementsMs:eK(e.requirementsTimeout??eo),researchMs:eK(e.researchTimeout??ed),planMs:eK(e.planTimeout??eu),implementMs:eK(e.implementTimeout??em),mergeMs:eK(e.mergeTimeout??ef)},analyzeRepoTimeouts:{analyzeMs:eK(e.analyzeRepoTimeout??ev)}}}}function eG(e={}){return{notifications:{inApp:{enabled:e.inApp??eM},events:e.events??eP}}}let[e$,eY]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tU.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&eY(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let eZ=(0,n.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Settings"}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",h?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",w&&!h?"opacity-100":"opacity-0"),children:[(0,t.jsx)(a.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tU.map(e=>{let n=e.icon,a=e$===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eZ(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",a?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(tG,{icon:r.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tK,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(to.AgentModelPicker,{initialAgentType:j,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>C(e),className:"w-55"})})}),(0,t.jsx)(tZ,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:i.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tK,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eX,{value:k,onValueChange:e=>{I(e),y({environment:{defaultEditor:e,shellPreference:M,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tW.map(e=>{var n;let a=(n=e.value)&&n in tl?tl[n]:te;return(0,t.jsx)(e3,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(a,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tK,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eX,{value:M,onValueChange:e=>{N(e),y({environment:{defaultEditor:k,shellPreference:e,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tO.map(e=>(0,t.jsx)(e3,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tK,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eX,{value:P,onValueChange:e=>{R(e),y({environment:{defaultEditor:k,shellPreference:M,terminalPreference:e}})},children:[(0,t.jsx)(eJ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:E.map(e=>(0,t.jsx)(e3,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tZ,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:l.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tY,{children:"Approve"}),(0,t.jsx)(tq,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:L,onChange:e=>{H(e),y(eq({allowPrd:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:B,onChange:e=>{z(e),y(eq({allowPlan:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:_,onChange:e=>{V(e),y(eq({allowMerge:e}))}}),(0,t.jsx)(tY,{children:"Evidence"}),(0,t.jsx)(tq,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:W,onChange:e=>{O(e),e?y(eq({enableEvidence:e})):(K(!1),y(eq({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:U,disabled:!W||!T,onChange:e=>{K(e),y(eq({commitEvidence:e}))}}),(0,t.jsx)(tY,{children:"Git"}),(0,t.jsx)(tq,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:D,onChange:e=>{F(e),y(eq({pushOnComplete:e}))}}),(0,t.jsx)(tq,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:T,onChange:e=>{A(e),e?y(eq({openPr:e})):(K(!1),y(eq({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:q,onChange:e=>{G(e),y(eq({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tK,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(t$,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Z,onChange:X,onBlur:()=>{Z!==eA&&y(eq({ciMaxFix:Z}))},min:1,max:10})}),(0,t.jsx)(tK,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(t$,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:Q,onChange:J,onBlur:()=>{Q!==eD&&y(eq({ciTimeout:Q}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tK,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(t$,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:ee,onChange:et,onBlur:()=>{ee!==eF&&y(eq({ciLogMax:ee}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tK,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(t$,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:en,onChange:ea,onBlur:()=>{en!==eL&&y(eq({ciPollInterval:en}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(tq,{label:"Hide CI status",description:"Hide CI status badges from feature drawer and merge review",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:$,onChange:e=>{Y(e),y(eq({hideCiStatus:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(tY,{children:"Feature Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(tV,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ei,onChange:el,onBlur:()=>{ei!==eH&&y(eq({analyzeTimeout:ei}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(tV,{id:"timeout-requirements",testId:"timeout-requirements-input",value:eo,onChange:es,onBlur:()=>{eo!==eB&&y(eq({requirementsTimeout:eo}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(tV,{id:"timeout-research",testId:"timeout-research-input",value:ed,onChange:ec,onBlur:()=>{ed!==ez&&y(eq({researchTimeout:ed}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(tV,{id:"timeout-plan",testId:"timeout-plan-input",value:eu,onChange:ep,onBlur:()=>{eu!==e_&&y(eq({planTimeout:eu}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(tV,{id:"timeout-implement",testId:"timeout-implement-input",value:em,onChange:eh,onBlur:()=>{em!==eV&&y(eq({implementTimeout:em}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(tV,{id:"timeout-merge",testId:"timeout-merge-input",value:ef,onChange:eg,onBlur:()=>{ef!==eW&&y(eq({mergeTimeout:ef}))},defaultSeconds:1800})}),(0,t.jsx)(tY,{children:"Analyze Repository Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(tV,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ev,onChange:eb,onBlur:()=>{ev!==eO&&y(eq({analyzeRepoTimeout:ev}))},defaultSeconds:600})})]}),(0,t.jsx)(tZ,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tY,{children:"Channels"}),(0,t.jsx)(tq,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:eM,onChange:e=>{eN(e),y(eG({inApp:e}))}}),(0,t.jsx)(tY,{children:"Agent Events"}),(0,t.jsx)(tq,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:eP.agentStarted,onChange:e=>{let t={...eP,agentStarted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:eP.phaseCompleted,onChange:e=>{let t={...eP,phaseCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:eP.waitingApproval,onChange:e=>{let t={...eP,waitingApproval:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:eP.agentCompleted,onChange:e=>{let t={...eP,agentCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:eP.agentFailed,onChange:e=>{let t={...eP,agentFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tY,{children:"Pull Request Events"}),(0,t.jsx)(tq,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:eP.prMerged,onChange:e=>{let t={...eP,prMerged:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:eP.prClosed,onChange:e=>{let t={...eP,prClosed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:eP.prChecksPassed,onChange:e=>{let t={...eP,prChecksPassed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:eP.prChecksFailed,onChange:e=>{let t={...eP,prChecksFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:eP.prBlocked,onChange:e=>{let t={...eP,prBlocked:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:eP.mergeReviewReady,onChange:e=>{let t={...eP,mergeReviewReady:e};eR(t),y(eG({events:t}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"In-app toast notifications keep you in the loop. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tq,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:eE.skills,onChange:e=>{let t={...eE,skills:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:eE.envDeploy,onChange:e=>{let t={...eE,envDeploy:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:eE.debug,onChange:e=>{let t={...eE,debug:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:eE.githubImport,onChange:e=>{let t={...eE,githubImport:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:eE.adoptBranch,onChange:e=>{let t={...eE,adoptBranch:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Git Rebase & Sync",description:"Enable git rebase-on-main and sync-main operations",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:eE.gitRebaseSync,onChange:e=>{let t={...eE,gitRebaseSync:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"React File Manager",description:"Use the built-in React file manager instead of the native OS folder picker",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:eE.reactFileManager,onChange:e=>{let t={...eE,reactFileManager:e};eT(t),y({featureFlags:t})}})]}),(0,t.jsx)(tZ,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:x.MessageSquare,title:"Interactive Agent",description:"Chat tab settings for per-feature interactive agent sessions",testId:"interactive-agent-settings-section",children:[(0,t.jsx)(tq,{label:"Enable Chat tab",description:"Show the Chat tab on all feature detail pages",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:ey,onChange:e=>{eS(e),y({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:parseInt(ek,10)||3}})}}),(0,t.jsx)(tK,{label:"Auto-timeout",description:"Minutes of inactivity before the agent is stopped automatically (1–120)",htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(t$,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:ej,placeholder:"15",min:1,max:120,suffix:"min",onChange:eC,onBlur:()=>{let e=parseInt(ej,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));eC(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(ek,10)||3}})}})}),(0,t.jsx)(tK,{label:"Max concurrent sessions",description:"Maximum number of active interactive agent sessions at once (1–10)",htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(t$,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:ek,placeholder:"3",min:1,max:10,onChange:eI,onBlur:()=>{let e=parseInt(ek,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));eI(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:t}})}})})]}),(0,t.jsx)(tZ,{children:"The Chat tab spawns a persistent agent process per feature. Auto-timeout stops idle sessions automatically to conserve resources. The concurrent session cap prevents runaway resource usage on developer machines."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tK,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:o})}),(0,t.jsx)(tK,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tZ,{links:[{label:"Settings service",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/settings-service.md"},{label:"Settings spec",href:"https://github.com/shep-ai/cli/blob/main/specs/005-global-settings-service/spec.md"}],children:"All settings are stored in a local SQLite database at ~/.shep/data. The database uses a singleton record pattern with automatic migrations on startup."})]})]})]})}e.s(["SettingsPageClient",()=>tX],41952)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(20314),n=e.i(79054),a=e.i(23925),r=e.i(26370),i=e.i(38573),l=e.i(49228),o=e.i(3645);let s=(0,o.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),d=(0,o.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,o.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),u=(0,o.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var p=e.i(10714),p=p,m=e.i(3214),h=e.i(30702);let f=(0,o.default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var g=e.i(58860),x=e.i(48109),v=e.i(60112),b=e.i(31777),w=e.i(41957),y=e.i(51911),S=e.i(26036),j=e.i(27069),C=e.i(91967),k=e.i(87342),I=e.i(5978),M=e.i(22528),N=e.i(66033),P=e.i(53532),R=e.i(41687),E=e.i(56720),T=e.i(13123),A=e.i(52740),D=e.i(39979),F=e.i(87620),L=e.i(86874),H=e.i(29297),B=e.i(36589),z=e.i(5192),_=e.i(23405),V=e.i(1693),W=e.i(73772),O=e.i(13044),U=[" ","Enter","ArrowUp","ArrowDown"],K=[" ","Enter"],q="Select",[G,$,Y]=(0,k.createCollection)(q),[Z,X]=(0,M.createContextScope)(q,[Y,A.createPopperScope]),Q=(0,A.createPopperScope)(),[J,ee]=Z(q),[et,en]=Z(q),ea=e=>{let{__scopeSelect:a,children:r,open:i,defaultOpen:l,onOpenChange:o,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:f,form:g}=e,x=Q(a),[v,b]=n.useState(null),[w,y]=n.useState(null),[S,j]=n.useState(!1),C=(0,N.useDirection)(u),[k,I]=(0,B.useControllableState)({prop:i,defaultProp:l??!1,onChange:o,caller:q}),[M,P]=(0,B.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:q}),R=n.useRef(null),E=!v||g||!!v.closest("form"),[D,F]=n.useState(new Set),L=Array.from(D).map(e=>e.props.value).join(";");return(0,t.jsx)(A.Root,{...x,children:(0,t.jsxs)(J,{required:f,scope:a,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:(0,T.useId)(),value:M,onValueChange:P,open:k,onOpenChange:I,dir:C,triggerPointerDownPosRef:R,disabled:h,children:[(0,t.jsx)(G.Provider,{scope:a,children:(0,t.jsx)(et,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{F(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{F(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:r})}),E?(0,t.jsxs)(eU,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:e=>P(e.target.value),disabled:h,form:g,children:[void 0===M?(0,t.jsx)("option",{value:""}):null,Array.from(D)]},L):null]})})};ea.displayName=q;var er="SelectTrigger",ei=n.forwardRef((e,a)=>{let{__scopeSelect:r,disabled:i=!1,...l}=e,o=Q(r),s=ee(er,r),d=s.disabled||i,c=(0,I.useComposedRefs)(a,s.onTriggerChange),u=$(r),p=n.useRef("touch"),[m,h,f]=eq(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eG(t,e,n);void 0!==a&&s.onValueChange(a.value)}),g=e=>{d||(s.onOpenChange(!0),f()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(A.Anchor,{asChild:!0,...o,children:(0,t.jsx)(F.Primitive.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eK(s.value)?"":void 0,...l,ref:c,onClick:(0,C.composeEventHandlers)(l.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,C.composeEventHandlers)(l.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),(!t||" "!==e.key)&&U.includes(e.key)&&(g(),e.preventDefault())})})})});ei.displayName=er;var el="SelectValue",eo=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:r,style:i,children:l,placeholder:o="",...s}=e,d=ee(el,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==l,p=(0,I.useComposedRefs)(n,d.onValueNodeChange);return(0,z.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(F.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eK(d.value)?(0,t.jsx)(t.Fragment,{children:o}):l})});eo.displayName=el;var es=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:r,...i}=e;return(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...i,ref:n,children:r||"▼"})});es.displayName="SelectIcon";var ed=e=>(0,t.jsx)(D.Portal,{asChild:!0,...e});ed.displayName="SelectPortal";var ec="SelectContent",eu=n.forwardRef((e,a)=>{let r=ee(ec,e.__scopeSelect),[i,l]=n.useState();return((0,z.useLayoutEffect)(()=>{l(new DocumentFragment)},[]),r.open)?(0,t.jsx)(ef,{...e,ref:a}):i?S.createPortal((0,t.jsx)(ep,{scope:e.__scopeSelect,children:(0,t.jsx)(G.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),i):null});eu.displayName=ec;var[ep,em]=Z(ec),eh=(0,L.createSlot)("SelectContent.RemoveScroll"),ef=n.forwardRef((e,a)=>{let{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:o,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...b}=e,w=ee(ec,r),[y,S]=n.useState(null),[j,k]=n.useState(null),M=(0,I.useComposedRefs)(a,e=>S(e)),[N,T]=n.useState(null),[A,D]=n.useState(null),F=$(r),[L,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,W.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let z=n.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[a]=n.slice(-1),r=document.activeElement;for(let n of e)if(n===r||(n?.scrollIntoView({block:"nearest"}),n===t&&j&&(j.scrollTop=0),n===a&&j&&(j.scrollTop=j.scrollHeight),n?.focus(),document.activeElement!==r))return},[F,j]),_=n.useCallback(()=>z([N,y]),[z,N,y]);n.useEffect(()=>{L&&_()},[L,_]);let{onOpenChange:V,triggerPointerDownPosRef:U}=w;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(U.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(U.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||V(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,V,U]),n.useEffect(()=>{let e=()=>V(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[V]);let[K,q]=eq(e=>{let t=F().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eG(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),G=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&(T(e),a&&(B.current=!0))},[w.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==w.value&&w.value===t||a)&&D(e)},[w.value]),X="popper"===i?ex:eg,Q=X===ex?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ep,{scope:r,content:y,viewport:j,onViewportChange:k,itemRefCallback:G,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:A,position:i,isPositioned:L,searchRef:K,children:(0,t.jsx)(O.RemoveScroll,{as:eh,allowPinchZoom:!0,children:(0,t.jsx)(E.FocusScope,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,C.composeEventHandlers)(l,e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(P.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,t.jsx)(X,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...b,...Q,onPlaced:()=>H(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:(0,C.composeEventHandlers)(b.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,a=t.indexOf(n);t=t.slice(a+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});ef.displayName="SelectContentImpl";var eg=n.forwardRef((e,a)=>{let{__scopeSelect:r,onPlaced:i,...l}=e,o=ee(ec,r),s=em(ec,r),[d,c]=n.useState(null),[u,p]=n.useState(null),m=(0,I.useComposedRefs)(a,e=>p(e)),h=$(r),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=s,y=n.useCallback(()=>{if(o.trigger&&o.valueNode&&d&&u&&x&&v&&b){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=b.getBoundingClientRect();if("rtl"!==o.dir){let r=a.left-t.left,i=n.left-r,l=e.left-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.left=u+"px"}else{let r=t.right-a.right,i=window.innerWidth-n.right-r,l=window.innerWidth-e.right-i,o=e.width+l,s=Math.max(o,t.width),c=window.innerWidth-10,u=(0,j.clamp)(i,[10,Math.max(10,c-s)]);d.style.minWidth=o+"px",d.style.right=u+"px"}let r=h(),l=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),m=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),w=p+m+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,w),S=window.getComputedStyle(x),C=parseInt(S.paddingTop,10),k=parseInt(S.paddingBottom,10),I=e.top+e.height/2-10,M=v.offsetHeight/2,N=p+m+(v.offsetTop+M);if(N<=I){let e=r.length>0&&v===r[r.length-1].ref.current;d.style.bottom="0px";let t=Math.max(l-I,M+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=N+t+"px"}else{let e=r.length>0&&v===r[0].ref.current;d.style.top="0px";let t=Math.max(I,p+x.offsetTop+(e?C:0)+M);d.style.height=t+(w-N)+"px",x.scrollTop=N-I+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=l+"px",i?.(),requestAnimationFrame(()=>f.current=!0)}},[h,o.trigger,o.valueNode,d,u,x,v,b,o.dir,i]);(0,z.useLayoutEffect)(()=>y(),[y]);let[S,C]=n.useState();(0,z.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let k=n.useCallback(e=>{e&&!0===g.current&&(y(),w?.(),g.current=!1)},[y,w]);return(0,t.jsx)(ev,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,t.jsx)(F.Primitive.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});eg.displayName="SelectItemAlignedPosition";var ex=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:r="start",collisionPadding:i=10,...l}=e,o=Q(a);return(0,t.jsx)(A.Content,{...o,...l,ref:n,align:r,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ex.displayName="SelectPopperPosition";var[ev,eb]=Z(ec,{}),ew="SelectViewport",ey=n.forwardRef((e,a)=>{let{__scopeSelect:r,nonce:i,...l}=e,o=em(ew,r),s=eb(ew,r),d=(0,I.useComposedRefs)(a,o.onViewportChange),c=n.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),(0,t.jsx)(G.Slot,{scope:r,children:(0,t.jsx)(F.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:(0,C.composeEventHandlers)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:a}=s;if(a?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let a=window.innerHeight-20,r=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(r<a){let i=r+e,l=Math.min(a,i),o=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ey.displayName=ew;var eS="SelectGroup",[ej,eC]=Z(eS),ek=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=(0,T.useId)();return(0,t.jsx)(ej,{scope:a,id:i,children:(0,t.jsx)(F.Primitive.div,{role:"group","aria-labelledby":i,...r,ref:n})})});ek.displayName=eS;var eI="SelectLabel",eM=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=eC(eI,a);return(0,t.jsx)(F.Primitive.div,{id:i.id,...r,ref:n})});eM.displayName=eI;var eN="SelectItem",[eP,eR]=Z(eN),eE=n.forwardRef((e,a)=>{let{__scopeSelect:r,value:i,disabled:l=!1,textValue:o,...s}=e,d=ee(eN,r),c=em(eN,r),u=d.value===i,[p,m]=n.useState(o??""),[h,f]=n.useState(!1),g=(0,I.useComposedRefs)(a,e=>c.itemRefCallback?.(e,i,l)),x=(0,T.useId)(),v=n.useRef("touch"),b=()=>{l||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(eP,{scope:r,value:i,disabled:l,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{m(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(G.ItemSlot,{scope:r,value:i,disabled:l,textValue:p,children:(0,t.jsx)(F.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:(0,C.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,C.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,C.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&b()}),onPointerUp:(0,C.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&b()}),onPointerDown:(0,C.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,C.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,l?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,C.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,C.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(K.includes(e.key)&&b()," "===e.key&&e.preventDefault())})})})})});eE.displayName=eN;var eT="SelectItemText",eA=n.forwardRef((e,a)=>{let{__scopeSelect:r,className:i,style:l,...o}=e,s=ee(eT,r),d=em(eT,r),c=eR(eT,r),u=en(eT,r),[p,m]=n.useState(null),h=(0,I.useComposedRefs)(a,e=>m(e),c.onItemTextChange,e=>d.itemTextRefCallback?.(e,c.value,c.disabled)),f=p?.textContent,g=n.useMemo(()=>(0,t.jsx)("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=u;return(0,z.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(F.Primitive.span,{id:c.textId,...o,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(o.children,s.valueNode):null]})});eA.displayName=eT;var eD="SelectItemIndicator",eF=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return eR(eD,a).isSelected?(0,t.jsx)(F.Primitive.span,{"aria-hidden":!0,...r,ref:n}):null});eF.displayName=eD;var eL="SelectScrollUpButton",eH=n.forwardRef((e,a)=>{let r=em(eL,e.__scopeSelect),i=eb(eL,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){o(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eH.displayName=eL;var eB="SelectScrollDownButton",ez=n.forwardRef((e,a)=>{let r=em(eB,e.__scopeSelect),i=eb(eB,e.__scopeSelect),[l,o]=n.useState(!1),s=(0,I.useComposedRefs)(a,i.onScrollButtonChange);return(0,z.useLayoutEffect)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),l?(0,t.jsx)(e_,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ez.displayName=eB;var e_=n.forwardRef((e,a)=>{let{__scopeSelect:r,onAutoScroll:i,...l}=e,o=em("SelectScrollButton",r),s=n.useRef(null),d=$(r),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,z.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...l,ref:a,style:{flexShrink:0,...l.style},onPointerDown:(0,C.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(i,50))}),onPointerMove:(0,C.composeEventHandlers)(l.onPointerMove,()=>{o.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))}),onPointerLeave:(0,C.composeEventHandlers)(l.onPointerLeave,()=>{c()})})}),eV=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e;return(0,t.jsx)(F.Primitive.div,{"aria-hidden":!0,...r,ref:n})});eV.displayName="SelectSeparator";var eW="SelectArrow",eO=n.forwardRef((e,n)=>{let{__scopeSelect:a,...r}=e,i=Q(a),l=ee(eW,a),o=em(eW,a);return l.open&&"popper"===o.position?(0,t.jsx)(A.Arrow,{...i,...r,ref:n}):null});eO.displayName=eW;var eU=n.forwardRef(({__scopeSelect:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(i,l),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==a&&t){let n=new Event("change",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.select,{...r,style:{...V.VISUALLY_HIDDEN_STYLES,...r.style},ref:o,defaultValue:a})});function eK(e){return""===e||void 0===e}function eq(e){let t=(0,H.useCallbackRef)(e),a=n.useRef(""),r=n.useRef(0),i=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),l=n.useCallback(()=>{a.current="",window.clearTimeout(r.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(r.current),[]),[a,i,l]}function eG(e,t,n){var a,r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1,o=(a=e,r=Math.max(l,0),a.map((e,t)=>a[(r+t)%a.length]));1===i.length&&(o=o.filter(e=>e!==n));let s=o.find(e=>e.textValue.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}eU.displayName="SelectBubbleInput",e.s(["Arrow",()=>eO,"Content",()=>eu,"Group",()=>ek,"Icon",()=>es,"Item",()=>eE,"ItemIndicator",()=>eF,"ItemText",()=>eA,"Label",()=>eM,"Portal",()=>ed,"Root",()=>ea,"ScrollDownButton",()=>ez,"ScrollUpButton",()=>eH,"Select",()=>ea,"SelectArrow",()=>eO,"SelectContent",()=>eu,"SelectGroup",()=>ek,"SelectIcon",()=>es,"SelectItem",()=>eE,"SelectItemIndicator",()=>eF,"SelectItemText",()=>eA,"SelectLabel",()=>eM,"SelectPortal",()=>ed,"SelectScrollDownButton",()=>ez,"SelectScrollUpButton",()=>eH,"SelectSeparator",()=>eV,"SelectTrigger",()=>ei,"SelectValue",()=>eo,"SelectViewport",()=>ey,"Separator",()=>eV,"Trigger",()=>ei,"Value",()=>eo,"Viewport",()=>ey,"createSelectScope",()=>X],83830);var e$=e.i(83830),e$=e$,eY=e.i(99105),eZ=e.i(48829);let eX=e$.Root;e$.Group;let eQ=e$.Value,eJ=n.forwardRef(({className:e,children:n,...a},r)=>(0,t.jsxs)(e$.Trigger,{ref:r,className:(0,b.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[n,(0,t.jsx)(e$.Icon,{asChild:!0,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));eJ.displayName=e$.Trigger.displayName;let e0=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollUpButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eZ.ChevronUp,{className:"h-4 w-4"})}));e0.displayName=e$.ScrollUpButton.displayName;let e1=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.ScrollDownButton,{ref:a,className:(0,b.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eY.ChevronDown,{className:"h-4 w-4"})}));e1.displayName=e$.ScrollDownButton.displayName;let e2=n.forwardRef(({className:e,children:n,position:a="popper",...r},i)=>(0,t.jsx)(e$.Portal,{children:(0,t.jsxs)(e$.Content,{ref:i,className:(0,b.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...r,children:[(0,t.jsx)(e0,{}),(0,t.jsx)(e$.Viewport,{className:(0,b.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(e1,{})]})}));e2.displayName=e$.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Label,{ref:a,className:(0,b.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=e$.Label.displayName;let e3=n.forwardRef(({className:e,children:n,...r},i)=>(0,t.jsxs)(e$.Item,{ref:i,className:(0,b.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(e$.ItemIndicator,{children:(0,t.jsx)(a.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(e$.ItemText,{children:n})]}));e3.displayName=e$.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(e$.Separator,{ref:a,className:(0,b.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=e$.Separator.displayName;var e5=e.i(21023);let e4=(0,e5.createServerReference)("406bf02f12ab8ff56d5400983aca745c5fb6584175",e5.callServer,void 0,e5.findSourceMapURL,"updateSettingsAction");var e8=e.i(17406),e6=e.i(98804),e9=e.i(44229),e7=e.i(83902);function te(e){return(0,t.jsx)(e9.Code,{className:(0,b.cn)("h-4 w-4",e.className),...e})}function tt({className:e}){return(0,t.jsx)(e6.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tn({className:e}){return(0,t.jsx)(e6.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ta({className:e}){return(0,t.jsx)(e6.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(e6.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,b.cn)("rounded-sm object-contain",e)})}function ti({className:e,...n}){return(0,t.jsx)(e7.Rocket,{className:(0,b.cn)("h-4 w-4",e),...n})}tt.displayName="VsCodeIcon",tn.displayName="CursorEditorIcon",ta.displayName="WindsurfIcon",tr.displayName="ZedIcon",ti.displayName="AntigravityIcon";let tl={vscode:tt,cursor:tn,windsurf:ta,zed:tr,antigravity:ti};var to=e.i(41413),ts=e.i(77624),td=["PageUp","PageDown"],tc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tu={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},tp="Slider",[tm,th,tf]=(0,k.createCollection)(tp),[tg,tx]=(0,M.createContextScope)(tp,[tf]),[tv,tb]=tg(tp),tw=n.forwardRef((e,a)=>{let{name:r,min:i=0,max:l=100,step:o=1,orientation:s="horizontal",disabled:d=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[i],value:p,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:f=!1,form:g,...x}=e,v=n.useRef(new Set),b=n.useRef(0),w="horizontal"===s,[y=[],S]=(0,B.useControllableState)({prop:p,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),m(e)}}),k=n.useRef(y);function I(e,t,{commit:n}={commit:!1}){let a,r=(String(o).split(".")[1]||"").length,s=Math.round((Math.round((e-i)/o)*o+i)*(a=Math.pow(10,r)))/a,d=(0,j.clamp)(s,[i,l]);S((e=[])=>{let a=function(e=[],t,n){let a=[...e];return a[n]=t,a.sort((e,t)=>e-t)}(e,d,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,n)=>e[n+1]-t))>=t;return!0}(a,c*o))return e;{b.current=a.indexOf(d);let t=String(a)!==String(e);return t&&n&&h(a),t?a:e}})}return(0,t.jsx)(tv,{scope:e.__scopeSlider,name:r,disabled:d,min:i,max:l,valueIndexToChangeRef:b,thumbs:v.current,values:y,orientation:s,form:g,children:(0,t.jsx)(tm.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(tm.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?tj:tC,{"aria-disabled":d,"data-disabled":d?"":void 0,...x,ref:a,onPointerDown:(0,C.composeEventHandlers)(x.onPointerDown,()=>{d||(k.current=y)}),min:i,max:l,inverted:f,onSlideStart:d?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let n=e.map(e=>Math.abs(e-t)),a=Math.min(...n);return n.indexOf(a)}(y,e);I(e,t)},onSlideMove:d?void 0:function(e){I(e,b.current)},onSlideEnd:d?void 0:function(){let e=k.current[b.current];y[b.current]!==e&&h(y)},onHomeKeyDown:()=>!d&&I(i,0,{commit:!0}),onEndKeyDown:()=>!d&&I(l,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!d){let n=td.includes(e.key)||e.shiftKey&&tc.includes(e.key),a=b.current;I(y[a]+o*(n?10:1)*t,a,{commit:!0})}}})})})})});tw.displayName=tp;var[ty,tS]=tg(tp,{startEdge:"left",endEdge:"right",size:"width",direction:1}),tj=n.forwardRef((e,a)=>{let{min:r,max:i,dir:l,inverted:o,onSlideStart:s,onSlideMove:d,onSlideEnd:c,onStepKeyDown:u,...p}=e,[m,h]=n.useState(null),f=(0,I.useComposedRefs)(a,e=>h(e)),g=n.useRef(void 0),x=(0,N.useDirection)(l),v="ltr"===x,b=v&&!o||!v&&o;function w(e){let t=g.current||m.getBoundingClientRect(),n=tF([0,t.width],b?[r,i]:[i,r]);return g.current=t,n(e-t.left)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(tk,{dir:x,"data-orientation":"horizontal",...p,ref:f,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);s?.(t)},onSlideMove:e=>{let t=w(e.clientX);d?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=tu[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),tC=n.forwardRef((e,a)=>{let{min:r,max:i,inverted:l,onSlideStart:o,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=e,p=n.useRef(null),m=(0,I.useComposedRefs)(a,p),h=n.useRef(void 0),f=!l;function g(e){let t=h.current||p.current.getBoundingClientRect(),n=tF([0,t.height],f?[i,r]:[r,i]);return h.current=t,n(e-t.top)}return(0,t.jsx)(ty,{scope:e.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,t.jsx)(tk,{"data-orientation":"vertical",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=g(e.clientY);o?.(t)},onSlideMove:e=>{let t=g(e.clientY);s?.(t)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:e=>{let t=tu[f?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),tk=n.forwardRef((e,n)=>{let{__scopeSlider:a,onSlideStart:r,onSlideMove:i,onSlideEnd:l,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:d,...c}=e,u=tb(tp,a);return(0,t.jsx)(F.Primitive.span,{...c,ref:n,onKeyDown:(0,C.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(o(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):td.concat(tc).includes(e.key)&&(d(e),e.preventDefault())}),onPointerDown:(0,C.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:(0,C.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:(0,C.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))})})}),tI="SliderTrack",tM=n.forwardRef((e,n)=>{let{__scopeSlider:a,...r}=e,i=tb(tI,a);return(0,t.jsx)(F.Primitive.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:n})});tM.displayName=tI;var tN="SliderRange",tP=n.forwardRef((e,a)=>{let{__scopeSlider:r,...i}=e,l=tb(tN,r),o=tS(tN,r),s=n.useRef(null),d=(0,I.useComposedRefs)(a,s),c=l.values.length,u=l.values.map(e=>tD(e,l.min,l.max)),p=c>1?Math.min(...u):0,m=100-Math.max(...u);return(0,t.jsx)(F.Primitive.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...i,ref:d,style:{...e.style,[o.startEdge]:p+"%",[o.endEdge]:m+"%"}})});tP.displayName=tN;var tR="SliderThumb",tE=n.forwardRef((e,a)=>{let r=th(e.__scopeSlider),[i,l]=n.useState(null),o=(0,I.useComposedRefs)(a,e=>l(e)),s=n.useMemo(()=>i?r().findIndex(e=>e.ref.current===i):-1,[r,i]);return(0,t.jsx)(tT,{...e,ref:o,index:s})}),tT=n.forwardRef((e,a)=>{var r,i,l,o,s;let d,c,{__scopeSlider:u,index:p,name:m,...h}=e,f=tb(tR,u),g=tS(tR,u),[x,v]=n.useState(null),b=(0,I.useComposedRefs)(a,e=>v(e)),w=!x||f.form||!!x.closest("form"),y=(0,ts.useSize)(x),S=f.values[p],j=void 0===S?0:tD(S,f.min,f.max),k=(r=p,(i=f.values.length)>2?`Value ${r+1} of ${i}`:2===i?["Minimum","Maximum"][r]:void 0),M=y?.[g.size],N=M?(l=M,o=j,s=g.direction,c=tF([0,50],[0,d=l/2]),(d-c(o)*s)*s):0;return n.useEffect(()=>{if(x)return f.thumbs.add(x),()=>{f.thumbs.delete(x)}},[x,f.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[g.startEdge]:`calc(${j}% + ${N}px)`},children:[(0,t.jsx)(tm.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(F.Primitive.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":f.min,"aria-valuenow":S,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...h,ref:b,style:void 0===S?{display:"none"}:e.style,onFocus:(0,C.composeEventHandlers)(e.onFocus,()=>{f.valueIndexToChangeRef.current=p})})}),w&&(0,t.jsx)(tA,{name:m??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:S},p)]})});tE.displayName=tR;var tA=n.forwardRef(({__scopeSlider:e,value:a,...r},i)=>{let l=n.useRef(null),o=(0,I.useComposedRefs)(l,i),s=(0,_.usePrevious)(a);return n.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(s!==a&&t){let n=new Event("input",{bubbles:!0});t.call(e,a),e.dispatchEvent(n)}},[s,a]),(0,t.jsx)(F.Primitive.input,{style:{display:"none"},...r,ref:o,defaultValue:a})});function tD(e,t,n){return(0,j.clamp)(100/(n-t)*(e-t),[0,100])}function tF(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}tA.displayName="RadioBubbleInput",e.s(["Range",()=>tP,"Root",()=>tw,"Slider",()=>tw,"SliderRange",()=>tP,"SliderThumb",()=>tE,"SliderTrack",()=>tM,"Thumb",()=>tE,"Track",()=>tM,"createSliderScope",()=>tx],29991);var tL=e.i(29991),tL=tL;function tH({className:e,defaultValue:a,value:r,min:i=0,max:l=100,...o}){let s=n.useMemo(()=>Array.isArray(r)?r:Array.isArray(a)?a:[i,l],[r,a,i,l]);return(0,t.jsxs)(tL.Root,{"data-slot":"slider",defaultValue:a,value:r,min:i,max:l,className:(0,b.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...o,children:[(0,t.jsx)(tL.Track,{"data-slot":"slider-track",className:(0,b.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(tL.Range,{"data-slot":"slider-range",className:(0,b.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:s.length},(e,n)=>(0,t.jsx)(tL.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},n))]})}let tB=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],tz=tB.length-1;function t_(e){let t=0,n=Math.abs(e-tB[0]);for(let a=1;a<tB.length;a++){let r=Math.abs(e-tB[a]);r<n&&(n=r,t=a)}return t}function tV({id:e,testId:a,value:r,onChange:i,onBlur:l,defaultSeconds:o=1800}){var s;let d,c,u=(""===r?o:parseInt(r,10))||o,[p,m]=(0,n.useState)(()=>t_(u)),h=t_(u);h!==p&&tB[p]!==u&&m(h);let f=(0,n.useCallback)(([e])=>{m(e),i(String(tB[e]))},[i]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(tH,{id:e,"data-testid":a,min:0,max:tz,step:1,value:[p],onValueChange:f,onValueCommit:()=>l(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-right text-xs tabular-nums",children:(d=Math.floor((s=tB[p])/3600),c=Math.round(s%3600/60),0===d?`${c}m`:0===c?`${d}h`:`${d}h ${c}m`)})]})}let tW=[{value:e8.EditorType.VsCode,label:"VS Code"},{value:e8.EditorType.Cursor,label:"Cursor"},{value:e8.EditorType.Windsurf,label:"Windsurf"},{value:e8.EditorType.Zed,label:"Zed"},{value:e8.EditorType.Antigravity,label:"Antigravity"}],tO=[{value:"bash",label:"Bash"},{value:"zsh",label:"Zsh"},{value:"fish",label:"Fish"}],tU=[{id:"agent",label:"Agent",icon:r.Bot},{id:"environment",label:"Environment",icon:i.Terminal},{id:"workflow",label:"Workflow",icon:l.GitBranch},{id:"ci",label:"CI",icon:s},{id:"stage-timeouts",label:"Timeouts",icon:g.Timer},{id:"notifications",label:"Notifications",icon:d},{id:"feature-flags",label:"Flags",icon:c},{id:"interactive-agent",label:"Chat",icon:x.MessageSquare},{id:"database",label:"Database",icon:u}];function tK({label:e,description:n,htmlFor:a,children:r}){return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(w.Label,{htmlFor:a,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),n?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:n}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r})]})}function tq({label:e,description:n,id:a,testId:r,checked:i,onChange:l,disabled:o}){return(0,t.jsx)(tK,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(y.Switch,{id:a,"data-testid":r,checked:i,onCheckedChange:l,disabled:o,className:(0,b.cn)("cursor-pointer",o&&"cursor-not-allowed opacity-50")})})}function tG({icon:e,title:n,description:a,badge:r,testId:i,children:l}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":i,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:n}),r?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:r}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:l})]})}function t$({id:e,testId:n,value:a,onChange:r,onBlur:i,placeholder:l,min:o=1,max:s,step:d=1,suffix:c}){let u=""===a?void 0:parseInt(a,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{r(String(Math.max(o,(u??parseInt(l,10))-d)))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":"Decrease",children:(0,t.jsx)(p.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":n,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:a,placeholder:l,onChange:e=>{r(e.target.value.replace(/[^0-9]/g,""))},onBlur:i,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=u??parseInt(l,10),r(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:i,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":"Increase",children:(0,t.jsx)(m.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tY({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function tZ({children:e,links:n}){return(0,t.jsxs)("div",{className:"hidden pt-2 lg:block",children:[(0,t.jsx)("p",{className:"text-muted-foreground/70 text-[11px] leading-relaxed",children:e}),null!=n&&n.length>0?(0,t.jsx)("div",{className:"mt-2 flex flex-col gap-1",children:n.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(h.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tX({settings:e,shepHome:o,dbFileSize:p,availableTerminals:m}){let{showSaving:h,showSaved:w,save:y}=function(){let[e,t]=(0,n.useTransition)(),[a,r]=(0,n.useState)(!1),[i,l]=(0,n.useState)(!1),o=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(r(!0),s.current=!1,o.current=setTimeout(()=>{o.current=null,s.current&&(r(!1),l(!0),setTimeout(()=>l(!1),2e3))},350)),!e&&a&&(s.current=!0,o.current||(r(!1),l(!0),setTimeout(()=>l(!1),2e3)))},[e,a]),{showSaving:a,showSaved:i,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e4(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),S=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1},[j,C]=(0,n.useState)(e.agent.type),[k,I]=(0,n.useState)(e.environment.defaultEditor),[M,N]=(0,n.useState)(e.environment.shellPreference),[P,R]=(0,n.useState)(e.environment.terminalPreference??e8.TerminalType.System),E=m?m.filter(e=>e.available):[{id:e8.TerminalType.System,name:"System Terminal",available:!0}],[T,A]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[D,F]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[L,H]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[B,z]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[_,V]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[W,O]=(0,n.useState)(e.workflow.enableEvidence),[U,K]=(0,n.useState)(e.workflow.commitEvidence),[q,G]=(0,n.useState)(!1!==e.workflow.ciWatchEnabled),[$,Y]=(0,n.useState)(!1!==e.workflow.hideCiStatus),[Z,X]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[Q,J]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[ee,et]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[en,ea]=(0,n.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),er=e.workflow.stageTimeouts,[ei,el]=(0,n.useState)(String(Math.round((er?.analyzeMs??18e5)/1e3))),[eo,es]=(0,n.useState)(String(Math.round((er?.requirementsMs??18e5)/1e3))),[ed,ec]=(0,n.useState)(String(Math.round((er?.researchMs??18e5)/1e3))),[eu,ep]=(0,n.useState)(String(Math.round((er?.planMs??18e5)/1e3))),[em,eh]=(0,n.useState)(String(Math.round((er?.implementMs??18e5)/1e3))),[ef,eg]=(0,n.useState)(String(Math.round((er?.mergeMs??18e5)/1e3))),ex=e.workflow.analyzeRepoTimeouts,[ev,eb]=(0,n.useState)(String(Math.round((ex?.analyzeMs??6e5)/1e3))),ew=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[ey,eS]=(0,n.useState)(ew.enabled),[ej,eC]=(0,n.useState)(String(ew.autoTimeoutMinutes)),[ek,eI]=(0,n.useState)(String(ew.maxConcurrentSessions)),[eM,eN]=(0,n.useState)(e.notifications.inApp.enabled),[eP,eR]=(0,n.useState)({...e.notifications.events}),[eE,eT]=(0,n.useState)({...S}),eA=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",eD=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eF=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",eL=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"",eH=er?.analyzeMs!=null?String(Math.round(er.analyzeMs/1e3)):"",eB=er?.requirementsMs!=null?String(Math.round(er.requirementsMs/1e3)):"",ez=er?.researchMs!=null?String(Math.round(er.researchMs/1e3)):"",e_=er?.planMs!=null?String(Math.round(er.planMs/1e3)):"",eV=er?.implementMs!=null?String(Math.round(er.implementMs/1e3)):"",eW=er?.mergeMs!=null?String(Math.round(er.mergeMs/1e3)):"",eO=ex?.analyzeMs!=null?String(Math.round(ex.analyzeMs/1e3)):"";function eU(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function eK(e){if(void 0===e)return;let t=eU(e);return null!=t?1e3*t:void 0}function eq(e={}){let t=eU(e.ciTimeout??Q);return{workflow:{openPrOnImplementationComplete:e.openPr??T,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??D,allowPrd:e.allowPrd??L,allowPlan:e.allowPlan??B,allowMerge:e.allowMerge??_},enableEvidence:e.enableEvidence??W,commitEvidence:e.commitEvidence??U,ciWatchEnabled:e.ciWatchEnabled??q,hideCiStatus:e.hideCiStatus??$,ciMaxFixAttempts:eU(e.ciMaxFix??Z),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:eU(e.ciLogMax??ee),ciWatchPollIntervalSeconds:eU(e.ciPollInterval??en),stageTimeouts:{analyzeMs:eK(e.analyzeTimeout??ei),requirementsMs:eK(e.requirementsTimeout??eo),researchMs:eK(e.researchTimeout??ed),planMs:eK(e.planTimeout??eu),implementMs:eK(e.implementTimeout??em),mergeMs:eK(e.mergeTimeout??ef)},analyzeRepoTimeouts:{analyzeMs:eK(e.analyzeRepoTimeout??ev)}}}}function eG(e={}){return{notifications:{inApp:{enabled:e.inApp??eM},events:e.events??eP}}}let[e$,eY]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=tU.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&eY(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let eZ=(0,n.useCallback)(e=>{let t=document.getElementById(`section-${e}`);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),t.style.animation="none",t.offsetHeight,t.style.animation="section-flash 1s ease-out")},[]);return(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl",children:[(0,t.jsx)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 grid grid-cols-1 gap-x-5 pt-6 pb-4 backdrop-blur lg:grid-cols-[1fr_280px]",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Settings"}),(0,t.jsxs)("span",{className:"relative h-4 w-16",children:[(0,t.jsx)("span",{className:(0,b.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",h?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,b.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",w&&!h?"opacity-100":"opacity-0"),children:[(0,t.jsx)(a.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:tU.map(e=>{let n=e.icon,a=e$===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>eZ(e.id),className:(0,b.cn)("flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 text-[11px] transition-all",a?"bg-accent text-foreground font-medium":"text-muted-foreground/60 hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(n,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id)})})]})}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{id:"section-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsx)(tG,{icon:r.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:(0,t.jsx)(tK,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(to.AgentModelPicker,{initialAgentType:j,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>C(e),className:"w-55"})})}),(0,t.jsx)(tZ,{links:[{label:"Agent system",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/agent-system.md"},{label:"Adding agents",href:"https://github.com/shep-ai/cli/blob/main/docs/development/adding-agents.md"},{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Choose which AI coding agent powers your features. Each agent supports different models and capabilities. Authentication is resolved automatically via your active session."})]}),(0,t.jsxs)("div",{id:"section-environment",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:i.Terminal,title:"Environment",description:"Editor, shell, and terminal preferences",testId:"environment-settings-section",children:[(0,t.jsx)(tK,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(eX,{value:k,onValueChange:e=>{I(e),y({environment:{defaultEditor:e,shellPreference:M,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tW.map(e=>{var n;let a=(n=e.value)&&n in tl?tl[n]:te;return(0,t.jsx)(e3,{value:e.value,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(a,{className:"h-4 w-4 shrink-0"}),e.label]})},e.value)})})]})}),(0,t.jsx)(tK,{label:"Shell",description:"Default shell for generated scripts",htmlFor:"shell-preference",children:(0,t.jsxs)(eX,{value:M,onValueChange:e=>{N(e),y({environment:{defaultEditor:k,shellPreference:e,terminalPreference:P}})},children:[(0,t.jsx)(eJ,{id:"shell-preference","data-testid":"shell-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:tO.map(e=>(0,t.jsx)(e3,{value:e.value,children:e.label},e.value))})]})}),(0,t.jsx)(tK,{label:"Terminal",description:"Terminal emulator for shell sessions",htmlFor:"terminal-preference",children:(0,t.jsxs)(eX,{value:P,onValueChange:e=>{R(e),y({environment:{defaultEditor:k,shellPreference:M,terminalPreference:e}})},children:[(0,t.jsx)(eJ,{id:"terminal-preference","data-testid":"terminal-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(eQ,{})}),(0,t.jsx)(e2,{children:E.map(e=>(0,t.jsx)(e3,{value:e.id,children:e.name},e.id))})]})})]}),(0,t.jsx)(tZ,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor opens files for review. The shell setting controls generated scripts. The terminal emulator is launched when opening shell sessions from the web UI."})]}),(0,t.jsxs)("div",{id:"section-workflow",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:l.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tY,{children:"Approve"}),(0,t.jsx)(tq,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:L,onChange:e=>{H(e),y(eq({allowPrd:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:B,onChange:e=>{z(e),y(eq({allowPlan:e}))}}),(0,t.jsx)(tq,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:_,onChange:e=>{V(e),y(eq({allowMerge:e}))}}),(0,t.jsx)(tY,{children:"Evidence"}),(0,t.jsx)(tq,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:W,onChange:e=>{O(e),e?y(eq({enableEvidence:e})):(K(!1),y(eq({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:U,disabled:!W||!T,onChange:e=>{K(e),y(eq({commitEvidence:e}))}}),(0,t.jsx)(tY,{children:"Git"}),(0,t.jsx)(tq,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:D,onChange:e=>{F(e),y(eq({pushOnComplete:e}))}}),(0,t.jsx)(tq,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:T,onChange:e=>{A(e),e?y(eq({openPr:e})):(K(!1),y(eq({openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(tq,{label:"Watch CI after push",description:"Monitor CI and auto-fix failures. Disable to avoid rate limits.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:q,onChange:e=>{G(e),y(eq({ciWatchEnabled:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Approval gates",href:"https://github.com/shep-ai/cli/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:"Push & PR flags",href:"https://github.com/shep-ai/cli/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:"Control how autonomous each feature run is. Auto-approve skips the human review pause at each phase. Push and PR options control what happens after successful implementation."})]}),(0,t.jsxs)("div",{id:"section-ci",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:s,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tK,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(t$,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Z,onChange:X,onBlur:()=>{Z!==eA&&y(eq({ciMaxFix:Z}))},min:1,max:10})}),(0,t.jsx)(tK,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(t$,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:Q,onChange:J,onBlur:()=>{Q!==eD&&y(eq({ciTimeout:Q}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tK,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(t$,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:ee,onChange:et,onBlur:()=>{ee!==eF&&y(eq({ciLogMax:ee}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(tK,{label:"Poll interval",description:"How often to check GitHub for CI status updates",htmlFor:"ci-poll-interval",children:(0,t.jsx)(t$,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:en,onChange:ea,onBlur:()=>{en!==eL&&y(eq({ciPollInterval:en}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(tq,{label:"Hide CI status",description:"Hide CI status badges from feature drawer and merge review",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:$,onChange:e=>{Y(e),y(eq({hideCiStatus:e}))}})]}),(0,t.jsx)(tZ,{links:[{label:"CI/CD pipeline",href:"https://github.com/shep-ai/cli/blob/main/docs/development/cicd.md"},{label:"CI security gates",href:"https://github.com/shep-ai/cli/blob/main/specs/003-cicd-security-gates/spec.md"}],children:"When a feature completes, the agent can watch CI and auto-fix failures. These limits prevent runaway retries and control how much log output is sent to the agent for analysis."})]}),(0,t.jsxs)("div",{id:"section-stage-timeouts",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:g.Timer,title:"Stage Timeouts",description:"Maximum execution time per agent stage",testId:"stage-timeouts-settings-section",children:[(0,t.jsx)(tY,{children:"Feature Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze",children:(0,t.jsx)(tV,{id:"timeout-analyze",testId:"timeout-analyze-input",value:ei,onChange:el,onBlur:()=>{ei!==eH&&y(eq({analyzeTimeout:ei}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Requirements",description:"Requirements gathering timeout",htmlFor:"timeout-requirements",children:(0,t.jsx)(tV,{id:"timeout-requirements",testId:"timeout-requirements-input",value:eo,onChange:es,onBlur:()=>{eo!==eB&&y(eq({requirementsTimeout:eo}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Research",description:"Technical research timeout",htmlFor:"timeout-research",children:(0,t.jsx)(tV,{id:"timeout-research",testId:"timeout-research-input",value:ed,onChange:ec,onBlur:()=>{ed!==ez&&y(eq({researchTimeout:ed}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Plan",description:"Implementation planning timeout",htmlFor:"timeout-plan",children:(0,t.jsx)(tV,{id:"timeout-plan",testId:"timeout-plan-input",value:eu,onChange:ep,onBlur:()=>{eu!==e_&&y(eq({planTimeout:eu}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Implement",description:"Code implementation timeout",htmlFor:"timeout-implement",children:(0,t.jsx)(tV,{id:"timeout-implement",testId:"timeout-implement-input",value:em,onChange:eh,onBlur:()=>{em!==eV&&y(eq({implementTimeout:em}))},defaultSeconds:1800})}),(0,t.jsx)(tK,{label:"Merge",description:"PR creation and merge timeout",htmlFor:"timeout-merge",children:(0,t.jsx)(tV,{id:"timeout-merge",testId:"timeout-merge-input",value:ef,onChange:eg,onBlur:()=>{ef!==eW&&y(eq({mergeTimeout:ef}))},defaultSeconds:1800})}),(0,t.jsx)(tY,{children:"Analyze Repository Agent"}),(0,t.jsx)(tK,{label:"Analyze",description:"Repository analysis timeout",htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(tV,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:ev,onChange:eb,onBlur:()=>{ev!==eO&&y(eq({analyzeRepoTimeout:ev}))},defaultSeconds:600})})]}),(0,t.jsx)(tZ,{children:"Each agent has independently configurable stage timeouts. When a stage exceeds its timeout, the agent is terminated. Longer timeouts are useful for complex implementations. Feature agent defaults to 30 minutes per stage. Analyze repository agent defaults to 10 minutes."})]}),(0,t.jsxs)("div",{id:"section-notifications",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:d,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tY,{children:"Channels"}),(0,t.jsx)(tq,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:eM,onChange:e=>{eN(e),y(eG({inApp:e}))}}),(0,t.jsx)(tY,{children:"Agent Events"}),(0,t.jsx)(tq,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:eP.agentStarted,onChange:e=>{let t={...eP,agentStarted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:eP.phaseCompleted,onChange:e=>{let t={...eP,phaseCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:eP.waitingApproval,onChange:e=>{let t={...eP,waitingApproval:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:eP.agentCompleted,onChange:e=>{let t={...eP,agentCompleted:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:eP.agentFailed,onChange:e=>{let t={...eP,agentFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tY,{children:"Pull Request Events"}),(0,t.jsx)(tq,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:eP.prMerged,onChange:e=>{let t={...eP,prMerged:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:eP.prClosed,onChange:e=>{let t={...eP,prClosed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:eP.prChecksPassed,onChange:e=>{let t={...eP,prChecksPassed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:eP.prChecksFailed,onChange:e=>{let t={...eP,prChecksFailed:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"PR blocked",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:eP.prBlocked,onChange:e=>{let t={...eP,prBlocked:e};eR(t),y(eG({events:t}))}}),(0,t.jsx)(tq,{label:"Merge review ready",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:eP.mergeReviewReady,onChange:e=>{let t={...eP,mergeReviewReady:e};eR(t),y(eG({events:t}))}})]}),(0,t.jsx)(tZ,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"In-app toast notifications keep you in the loop. Fine-tune which agent lifecycle events trigger a notification."})]}),(0,t.jsxs)("div",{id:"section-feature-flags",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:c,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tq,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:eE.skills,onChange:e=>{let t={...eE,skills:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:eE.envDeploy,onChange:e=>{let t={...eE,envDeploy:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:eE.debug,onChange:e=>{let t={...eE,debug:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"GitHub Import",description:"Enable GitHub repository import in the web UI",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:eE.githubImport,onChange:e=>{let t={...eE,githubImport:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Adopt Branch",description:"Import existing branches as tracked features",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:eE.adoptBranch,onChange:e=>{let t={...eE,adoptBranch:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"Git Rebase & Sync",description:"Enable git rebase-on-main and sync-main operations",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:eE.gitRebaseSync,onChange:e=>{let t={...eE,gitRebaseSync:e};eT(t),y({featureFlags:t})}}),(0,t.jsx)(tq,{label:"React File Manager",description:"Use the built-in React file manager instead of the native OS folder picker",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:eE.reactFileManager,onChange:e=>{let t={...eE,reactFileManager:e};eT(t),y({featureFlags:t})}})]}),(0,t.jsx)(tZ,{children:"Experimental features that are still under development. Enable at your own risk — they may change or be removed in future versions. Debug mode adds verbose logging useful for troubleshooting."})]}),(0,t.jsxs)("div",{id:"section-interactive-agent",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:x.MessageSquare,title:"Interactive Agent",description:"Chat tab settings for per-feature interactive agent sessions",testId:"interactive-agent-settings-section",children:[(0,t.jsx)(tq,{label:"Enable Chat tab",description:"Show the Chat tab on all feature detail pages",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:ey,onChange:e=>{eS(e),y({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:parseInt(ek,10)||3}})}}),(0,t.jsx)(tK,{label:"Auto-timeout",description:"Minutes of inactivity before the agent is stopped automatically (1–120)",htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(t$,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:ej,placeholder:"15",min:1,max:120,suffix:"min",onChange:eC,onBlur:()=>{let e=parseInt(ej,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));eC(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(ek,10)||3}})}})}),(0,t.jsx)(tK,{label:"Max concurrent sessions",description:"Maximum number of active interactive agent sessions at once (1–10)",htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(t$,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:ek,placeholder:"3",min:1,max:10,onChange:eI,onBlur:()=>{let e=parseInt(ek,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));eI(String(t)),y({interactiveAgent:{enabled:ey,autoTimeoutMinutes:parseInt(ej,10)||15,maxConcurrentSessions:t}})}})})]}),(0,t.jsx)(tZ,{children:"The Chat tab spawns a persistent agent process per feature. Auto-timeout stops idle sessions automatically to conserve resources. The concurrent session cap prevents runaway resource usage on developer machines."})]}),(0,t.jsxs)("div",{id:"section-database",className:"grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]",children:[(0,t.jsxs)(tG,{icon:u,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tK,{label:"Location",description:"Path to the local SQLite database",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shep-home-path",children:o})}),(0,t.jsx)(tK,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:p})})]}),(0,t.jsx)(tZ,{links:[{label:"Settings service",href:"https://github.com/shep-ai/cli/blob/main/docs/architecture/settings-service.md"},{label:"Settings spec",href:"https://github.com/shep-ai/cli/blob/main/specs/005-global-settings-service/spec.md"}],children:"All settings are stored in a local SQLite database at ~/.shep/data. The database uses a singleton record pattern with automatic migrations on startup."})]})]})]})}e.s(["SettingsPageClient",()=>tX],41952)}]);