@shepai/cli 1.106.2 → 1.106.3

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 (127) hide show
  1. package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +1 -1
  2. package/dist/tsconfig.build.tsbuildinfo +1 -1
  3. package/package.json +1 -1
  4. package/web/.next/BUILD_ID +1 -1
  5. package/web/.next/build-manifest.json +2 -2
  6. package/web/.next/fallback-build-manifest.json +2 -2
  7. package/web/.next/prerender-manifest.json +3 -3
  8. package/web/.next/required-server-files.js +2 -2
  9. package/web/.next/required-server-files.json +2 -2
  10. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +20 -20
  11. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  12. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  13. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +25 -25
  14. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +25 -25
  17. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  18. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  20. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  21. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  22. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +20 -20
  23. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  24. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +25 -25
  26. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +25 -25
  29. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  30. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +18 -18
  32. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  33. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  34. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +18 -18
  35. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  36. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  37. package/web/.next/server/app/_global-error.html +2 -2
  38. package/web/.next/server/app/_global-error.rsc +1 -1
  39. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  40. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  41. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  42. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  43. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  44. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  45. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
  47. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  48. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
  50. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
  52. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
  54. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/chunks/[root-of-the-server]__f47bb8a5._.js +1 -1
  56. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  57. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  58. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_0a7546ed.js +1 -1
  59. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_0a7546ed.js.map +1 -1
  60. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_978cbb4c.js +1 -1
  61. package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_978cbb4c.js.map +1 -1
  62. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
  63. package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
  64. package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
  65. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  66. package/web/.next/server/chunks/ssr/[root-of-the-server]__51fc98b0._.js +1 -1
  67. package/web/.next/server/chunks/ssr/[root-of-the-server]__51fc98b0._.js.map +1 -1
  68. package/web/.next/server/chunks/ssr/[root-of-the-server]__57f37786._.js +1 -1
  69. package/web/.next/server/chunks/ssr/[root-of-the-server]__57f37786._.js.map +1 -1
  70. package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
  71. package/web/.next/server/chunks/ssr/[root-of-the-server]__708dcad1._.js +1 -1
  72. package/web/.next/server/chunks/ssr/[root-of-the-server]__708dcad1._.js.map +1 -1
  73. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js +1 -1
  74. package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +1 -1
  75. package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
  76. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e002910._.js +1 -1
  77. package/web/.next/server/chunks/ssr/[root-of-the-server]__8e002910._.js.map +1 -1
  78. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
  79. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  80. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
  81. package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
  82. package/web/.next/server/chunks/ssr/{_52bb01a9._.js → _025a2fa0._.js} +2 -2
  83. package/web/.next/server/chunks/ssr/{_52bb01a9._.js.map → _025a2fa0._.js.map} +1 -1
  84. package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
  85. package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
  86. package/web/.next/server/chunks/ssr/{_949f04ba._.js → _1f9b7ad3._.js} +2 -2
  87. package/web/.next/server/chunks/ssr/{_949f04ba._.js.map → _1f9b7ad3._.js.map} +1 -1
  88. package/web/.next/server/chunks/ssr/{_bec233fd._.js → _8afac0ca._.js} +2 -2
  89. package/web/.next/server/chunks/ssr/{_bec233fd._.js.map → _8afac0ca._.js.map} +1 -1
  90. package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
  91. package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
  92. package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
  93. package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
  94. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  95. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  96. package/web/.next/server/chunks/ssr/src_presentation_web_7275ce5d._.js +2 -2
  97. package/web/.next/server/chunks/ssr/src_presentation_web_7275ce5d._.js.map +1 -1
  98. package/web/.next/server/chunks/ssr/src_presentation_web_758dfa10._.js +2 -2
  99. package/web/.next/server/chunks/ssr/src_presentation_web_758dfa10._.js.map +1 -1
  100. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_84803221.js +1 -1
  101. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_84803221.js.map +1 -1
  102. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
  103. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
  104. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
  105. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
  106. package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
  107. package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
  108. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  109. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  110. package/web/.next/server/pages/500.html +2 -2
  111. package/web/.next/server/server-reference-manifest.js +1 -1
  112. package/web/.next/server/server-reference-manifest.json +30 -30
  113. package/web/.next/static/chunks/{9ca0d675bf5d98c2.js → 29c29800f5a2acc6.js} +1 -1
  114. package/web/.next/static/chunks/{76814cd97c0a92de.js → 77ae4e64052864f9.js} +2 -2
  115. package/web/.next/static/chunks/79474459eb409359.js +1 -0
  116. package/web/.next/static/chunks/{900aedf6e293c4ac.js → 8c0f3126502dea0a.js} +1 -1
  117. package/web/.next/static/chunks/8c3a1b4dd386fb21.js +1 -0
  118. package/web/.next/static/chunks/{1942195f7ab34047.js → b1eadf24106c53ce.js} +1 -1
  119. package/web/.next/static/chunks/{36ae564826a3fd31.js → b2b65ee0666a829a.js} +1 -1
  120. package/web/.next/static/chunks/{aee0323baf10b478.js → c750d771701b9b97.js} +1 -1
  121. package/web/.next/static/chunks/{012863314e48986d.js → d4ee1f8f03cee0aa.js} +1 -1
  122. package/web/.next/static/chunks/{da47c9075566521a.js → ea320f314a210a70.js} +2 -2
  123. package/web/.next/static/chunks/2cdf7a22c07f9d92.js +0 -1
  124. package/web/.next/static/chunks/dae2a000b44bad21.js +0 -1
  125. /package/web/.next/static/{zDqLR-kqhRwNcPV4PFtal → uT0QQwg2cbMo46NG69Bky}/_buildManifest.js +0 -0
  126. /package/web/.next/static/{zDqLR-kqhRwNcPV4PFtal → uT0QQwg2cbMo46NG69Bky}/_clientMiddlewareManifest.json +0 -0
  127. /package/web/.next/static/{zDqLR-kqhRwNcPV4PFtal → uT0QQwg2cbMo46NG69Bky}/_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(87889),o=e.i(3645);let l=(0,o.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var r=e.i(23925),i=e.i(26370),s=e.i(38573),d=e.i(49228);let c=(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"}]]),u=(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"}]]),p=(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"}]]),h=(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 m=e.i(61569),m=m,f=e.i(3214),g=e.i(30702);let x=(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 v=e.i(60112),w=e.i(31777),b=e.i(41957),y=e.i(98127),j=e.i(35364),C=e.i(51911),k=e.i(2828),S=e.i(26036),N=e.i(27069),I=e.i(91967),E=e.i(87342),P=e.i(5978),M=e.i(22528),T=e.i(66033),A=e.i(53532),R=e.i(41687),D=e.i(56720),L=e.i(13123),F=e.i(52740),H=e.i(39979),B=e.i(87620),V=e.i(86874),_=e.i(29297),O=e.i(36589),W=e.i(5192),z=e.i(23405),U=e.i(1693),K=e.i(73772),G=e.i(13044),q=[" ","Enter","ArrowUp","ArrowDown"],Y=[" ","Enter"],Z="Select",[Q,X,$]=(0,E.createCollection)(Z),[J,ee]=(0,M.createContextScope)(Z,[$,F.createPopperScope]),et=(0,F.createPopperScope)(),[en,ea]=J(Z),[eo,el]=J(Z),er=e=>{let{__scopeSelect:a,children:o,open:l,defaultOpen:r,onOpenChange:i,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:h,disabled:m,required:f,form:g}=e,x=et(a),[v,w]=n.useState(null),[b,y]=n.useState(null),[j,C]=n.useState(!1),k=(0,T.useDirection)(u),[S,N]=(0,O.useControllableState)({prop:l,defaultProp:r??!1,onChange:i,caller:Z}),[I,E]=(0,O.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:Z}),P=n.useRef(null),M=!v||g||!!v.closest("form"),[A,R]=n.useState(new Set),D=Array.from(A).map(e=>e.props.value).join(";");return(0,t.jsx)(F.Root,{...x,children:(0,t.jsxs)(en,{required:f,scope:a,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:j,onValueNodeHasChildrenChange:C,contentId:(0,L.useId)(),value:I,onValueChange:E,open:S,onOpenChange:N,dir:k,triggerPointerDownPosRef:P,disabled:m,children:[(0,t.jsx)(Q.Provider,{scope:a,children:(0,t.jsx)(eo,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{R(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{R(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:o})}),M?(0,t.jsxs)(eq,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:h,value:I,onChange:e=>E(e.target.value),disabled:m,form:g,children:[void 0===I?(0,t.jsx)("option",{value:""}):null,Array.from(A)]},D):null]})})};er.displayName=Z;var ei="SelectTrigger",es=n.forwardRef((e,a)=>{let{__scopeSelect:o,disabled:l=!1,...r}=e,i=et(o),s=ea(ei,o),d=s.disabled||l,c=(0,P.useComposedRefs)(a,s.onTriggerChange),u=X(o),p=n.useRef("touch"),[h,m,f]=eZ(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eQ(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)(F.Anchor,{asChild:!0,...i,children:(0,t.jsx)(B.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":eY(s.value)?"":void 0,...r,ref:c,onClick:(0,I.composeEventHandlers)(r.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,I.composeEventHandlers)(r.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,I.composeEventHandlers)(r.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&q.includes(e.key)&&(g(),e.preventDefault())})})})});es.displayName=ei;var ed="SelectValue",ec=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:o,style:l,children:r,placeholder:i="",...s}=e,d=ea(ed,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==r,p=(0,P.useComposedRefs)(n,d.onValueNodeChange);return(0,W.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(B.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eY(d.value)?(0,t.jsx)(t.Fragment,{children:i}):r})});ec.displayName=ed;var eu=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:o,...l}=e;return(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...l,ref:n,children:o||"▼"})});eu.displayName="SelectIcon";var ep=e=>(0,t.jsx)(H.Portal,{asChild:!0,...e});ep.displayName="SelectPortal";var eh="SelectContent",em=n.forwardRef((e,a)=>{let o=ea(eh,e.__scopeSelect),[l,r]=n.useState();return((0,W.useLayoutEffect)(()=>{r(new DocumentFragment)},[]),o.open)?(0,t.jsx)(ev,{...e,ref:a}):l?S.createPortal((0,t.jsx)(ef,{scope:e.__scopeSelect,children:(0,t.jsx)(Q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),l):null});em.displayName=eh;var[ef,eg]=J(eh),ex=(0,V.createSlot)("SelectContent.RemoveScroll"),ev=n.forwardRef((e,a)=>{let{__scopeSelect:o,position:l="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=ea(eh,o),[y,j]=n.useState(null),[C,k]=n.useState(null),S=(0,P.useComposedRefs)(a,e=>j(e)),[N,E]=n.useState(null),[M,T]=n.useState(null),L=X(o),[F,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,K.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let V=n.useCallback(e=>{let[t,...n]=L().map(e=>e.ref.current),[a]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===a&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==o))return},[L,C]),_=n.useCallback(()=>V([N,y]),[V,N,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:O,triggerPointerDownPosRef:W}=b;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(W.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),W.current=null};return null!==W.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,O,W]),n.useEffect(()=>{let e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[O]);let[z,U]=eZ(e=>{let t=L().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eQ(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),q=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&(E(e),a&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&T(e)},[b.value]),Q="popper"===l?eb:ew,$=Q===eb?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ef,{scope:o,content:y,viewport:C,onViewportChange:k,itemRefCallback:q,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:M,position:l,isPositioned:F,searchRef:z,children:(0,t.jsx)(G.RemoveScroll,{as:ex,allowPinchZoom:!0,children:(0,t.jsx)(D.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,I.composeEventHandlers)(r,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(A.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(Q,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...$,onPlaced:()=>H(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,I.composeEventHandlers)(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().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(()=>V(t)),e.preventDefault()}})})})})})})});ev.displayName="SelectContentImpl";var ew=n.forwardRef((e,a)=>{let{__scopeSelect:o,onPlaced:l,...r}=e,i=ea(eh,o),s=eg(eh,o),[d,c]=n.useState(null),[u,p]=n.useState(null),h=(0,P.useComposedRefs)(a,e=>p(e)),m=X(o),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(i.trigger&&i.valueNode&&d&&u&&x&&v&&w){let e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),a=w.getBoundingClientRect();if("rtl"!==i.dir){let o=a.left-t.left,l=n.left-o,r=e.left-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.left=u+"px"}else{let o=t.right-a.right,l=window.innerWidth-n.right-o,r=window.innerWidth-e.right-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.right=u+"px"}let o=m(),r=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+h+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),C=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),S=e.top+e.height/2-10,I=v.offsetHeight/2,E=p+h+(v.offsetTop+I);if(E<=S){let e=o.length>0&&v===o[o.length-1].ref.current;d.style.bottom="0px";let t=Math.max(r-S,I+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=E+t+"px"}else{let e=o.length>0&&v===o[0].ref.current;d.style.top="0px";let t=Math.max(S,p+x.offsetTop+(e?C:0)+I);d.style.height=t+(b-E)+"px",x.scrollTop=E-S+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=r+"px",l?.(),requestAnimationFrame(()=>f.current=!0)}},[m,i.trigger,i.valueNode,d,u,x,v,w,i.dir,l]);(0,W.useLayoutEffect)(()=>y(),[y]);let[j,C]=n.useState();(0,W.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let k=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ey,{scope:o,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(B.Primitive.div,{...r,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ew.displayName="SelectItemAlignedPosition";var eb=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:o="start",collisionPadding:l=10,...r}=e,i=et(a);return(0,t.jsx)(F.Content,{...i,...r,ref:n,align:o,collisionPadding:l,style:{boxSizing:"border-box",...r.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)"}})});eb.displayName="SelectPopperPosition";var[ey,ej]=J(eh,{}),eC="SelectViewport",ek=n.forwardRef((e,a)=>{let{__scopeSelect:o,nonce:l,...r}=e,i=eg(eC,o),s=ej(eC,o),d=(0,P.useComposedRefs)(a,i.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:l}),(0,t.jsx)(Q.Slot,{scope:o,children:(0,t.jsx)(B.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:(0,I.composeEventHandlers)(r.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,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<a){let l=o+e,r=Math.min(a,l),i=l-r;n.style.height=r+"px","0px"===n.style.bottom&&(t.scrollTop=i>0?i:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ek.displayName=eC;var eS="SelectGroup",[eN,eI]=J(eS),eE=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=(0,L.useId)();return(0,t.jsx)(eN,{scope:a,id:l,children:(0,t.jsx)(B.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:n})})});eE.displayName=eS;var eP="SelectLabel",eM=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=eI(eP,a);return(0,t.jsx)(B.Primitive.div,{id:l.id,...o,ref:n})});eM.displayName=eP;var eT="SelectItem",[eA,eR]=J(eT),eD=n.forwardRef((e,a)=>{let{__scopeSelect:o,value:l,disabled:r=!1,textValue:i,...s}=e,d=ea(eT,o),c=eg(eT,o),u=d.value===l,[p,h]=n.useState(i??""),[m,f]=n.useState(!1),g=(0,P.useComposedRefs)(a,e=>c.itemRefCallback?.(e,l,r)),x=(0,L.useId)(),v=n.useRef("touch"),w=()=>{r||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)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)(eA,{scope:o,value:l,disabled:r,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(Q.ItemSlot,{scope:o,value:l,disabled:r,textValue:p,children:(0,t.jsx)(B.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:g,onFocus:(0,I.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,I.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,I.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,I.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,I.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,I.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,r?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,I.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,I.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(Y.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eD.displayName=eT;var eL="SelectItemText",eF=n.forwardRef((e,a)=>{let{__scopeSelect:o,className:l,style:r,...i}=e,s=ea(eL,o),d=eg(eL,o),c=eR(eL,o),u=el(eL,o),[p,h]=n.useState(null),m=(0,P.useComposedRefs)(a,e=>h(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,W.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Primitive.span,{id:c.textId,...i,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(i.children,s.valueNode):null]})});eF.displayName=eL;var eH="SelectItemIndicator",eB=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return eR(eH,a).isSelected?(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...o,ref:n}):null});eB.displayName=eH;var eV="SelectScrollUpButton",e_=n.forwardRef((e,a)=>{let o=eg(eV,e.__scopeSelect),l=ej(eV,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,P.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){i(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});e_.displayName=eV;var eO="SelectScrollDownButton",eW=n.forwardRef((e,a)=>{let o=eg(eO,e.__scopeSelect),l=ej(eO,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,P.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eW.displayName=eO;var ez=n.forwardRef((e,a)=>{let{__scopeSelect:o,onAutoScroll:l,...r}=e,i=eg("SelectScrollButton",o),s=n.useRef(null),d=X(o),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,W.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...r,ref:a,style:{flexShrink:0,...r.style},onPointerDown:(0,I.composeEventHandlers)(r.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(l,50))}),onPointerMove:(0,I.composeEventHandlers)(r.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(l,50))}),onPointerLeave:(0,I.composeEventHandlers)(r.onPointerLeave,()=>{c()})})}),eU=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...o,ref:n})});eU.displayName="SelectSeparator";var eK="SelectArrow",eG=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=et(a),r=ea(eK,a),i=eg(eK,a);return r.open&&"popper"===i.position?(0,t.jsx)(F.Arrow,{...l,...o,ref:n}):null});eG.displayName=eK;var eq=n.forwardRef(({__scopeSelect:e,value:a,...o},l)=>{let r=n.useRef(null),i=(0,P.useComposedRefs)(l,r),s=(0,z.usePrevious)(a);return n.useEffect(()=>{let e=r.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)(B.Primitive.select,{...o,style:{...U.VISUALLY_HIDDEN_STYLES,...o.style},ref:i,defaultValue:a})});function eY(e){return""===e||void 0===e}function eZ(e){let t=(0,_.useCallbackRef)(e),a=n.useRef(""),o=n.useRef(0),l=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),r=n.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,l,r]}function eQ(e,t,n){var a,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,r=n?e.indexOf(n):-1,i=(a=e,o=Math.max(r,0),a.map((e,t)=>a[(o+t)%a.length]));1===l.length&&(i=i.filter(e=>e!==n));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==n?s:void 0}eq.displayName="SelectBubbleInput",e.s(["Arrow",()=>eG,"Content",()=>em,"Group",()=>eE,"Icon",()=>eu,"Item",()=>eD,"ItemIndicator",()=>eB,"ItemText",()=>eF,"Label",()=>eM,"Portal",()=>ep,"Root",()=>er,"ScrollDownButton",()=>eW,"ScrollUpButton",()=>e_,"Select",()=>er,"SelectArrow",()=>eG,"SelectContent",()=>em,"SelectGroup",()=>eE,"SelectIcon",()=>eu,"SelectItem",()=>eD,"SelectItemIndicator",()=>eB,"SelectItemText",()=>eF,"SelectLabel",()=>eM,"SelectPortal",()=>ep,"SelectScrollDownButton",()=>eW,"SelectScrollUpButton",()=>e_,"SelectSeparator",()=>eU,"SelectTrigger",()=>es,"SelectValue",()=>ec,"SelectViewport",()=>ek,"Separator",()=>eU,"Trigger",()=>es,"Value",()=>ec,"Viewport",()=>ek,"createSelectScope",()=>ee],83830);var eX=e.i(83830),eX=eX,e$=e.i(99105);let eJ=(0,o.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),e0=eX.Root;eX.Group;let e1=eX.Value,e2=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Trigger,{ref:o,className:(0,w.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)(eX.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e2.displayName=eX.Trigger.displayName;let e3=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollUpButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eJ,{className:"h-4 w-4"})}));e3.displayName=eX.ScrollUpButton.displayName;let e5=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollDownButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e5.displayName=eX.ScrollDownButton.displayName;let e4=n.forwardRef(({className:e,children:n,position:a="popper",...o},l)=>(0,t.jsx)(eX.Portal,{children:(0,t.jsxs)(eX.Content,{ref:l,className:(0,w.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,...o,children:[(0,t.jsx)(e3,{}),(0,t.jsx)(eX.Viewport,{className:(0,w.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)(e5,{})]})}));e4.displayName=eX.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Label,{ref:a,className:(0,w.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eX.Label.displayName;let e8=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Item,{ref:o,className:(0,w.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),...a,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eX.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eX.ItemText,{children:n})]}));e8.displayName=eX.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Separator,{ref:a,className:(0,w.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eX.Separator.displayName;var e6=e.i(21023);let e9=(0,e6.createServerReference)("40218ecd23368030affb0689c18e007499a5a25001",e6.callServer,void 0,e6.findSourceMapURL,"updateSettingsAction");var e7=e.i(17406),te=e.i(98804),tt=e.i(93752),tt=tt,tn=e.i(83902);function ta(e){return(0,t.jsx)(tt.default,{className:(0,w.cn)("h-4 w-4",e.className),...e})}function to({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tl({className:e}){return(0,t.jsx)(te.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ti({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ts({className:e,...n}){return(0,t.jsx)(tn.Rocket,{className:(0,w.cn)("h-4 w-4",e),...n})}to.displayName="VsCodeIcon",tl.displayName="CursorEditorIcon",tr.displayName="WindsurfIcon",ti.displayName="ZedIcon",ts.displayName="AntigravityIcon";let td={vscode:to,cursor:tl,windsurf:tr,zed:ti,antigravity:ts};var tc=e.i(41413);let tu=[{value:e7.AgentAuthMethod.Session,label:"Session"},{value:e7.AgentAuthMethod.Token,label:"Token"}],tp=[{value:e7.EditorType.VsCode,label:"VS Code"},{value:e7.EditorType.Cursor,label:"Cursor"},{value:e7.EditorType.Windsurf,label:"Windsurf"},{value:e7.EditorType.Zed,label:"Zed"},{value:e7.EditorType.Antigravity,label:"Antigravity"}],th=[{id:"agent",label:"Agent",icon:i.Bot},{id:"environment",label:"Environment",icon:s.Terminal},{id:"workflow",label:"Workflow",icon:d.GitBranch},{id:"ci",label:"CI",icon:c},{id:"notifications",label:"Notifications",icon:u},{id:"feature-flags",label:"Flags",icon:p},{id:"database",label:"Database",icon:h}];function tm({label:e,description:n,htmlFor:a,children:o}){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)(b.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:o})]})}function tf({label:e,description:n,id:a,testId:o,checked:l,onChange:r,disabled:i}){return(0,t.jsx)(tm,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(C.Switch,{id:a,"data-testid":o,checked:l,onCheckedChange:r,disabled:i,className:(0,w.cn)("cursor-pointer",i&&"cursor-not-allowed opacity-50")})})}function tg({icon:e,title:n,description:a,badge:o,testId:l,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":l,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}),o?(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:o}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function tx({id:e,testId:n,value:a,onChange:o,onBlur:l,placeholder:r,min:i=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:()=>{o(String(Math.max(i,(u??parseInt(r,10))-d)))},onMouseUp:l,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)(m.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:r,onChange:e=>{o(e.target.value.replace(/[^0-9]/g,""))},onBlur:l,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(r,10),o(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:l,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)(f.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tv({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 tw({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)(g.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tb({settings:e,shepHome:o,dbFileSize:m}){let{showSaving:f,showSaved:g,save:b}=function(){let[e,t]=(0,n.useTransition)(),[a,o]=(0,n.useState)(!1),[l,r]=(0,n.useState)(!1),i=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(o(!0),s.current=!1,i.current=setTimeout(()=>{i.current=null,s.current&&(o(!1),r(!0),setTimeout(()=>r(!1),2e3))},350)),!e&&a&&(s.current=!0,i.current||(o(!1),r(!0),setTimeout(()=>r(!1),2e3)))},[e,a]),{showSaving:a,showSaved:l,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e9(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),C=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1},[S,N]=(0,n.useState)(e.agent.type),I=e.agent.authMethod,[E,P]=(0,n.useState)(e.agent.token??""),[M,T]=(0,n.useState)(!1),[A,R]=(0,n.useState)(e.environment.defaultEditor),D=e.environment.shellPreference,[L,F]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[H,B]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[V,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[O,W]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,U]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[K,G]=(0,n.useState)(e.workflow.enableEvidence),[q,Y]=(0,n.useState)(e.workflow.commitEvidence),[Z,Q]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[X,$]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[J,ee]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[et,en]=(0,n.useState)(e.notifications.inApp.enabled),[ea,eo]=(0,n.useState)(e.notifications.browser.enabled),[el,er]=(0,n.useState)(e.notifications.desktop.enabled),[ei,es]=(0,n.useState)({...e.notifications.events}),[ed,ec]=(0,n.useState)({...C}),eu=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",ep=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eh=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"";function em(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function ef(e={}){let t=em(e.ciTimeout??X);return{workflow:{openPrOnImplementationComplete:e.openPr??L,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??H,allowPrd:e.allowPrd??V,allowPlan:e.allowPlan??O,allowMerge:e.allowMerge??z},enableEvidence:e.enableEvidence??K,commitEvidence:e.commitEvidence??q,ciMaxFixAttempts:em(e.ciMaxFix??Z),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:em(e.ciLogMax??J)}}}function eg(e={}){return{notifications:{inApp:{enabled:e.inApp??et},browser:{enabled:e.browser??ea},desktop:{enabled:e.desktop??el},events:e.events??ei}}}let[ex,ev]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=th.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&&ev(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let ew=(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)(x,{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,w.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",f?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,w.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",g&&!f?"opacity-100":"opacity-0"),children:[(0,t.jsx)(r.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:th.map(e=>{let n=e.icon,a=ex===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>ew(e.id),className:(0,w.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.jsxs)(tg,{icon:i.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:[(0,t.jsx)(tm,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tc.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>N(e),className:"w-55"})}),(0,t.jsx)(tm,{label:"Authentication",description:"How the agent authenticates",htmlFor:"auth-method",children:(0,t.jsx)(k.TooltipProvider,{children:(0,t.jsxs)(k.Tooltip,{children:[(0,t.jsx)(k.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsxs)(e0,{value:I,disabled:!0,children:[(0,t.jsx)(e2,{id:"auth-method","data-testid":"auth-method-select",className:"w-55 cursor-not-allowed text-xs opacity-60",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e4,{children:tu.map(e=>(0,t.jsx)(e8,{value:e.value,children:e.label},e.value))})]})})}),(0,t.jsx)(k.TooltipContent,{children:"Coming soon"})]})})}),I===e7.AgentAuthMethod.Token&&(0,t.jsx)(tm,{label:"API Token",htmlFor:"agent-token",children:(0,t.jsxs)("div",{className:"relative w-45",children:[(0,t.jsx)(y.Input,{id:"agent-token","data-testid":"agent-token-input",type:M?"text":"password",value:E,onChange:e=>P(e.target.value),onBlur:()=>{E!==(e.agent.token??"")&&b(function(e={}){let t={type:S,authMethod:I,...e},n={type:t.type,authMethod:t.authMethod};return t.authMethod===e7.AgentAuthMethod.Token&&(n.token=e.token??E),{agent:n}}({token:E}))},placeholder:"Enter token",className:"pr-8"}),(0,t.jsx)(j.Button,{type:"button",variant:"ghost",size:"sm",className:"absolute top-0 right-0 h-full px-2 hover:bg-transparent",onClick:()=>T(!M),"data-testid":"toggle-token-visibility","aria-label":M?"Hide token":"Show token",children:M?(0,t.jsx)(l,{className:"h-3 w-3"}):(0,t.jsx)(a.Eye,{className:"h-3 w-3"})})]})})]}),(0,t.jsx)(tw,{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.jsx)(tg,{icon:s.Terminal,title:"Environment",description:"Editor and shell preferences",testId:"environment-settings-section",children:(0,t.jsx)(tm,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(e0,{value:A,onValueChange:e=>{R(e),b({environment:{defaultEditor:e,shellPreference:D}})},children:[(0,t.jsx)(e2,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e4,{children:tp.map(e=>{var n;let a=(n=e.value)&&n in td?td[n]:ta;return(0,t.jsx)(e8,{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)(tw,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor is used when opening files for review or editing during the development workflow."})]}),(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:d.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tv,{children:"Approve"}),(0,t.jsx)(tf,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:V,onChange:e=>{_(e),b(ef({allowPrd:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:O,onChange:e=>{W(e),b(ef({allowPlan:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{U(e),b(ef({allowMerge:e}))}}),(0,t.jsx)(tv,{children:"Evidence"}),(0,t.jsx)(tf,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:K,onChange:e=>{G(e),e?b(ef({enableEvidence:e})):(Y(!1),b(ef({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tf,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:q,disabled:!K||!L,onChange:e=>{Y(e),b(ef({commitEvidence:e}))}}),(0,t.jsx)(tv,{children:"Git"}),(0,t.jsx)(tf,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:H,onChange:e=>{B(e),b(ef({pushOnComplete:e}))}}),(0,t.jsx)(tf,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:L,onChange:e=>{F(e),e?b(ef({openPr:e})):(Y(!1),b(ef({openPr:e,commitEvidence:!1})))}})]}),(0,t.jsx)(tw,{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:c,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tm,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tx,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Z,onChange:Q,onBlur:()=>{Z!==eu&&b(ef({ciMaxFix:Z}))},min:1,max:10})}),(0,t.jsx)(tm,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tx,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:X,onChange:$,onBlur:()=>{X!==ep&&b(ef({ciTimeout:X}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tm,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tx,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:J,onChange:ee,onBlur:()=>{J!==eh&&b(ef({ciLogMax:J}))},min:1e3,step:5e3,suffix:"chars"})})]}),(0,t.jsx)(tw,{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-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:u,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tv,{children:"Channels"}),(0,t.jsx)(tf,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:et,onChange:e=>{en(e),b(eg({inApp:e}))}}),(0,t.jsx)(tf,{label:"Browser",description:"Push notifications via the browser",id:"notif-browser",testId:"switch-browser",checked:ea,onChange:e=>{eo(e),b(eg({browser:e}))}}),(0,t.jsx)(tf,{label:"Desktop",description:"Native OS notifications",id:"notif-desktop",testId:"switch-desktop",checked:el,onChange:e=>{er(e),b(eg({desktop:e}))}}),(0,t.jsx)(tv,{children:"Agent Events"}),(0,t.jsx)(tf,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ei.agentStarted,onChange:e=>{let t={...ei,agentStarted:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ei.phaseCompleted,onChange:e=>{let t={...ei,phaseCompleted:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ei.waitingApproval,onChange:e=>{let t={...ei,waitingApproval:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ei.agentCompleted,onChange:e=>{let t={...ei,agentCompleted:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ei.agentFailed,onChange:e=>{let t={...ei,agentFailed:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tv,{children:"Pull Request Events"}),(0,t.jsx)(tf,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ei.prMerged,onChange:e=>{let t={...ei,prMerged:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ei.prClosed,onChange:e=>{let t={...ei,prClosed:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ei.prChecksPassed,onChange:e=>{let t={...ei,prChecksPassed:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ei.prChecksFailed,onChange:e=>{let t={...ei,prChecksFailed:e};es(t),b(eg({events:t}))}})]}),(0,t.jsx)(tw,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"Three notification channels keep you in the loop: in-app toasts, browser push notifications, and native desktop alerts. 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:p,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tf,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:ed.skills,onChange:e=>{let t={...ed,skills:e};ec(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ed.envDeploy,onChange:e=>{let t={...ed,envDeploy:e};ec(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:ed.debug,onChange:e=>{let t={...ed,debug:e};ec(t),b({featureFlags:t})}})]}),(0,t.jsx)(tw,{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-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:h,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tm,{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)(tm,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:m})})]}),(0,t.jsx)(tw,{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",()=>tb],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(87889),o=e.i(3645);let l=(0,o.default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var r=e.i(23925),i=e.i(26370),s=e.i(38573),d=e.i(49228);let c=(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"}]]),u=(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"}]]),p=(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"}]]),h=(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 m=e.i(61569),m=m,f=e.i(3214),g=e.i(30702);let x=(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 v=e.i(60112),w=e.i(31777),b=e.i(41957),y=e.i(98127),j=e.i(35364),C=e.i(51911),k=e.i(2828),S=e.i(26036),N=e.i(27069),I=e.i(91967),E=e.i(87342),P=e.i(5978),M=e.i(22528),T=e.i(66033),A=e.i(53532),R=e.i(41687),D=e.i(56720),L=e.i(13123),F=e.i(52740),H=e.i(39979),B=e.i(87620),V=e.i(86874),_=e.i(29297),O=e.i(36589),W=e.i(5192),z=e.i(23405),U=e.i(1693),K=e.i(73772),G=e.i(13044),q=[" ","Enter","ArrowUp","ArrowDown"],Y=[" ","Enter"],Z="Select",[Q,X,$]=(0,E.createCollection)(Z),[J,ee]=(0,M.createContextScope)(Z,[$,F.createPopperScope]),et=(0,F.createPopperScope)(),[en,ea]=J(Z),[eo,el]=J(Z),er=e=>{let{__scopeSelect:a,children:o,open:l,defaultOpen:r,onOpenChange:i,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:h,disabled:m,required:f,form:g}=e,x=et(a),[v,w]=n.useState(null),[b,y]=n.useState(null),[j,C]=n.useState(!1),k=(0,T.useDirection)(u),[S,N]=(0,O.useControllableState)({prop:l,defaultProp:r??!1,onChange:i,caller:Z}),[I,E]=(0,O.useControllableState)({prop:s,defaultProp:d,onChange:c,caller:Z}),P=n.useRef(null),M=!v||g||!!v.closest("form"),[A,R]=n.useState(new Set),D=Array.from(A).map(e=>e.props.value).join(";");return(0,t.jsx)(F.Root,{...x,children:(0,t.jsxs)(en,{required:f,scope:a,trigger:v,onTriggerChange:w,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:j,onValueNodeHasChildrenChange:C,contentId:(0,L.useId)(),value:I,onValueChange:E,open:S,onOpenChange:N,dir:k,triggerPointerDownPosRef:P,disabled:m,children:[(0,t.jsx)(Q.Provider,{scope:a,children:(0,t.jsx)(eo,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{R(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{R(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:o})}),M?(0,t.jsxs)(eq,{"aria-hidden":!0,required:f,tabIndex:-1,name:p,autoComplete:h,value:I,onChange:e=>E(e.target.value),disabled:m,form:g,children:[void 0===I?(0,t.jsx)("option",{value:""}):null,Array.from(A)]},D):null]})})};er.displayName=Z;var ei="SelectTrigger",es=n.forwardRef((e,a)=>{let{__scopeSelect:o,disabled:l=!1,...r}=e,i=et(o),s=ea(ei,o),d=s.disabled||l,c=(0,P.useComposedRefs)(a,s.onTriggerChange),u=X(o),p=n.useRef("touch"),[h,m,f]=eZ(e=>{let t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),a=eQ(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)(F.Anchor,{asChild:!0,...i,children:(0,t.jsx)(B.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":eY(s.value)?"":void 0,...r,ref:c,onClick:(0,I.composeEventHandlers)(r.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)}),onPointerDown:(0,I.composeEventHandlers)(r.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,I.composeEventHandlers)(r.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&q.includes(e.key)&&(g(),e.preventDefault())})})})});es.displayName=ei;var ed="SelectValue",ec=n.forwardRef((e,n)=>{let{__scopeSelect:a,className:o,style:l,children:r,placeholder:i="",...s}=e,d=ea(ed,a),{onValueNodeHasChildrenChange:c}=d,u=void 0!==r,p=(0,P.useComposedRefs)(n,d.onValueNodeChange);return(0,W.useLayoutEffect)(()=>{c(u)},[c,u]),(0,t.jsx)(B.Primitive.span,{...s,ref:p,style:{pointerEvents:"none"},children:eY(d.value)?(0,t.jsx)(t.Fragment,{children:i}):r})});ec.displayName=ed;var eu=n.forwardRef((e,n)=>{let{__scopeSelect:a,children:o,...l}=e;return(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...l,ref:n,children:o||"▼"})});eu.displayName="SelectIcon";var ep=e=>(0,t.jsx)(H.Portal,{asChild:!0,...e});ep.displayName="SelectPortal";var eh="SelectContent",em=n.forwardRef((e,a)=>{let o=ea(eh,e.__scopeSelect),[l,r]=n.useState();return((0,W.useLayoutEffect)(()=>{r(new DocumentFragment)},[]),o.open)?(0,t.jsx)(ev,{...e,ref:a}):l?S.createPortal((0,t.jsx)(ef,{scope:e.__scopeSelect,children:(0,t.jsx)(Q.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),l):null});em.displayName=eh;var[ef,eg]=J(eh),ex=(0,V.createSlot)("SelectContent.RemoveScroll"),ev=n.forwardRef((e,a)=>{let{__scopeSelect:o,position:l="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v,...w}=e,b=ea(eh,o),[y,j]=n.useState(null),[C,k]=n.useState(null),S=(0,P.useComposedRefs)(a,e=>j(e)),[N,E]=n.useState(null),[M,T]=n.useState(null),L=X(o),[F,H]=n.useState(!1),B=n.useRef(!1);n.useEffect(()=>{if(y)return(0,K.hideOthers)(y)},[y]),(0,R.useFocusGuards)();let V=n.useCallback(e=>{let[t,...n]=L().map(e=>e.ref.current),[a]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===a&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==o))return},[L,C]),_=n.useCallback(()=>V([N,y]),[V,N,y]);n.useEffect(()=>{F&&_()},[F,_]);let{onOpenChange:O,triggerPointerDownPosRef:W}=b;n.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(W.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(W.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||O(!1),document.removeEventListener("pointermove",t),W.current=null};return null!==W.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,O,W]),n.useEffect(()=>{let e=()=>O(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[O]);let[z,U]=eZ(e=>{let t=L().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),a=eQ(t,e,n);a&&setTimeout(()=>a.ref.current.focus())}),q=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&(E(e),a&&(B.current=!0))},[b.value]),Y=n.useCallback(()=>y?.focus(),[y]),Z=n.useCallback((e,t,n)=>{let a=!B.current&&!n;(void 0!==b.value&&b.value===t||a)&&T(e)},[b.value]),Q="popper"===l?eb:ew,$=Q===eb?{side:d,sideOffset:c,align:u,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:f,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return(0,t.jsx)(ef,{scope:o,content:y,viewport:C,onViewportChange:k,itemRefCallback:q,selectedItem:N,onItemLeave:Y,itemTextRefCallback:Z,focusSelectedItem:_,selectedItemText:M,position:l,isPositioned:F,searchRef:z,children:(0,t.jsx)(G.RemoveScroll,{as:ex,allowPinchZoom:!0,children:(0,t.jsx)(D.FocusScope,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,I.composeEventHandlers)(r,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(A.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,t.jsx)(Q,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...w,...$,onPlaced:()=>H(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:(0,I.composeEventHandlers)(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=L().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(()=>V(t)),e.preventDefault()}})})})})})})});ev.displayName="SelectContentImpl";var ew=n.forwardRef((e,a)=>{let{__scopeSelect:o,onPlaced:l,...r}=e,i=ea(eh,o),s=eg(eh,o),[d,c]=n.useState(null),[u,p]=n.useState(null),h=(0,P.useComposedRefs)(a,e=>p(e)),m=X(o),f=n.useRef(!1),g=n.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:w,focusSelectedItem:b}=s,y=n.useCallback(()=>{if(i.trigger&&i.valueNode&&d&&u&&x&&v&&w){let e=i.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),a=w.getBoundingClientRect();if("rtl"!==i.dir){let o=a.left-t.left,l=n.left-o,r=e.left-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.left=u+"px"}else{let o=t.right-a.right,l=window.innerWidth-n.right-o,r=window.innerWidth-e.right-l,i=e.width+r,s=Math.max(i,t.width),c=window.innerWidth-10,u=(0,N.clamp)(l,[10,Math.max(10,c-s)]);d.style.minWidth=i+"px",d.style.right=u+"px"}let o=m(),r=window.innerHeight-20,s=x.scrollHeight,c=window.getComputedStyle(u),p=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),g=parseInt(c.borderBottomWidth,10),b=p+h+s+parseInt(c.paddingBottom,10)+g,y=Math.min(5*v.offsetHeight,b),j=window.getComputedStyle(x),C=parseInt(j.paddingTop,10),k=parseInt(j.paddingBottom,10),S=e.top+e.height/2-10,I=v.offsetHeight/2,E=p+h+(v.offsetTop+I);if(E<=S){let e=o.length>0&&v===o[o.length-1].ref.current;d.style.bottom="0px";let t=Math.max(r-S,I+(e?k:0)+(u.clientHeight-x.offsetTop-x.offsetHeight)+g);d.style.height=E+t+"px"}else{let e=o.length>0&&v===o[0].ref.current;d.style.top="0px";let t=Math.max(S,p+x.offsetTop+(e?C:0)+I);d.style.height=t+(b-E)+"px",x.scrollTop=E-S+x.offsetTop}d.style.margin="10px 0",d.style.minHeight=y+"px",d.style.maxHeight=r+"px",l?.(),requestAnimationFrame(()=>f.current=!0)}},[m,i.trigger,i.valueNode,d,u,x,v,w,i.dir,l]);(0,W.useLayoutEffect)(()=>y(),[y]);let[j,C]=n.useState();(0,W.useLayoutEffect)(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let k=n.useCallback(e=>{e&&!0===g.current&&(y(),b?.(),g.current=!1)},[y,b]);return(0,t.jsx)(ey,{scope:o,contentWrapper:d,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:(0,t.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(B.Primitive.div,{...r,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ew.displayName="SelectItemAlignedPosition";var eb=n.forwardRef((e,n)=>{let{__scopeSelect:a,align:o="start",collisionPadding:l=10,...r}=e,i=et(a);return(0,t.jsx)(F.Content,{...i,...r,ref:n,align:o,collisionPadding:l,style:{boxSizing:"border-box",...r.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)"}})});eb.displayName="SelectPopperPosition";var[ey,ej]=J(eh,{}),eC="SelectViewport",ek=n.forwardRef((e,a)=>{let{__scopeSelect:o,nonce:l,...r}=e,i=eg(eC,o),s=ej(eC,o),d=(0,P.useComposedRefs)(a,i.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:l}),(0,t.jsx)(Q.Slot,{scope:o,children:(0,t.jsx)(B.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:(0,I.composeEventHandlers)(r.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,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<a){let l=o+e,r=Math.min(a,l),i=l-r;n.style.height=r+"px","0px"===n.style.bottom&&(t.scrollTop=i>0?i:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});ek.displayName=eC;var eS="SelectGroup",[eN,eI]=J(eS),eE=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=(0,L.useId)();return(0,t.jsx)(eN,{scope:a,id:l,children:(0,t.jsx)(B.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:n})})});eE.displayName=eS;var eP="SelectLabel",eM=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=eI(eP,a);return(0,t.jsx)(B.Primitive.div,{id:l.id,...o,ref:n})});eM.displayName=eP;var eT="SelectItem",[eA,eR]=J(eT),eD=n.forwardRef((e,a)=>{let{__scopeSelect:o,value:l,disabled:r=!1,textValue:i,...s}=e,d=ea(eT,o),c=eg(eT,o),u=d.value===l,[p,h]=n.useState(i??""),[m,f]=n.useState(!1),g=(0,P.useComposedRefs)(a,e=>c.itemRefCallback?.(e,l,r)),x=(0,L.useId)(),v=n.useRef("touch"),w=()=>{r||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)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)(eA,{scope:o,value:l,disabled:r,textId:x,isSelected:u,onItemTextChange:n.useCallback(e=>{h(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(Q.ItemSlot,{scope:o,value:l,disabled:r,textValue:p,children:(0,t.jsx)(B.Primitive.div,{role:"option","aria-labelledby":x,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:g,onFocus:(0,I.composeEventHandlers)(s.onFocus,()=>f(!0)),onBlur:(0,I.composeEventHandlers)(s.onBlur,()=>f(!1)),onClick:(0,I.composeEventHandlers)(s.onClick,()=>{"mouse"!==v.current&&w()}),onPointerUp:(0,I.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===v.current&&w()}),onPointerDown:(0,I.composeEventHandlers)(s.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:(0,I.composeEventHandlers)(s.onPointerMove,e=>{v.current=e.pointerType,r?c.onItemLeave?.():"mouse"===v.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,I.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:(0,I.composeEventHandlers)(s.onKeyDown,e=>{(c.searchRef?.current===""||" "!==e.key)&&(Y.includes(e.key)&&w()," "===e.key&&e.preventDefault())})})})})});eD.displayName=eT;var eL="SelectItemText",eF=n.forwardRef((e,a)=>{let{__scopeSelect:o,className:l,style:r,...i}=e,s=ea(eL,o),d=eg(eL,o),c=eR(eL,o),u=el(eL,o),[p,h]=n.useState(null),m=(0,P.useComposedRefs)(a,e=>h(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,W.useLayoutEffect)(()=>(x(g),()=>v(g)),[x,v,g]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Primitive.span,{id:c.textId,...i,ref:m}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?S.createPortal(i.children,s.valueNode):null]})});eF.displayName=eL;var eH="SelectItemIndicator",eB=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return eR(eH,a).isSelected?(0,t.jsx)(B.Primitive.span,{"aria-hidden":!0,...o,ref:n}):null});eB.displayName=eH;var eV="SelectScrollUpButton",e_=n.forwardRef((e,a)=>{let o=eg(eV,e.__scopeSelect),l=ej(eV,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,P.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){i(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});e_.displayName=eV;var eO="SelectScrollDownButton",eW=n.forwardRef((e,a)=>{let o=eg(eO,e.__scopeSelect),l=ej(eO,e.__scopeSelect),[r,i]=n.useState(!1),s=(0,P.useComposedRefs)(a,l.onScrollButtonChange);return(0,W.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),r?(0,t.jsx)(ez,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eW.displayName=eO;var ez=n.forwardRef((e,a)=>{let{__scopeSelect:o,onAutoScroll:l,...r}=e,i=eg("SelectScrollButton",o),s=n.useRef(null),d=X(o),c=n.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,W.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...r,ref:a,style:{flexShrink:0,...r.style},onPointerDown:(0,I.composeEventHandlers)(r.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(l,50))}),onPointerMove:(0,I.composeEventHandlers)(r.onPointerMove,()=>{i.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(l,50))}),onPointerLeave:(0,I.composeEventHandlers)(r.onPointerLeave,()=>{c()})})}),eU=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e;return(0,t.jsx)(B.Primitive.div,{"aria-hidden":!0,...o,ref:n})});eU.displayName="SelectSeparator";var eK="SelectArrow",eG=n.forwardRef((e,n)=>{let{__scopeSelect:a,...o}=e,l=et(a),r=ea(eK,a),i=eg(eK,a);return r.open&&"popper"===i.position?(0,t.jsx)(F.Arrow,{...l,...o,ref:n}):null});eG.displayName=eK;var eq=n.forwardRef(({__scopeSelect:e,value:a,...o},l)=>{let r=n.useRef(null),i=(0,P.useComposedRefs)(l,r),s=(0,z.usePrevious)(a);return n.useEffect(()=>{let e=r.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)(B.Primitive.select,{...o,style:{...U.VISUALLY_HIDDEN_STYLES,...o.style},ref:i,defaultValue:a})});function eY(e){return""===e||void 0===e}function eZ(e){let t=(0,_.useCallbackRef)(e),a=n.useRef(""),o=n.useRef(0),l=n.useCallback(e=>{let n=a.current+e;t(n),function e(t){a.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),r=n.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,l,r]}function eQ(e,t,n){var a,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,r=n?e.indexOf(n):-1,i=(a=e,o=Math.max(r,0),a.map((e,t)=>a[(o+t)%a.length]));1===l.length&&(i=i.filter(e=>e!==n));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==n?s:void 0}eq.displayName="SelectBubbleInput",e.s(["Arrow",()=>eG,"Content",()=>em,"Group",()=>eE,"Icon",()=>eu,"Item",()=>eD,"ItemIndicator",()=>eB,"ItemText",()=>eF,"Label",()=>eM,"Portal",()=>ep,"Root",()=>er,"ScrollDownButton",()=>eW,"ScrollUpButton",()=>e_,"Select",()=>er,"SelectArrow",()=>eG,"SelectContent",()=>em,"SelectGroup",()=>eE,"SelectIcon",()=>eu,"SelectItem",()=>eD,"SelectItemIndicator",()=>eB,"SelectItemText",()=>eF,"SelectLabel",()=>eM,"SelectPortal",()=>ep,"SelectScrollDownButton",()=>eW,"SelectScrollUpButton",()=>e_,"SelectSeparator",()=>eU,"SelectTrigger",()=>es,"SelectValue",()=>ec,"SelectViewport",()=>ek,"Separator",()=>eU,"Trigger",()=>es,"Value",()=>ec,"Viewport",()=>ek,"createSelectScope",()=>ee],83830);var eX=e.i(83830),eX=eX,e$=e.i(99105);let eJ=(0,o.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),e0=eX.Root;eX.Group;let e1=eX.Value,e2=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Trigger,{ref:o,className:(0,w.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)(eX.Icon,{asChild:!0,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e2.displayName=eX.Trigger.displayName;let e3=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollUpButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eJ,{className:"h-4 w-4"})}));e3.displayName=eX.ScrollUpButton.displayName;let e5=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.ScrollDownButton,{ref:a,className:(0,w.cn)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(e$.ChevronDown,{className:"h-4 w-4"})}));e5.displayName=eX.ScrollDownButton.displayName;let e4=n.forwardRef(({className:e,children:n,position:a="popper",...o},l)=>(0,t.jsx)(eX.Portal,{children:(0,t.jsxs)(eX.Content,{ref:l,className:(0,w.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,...o,children:[(0,t.jsx)(e3,{}),(0,t.jsx)(eX.Viewport,{className:(0,w.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)(e5,{})]})}));e4.displayName=eX.Content.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Label,{ref:a,className:(0,w.cn)("px-2 py-1.5 text-sm font-semibold",e),...n})).displayName=eX.Label.displayName;let e8=n.forwardRef(({className:e,children:n,...a},o)=>(0,t.jsxs)(eX.Item,{ref:o,className:(0,w.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),...a,children:[(0,t.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eX.ItemIndicator,{children:(0,t.jsx)(r.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(eX.ItemText,{children:n})]}));e8.displayName=eX.Item.displayName,n.forwardRef(({className:e,...n},a)=>(0,t.jsx)(eX.Separator,{ref:a,className:(0,w.cn)("bg-muted -mx-1 my-1 h-px",e),...n})).displayName=eX.Separator.displayName;var e6=e.i(21023);let e9=(0,e6.createServerReference)("40fc577fcfec936969931b7ac1607a8a34cf648d79",e6.callServer,void 0,e6.findSourceMapURL,"updateSettingsAction");var e7=e.i(17406),te=e.i(98804),tt=e.i(93752),tt=tt,tn=e.i(83902);function ta(e){return(0,t.jsx)(tt.default,{className:(0,w.cn)("h-4 w-4",e.className),...e})}function to({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tl({className:e}){return(0,t.jsx)(te.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function tr({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ti({className:e}){return(0,t.jsx)(te.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,w.cn)("rounded-sm object-contain",e)})}function ts({className:e,...n}){return(0,t.jsx)(tn.Rocket,{className:(0,w.cn)("h-4 w-4",e),...n})}to.displayName="VsCodeIcon",tl.displayName="CursorEditorIcon",tr.displayName="WindsurfIcon",ti.displayName="ZedIcon",ts.displayName="AntigravityIcon";let td={vscode:to,cursor:tl,windsurf:tr,zed:ti,antigravity:ts};var tc=e.i(41413);let tu=[{value:e7.AgentAuthMethod.Session,label:"Session"},{value:e7.AgentAuthMethod.Token,label:"Token"}],tp=[{value:e7.EditorType.VsCode,label:"VS Code"},{value:e7.EditorType.Cursor,label:"Cursor"},{value:e7.EditorType.Windsurf,label:"Windsurf"},{value:e7.EditorType.Zed,label:"Zed"},{value:e7.EditorType.Antigravity,label:"Antigravity"}],th=[{id:"agent",label:"Agent",icon:i.Bot},{id:"environment",label:"Environment",icon:s.Terminal},{id:"workflow",label:"Workflow",icon:d.GitBranch},{id:"ci",label:"CI",icon:c},{id:"notifications",label:"Notifications",icon:u},{id:"feature-flags",label:"Flags",icon:p},{id:"database",label:"Database",icon:h}];function tm({label:e,description:n,htmlFor:a,children:o}){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)(b.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:o})]})}function tf({label:e,description:n,id:a,testId:o,checked:l,onChange:r,disabled:i}){return(0,t.jsx)(tm,{label:e,description:n,htmlFor:a,children:(0,t.jsx)(C.Switch,{id:a,"data-testid":o,checked:l,onCheckedChange:r,disabled:i,className:(0,w.cn)("cursor-pointer",i&&"cursor-not-allowed opacity-50")})})}function tg({icon:e,title:n,description:a,badge:o,testId:l,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":l,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}),o?(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:o}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:a})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function tx({id:e,testId:n,value:a,onChange:o,onBlur:l,placeholder:r,min:i=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:()=>{o(String(Math.max(i,(u??parseInt(r,10))-d)))},onMouseUp:l,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)(m.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:r,onChange:e=>{o(e.target.value.replace(/[^0-9]/g,""))},onBlur:l,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(r,10),o(String(null!=s?Math.min(s,e+d):e+d))},onMouseUp:l,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)(f.Plus,{className:"h-3 w-3"})})]}),c?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:c}):null]})}function tv({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 tw({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)(g.ExternalLink,{className:"h-2.5 w-2.5"}),e.label]},e.href))}):null]})}function tb({settings:e,shepHome:o,dbFileSize:m}){let{showSaving:f,showSaved:g,save:b}=function(){let[e,t]=(0,n.useTransition)(),[a,o]=(0,n.useState)(!1),[l,r]=(0,n.useState)(!1),i=(0,n.useRef)(null),s=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{e&&!a&&(o(!0),s.current=!1,i.current=setTimeout(()=>{i.current=null,s.current&&(o(!1),r(!0),setTimeout(()=>r(!1),2e3))},350)),!e&&a&&(s.current=!0,i.current||(o(!1),r(!0),setTimeout(()=>r(!1),2e3)))},[e,a]),{showSaving:a,showSaved:l,save:(0,n.useCallback)(e=>{t(async()=>{let t=await e9(e);t.success||v.toast.error(t.error??"Failed to save settings")})},[t])}}(),C=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1},[S,N]=(0,n.useState)(e.agent.type),I=e.agent.authMethod,[E,P]=(0,n.useState)(e.agent.token??""),[M,T]=(0,n.useState)(!1),[A,R]=(0,n.useState)(e.environment.defaultEditor),D=e.environment.shellPreference,[L,F]=(0,n.useState)(e.workflow.openPrOnImplementationComplete),[H,B]=(0,n.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[V,_]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPrd),[O,W]=(0,n.useState)(e.workflow.approvalGateDefaults.allowPlan),[z,U]=(0,n.useState)(e.workflow.approvalGateDefaults.allowMerge),[K,G]=(0,n.useState)(e.workflow.enableEvidence),[q,Y]=(0,n.useState)(e.workflow.commitEvidence),[Z,Q]=(0,n.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[X,$]=(0,n.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[J,ee]=(0,n.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[et,en]=(0,n.useState)(e.notifications.inApp.enabled),[ea,eo]=(0,n.useState)(e.notifications.browser.enabled),[el,er]=(0,n.useState)(e.notifications.desktop.enabled),[ei,es]=(0,n.useState)({...e.notifications.events}),[ed,ec]=(0,n.useState)({...C}),eu=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",ep=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",eh=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"";function em(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function ef(e={}){let t=em(e.ciTimeout??X);return{workflow:{openPrOnImplementationComplete:e.openPr??L,approvalGateDefaults:{pushOnImplementationComplete:e.pushOnComplete??H,allowPrd:e.allowPrd??V,allowPlan:e.allowPlan??O,allowMerge:e.allowMerge??z},enableEvidence:e.enableEvidence??K,commitEvidence:e.commitEvidence??q,ciMaxFixAttempts:em(e.ciMaxFix??Z),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:em(e.ciLogMax??J)}}}function eg(e={}){return{notifications:{inApp:{enabled:e.inApp??et},browser:{enabled:e.browser??ea},desktop:{enabled:e.desktop??el},events:e.events??ei}}}let[ex,ev]=(0,n.useState)("agent");(0,n.useEffect)(()=>{let e=th.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&&ev(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let n of e)t.observe(n);return()=>t.disconnect()},[]);let ew=(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)(x,{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,w.cn)("text-muted-foreground absolute inset-0 flex items-center text-xs transition-opacity duration-300",f?"opacity-100":"opacity-0"),children:"Saving..."}),(0,t.jsxs)("span",{className:(0,w.cn)("absolute inset-0 flex items-center gap-1 text-xs text-green-600 transition-opacity duration-300",g&&!f?"opacity-100":"opacity-0"),children:[(0,t.jsx)(r.Check,{className:"h-3 w-3"}),"Saved"]})]}),(0,t.jsx)("nav",{className:"ml-auto flex items-center gap-0.5",children:th.map(e=>{let n=e.icon,a=ex===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>ew(e.id),className:(0,w.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.jsxs)(tg,{icon:i.Bot,title:"Agent",description:"AI coding agent and authentication",testId:"agent-settings-section",children:[(0,t.jsx)(tm,{label:"Agent & Model",description:"Provider and model for all operations",htmlFor:"agent-model-picker",children:(0,t.jsx)(tc.AgentModelPicker,{initialAgentType:S,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>N(e),className:"w-55"})}),(0,t.jsx)(tm,{label:"Authentication",description:"How the agent authenticates",htmlFor:"auth-method",children:(0,t.jsx)(k.TooltipProvider,{children:(0,t.jsxs)(k.Tooltip,{children:[(0,t.jsx)(k.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{children:(0,t.jsxs)(e0,{value:I,disabled:!0,children:[(0,t.jsx)(e2,{id:"auth-method","data-testid":"auth-method-select",className:"w-55 cursor-not-allowed text-xs opacity-60",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e4,{children:tu.map(e=>(0,t.jsx)(e8,{value:e.value,children:e.label},e.value))})]})})}),(0,t.jsx)(k.TooltipContent,{children:"Coming soon"})]})})}),I===e7.AgentAuthMethod.Token&&(0,t.jsx)(tm,{label:"API Token",htmlFor:"agent-token",children:(0,t.jsxs)("div",{className:"relative w-45",children:[(0,t.jsx)(y.Input,{id:"agent-token","data-testid":"agent-token-input",type:M?"text":"password",value:E,onChange:e=>P(e.target.value),onBlur:()=>{E!==(e.agent.token??"")&&b(function(e={}){let t={type:S,authMethod:I,...e},n={type:t.type,authMethod:t.authMethod};return t.authMethod===e7.AgentAuthMethod.Token&&(n.token=e.token??E),{agent:n}}({token:E}))},placeholder:"Enter token",className:"pr-8"}),(0,t.jsx)(j.Button,{type:"button",variant:"ghost",size:"sm",className:"absolute top-0 right-0 h-full px-2 hover:bg-transparent",onClick:()=>T(!M),"data-testid":"toggle-token-visibility","aria-label":M?"Hide token":"Show token",children:M?(0,t.jsx)(l,{className:"h-3 w-3"}):(0,t.jsx)(a.Eye,{className:"h-3 w-3"})})]})})]}),(0,t.jsx)(tw,{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.jsx)(tg,{icon:s.Terminal,title:"Environment",description:"Editor and shell preferences",testId:"environment-settings-section",children:(0,t.jsx)(tm,{label:"Default Editor",description:"Editor launched for file operations",htmlFor:"default-editor",children:(0,t.jsxs)(e0,{value:A,onValueChange:e=>{R(e),b({environment:{defaultEditor:e,shellPreference:D}})},children:[(0,t.jsx)(e2,{id:"default-editor","data-testid":"editor-select",className:"w-55 cursor-pointer text-xs",children:(0,t.jsx)(e1,{})}),(0,t.jsx)(e4,{children:tp.map(e=>{var n;let a=(n=e.value)&&n in td?td[n]:ta;return(0,t.jsx)(e8,{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)(tw,{links:[{label:"Configuration guide",href:"https://github.com/shep-ai/cli/blob/main/docs/guides/configuration.md"}],children:"Your preferred editor is used when opening files for review or editing during the development workflow."})]}),(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:d.GitBranch,title:"Workflow",description:"Automation behavior after implementation",testId:"workflow-settings-section",children:[(0,t.jsx)(tv,{children:"Approve"}),(0,t.jsx)(tf,{label:"Auto-approve PRD",description:"Skip manual review of requirements",id:"allow-prd",testId:"switch-allow-prd",checked:V,onChange:e=>{_(e),b(ef({allowPrd:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Plan",description:"Skip manual review of implementation plan",id:"allow-plan",testId:"switch-allow-plan",checked:O,onChange:e=>{W(e),b(ef({allowPlan:e}))}}),(0,t.jsx)(tf,{label:"Auto-approve Merge",description:"Merge without manual review",id:"allow-merge",testId:"switch-allow-merge",checked:z,onChange:e=>{U(e),b(ef({allowMerge:e}))}}),(0,t.jsx)(tv,{children:"Evidence"}),(0,t.jsx)(tf,{label:"Collect evidence",description:"Capture screenshots and artifacts after implementation",id:"enable-evidence",testId:"switch-enable-evidence",checked:K,onChange:e=>{G(e),e?b(ef({enableEvidence:e})):(Y(!1),b(ef({enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(tf,{label:"Add evidence to PR",description:"Include evidence in the pull request body",id:"commit-evidence",testId:"switch-commit-evidence",checked:q,disabled:!K||!L,onChange:e=>{Y(e),b(ef({commitEvidence:e}))}}),(0,t.jsx)(tv,{children:"Git"}),(0,t.jsx)(tf,{label:"Push on complete",description:"Push to remote when implementation finishes",id:"push-on-complete",testId:"switch-push-on-complete",checked:H,onChange:e=>{B(e),b(ef({pushOnComplete:e}))}}),(0,t.jsx)(tf,{label:"Open PR on complete",description:"Create a pull request when done",id:"open-pr",testId:"switch-open-pr",checked:L,onChange:e=>{F(e),e?b(ef({openPr:e})):(Y(!1),b(ef({openPr:e,commitEvidence:!1})))}})]}),(0,t.jsx)(tw,{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:c,title:"Continuous Integration",description:"Limits and timeouts for CI monitoring",testId:"ci-settings-section",children:[(0,t.jsx)(tm,{label:"Max fix attempts",description:"Agent retries on failing CI",htmlFor:"ci-max-fix",children:(0,t.jsx)(tx,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:Z,onChange:Q,onBlur:()=>{Z!==eu&&b(ef({ciMaxFix:Z}))},min:1,max:10})}),(0,t.jsx)(tm,{label:"Watch timeout",description:"Max wait for CI completion",htmlFor:"ci-timeout",children:(0,t.jsx)(tx,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:X,onChange:$,onBlur:()=>{X!==ep&&b(ef({ciTimeout:X}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(tm,{label:"Max log size",description:"Truncate CI logs beyond this limit",htmlFor:"ci-log-max",children:(0,t.jsx)(tx,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:J,onChange:ee,onBlur:()=>{J!==eh&&b(ef({ciLogMax:J}))},min:1e3,step:5e3,suffix:"chars"})})]}),(0,t.jsx)(tw,{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-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:u,title:"Notifications",description:"How and when you get notified",testId:"notification-settings-section",children:[(0,t.jsx)(tv,{children:"Channels"}),(0,t.jsx)(tf,{label:"In-app",description:"Notifications inside the Shep UI",id:"notif-in-app",testId:"switch-in-app",checked:et,onChange:e=>{en(e),b(eg({inApp:e}))}}),(0,t.jsx)(tf,{label:"Browser",description:"Push notifications via the browser",id:"notif-browser",testId:"switch-browser",checked:ea,onChange:e=>{eo(e),b(eg({browser:e}))}}),(0,t.jsx)(tf,{label:"Desktop",description:"Native OS notifications",id:"notif-desktop",testId:"switch-desktop",checked:el,onChange:e=>{er(e),b(eg({desktop:e}))}}),(0,t.jsx)(tv,{children:"Agent Events"}),(0,t.jsx)(tf,{label:"Agent started",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:ei.agentStarted,onChange:e=>{let t={...ei,agentStarted:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Phase completed",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:ei.phaseCompleted,onChange:e=>{let t={...ei,phaseCompleted:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Waiting approval",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:ei.waitingApproval,onChange:e=>{let t={...ei,waitingApproval:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Agent completed",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:ei.agentCompleted,onChange:e=>{let t={...ei,agentCompleted:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"Agent failed",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:ei.agentFailed,onChange:e=>{let t={...ei,agentFailed:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tv,{children:"Pull Request Events"}),(0,t.jsx)(tf,{label:"PR merged",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:ei.prMerged,onChange:e=>{let t={...ei,prMerged:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"PR closed",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:ei.prClosed,onChange:e=>{let t={...ei,prClosed:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks passed",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:ei.prChecksPassed,onChange:e=>{let t={...ei,prChecksPassed:e};es(t),b(eg({events:t}))}}),(0,t.jsx)(tf,{label:"PR checks failed",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:ei.prChecksFailed,onChange:e=>{let t={...ei,prChecksFailed:e};es(t),b(eg({events:t}))}})]}),(0,t.jsx)(tw,{links:[{label:"Notification system",href:"https://github.com/shep-ai/cli/blob/main/specs/021-agent-notifications/spec.yaml"}],children:"Three notification channels keep you in the loop: in-app toasts, browser push notifications, and native desktop alerts. 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:p,title:"Feature Flags",description:"Enable or disable experimental features",badge:"Experimental",testId:"feature-flags-settings-section",children:[(0,t.jsx)(tf,{label:"Skills",description:"Enable the skills system for agent capabilities",id:"flag-skills",testId:"switch-flag-skills",checked:ed.skills,onChange:e=>{let t={...ed,skills:e};ec(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Deployments",description:"Enable environment deployment workflows",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:ed.envDeploy,onChange:e=>{let t={...ed,envDeploy:e};ec(t),b({featureFlags:t})}}),(0,t.jsx)(tf,{label:"Debug",description:"Show debug panels and verbose logging",id:"flag-debug",testId:"switch-flag-debug",checked:ed.debug,onChange:e=>{let t={...ed,debug:e};ec(t),b({featureFlags:t})}})]}),(0,t.jsx)(tw,{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-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:h,title:"Database",description:"Local storage information",testId:"database-settings-section",children:[(0,t.jsx)(tm,{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)(tm,{label:"Size",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:m})})]}),(0,t.jsx)(tw,{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",()=>tb],41952)}]);