@shipit-ai/cli 1.174.0 → 1.174.1-pr20.dba624c
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.
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/codex-cli.json +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +3 -3
- package/web/.next/fallback-build-manifest.json +3 -3
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +1 -1
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/mcp-servers/page/server-reference-manifest.json +13 -13
- package/web/.next/server/app/mcp-servers/page.js.nft.json +1 -1
- package/web/.next/server/app/mcp-servers/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/plugins/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/plugins/page.js.nft.json +1 -1
- package/web/.next/server/app/plugins/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +12 -12
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
- package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_features_mcp-servers_mcp-servers-page-client_tsx_0dda8ih._.js +1 -1
- package/web/.next/server/chunks/ssr/0j.8_web_components_features_mcp-servers_mcp-servers-page-client_tsx_0dda8ih._.js.map +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
- package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
- package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0mwao26._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0mwao26._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0bknjp-._.js → _01.73dm._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0bknjp-._.js.map → _01.73dm._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
- package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
- package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
- package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
- package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_087x~el._.js → _0ajzmj-._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_087x~el._.js.map → _0ajzmj-._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
- package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
- package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0fswe4r._.js +1 -1
- package/web/.next/server/chunks/ssr/_0fswe4r._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_0glox21._.js → _0mbb.7k._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0glox21._.js.map → _0mbb.7k._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
- package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
- package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
- package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0vq0c0x._.js +1 -1
- package/web/.next/server/chunks/ssr/_0vq0c0x._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
- package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
- package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
- package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
- package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
- package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
- package/web/.next/server/middleware-build-manifest.js +3 -3
- package/web/.next/server/pages/500.html +1 -1
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +57 -57
- package/web/.next/static/chunks/{0fzx4yzxqtc6v.js → 0-m4rnec155i1.js} +1 -1
- package/web/.next/static/chunks/{11v7w0zh-u9s8.js → 02940.vqpqt~w.js} +1 -1
- package/web/.next/static/chunks/{0q1rh6cwq8q~e.js → 094xbjw.1t41_.js} +1 -1
- package/web/.next/static/chunks/{0djvgyu139qht.js → 0_bfubsp9neaf.js} +1 -1
- package/web/.next/static/chunks/{0etn4uwpbu0p..js → 0g304jt8qhu-~.js} +1 -1
- package/web/.next/static/chunks/{0ou6vmrmvv4.f.js → 0k4d8i58i.mo0.js} +1 -1
- package/web/.next/static/chunks/{0c.5-5ohi38wu.js → 0lb_dekd7d4xu.js} +1 -1
- package/web/.next/static/chunks/{030tqac1cx-fj.js → 0lc14m5evyhuu.js} +1 -1
- package/web/.next/static/chunks/{11n8b8mq7xbv9.js → 0lt_ok~0hysqu.js} +1 -1
- package/web/.next/static/chunks/{0w9~abfpfmxwe.js → 0nct2gnbj84mf.js} +1 -1
- package/web/.next/static/chunks/{113fyg.4c74k~.js → 0nm97zmm.ri8o.js} +1 -1
- package/web/.next/static/chunks/{0iey6w_th4w6t.js → 0y~7z3sw~k~a3.js} +1 -1
- package/web/.next/static/chunks/{164.6ma3h~kkp.js → 0~5w460yes32a.js} +2 -2
- package/web/.next/static/chunks/{093...bdsa2vi.js → 13wohdlnw9eid.js} +1 -1
- package/web/.next/static/chunks/{0mukkm1m79wpt.js → 15lkkh2eg.w0h.js} +1 -1
- package/web/.next/static/chunks/{0zwhmf.myybu0.js → 15qu-.zhd9f48.js} +3 -3
- package/web/public/icons/tools/openai.svg +1 -0
- /package/web/.next/static/{G6UvAet1r3tmTZHz91Byx → MgGhOZyXLY0dmh1EnLE2U}/_buildManifest.js +0 -0
- /package/web/.next/static/{G6UvAet1r3tmTZHz91Byx → MgGhOZyXLY0dmh1EnLE2U}/_clientMiddlewareManifest.js +0 -0
- /package/web/.next/static/{G6UvAet1r3tmTZHz91Byx → MgGhOZyXLY0dmh1EnLE2U}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[79020,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(87638),e=a.i(8685),f=a.i(37545),g=a.i(51423),h=a.i(97624);let i=(0,h.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"}]]),j=(0,h.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"}]]),k=(0,h.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 l=a.i(69210),m=a.i(73952);let n=(0,h.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),o=(0,h.default)("layout-list",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);var p=a.i(63466);a.i(98617);var q=a.i(50040),r=a.i(85536),s=a.i(61781),t=a.i(49853),t=t,u=a.i(29370),v=a.i(2),w=a.i(77612),x=a.i(58860),y=a.i(96867),z=a.i(82934);function A({label:a,description:c,htmlFor:d,tooltip:e,children:f}){let g=e??c;return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(x.Label,{htmlFor:d,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:a}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsx)(z.TooltipContent,{side:"top",className:"max-w-64 text-[11px] leading-relaxed",children:(0,b.jsx)("span",{className:"text-muted-foreground",children:g})})]}):null]}),c?(0,b.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:c}):null]}),(0,b.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:f})]})}function B({label:a,description:c,id:d,testId:e,checked:f,onChange:g,disabled:h,tooltip:i}){return(0,b.jsx)(A,{label:a,description:c,htmlFor:d,tooltip:i,children:(0,b.jsx)(y.Switch,{id:d,"data-testid":e,checked:f,onCheckedChange:g,disabled:h,className:(0,r.cn)("cursor-pointer",h&&"cursor-not-allowed opacity-50")})})}function C({icon:a,title:c,description:d,badge:e,testId:f,tooltip:g,tooltipLinks:h,children:i}){return(0,b.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":f,children:[(0,b.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,b.jsx)("h2",{className:"text-sm font-semibold",children:c}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsxs)(z.TooltipContent,{side:"bottom",className:"max-w-72 text-[11px] leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:g}),null!=h&&h.length>0?(0,b.jsx)("div",{className:"border-border/50 mt-1.5 flex flex-col gap-0.5 border-t pt-1.5",children:h.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5 text-[10px] tracking-wide transition-colors",children:[(0,b.jsx)(v.ExternalLink,{className:"h-2.5 w-2.5 shrink-0 opacity-50"}),a.label]},a.href))}):null]})]}):null,e?(0,b.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:e}):null]}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:d})]}),(0,b.jsx)("div",{className:"px-4",children:i})]})}function D({id:a,testId:c,value:d,onChange:e,onBlur:f,placeholder:g,min:h=1,max:i,step:j=1,suffix:k}){let{t:l}=(0,q.useTranslation)("web"),m=""===d?void 0:parseInt(d,10);return(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{e(String(Math.max(h,(m??parseInt(g,10))-j)))},onMouseUp:f,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":l("common.decrease"),children:(0,b.jsx)(t.default,{className:"h-3 w-3"})}),(0,b.jsx)("input",{id:a,"data-testid":c,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:d,placeholder:g,onChange:a=>{e(a.target.value.replace(/[^0-9]/g,""))},onBlur:f,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,b.jsx)("button",{type:"button",onClick:()=>{let a;a=m??parseInt(g,10),e(String(null!=i?Math.min(i,a+j):a+j))},onMouseUp:f,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":l("common.increase"),children:(0,b.jsx)(u.Plus,{className:"h-3 w-3"})})]}),k?(0,b.jsx)("span",{className:"text-muted-foreground text-[11px]",children:k}):null]})}function E({children:a}){return(0,b.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,b.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:a})})}function F({settings:a}){let{t:e}=(0,q.useTranslation)("web"),[f,g]=(0,c.useState)(a.agent.type);return(0,b.jsx)(C,{icon:d.Bot,title:e("settings.agent.sectionTitle"),description:e("settings.agent.sectionDescription"),testId:"agent-settings-section",tooltip:e("settings.agent.hint"),tooltipLinks:[{label:e("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:e("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:e("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:(0,b.jsx)(A,{label:e("settings.agent.agentAndModel"),description:e("settings.agent.agentAndModelDescription"),tooltip:"Changing the agent switches which AI CLI tool runs your features. Each agent has different capabilities, speed, and cost tradeoffs.",htmlFor:"agent-model-picker",children:(0,b.jsx)(s.AgentModelPicker,{initialAgentType:f,initialModel:a.models.default,mode:"settings",onAgentModelChange:a=>g(a),className:"w-55"})})})}var G=a.i(52313),H=a.i(59175),I=a.i(58339),J=a.i(6120);let K=(0,J.createServerReference)("40dd0e9a4486c4b055a0c816971cc6ca042b814b39",J.callServer,void 0,J.findSourceMapURL,"updateSettingsAction");var L=a.i(46847),M=a.i(7077),N=a.i(11036),O=a.i(96436);function P(a){return(0,b.jsx)(N.Code,{className:(0,r.cn)("h-4 w-4",a.className),...a})}function Q({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function R({className:a}){return(0,b.jsx)(M.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function S({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function T({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function U({className:a,...c}){return(0,b.jsx)(O.Rocket,{className:(0,r.cn)("h-4 w-4",a),...c})}Q.displayName="VsCodeIcon",R.displayName="CursorEditorIcon",S.displayName="WindsurfIcon",T.displayName="ZedIcon",U.displayName="AntigravityIcon";let V={vscode:Q,cursor:R,windsurf:S,zed:T,antigravity:U},W=[{id:"vscode",name:"VS Code",available:!0},{id:"cursor",name:"Cursor",available:!0},{id:"windsurf",name:"Windsurf",available:!0},{id:"zed",name:"Zed",available:!0},{id:"antigravity",name:"Antigravity",available:!0}],X=[{id:"bash",name:"Bash",available:!0},{id:"zsh",name:"Zsh",available:!0},{id:"fish",name:"Fish",available:!0}];function Y({settings:a,availableEditors:d,availableShells:f,availableTerminals:g}){let{t:h}=(0,q.useTranslation)("web"),[,i]=(0,c.useTransition)(),[j,k]=(0,c.useState)(a.environment.defaultEditor),[l,m]=(0,c.useState)(a.environment.shellPreference),[n,o]=(0,c.useState)(a.environment.terminalPreference??L.TerminalType.System),p=g??[{id:L.TerminalType.System,name:h("settings.environment.systemTerminal"),available:!0}];function s(a){i(async()=>{let b=await K(a);b.success||G.toast.error(b.error??h("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:e.Terminal,title:h("settings.environment.sectionTitle"),description:h("settings.environment.sectionDescription"),testId:"environment-settings-section",tooltip:h("settings.environment.hint"),tooltipLinks:[{label:h("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:[(0,b.jsx)(A,{label:h("settings.environment.defaultEditor"),description:h("settings.environment.defaultEditorDescription"),tooltip:"The editor that opens when you click 'Launch' on a tool card or when ShipIT needs to open a file for review.",htmlFor:"default-editor",children:(0,b.jsxs)(H.Select,{value:j,onValueChange:a=>{k(a),s({environment:{defaultEditor:a,shellPreference:l,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(d??W).map(a=>{var c;let d=(c=a.id)&&c in V?V[c]:P;return(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(d,{className:"h-4 w-4 shrink-0"}),a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id)})})]})}),(0,b.jsx)(A,{label:h("settings.environment.shell"),description:h("settings.environment.shellDescription"),tooltip:"Controls which shell runs generated scripts like install commands and git operations. Match this to your daily driver shell.",htmlFor:"shell-preference",children:(0,b.jsxs)(H.Select,{value:l,onValueChange:a=>{m(a),s({environment:{defaultEditor:j,shellPreference:a,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(f??X).map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})}),(0,b.jsx)(A,{label:h("settings.environment.terminal"),description:h("settings.environment.terminalDescription"),tooltip:"The terminal emulator launched when opening shell sessions from the web UI. Only affects web-launched terminals, not CLI usage.",htmlFor:"terminal-preference",children:(0,b.jsxs)(H.Select,{value:n,onValueChange:a=>{o(a),s({environment:{defaultEditor:j,shellPreference:l,terminalPreference:a}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:p.map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})})]})}function Z(a,b={}){let c=b.autoArchiveEnabled??a.autoArchiveEnabled,d=parseInt(b.autoArchiveDelay??a.autoArchiveDelay,10);return{workflow:{openPrOnImplementationComplete:b.openPr??a.openPr,approvalGateDefaults:{pushOnImplementationComplete:b.pushOnComplete??a.pushOnComplete,allowPrd:b.allowPrd??a.allowPrd,allowPlan:b.allowPlan??a.allowPlan,allowMerge:b.allowMerge??a.allowMerge},enableEvidence:b.enableEvidence??a.enableEvidence,commitEvidence:b.commitEvidence??a.commitEvidence,ciWatchEnabled:b.ciWatchEnabled??a.ciWatchEnabled,defaultFastMode:b.defaultFastMode??a.defaultFastMode,autoArchiveDelayMinutes:c?Number.isNaN(d)||d<1?10:d:0}}}function $({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[g,h]=(0,c.useState)(a.workflow.openPrOnImplementationComplete),[i,j]=(0,c.useState)(a.workflow.approvalGateDefaults.pushOnImplementationComplete),[k,l]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPrd),[m,n]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPlan),[o,p]=(0,c.useState)(a.workflow.approvalGateDefaults.allowMerge),[r,s]=(0,c.useState)(a.workflow.enableEvidence),[t,u]=(0,c.useState)(a.workflow.commitEvidence),[v,w]=(0,c.useState)(!1!==a.workflow.ciWatchEnabled),[x,y]=(0,c.useState)(!1!==a.workflow.defaultFastMode),[z,F]=(0,c.useState)((a.workflow.autoArchiveDelayMinutes??10)>0),[H,I]=(0,c.useState)(String(a.workflow.autoArchiveDelayMinutes??10));function J(){return{openPr:g,pushOnComplete:i,allowPrd:k,allowPlan:m,allowMerge:o,enableEvidence:r,commitEvidence:t,ciWatchEnabled:v,defaultFastMode:x,autoArchiveEnabled:z,autoArchiveDelay:H}}function L(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:f.GitBranch,title:d("settings.workflow.title"),description:d("settings.workflow.sectionDescription"),testId:"workflow-settings-section",tooltip:d("settings.workflow.hint"),tooltipLinks:[{label:d("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:d("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:[(0,b.jsx)(B,{label:d("settings.workflow.defaultFastMode"),description:d("settings.workflow.defaultFastModeDescription"),tooltip:"When enabled, new features skip the PRD and Plan phases and go straight to implementation. Useful for quick fixes, risky for complex features.",id:"default-fast-mode",testId:"switch-default-fast-mode",checked:x,onChange:a=>{y(a),L(Z(J(),{defaultFastMode:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.approve")}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePrd"),description:d("settings.workflow.autoApprovePrdDescription"),tooltip:"Automatically approves the requirements document without pausing for your review. Saves time but you lose the chance to refine requirements before planning.",id:"allow-prd",testId:"switch-allow-prd",checked:k,onChange:a=>{l(a),L(Z(J(),{allowPrd:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePlan"),description:d("settings.workflow.autoApprovePlanDescription"),tooltip:"Automatically approves the implementation plan. The agent proceeds to coding without waiting for your plan review.",id:"allow-plan",testId:"switch-allow-plan",checked:m,onChange:a=>{n(a),L(Z(J(),{allowPlan:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApproveMerge"),description:d("settings.workflow.autoApproveMergeDescription"),tooltip:"Automatically merges the PR after implementation without requiring your final review. Use with caution on production branches.",id:"allow-merge",testId:"switch-allow-merge",checked:o,onChange:a=>{p(a),L(Z(J(),{allowMerge:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.evidence")}),(0,b.jsx)(B,{label:d("settings.workflow.collectEvidence"),description:d("settings.workflow.collectEvidenceDescription"),tooltip:"Captures screenshots and test outputs during implementation as proof of work. Useful for audit trails and PR documentation.",id:"enable-evidence",testId:"switch-enable-evidence",checked:r,onChange:a=>{s(a),a?L(Z(J(),{enableEvidence:a})):(u(!1),L(Z(J(),{enableEvidence:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.addEvidenceToPr"),description:d("settings.workflow.addEvidenceToPrDescription"),tooltip:"Attaches collected evidence artifacts (screenshots, logs) directly to the pull request description.",id:"commit-evidence",testId:"switch-commit-evidence",checked:t,disabled:!r||!g,onChange:a=>{u(a),L(Z(J(),{commitEvidence:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.git")}),(0,b.jsx)(B,{label:d("settings.workflow.pushOnComplete"),description:d("settings.workflow.pushOnCompleteDescription"),tooltip:"Automatically pushes the implementation branch to the remote repository when the agent finishes coding.",id:"push-on-complete",testId:"switch-push-on-complete",checked:i,onChange:a=>{j(a),L(Z(J(),{pushOnComplete:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.openPrOnComplete"),description:d("settings.workflow.openPrOnCompleteDescription"),tooltip:"Creates a pull request automatically after pushing. Combined with push-on-complete, this fully automates the delivery pipeline.",id:"open-pr",testId:"switch-open-pr",checked:g,onChange:a=>{h(a),a?L(Z(J(),{openPr:a})):(u(!1),L(Z(J(),{openPr:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.watchCiAfterPush"),description:d("settings.workflow.watchCiAfterPushDescription"),tooltip:"Monitors CI/CD pipeline status after pushing and can attempt fixes if tests fail. Disable if you prefer to handle CI failures manually.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:v,onChange:a=>{w(a),L(Z(J(),{ciWatchEnabled:a}))}}),(0,b.jsx)(E,{children:"Archive"}),(0,b.jsx)(B,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",tooltip:"Automatically archives features from the control center canvas after they reach the completed state, keeping the board clean.",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:z,onChange:a=>{F(a),L(Z(J(),{autoArchiveEnabled:a}))}}),(0,b.jsx)(A,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1-1440)",tooltip:"How long to wait after a feature completes before archiving it. Gives you time to review results before the feature moves off the board.",htmlFor:"auto-archive-delay",children:(0,b.jsx)(D,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:H,placeholder:"10",min:1,max:1440,suffix:"min",onChange:a=>{I(a)},onBlur:()=>{if(!z)return;let a=parseInt(H,10),b=Number.isNaN(a)?10:Math.min(1440,Math.max(1,a));I(String(b)),L(Z(J(),{autoArchiveDelay:String(b)}))}})})]})}function _(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}function aa({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,h]=(0,c.useState)(null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):""),[i,j]=(0,c.useState)(null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):""),[k,l]=(0,c.useState)(null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):""),[m,n]=(0,c.useState)(null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):""),[o,p]=(0,c.useState)(!1!==a.workflow.hideCiStatus),r=null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):"",s=null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):"",t=null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):"",u=null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):"";function v(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function w(a){let b=_(a.ciTimeout??i);return{workflow:{ciMaxFixAttempts:_(a.ciMaxFix??f),ciWatchTimeoutMs:null!=b?1e3*b:void 0,ciLogMaxChars:_(a.ciLogMax??k),ciWatchPollIntervalSeconds:_(a.ciPollInterval??m),hideCiStatus:a.hideCiStatus??o}}}return(0,b.jsxs)(C,{icon:g.Activity,title:d("settings.ci.title"),description:d("settings.ci.description"),testId:"ci-settings-section",tooltip:d("settings.ci.hint"),tooltipLinks:[{label:d("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:d("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.ci.maxFixAttempts"),description:d("settings.ci.maxFixAttemptsDescription"),tooltip:"How many times the agent will attempt to fix failing CI checks before giving up. Higher values increase the chance of auto-resolution but consume more agent time and API calls.",htmlFor:"ci-max-fix",children:(0,b.jsx)(D,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:f,onChange:h,onBlur:()=>{f!==r&&v(w({ciMaxFix:f}))},min:1,max:10})}),(0,b.jsx)(A,{label:d("settings.ci.watchTimeout"),description:d("settings.ci.watchTimeoutDescription"),tooltip:"Maximum time the agent will wait for CI to finish. If CI hasn't completed within this window, the agent stops watching. Increase for repos with slow CI pipelines.",htmlFor:"ci-timeout",children:(0,b.jsx)(D,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:i,onChange:j,onBlur:()=>{i!==s&&v(w({ciTimeout:i}))},min:30,step:30,suffix:"sec"})}),(0,b.jsx)(A,{label:d("settings.ci.maxLogSize"),description:d("settings.ci.maxLogSizeDescription"),tooltip:"CI logs beyond this character limit are truncated before being sent to the agent for analysis. Keeps agent context focused and avoids excessive token usage.",htmlFor:"ci-log-max",children:(0,b.jsx)(D,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:k,onChange:l,onBlur:()=>{k!==t&&v(w({ciLogMax:k}))},min:1e3,step:5e3,suffix:"chars"})}),(0,b.jsx)(A,{label:d("settings.ci.pollInterval"),description:d("settings.ci.pollIntervalDescription"),tooltip:"How frequently the agent checks GitHub for CI status updates. Lower values give faster feedback but increase API call volume.",htmlFor:"ci-poll-interval",children:(0,b.jsx)(D,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:m,onChange:n,onBlur:()=>{m!==u&&v(w({ciPollInterval:m}))},min:5,step:5,suffix:"sec"})}),(0,b.jsx)(B,{label:d("settings.ci.hideCiStatus"),description:d("settings.ci.hideCiStatusDescription"),tooltip:"When enabled, CI status indicators are hidden from the feature drawer and merge review panels. Useful if you monitor CI through GitHub directly.",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:o,onChange:a=>{p(a),v(w({hideCiStatus:a}))}})]})}var ab=a.i(48972),ac=a.i(59653),ad=a.i(80303),ae=a.i(95819),af=a.i(47427),ag=a.i(60380),ah=a.i(41387),ai=a.i(97045),aj=a.i(30419),ak=a.i(69471),al=["PageUp","PageDown"],am=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],an={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ao="Slider",[ap,aq,ar]=(0,ak.createCollection)(ao),[as,at]=(0,ae.createContextScope)(ao,[ar]),[au,av]=as(ao),aw=c.forwardRef((a,d)=>{let{name:e,min:f=0,max:g=100,step:h=1,orientation:i="horizontal",disabled:j=!1,minStepsBetweenThumbs:k=0,defaultValue:l=[f],value:m,onValueChange:n=()=>{},onValueCommit:o=()=>{},inverted:p=!1,form:q,...r}=a,s=c.useRef(new Set),t=c.useRef(0),u="horizontal"===i,[v=[],w]=(0,af.useControllableState)({prop:m,defaultProp:l,onChange:a=>{let b=[...s.current];b[t.current]?.focus(),n(a)}}),x=c.useRef(v);function y(a,b,{commit:c}={commit:!1}){let d,e=(String(h).split(".")[1]||"").length,i=Math.round((Math.round((a-f)/h)*h+f)*(d=Math.pow(10,e)))/d,j=(0,ab.clamp)(i,[f,g]);w((a=[])=>{let d=function(a=[],b,c){let d=[...a];return d[c]=b,d.sort((a,b)=>a-b)}(a,j,b);if(!function(a,b){if(b>0)return Math.min(...a.slice(0,-1).map((b,c)=>a[c+1]-b))>=b;return!0}(d,k*h))return a;{t.current=d.indexOf(j);let b=String(d)!==String(a);return b&&c&&o(d),b?d:a}})}return(0,b.jsx)(au,{scope:a.__scopeSlider,name:e,disabled:j,min:f,max:g,valueIndexToChangeRef:t,thumbs:s.current,values:v,orientation:i,form:q,children:(0,b.jsx)(ap.Provider,{scope:a.__scopeSlider,children:(0,b.jsx)(ap.Slot,{scope:a.__scopeSlider,children:(0,b.jsx)(u?az:aA,{"aria-disabled":j,"data-disabled":j?"":void 0,...r,ref:d,onPointerDown:(0,ac.composeEventHandlers)(r.onPointerDown,()=>{j||(x.current=v)}),min:f,max:g,inverted:p,onSlideStart:j?void 0:function(a){let b=function(a,b){if(1===a.length)return 0;let c=a.map(a=>Math.abs(a-b)),d=Math.min(...c);return c.indexOf(d)}(v,a);y(a,b)},onSlideMove:j?void 0:function(a){y(a,t.current)},onSlideEnd:j?void 0:function(){let a=x.current[t.current];v[t.current]!==a&&o(v)},onHomeKeyDown:()=>!j&&y(f,0,{commit:!0}),onEndKeyDown:()=>!j&&y(g,v.length-1,{commit:!0}),onStepKeyDown:({event:a,direction:b})=>{if(!j){let c=al.includes(a.key)||a.shiftKey&&am.includes(a.key),d=t.current;y(v[d]+h*(c?10:1)*b,d,{commit:!0})}}})})})})});aw.displayName=ao;var[ax,ay]=as(ao,{startEdge:"left",endEdge:"right",size:"width",direction:1}),az=c.forwardRef((a,d)=>{let{min:e,max:f,dir:g,inverted:h,onSlideStart:i,onSlideMove:j,onSlideEnd:k,onStepKeyDown:l,...m}=a,[n,o]=c.useState(null),p=(0,ad.useComposedRefs)(d,a=>o(a)),q=c.useRef(void 0),r=(0,ag.useDirection)(g),s="ltr"===r,t=s&&!h||!s&&h;function u(a){let b=q.current||n.getBoundingClientRect(),c=aL([0,b.width],t?[e,f]:[f,e]);return q.current=b,c(a-b.left)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:t?"left":"right",endEdge:t?"right":"left",direction:t?1:-1,size:"width",children:(0,b.jsx)(aB,{dir:r,"data-orientation":"horizontal",...m,ref:p,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:a=>{let b=u(a.clientX);i?.(b)},onSlideMove:a=>{let b=u(a.clientX);j?.(b)},onSlideEnd:()=>{q.current=void 0,k?.()},onStepKeyDown:a=>{let b=an[t?"from-left":"from-right"].includes(a.key);l?.({event:a,direction:b?-1:1})}})})}),aA=c.forwardRef((a,d)=>{let{min:e,max:f,inverted:g,onSlideStart:h,onSlideMove:i,onSlideEnd:j,onStepKeyDown:k,...l}=a,m=c.useRef(null),n=(0,ad.useComposedRefs)(d,m),o=c.useRef(void 0),p=!g;function q(a){let b=o.current||m.current.getBoundingClientRect(),c=aL([0,b.height],p?[f,e]:[e,f]);return o.current=b,c(a-b.top)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,b.jsx)(aB,{"data-orientation":"vertical",...l,ref:n,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:a=>{let b=q(a.clientY);h?.(b)},onSlideMove:a=>{let b=q(a.clientY);i?.(b)},onSlideEnd:()=>{o.current=void 0,j?.()},onStepKeyDown:a=>{let b=an[p?"from-bottom":"from-top"].includes(a.key);k?.({event:a,direction:b?-1:1})}})})}),aB=c.forwardRef((a,c)=>{let{__scopeSlider:d,onSlideStart:e,onSlideMove:f,onSlideEnd:g,onHomeKeyDown:h,onEndKeyDown:i,onStepKeyDown:j,...k}=a,l=av(ao,d);return(0,b.jsx)(aj.Primitive.span,{...k,ref:c,onKeyDown:(0,ac.composeEventHandlers)(a.onKeyDown,a=>{"Home"===a.key?(h(a),a.preventDefault()):"End"===a.key?(i(a),a.preventDefault()):al.concat(am).includes(a.key)&&(j(a),a.preventDefault())}),onPointerDown:(0,ac.composeEventHandlers)(a.onPointerDown,a=>{let b=a.target;b.setPointerCapture(a.pointerId),a.preventDefault(),l.thumbs.has(b)?b.focus():e(a)}),onPointerMove:(0,ac.composeEventHandlers)(a.onPointerMove,a=>{a.target.hasPointerCapture(a.pointerId)&&f(a)}),onPointerUp:(0,ac.composeEventHandlers)(a.onPointerUp,a=>{let b=a.target;b.hasPointerCapture(a.pointerId)&&(b.releasePointerCapture(a.pointerId),g(a))})})}),aC="SliderTrack",aD=c.forwardRef((a,c)=>{let{__scopeSlider:d,...e}=a,f=av(aC,d);return(0,b.jsx)(aj.Primitive.span,{"data-disabled":f.disabled?"":void 0,"data-orientation":f.orientation,...e,ref:c})});aD.displayName=aC;var aE="SliderRange",aF=c.forwardRef((a,d)=>{let{__scopeSlider:e,...f}=a,g=av(aE,e),h=ay(aE,e),i=c.useRef(null),j=(0,ad.useComposedRefs)(d,i),k=g.values.length,l=g.values.map(a=>aK(a,g.min,g.max)),m=k>1?Math.min(...l):0,n=100-Math.max(...l);return(0,b.jsx)(aj.Primitive.span,{"data-orientation":g.orientation,"data-disabled":g.disabled?"":void 0,...f,ref:j,style:{...a.style,[h.startEdge]:m+"%",[h.endEdge]:n+"%"}})});aF.displayName=aE;var aG="SliderThumb",aH=c.forwardRef((a,d)=>{let e=aq(a.__scopeSlider),[f,g]=c.useState(null),h=(0,ad.useComposedRefs)(d,a=>g(a)),i=c.useMemo(()=>f?e().findIndex(a=>a.ref.current===f):-1,[e,f]);return(0,b.jsx)(aI,{...a,ref:h,index:i})}),aI=c.forwardRef((a,d)=>{var e,f,g,h,i;let j,k,{__scopeSlider:l,index:m,name:n,...o}=a,p=av(aG,l),q=ay(aG,l),[r,s]=c.useState(null),t=(0,ad.useComposedRefs)(d,a=>s(a)),u=!r||p.form||!!r.closest("form"),v=(0,ai.useSize)(r),w=p.values[m],x=void 0===w?0:aK(w,p.min,p.max),y=(e=m,(f=p.values.length)>2?`Value ${e+1} of ${f}`:2===f?["Minimum","Maximum"][e]:void 0),z=v?.[q.size],A=z?(g=z,h=x,i=q.direction,k=aL([0,50],[0,j=g/2]),(j-k(h)*i)*i):0;return c.useEffect(()=>{if(r)return p.thumbs.add(r),()=>{p.thumbs.delete(r)}},[r,p.thumbs]),(0,b.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[q.startEdge]:`calc(${x}% + ${A}px)`},children:[(0,b.jsx)(ap.ItemSlot,{scope:a.__scopeSlider,children:(0,b.jsx)(aj.Primitive.span,{role:"slider","aria-label":a["aria-label"]||y,"aria-valuemin":p.min,"aria-valuenow":w,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...o,ref:t,style:void 0===w?{display:"none"}:a.style,onFocus:(0,ac.composeEventHandlers)(a.onFocus,()=>{p.valueIndexToChangeRef.current=m})})}),u&&(0,b.jsx)(aJ,{name:n??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:w},m)]})});aH.displayName=aG;var aJ=c.forwardRef(({__scopeSlider:a,value:d,...e},f)=>{let g=c.useRef(null),h=(0,ad.useComposedRefs)(g,f),i=(0,ah.usePrevious)(d);return c.useEffect(()=>{let a=g.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(i!==d&&b){let c=new Event("input",{bubbles:!0});b.call(a,d),a.dispatchEvent(c)}},[i,d]),(0,b.jsx)(aj.Primitive.input,{style:{display:"none"},...e,ref:h,defaultValue:d})});function aK(a,b,c){return(0,ab.clamp)(100/(c-b)*(a-b),[0,100])}function aL(a,b){return c=>{if(a[0]===a[1]||b[0]===b[1])return b[0];let d=(b[1]-b[0])/(a[1]-a[0]);return b[0]+d*(c-a[0])}}aJ.displayName="RadioBubbleInput",a.s(["Range",0,aF,"Root",0,aw,"Slider",0,aw,"SliderRange",0,aF,"SliderThumb",0,aH,"SliderTrack",0,aD,"Thumb",0,aH,"Track",0,aD,"createSliderScope",0,at],40432);var aM=a.i(40432),aM=aM;function aN({className:a,defaultValue:d,value:e,min:f=0,max:g=100,...h}){let i=c.useMemo(()=>Array.isArray(e)?e:Array.isArray(d)?d:[f,g],[e,d,f,g]);return(0,b.jsxs)(aM.Root,{"data-slot":"slider",defaultValue:d,value:e,min:f,max:g,className:(0,r.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",a),...h,children:[(0,b.jsx)(aM.Track,{"data-slot":"slider-track",className:(0,r.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,b.jsx)(aM.Range,{"data-slot":"slider-range",className:(0,r.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:i.length},(a,c)=>(0,b.jsx)(aM.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},c))]})}let aO=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],aP=aO.length-1;function aQ(a){let b=0,c=Math.abs(a-aO[0]);for(let d=1;d<aO.length;d++){let e=Math.abs(a-aO[d]);e<c&&(c=e,b=d)}return b}function aR({id:a,testId:d,value:e,onChange:f,onBlur:g,defaultSeconds:h=1800}){var i;let j,k,l=(""===e?h:parseInt(e,10))||h,[m,n]=(0,c.useState)(()=>aQ(l)),o=aQ(l);o!==m&&aO[m]!==l&&n(o);let p=(0,c.useCallback)(([a])=>{n(a),f(String(aO[a]))},[f]);return(0,b.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,b.jsx)(aN,{id:a,"data-testid":d,min:0,max:aP,step:1,value:[m],onValueChange:p,onValueCommit:()=>g(),className:"min-w-0 flex-1"}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(j=Math.floor((i=aO[m])/3600),k=Math.round(i%3600/60),0===j?`${k}m`:0===k?`${j}h`:`${j}h ${k}m`)})]})}function aS(a){if(void 0===a)return;let b=function(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}(a);return null!=b?1e3*b:void 0}function aT({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.workflow.stageTimeouts,g=a.workflow.analyzeRepoTimeouts,[h,i]=(0,c.useState)(String(Math.round((f?.analyzeMs??18e5)/1e3))),[j,k]=(0,c.useState)(String(Math.round((f?.requirementsMs??18e5)/1e3))),[m,n]=(0,c.useState)(String(Math.round((f?.researchMs??18e5)/1e3))),[o,p]=(0,c.useState)(String(Math.round((f?.planMs??18e5)/1e3))),[r,s]=(0,c.useState)(String(Math.round((f?.implementMs??18e5)/1e3))),[t,u]=(0,c.useState)(String(Math.round((f?.mergeMs??18e5)/1e3))),[v,w]=(0,c.useState)(String(Math.round((g?.analyzeMs??6e5)/1e3))),x=f?.analyzeMs!=null?String(Math.round(f.analyzeMs/1e3)):"",y=f?.requirementsMs!=null?String(Math.round(f.requirementsMs/1e3)):"",z=f?.researchMs!=null?String(Math.round(f.researchMs/1e3)):"",B=f?.planMs!=null?String(Math.round(f.planMs/1e3)):"",D=f?.implementMs!=null?String(Math.round(f.implementMs/1e3)):"",F=f?.mergeMs!=null?String(Math.round(f.mergeMs/1e3)):"",H=g?.analyzeMs!=null?String(Math.round(g.analyzeMs/1e3)):"";function I(a){return{workflow:{stageTimeouts:{analyzeMs:aS(a.analyzeTimeout??h),requirementsMs:aS(a.requirementsTimeout??j),researchMs:aS(a.researchTimeout??m),planMs:aS(a.planTimeout??o),implementMs:aS(a.implementTimeout??r),mergeMs:aS(a.mergeTimeout??t)},analyzeRepoTimeouts:{analyzeMs:aS(a.analyzeRepoTimeout??v)}}}}function J(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:l.Timer,title:d("settings.stageTimeouts.title"),description:d("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",tooltip:d("settings.stageTimeouts.hint"),children:[(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.featureAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,b.jsx)(aR,{id:"timeout-analyze",testId:"timeout-analyze-input",value:h,onChange:i,onBlur:()=>{h!==x&&J(I({analyzeTimeout:h}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.requirements"),description:d("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,b.jsx)(aR,{id:"timeout-requirements",testId:"timeout-requirements-input",value:j,onChange:k,onBlur:()=>{j!==y&&J(I({requirementsTimeout:j}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.research"),description:d("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,b.jsx)(aR,{id:"timeout-research",testId:"timeout-research-input",value:m,onChange:n,onBlur:()=>{m!==z&&J(I({researchTimeout:m}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.plan"),description:d("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,b.jsx)(aR,{id:"timeout-plan",testId:"timeout-plan-input",value:o,onChange:p,onBlur:()=>{o!==B&&J(I({planTimeout:o}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.implement"),description:d("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,b.jsx)(aR,{id:"timeout-implement",testId:"timeout-implement-input",value:r,onChange:s,onBlur:()=>{r!==D&&J(I({implementTimeout:r}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.merge"),description:d("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,b.jsx)(aR,{id:"timeout-merge",testId:"timeout-merge-input",value:t,onChange:u,onBlur:()=>{t!==F&&J(I({mergeTimeout:t}))},defaultSeconds:1800})}),(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,b.jsx)(aR,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:v,onChange:w,onBlur:()=>{v!==H&&J(I({analyzeRepoTimeout:v}))},defaultSeconds:600})})]})}function aU({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.notifications.inApp.enabled),[h,j]=(0,c.useState)({...a.notifications.events});function k(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function l(a={}){return{notifications:{inApp:{enabled:a.inApp??f},events:a.events??h}}}return(0,b.jsxs)(C,{icon:i,title:d("settings.notifications.title"),description:d("settings.notifications.sectionDescription"),testId:"notification-settings-section",tooltip:d("settings.notifications.hint"),tooltipLinks:[{label:d("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:[(0,b.jsx)(E,{children:d("settings.notifications.channels")}),(0,b.jsx)(B,{label:d("settings.notifications.inAppLabel"),description:d("settings.notifications.inAppDescription"),tooltip:"Master toggle for in-app toast notifications. When disabled, no event toasts will appear regardless of individual event settings below.",id:"notif-in-app",testId:"switch-in-app",checked:f,onChange:a=>{g(a),k(l({inApp:a}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.agentEvents")}),(0,b.jsx)(B,{label:d("settings.notifications.events.agentStarted"),tooltip:"Controls whether you receive an in-app toast notification when an agent begins working on a feature.",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:h.agentStarted,onChange:a=>{let b={...h,agentStarted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.phaseCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent completes a workflow phase (e.g., requirements, planning, implementation).",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:h.phaseCompleted,onChange:a=>{let b={...h,phaseCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.waitingApproval"),tooltip:"Controls whether you receive an in-app toast notification when a feature is paused and waiting for your approval to continue.",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:h.waitingApproval,onChange:a=>{let b={...h,waitingApproval:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.agentCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent finishes all work on a feature successfully.",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:h.agentCompleted,onChange:a=>{let b={...h,agentCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.agentFailed"),tooltip:"Controls whether you receive an in-app toast notification when an agent encounters an error and stops working on a feature.",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:h.agentFailed,onChange:a=>{let b={...h,agentFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.pullRequestEvents")}),(0,b.jsx)(B,{label:d("settings.notifications.events.prMerged"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is merged into the target branch.",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:h.prMerged,onChange:a=>{let b={...h,prMerged:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prClosed"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is closed without merging.",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:h.prClosed,onChange:a=>{let b={...h,prClosed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prChecksPassed"),tooltip:"Controls whether you receive an in-app toast notification when all CI checks pass on a feature's pull request.",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:h.prChecksPassed,onChange:a=>{let b={...h,prChecksPassed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prChecksFailed"),tooltip:"Controls whether you receive an in-app toast notification when CI checks fail on a feature's pull request.",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:h.prChecksFailed,onChange:a=>{let b={...h,prChecksFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prBlocked"),tooltip:"Controls whether you receive an in-app toast notification when a pull request is blocked by merge conflicts or branch protection rules.",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:h.prBlocked,onChange:a=>{let b={...h,prBlocked:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.mergeReviewReady"),tooltip:"Controls whether you receive an in-app toast notification when a feature's PR passes all checks and is ready for your merge review.",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:h.mergeReviewReady,onChange:a=>{let b={...h,mergeReviewReady:a};j(b),k(l({events:b}))}})]})}function aV({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1,plugins:!1,mcpServers:!1},[g,h]=(0,c.useState)({...f});function i(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:j,title:d("settings.featureFlags.title"),description:d("settings.featureFlags.sectionDescription"),badge:d("settings.featureFlags.badge"),testId:"feature-flags-settings-section",tooltip:d("settings.featureFlags.hint"),children:[(0,b.jsx)(B,{label:d("settings.featureFlags.skills"),description:d("settings.featureFlags.skillsDescription"),tooltip:"Enables the Skills page in the sidebar for browsing and managing Claude Code skills.",id:"flag-skills",testId:"switch-flag-skills",checked:g.skills,onChange:a=>{let b={...g,skills:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.deployments"),description:d("settings.featureFlags.deploymentsDescription"),tooltip:"Enables experimental deployment features for environment management.",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:g.envDeploy,onChange:a=>{let b={...g,envDeploy:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.debug"),description:d("settings.featureFlags.debugDescription"),tooltip:"Shows additional debugging information in the UI for troubleshooting.",id:"flag-debug",testId:"switch-flag-debug",checked:g.debug,onChange:a=>{let b={...g,debug:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.githubImport"),description:d("settings.featureFlags.githubImportDescription"),tooltip:"Enables importing repositories directly from GitHub.",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:g.githubImport,onChange:a=>{let b={...g,githubImport:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.adoptBranch"),description:d("settings.featureFlags.adoptBranchDescription"),tooltip:"Enables adopting existing git branches as ShipIT features.",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:g.adoptBranch,onChange:a=>{let b={...g,adoptBranch:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.gitRebaseSync"),description:d("settings.featureFlags.gitRebaseSyncDescription"),tooltip:"Uses git rebase instead of merge when syncing feature branches with the upstream branch.",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:g.gitRebaseSync,onChange:a=>{let b={...g,gitRebaseSync:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.reactFileManager"),description:d("settings.featureFlags.reactFileManagerDescription"),tooltip:"Replaces the native file picker dialog with a React-based file browser for selecting project folders.",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:g.reactFileManager,onChange:a=>{let b={...g,reactFileManager:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.plugins"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.pluginsDescription"):`${d("settings.featureFlags.pluginsDescription")} — ${d("plugins.noProxy")}`,tooltip:"Enables the Plugins page for browsing and managing Claude Code plugins from a LiteLLM marketplace. Requires a LiteLLM proxy URL to be configured.",id:"flag-plugins",testId:"switch-flag-plugins",checked:g.plugins,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,plugins:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.mcpServers"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.mcpServersDescription"):`${d("settings.featureFlags.mcpServersDescription")} — ${d("mcpServers.noProxy")}`,tooltip:"Enables the MCP Servers page for viewing MCP servers deployed on your LiteLLM proxy. Requires a LiteLLM proxy URL to be configured.",id:"flag-mcp-servers",testId:"switch-flag-mcp-servers",checked:g.mcpServers,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,mcpServers:a};h(b),i({featureFlags:b})}})]})}function aW({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[g,h]=(0,c.useState)(f.enabled),[i,j]=(0,c.useState)(String(f.autoTimeoutMinutes)),[k,l]=(0,c.useState)(String(f.maxConcurrentSessions));function n(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:m.MessageSquare,title:d("settings.interactiveAgent.title"),description:d("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",tooltip:d("settings.interactiveAgent.hint"),children:[(0,b.jsx)(B,{label:d("settings.interactiveAgent.enableChatTab"),description:d("settings.interactiveAgent.enableChatTabDescription"),tooltip:"Shows or hides the Chat tab on feature detail pages. When enabled, you can have interactive conversations with the agent about a specific feature.",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:g,onChange:a=>{h(a),n({interactiveAgent:{enabled:a,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:parseInt(k,10)||3}})}}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.autoTimeout"),description:d("settings.interactiveAgent.autoTimeoutDescription"),tooltip:"Minutes of inactivity before a chat agent session is automatically terminated. Prevents idle agent processes from consuming resources indefinitely.",htmlFor:"interactive-agent-timeout",children:(0,b.jsx)(D,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:i,placeholder:"15",min:1,max:120,suffix:"min",onChange:j,onBlur:()=>{let a=parseInt(i,10),b=Number.isNaN(a)?15:Math.min(120,Math.max(1,a));j(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:b,maxConcurrentSessions:parseInt(k,10)||3}})}})}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.maxConcurrentSessions"),description:d("settings.interactiveAgent.maxConcurrentSessionsDescription"),tooltip:"Maximum number of interactive agent sessions that can run simultaneously. Each session spawns a separate agent process, so higher values use more CPU and memory.",htmlFor:"interactive-agent-sessions",children:(0,b.jsx)(D,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:k,placeholder:"3",min:1,max:10,onChange:l,onBlur:()=>{let a=parseInt(k,10),b=Number.isNaN(a)?3:Math.min(10,Math.max(1,a));l(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:b}})}})})]})}function aX({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.fabLayout??{swapPosition:!1},[g,h]=(0,c.useState)(f.swapPosition);return(0,b.jsx)(C,{icon:n,title:d("settings.fabLayout.title"),description:d("settings.fabLayout.description"),testId:"fab-layout-settings-section",tooltip:d("settings.fabLayout.hint"),children:(0,b.jsx)(B,{label:d("settings.fabLayout.swapPosition"),description:d("settings.fabLayout.swapPositionDescription"),tooltip:"Swaps the Create button (bottom-right) and Chat button (bottom-left) positions on the control center canvas.",id:"fab-swap-position",testId:"switch-fab-swap-position",checked:g,onChange:a=>{var b;h(a),b={fabLayout:{swapPosition:a}},e(async()=>{let a=await K(b);a.success||G.toast.error(a.error??d("settings.failedToSave"))})}})})}function aY({shipitAiHome:a,dbFileSize:c}){let{t:d}=(0,q.useTranslation)("web");return(0,b.jsxs)(C,{icon:k,title:d("settings.database.title"),description:d("settings.database.sectionDescription"),testId:"database-settings-section",tooltip:d("settings.database.hint"),tooltipLinks:[{label:d("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:d("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.database.location"),description:d("settings.database.locationDescription"),tooltip:"The directory where ShipIT stores its SQLite database, logs, and configuration files. Change this via the SHIPIT_AI_HOME environment variable.",children:(0,b.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:a})}),(0,b.jsx)(A,{label:d("settings.database.size"),tooltip:"Current size of the SQLite database file on disk. Large databases may slow down startup; consider archiving old features if this grows significantly.",children:(0,b.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:c})})]})}var aZ=a.i(98680),aZ=aZ,a$=a.i(74605),a$=a$;let a_=(0,J.createServerReference)("404f44d7fe0e8c191245932d8a0bf4e33f231da34a",J.callServer,void 0,J.findSourceMapURL,"addMarketplaceAction");var a0=a.i(90920),a1=a.i(18948);function a2({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.litellmProxy?.baseUrl??""),[h,i]=(0,c.useState)(a.litellmProxy?.apiKey??""),[j,k]=(0,c.useState)("idle"),[l,m]=(0,c.useState)(!1),n=a.litellmProxy?.baseUrl??"",o=a.litellmProxy?.apiKey??"";function r(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function s(a){let b=a?.baseUrl??f;return{litellmProxy:{baseUrl:b,apiKey:a?.apiKey??h,marketplaceEnabled:!!b}}}async function t(){if(f){m(!0),k("idle");try{let a=`${f.replace(/\/+$/,"")}/claude-code/marketplace.json`,b=await a_(a);k(b.success?"success":"failed"),b.success?G.toast.success(d("settings.litellmProxy.testSuccess")):G.toast.error(d("settings.litellmProxy.testFailed"))}catch{k("failed"),G.toast.error(d("settings.litellmProxy.testFailed"))}finally{m(!1)}}}return(0,b.jsxs)(C,{icon:p.Server,title:d("settings.litellmProxy.title"),description:d("settings.litellmProxy.description"),testId:"litellm-proxy-settings-section",tooltip:d("settings.litellmProxy.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.baseUrl"),description:d("settings.litellmProxy.baseUrlDescription"),tooltip:"The base URL of your LiteLLM proxy server. This is used to fetch the plugin marketplace catalog and route model requests.",htmlFor:"litellm-proxy-url",children:(0,b.jsx)(a0.Input,{id:"litellm-proxy-url","data-testid":"litellm-proxy-url-input",type:"text",placeholder:"http://localhost:4000",value:f,onChange:a=>{g(a.target.value),k("idle")},onBlur:()=>{f!==n&&r(s({baseUrl:f}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.apiKey"),description:d("settings.litellmProxy.apiKeyDescription"),tooltip:"A virtual API key for authenticating with the LiteLLM proxy. Stored locally alongside other agent credentials.",htmlFor:"litellm-api-key",children:(0,b.jsx)(a0.Input,{id:"litellm-api-key","data-testid":"litellm-api-key-input",type:"password",placeholder:"sk-...",value:h,onChange:a=>i(a.target.value),onBlur:()=>{h!==o&&r(s({apiKey:h}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.testConnection"),tooltip:"Attempt to connect to the proxy and fetch the marketplace catalog to verify the configuration is correct.",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a1.Button,{variant:"outline",size:"sm","data-testid":"litellm-test-connection-btn",disabled:!f||l,onClick:t,className:"cursor-pointer text-xs",children:l?d("settings.saving"):d("settings.litellmProxy.testConnection")}),"success"===j&&(0,b.jsx)(aZ.default,{className:"h-4 w-4 text-emerald-500","data-testid":"litellm-test-success"}),"failed"===j&&(0,b.jsx)(a$.default,{className:"text-destructive h-4 w-4","data-testid":"litellm-test-failed"})]})})]})}let a3=(0,h.default)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);var a4=a.i(79620);let a5=new Set(["claude-code","gemini-cli","codex-cli"]),a6=new Set(["cursor","copilot-cli"]);function a7({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.agent.type,g=a.litellmProxy?.claudeCode,[h,i]=(0,c.useState)(function(a){switch(a.agent.type){case"claude-code":return a.litellmProxy?.claudeCode?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"gemini-cli":return a.litellmProxy?.geminiCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"codex-cli":return a.litellmProxy?.codexCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;default:return L.LiteLLMProxyRoutingMode.direct}}(a)),[j,k]=(0,c.useState)(g?.customHeaders??""),[l,m]=(0,c.useState)(g?.sonnetModel??""),[n,o]=(0,c.useState)(g?.haikuModel??""),[p,r]=(0,c.useState)(g?.opusModel??""),s=g?.customHeaders??"",t=g?.sonnetModel??"",u=g?.haikuModel??"",v=g?.opusModel??"",w=h!==L.LiteLLMProxyRoutingMode.direct,x=a5.has(f),y=a6.has(f),z=a.litellmProxy?.baseUrl??"",B=a.litellmProxy?.apiKey??"";function D(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function E(a){let b=function(a){switch(a){case"claude-code":return"claudeCode";case"gemini-cli":return"geminiCli";case"codex-cli":return"codexCli";default:return null}}(f);return b?"claude-code"===f?{litellmProxy:{claudeCode:{routingMode:a?.routingMode??h,customHeaders:a?.customHeaders??j,sonnetModel:a?.sonnetModel??l,haikuModel:a?.haikuModel??n,opusModel:a?.opusModel??p}}}:{litellmProxy:{[b]:{routingMode:a?.routingMode??h}}}:{}}if(!x&&!y)return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.notSupported"),children:(0,b.jsx)("span",{})})});if(y){let a="cursor"===f,c=z?a?`${z.replace(/\/+$/,"")}/cursor`:z:"";return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:a?d("settings.litellmProxy.routing.cursorInstructions"):d("settings.litellmProxy.routing.copilotInstructions"),description:a?d("settings.litellmProxy.routing.cursorDescription"):d("settings.litellmProxy.routing.copilotDescription"),children:(0,b.jsxs)("div",{className:"w-64 space-y-2",children:[(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:c}),a&&B?(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:B}):null]})})})}return(0,b.jsxs)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.mode"),description:d("settings.litellmProxy.routing.modeDescription"),htmlFor:"litellm-routing-mode",children:(0,b.jsxs)(H.Select,{value:h,onValueChange:function(a){i(a),D(E({routingMode:a}))},children:[(0,b.jsx)(H.SelectTrigger,{id:"litellm-routing-mode","data-testid":"litellm-routing-mode-select",className:"w-48 text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsxs)(H.SelectContent,{children:[(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.direct,children:d("settings.litellmProxy.routing.modeDirect")}),(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.proxy,children:d("settings.litellmProxy.routing.modeProxy")}),"claude-code"===f&&(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.passthrough,children:d("settings.litellmProxy.routing.modePassthrough")})]})]})}),h===L.LiteLLMProxyRoutingMode.passthrough&&(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.passthroughHelp"),children:(0,b.jsx)("span",{})}),w&&"claude-code"===f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.customHeaders"),description:d("settings.litellmProxy.routing.customHeadersDescription"),htmlFor:"litellm-custom-headers",children:(0,b.jsx)(a4.Textarea,{id:"litellm-custom-headers","data-testid":"litellm-custom-headers-input",placeholder:"x-litellm-customer-id: my-user\nx-litellm-tags: project:acme",value:j,onChange:a=>k(a.target.value),onBlur:()=>{j!==s&&D(E({customHeaders:j}))},rows:3,className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.sonnetModel"),description:d("settings.litellmProxy.routing.modelOverrideDescription"),htmlFor:"litellm-sonnet-model",children:(0,b.jsx)(a0.Input,{id:"litellm-sonnet-model","data-testid":"litellm-sonnet-model-input",type:"text",placeholder:"claude-sonnet-4-6",value:l,onChange:a=>m(a.target.value),onBlur:()=>{l!==t&&D(E({sonnetModel:l}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.haikuModel"),htmlFor:"litellm-haiku-model",children:(0,b.jsx)(a0.Input,{id:"litellm-haiku-model","data-testid":"litellm-haiku-model-input",type:"text",placeholder:"claude-haiku-4-5",value:n,onChange:a=>o(a.target.value),onBlur:()=>{n!==u&&D(E({haikuModel:n}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.opusModel"),htmlFor:"litellm-opus-model",children:(0,b.jsx)(a0.Input,{id:"litellm-opus-model","data-testid":"litellm-opus-model-input",type:"text",placeholder:"claude-opus-4-6",value:p,onChange:a=>r(a.target.value),onBlur:()=>{p!==v&&D(E({opusModel:p}))},className:"w-64 text-xs"})})]}):null]})}let a8=[{id:"agent",labelKey:"settings.sections.agent",icon:d.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:e.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:f.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:g.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:l.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:i},{id:"feature-flags",labelKey:"settings.sections.flags",icon:j},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:m.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:n},{id:"database",labelKey:"settings.sections.database",icon:k},{id:"litellm-proxy",labelKey:"settings.sections.proxy",icon:p.Server}],a9=[{id:"all",labelKey:"settings.sections.all",icon:o},...a8];a.s(["SettingsPageClient",0,function({settings:a,shipitAiHome:d,dbFileSize:e,availableTerminals:f,availableEditors:g,availableShells:h}){let{t:i}=(0,q.useTranslation)("web"),[j,k]=(0,c.useState)("all"),[l,m]=(0,c.useState)("agent");return(0,c.useEffect)(()=>{if("all"!==j)return;let a=a8.map(a=>document.getElementById(`section-${a.id}`)).filter(Boolean);if(0===a.length)return;let b=new IntersectionObserver(a=>{for(let b of a)b.isIntersecting&&m(b.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let c of a)b.observe(c);return()=>b.disconnect()},[j]),(0,b.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl px-8 pt-8",children:[(0,b.jsxs)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 pb-4 backdrop-blur",children:[(0,b.jsxs)("div",{className:"mb-4 space-y-1.5",children:[(0,b.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:"Developer Portal"}),(0,b.jsx)("div",{className:"flex items-baseline gap-3",children:(0,b.jsx)("h1",{className:"text-foreground text-3xl font-black tracking-tight",children:i("settings.title")})})]}),(0,b.jsx)("nav",{className:"bg-card editorial-shadow flex flex-wrap items-center gap-0.5 rounded-lg p-1",children:a9.map(a=>{let c=a.icon,d=j===a.id||"all"===j&&"all"!==a.id&&l===a.id;return(0,b.jsxs)("button",{type:"button",onClick:()=>k(a.id),className:(0,r.cn)("flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-bold transition-all",d?"bg-muted text-primary shadow-sm ring-1 ring-slate-200/70 dark:ring-slate-700/50":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[(0,b.jsx)(c,{className:"h-3 w-3"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:i(a.labelKey)})]},a.id)})})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3",children:[("all"===j||"agent"===j)&&(0,b.jsx)("div",{id:"section-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(F,{settings:a})}),("all"===j||"environment"===j)&&(0,b.jsx)("div",{id:"section-environment",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(Y,{settings:a,availableEditors:g,availableShells:h,availableTerminals:f})}),("all"===j||"workflow"===j)&&(0,b.jsx)("div",{id:"section-workflow",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)($,{settings:a})}),("all"===j||"ci"===j)&&(0,b.jsx)("div",{id:"section-ci",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aa,{settings:a})}),("all"===j||"stage-timeouts"===j)&&(0,b.jsx)("div",{id:"section-stage-timeouts",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aT,{settings:a})}),("all"===j||"notifications"===j)&&(0,b.jsx)("div",{id:"section-notifications",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aU,{settings:a})}),("all"===j||"feature-flags"===j)&&(0,b.jsx)("div",{id:"section-feature-flags",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aV,{settings:a})}),("all"===j||"interactive-agent"===j)&&(0,b.jsx)("div",{id:"section-interactive-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aW,{settings:a})}),("all"===j||"fab-layout"===j)&&(0,b.jsx)("div",{id:"section-fab-layout",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aX,{settings:a})}),("all"===j||"database"===j)&&(0,b.jsx)("div",{id:"section-database",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aY,{shipitAiHome:d,dbFileSize:e})}),("all"===j||"litellm-proxy"===j)&&(0,b.jsxs)("div",{id:"section-litellm-proxy",className:"scroll-mt-18 rounded-lg",children:[(0,b.jsx)(a2,{settings:a}),a.litellmProxy?.baseUrl?(0,b.jsx)(a7,{settings:a}):null]})]})]})}],79020)}];
|
|
1
|
+
module.exports=[79020,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(87638),e=a.i(8685),f=a.i(37545),g=a.i(51423),h=a.i(97624);let i=(0,h.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"}]]),j=(0,h.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"}]]),k=(0,h.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 l=a.i(69210),m=a.i(73952);let n=(0,h.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),o=(0,h.default)("layout-list",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);var p=a.i(63466);a.i(98617);var q=a.i(50040),r=a.i(85536),s=a.i(61781),t=a.i(49853),t=t,u=a.i(29370),v=a.i(2),w=a.i(77612),x=a.i(58860),y=a.i(96867),z=a.i(82934);function A({label:a,description:c,htmlFor:d,tooltip:e,children:f}){let g=e??c;return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(x.Label,{htmlFor:d,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:a}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsx)(z.TooltipContent,{side:"top",className:"max-w-64 text-[11px] leading-relaxed",children:(0,b.jsx)("span",{className:"text-muted-foreground",children:g})})]}):null]}),c?(0,b.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:c}):null]}),(0,b.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:f})]})}function B({label:a,description:c,id:d,testId:e,checked:f,onChange:g,disabled:h,tooltip:i}){return(0,b.jsx)(A,{label:a,description:c,htmlFor:d,tooltip:i,children:(0,b.jsx)(y.Switch,{id:d,"data-testid":e,checked:f,onCheckedChange:g,disabled:h,className:(0,r.cn)("cursor-pointer",h&&"cursor-not-allowed opacity-50")})})}function C({icon:a,title:c,description:d,badge:e,testId:f,tooltip:g,tooltipLinks:h,children:i}){return(0,b.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":f,children:[(0,b.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,b.jsx)("h2",{className:"text-sm font-semibold",children:c}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsxs)(z.TooltipContent,{side:"bottom",className:"max-w-72 text-[11px] leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:g}),null!=h&&h.length>0?(0,b.jsx)("div",{className:"border-border/50 mt-1.5 flex flex-col gap-0.5 border-t pt-1.5",children:h.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5 text-[10px] tracking-wide transition-colors",children:[(0,b.jsx)(v.ExternalLink,{className:"h-2.5 w-2.5 shrink-0 opacity-50"}),a.label]},a.href))}):null]})]}):null,e?(0,b.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:e}):null]}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:d})]}),(0,b.jsx)("div",{className:"px-4",children:i})]})}function D({id:a,testId:c,value:d,onChange:e,onBlur:f,placeholder:g,min:h=1,max:i,step:j=1,suffix:k}){let{t:l}=(0,q.useTranslation)("web"),m=""===d?void 0:parseInt(d,10);return(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{e(String(Math.max(h,(m??parseInt(g,10))-j)))},onMouseUp:f,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":l("common.decrease"),children:(0,b.jsx)(t.default,{className:"h-3 w-3"})}),(0,b.jsx)("input",{id:a,"data-testid":c,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:d,placeholder:g,onChange:a=>{e(a.target.value.replace(/[^0-9]/g,""))},onBlur:f,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,b.jsx)("button",{type:"button",onClick:()=>{let a;a=m??parseInt(g,10),e(String(null!=i?Math.min(i,a+j):a+j))},onMouseUp:f,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":l("common.increase"),children:(0,b.jsx)(u.Plus,{className:"h-3 w-3"})})]}),k?(0,b.jsx)("span",{className:"text-muted-foreground text-[11px]",children:k}):null]})}function E({children:a}){return(0,b.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,b.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:a})})}function F({settings:a}){let{t:e}=(0,q.useTranslation)("web"),[f,g]=(0,c.useState)(a.agent.type);return(0,b.jsx)(C,{icon:d.Bot,title:e("settings.agent.sectionTitle"),description:e("settings.agent.sectionDescription"),testId:"agent-settings-section",tooltip:e("settings.agent.hint"),tooltipLinks:[{label:e("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:e("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:e("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:(0,b.jsx)(A,{label:e("settings.agent.agentAndModel"),description:e("settings.agent.agentAndModelDescription"),tooltip:"Changing the agent switches which AI CLI tool runs your features. Each agent has different capabilities, speed, and cost tradeoffs.",htmlFor:"agent-model-picker",children:(0,b.jsx)(s.AgentModelPicker,{initialAgentType:f,initialModel:a.models.default,mode:"settings",onAgentModelChange:a=>g(a),className:"w-55"})})})}var G=a.i(52313),H=a.i(59175),I=a.i(58339),J=a.i(6120);let K=(0,J.createServerReference)("40c36e2c361dd26484caa7f4d3c27ef58ff4bf6a45",J.callServer,void 0,J.findSourceMapURL,"updateSettingsAction");var L=a.i(46847),M=a.i(7077),N=a.i(11036),O=a.i(96436);function P(a){return(0,b.jsx)(N.Code,{className:(0,r.cn)("h-4 w-4",a.className),...a})}function Q({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function R({className:a}){return(0,b.jsx)(M.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function S({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function T({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function U({className:a,...c}){return(0,b.jsx)(O.Rocket,{className:(0,r.cn)("h-4 w-4",a),...c})}Q.displayName="VsCodeIcon",R.displayName="CursorEditorIcon",S.displayName="WindsurfIcon",T.displayName="ZedIcon",U.displayName="AntigravityIcon";let V={vscode:Q,cursor:R,windsurf:S,zed:T,antigravity:U},W=[{id:"vscode",name:"VS Code",available:!0},{id:"cursor",name:"Cursor",available:!0},{id:"windsurf",name:"Windsurf",available:!0},{id:"zed",name:"Zed",available:!0},{id:"antigravity",name:"Antigravity",available:!0}],X=[{id:"bash",name:"Bash",available:!0},{id:"zsh",name:"Zsh",available:!0},{id:"fish",name:"Fish",available:!0}];function Y({settings:a,availableEditors:d,availableShells:f,availableTerminals:g}){let{t:h}=(0,q.useTranslation)("web"),[,i]=(0,c.useTransition)(),[j,k]=(0,c.useState)(a.environment.defaultEditor),[l,m]=(0,c.useState)(a.environment.shellPreference),[n,o]=(0,c.useState)(a.environment.terminalPreference??L.TerminalType.System),p=g??[{id:L.TerminalType.System,name:h("settings.environment.systemTerminal"),available:!0}];function s(a){i(async()=>{let b=await K(a);b.success||G.toast.error(b.error??h("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:e.Terminal,title:h("settings.environment.sectionTitle"),description:h("settings.environment.sectionDescription"),testId:"environment-settings-section",tooltip:h("settings.environment.hint"),tooltipLinks:[{label:h("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:[(0,b.jsx)(A,{label:h("settings.environment.defaultEditor"),description:h("settings.environment.defaultEditorDescription"),tooltip:"The editor that opens when you click 'Launch' on a tool card or when ShipIT needs to open a file for review.",htmlFor:"default-editor",children:(0,b.jsxs)(H.Select,{value:j,onValueChange:a=>{k(a),s({environment:{defaultEditor:a,shellPreference:l,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(d??W).map(a=>{var c;let d=(c=a.id)&&c in V?V[c]:P;return(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(d,{className:"h-4 w-4 shrink-0"}),a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id)})})]})}),(0,b.jsx)(A,{label:h("settings.environment.shell"),description:h("settings.environment.shellDescription"),tooltip:"Controls which shell runs generated scripts like install commands and git operations. Match this to your daily driver shell.",htmlFor:"shell-preference",children:(0,b.jsxs)(H.Select,{value:l,onValueChange:a=>{m(a),s({environment:{defaultEditor:j,shellPreference:a,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(f??X).map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})}),(0,b.jsx)(A,{label:h("settings.environment.terminal"),description:h("settings.environment.terminalDescription"),tooltip:"The terminal emulator launched when opening shell sessions from the web UI. Only affects web-launched terminals, not CLI usage.",htmlFor:"terminal-preference",children:(0,b.jsxs)(H.Select,{value:n,onValueChange:a=>{o(a),s({environment:{defaultEditor:j,shellPreference:l,terminalPreference:a}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:p.map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})})]})}function Z(a,b={}){let c=b.autoArchiveEnabled??a.autoArchiveEnabled,d=parseInt(b.autoArchiveDelay??a.autoArchiveDelay,10);return{workflow:{openPrOnImplementationComplete:b.openPr??a.openPr,approvalGateDefaults:{pushOnImplementationComplete:b.pushOnComplete??a.pushOnComplete,allowPrd:b.allowPrd??a.allowPrd,allowPlan:b.allowPlan??a.allowPlan,allowMerge:b.allowMerge??a.allowMerge},enableEvidence:b.enableEvidence??a.enableEvidence,commitEvidence:b.commitEvidence??a.commitEvidence,ciWatchEnabled:b.ciWatchEnabled??a.ciWatchEnabled,defaultFastMode:b.defaultFastMode??a.defaultFastMode,autoArchiveDelayMinutes:c?Number.isNaN(d)||d<1?10:d:0}}}function $({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[g,h]=(0,c.useState)(a.workflow.openPrOnImplementationComplete),[i,j]=(0,c.useState)(a.workflow.approvalGateDefaults.pushOnImplementationComplete),[k,l]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPrd),[m,n]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPlan),[o,p]=(0,c.useState)(a.workflow.approvalGateDefaults.allowMerge),[r,s]=(0,c.useState)(a.workflow.enableEvidence),[t,u]=(0,c.useState)(a.workflow.commitEvidence),[v,w]=(0,c.useState)(!1!==a.workflow.ciWatchEnabled),[x,y]=(0,c.useState)(!1!==a.workflow.defaultFastMode),[z,F]=(0,c.useState)((a.workflow.autoArchiveDelayMinutes??10)>0),[H,I]=(0,c.useState)(String(a.workflow.autoArchiveDelayMinutes??10));function J(){return{openPr:g,pushOnComplete:i,allowPrd:k,allowPlan:m,allowMerge:o,enableEvidence:r,commitEvidence:t,ciWatchEnabled:v,defaultFastMode:x,autoArchiveEnabled:z,autoArchiveDelay:H}}function L(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:f.GitBranch,title:d("settings.workflow.title"),description:d("settings.workflow.sectionDescription"),testId:"workflow-settings-section",tooltip:d("settings.workflow.hint"),tooltipLinks:[{label:d("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:d("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:[(0,b.jsx)(B,{label:d("settings.workflow.defaultFastMode"),description:d("settings.workflow.defaultFastModeDescription"),tooltip:"When enabled, new features skip the PRD and Plan phases and go straight to implementation. Useful for quick fixes, risky for complex features.",id:"default-fast-mode",testId:"switch-default-fast-mode",checked:x,onChange:a=>{y(a),L(Z(J(),{defaultFastMode:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.approve")}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePrd"),description:d("settings.workflow.autoApprovePrdDescription"),tooltip:"Automatically approves the requirements document without pausing for your review. Saves time but you lose the chance to refine requirements before planning.",id:"allow-prd",testId:"switch-allow-prd",checked:k,onChange:a=>{l(a),L(Z(J(),{allowPrd:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePlan"),description:d("settings.workflow.autoApprovePlanDescription"),tooltip:"Automatically approves the implementation plan. The agent proceeds to coding without waiting for your plan review.",id:"allow-plan",testId:"switch-allow-plan",checked:m,onChange:a=>{n(a),L(Z(J(),{allowPlan:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApproveMerge"),description:d("settings.workflow.autoApproveMergeDescription"),tooltip:"Automatically merges the PR after implementation without requiring your final review. Use with caution on production branches.",id:"allow-merge",testId:"switch-allow-merge",checked:o,onChange:a=>{p(a),L(Z(J(),{allowMerge:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.evidence")}),(0,b.jsx)(B,{label:d("settings.workflow.collectEvidence"),description:d("settings.workflow.collectEvidenceDescription"),tooltip:"Captures screenshots and test outputs during implementation as proof of work. Useful for audit trails and PR documentation.",id:"enable-evidence",testId:"switch-enable-evidence",checked:r,onChange:a=>{s(a),a?L(Z(J(),{enableEvidence:a})):(u(!1),L(Z(J(),{enableEvidence:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.addEvidenceToPr"),description:d("settings.workflow.addEvidenceToPrDescription"),tooltip:"Attaches collected evidence artifacts (screenshots, logs) directly to the pull request description.",id:"commit-evidence",testId:"switch-commit-evidence",checked:t,disabled:!r||!g,onChange:a=>{u(a),L(Z(J(),{commitEvidence:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.git")}),(0,b.jsx)(B,{label:d("settings.workflow.pushOnComplete"),description:d("settings.workflow.pushOnCompleteDescription"),tooltip:"Automatically pushes the implementation branch to the remote repository when the agent finishes coding.",id:"push-on-complete",testId:"switch-push-on-complete",checked:i,onChange:a=>{j(a),L(Z(J(),{pushOnComplete:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.openPrOnComplete"),description:d("settings.workflow.openPrOnCompleteDescription"),tooltip:"Creates a pull request automatically after pushing. Combined with push-on-complete, this fully automates the delivery pipeline.",id:"open-pr",testId:"switch-open-pr",checked:g,onChange:a=>{h(a),a?L(Z(J(),{openPr:a})):(u(!1),L(Z(J(),{openPr:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.watchCiAfterPush"),description:d("settings.workflow.watchCiAfterPushDescription"),tooltip:"Monitors CI/CD pipeline status after pushing and can attempt fixes if tests fail. Disable if you prefer to handle CI failures manually.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:v,onChange:a=>{w(a),L(Z(J(),{ciWatchEnabled:a}))}}),(0,b.jsx)(E,{children:"Archive"}),(0,b.jsx)(B,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",tooltip:"Automatically archives features from the control center canvas after they reach the completed state, keeping the board clean.",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:z,onChange:a=>{F(a),L(Z(J(),{autoArchiveEnabled:a}))}}),(0,b.jsx)(A,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1-1440)",tooltip:"How long to wait after a feature completes before archiving it. Gives you time to review results before the feature moves off the board.",htmlFor:"auto-archive-delay",children:(0,b.jsx)(D,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:H,placeholder:"10",min:1,max:1440,suffix:"min",onChange:a=>{I(a)},onBlur:()=>{if(!z)return;let a=parseInt(H,10),b=Number.isNaN(a)?10:Math.min(1440,Math.max(1,a));I(String(b)),L(Z(J(),{autoArchiveDelay:String(b)}))}})})]})}function _(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}function aa({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,h]=(0,c.useState)(null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):""),[i,j]=(0,c.useState)(null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):""),[k,l]=(0,c.useState)(null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):""),[m,n]=(0,c.useState)(null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):""),[o,p]=(0,c.useState)(!1!==a.workflow.hideCiStatus),r=null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):"",s=null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):"",t=null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):"",u=null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):"";function v(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function w(a){let b=_(a.ciTimeout??i);return{workflow:{ciMaxFixAttempts:_(a.ciMaxFix??f),ciWatchTimeoutMs:null!=b?1e3*b:void 0,ciLogMaxChars:_(a.ciLogMax??k),ciWatchPollIntervalSeconds:_(a.ciPollInterval??m),hideCiStatus:a.hideCiStatus??o}}}return(0,b.jsxs)(C,{icon:g.Activity,title:d("settings.ci.title"),description:d("settings.ci.description"),testId:"ci-settings-section",tooltip:d("settings.ci.hint"),tooltipLinks:[{label:d("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:d("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.ci.maxFixAttempts"),description:d("settings.ci.maxFixAttemptsDescription"),tooltip:"How many times the agent will attempt to fix failing CI checks before giving up. Higher values increase the chance of auto-resolution but consume more agent time and API calls.",htmlFor:"ci-max-fix",children:(0,b.jsx)(D,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:f,onChange:h,onBlur:()=>{f!==r&&v(w({ciMaxFix:f}))},min:1,max:10})}),(0,b.jsx)(A,{label:d("settings.ci.watchTimeout"),description:d("settings.ci.watchTimeoutDescription"),tooltip:"Maximum time the agent will wait for CI to finish. If CI hasn't completed within this window, the agent stops watching. Increase for repos with slow CI pipelines.",htmlFor:"ci-timeout",children:(0,b.jsx)(D,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:i,onChange:j,onBlur:()=>{i!==s&&v(w({ciTimeout:i}))},min:30,step:30,suffix:"sec"})}),(0,b.jsx)(A,{label:d("settings.ci.maxLogSize"),description:d("settings.ci.maxLogSizeDescription"),tooltip:"CI logs beyond this character limit are truncated before being sent to the agent for analysis. Keeps agent context focused and avoids excessive token usage.",htmlFor:"ci-log-max",children:(0,b.jsx)(D,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:k,onChange:l,onBlur:()=>{k!==t&&v(w({ciLogMax:k}))},min:1e3,step:5e3,suffix:"chars"})}),(0,b.jsx)(A,{label:d("settings.ci.pollInterval"),description:d("settings.ci.pollIntervalDescription"),tooltip:"How frequently the agent checks GitHub for CI status updates. Lower values give faster feedback but increase API call volume.",htmlFor:"ci-poll-interval",children:(0,b.jsx)(D,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:m,onChange:n,onBlur:()=>{m!==u&&v(w({ciPollInterval:m}))},min:5,step:5,suffix:"sec"})}),(0,b.jsx)(B,{label:d("settings.ci.hideCiStatus"),description:d("settings.ci.hideCiStatusDescription"),tooltip:"When enabled, CI status indicators are hidden from the feature drawer and merge review panels. Useful if you monitor CI through GitHub directly.",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:o,onChange:a=>{p(a),v(w({hideCiStatus:a}))}})]})}var ab=a.i(48972),ac=a.i(59653),ad=a.i(80303),ae=a.i(95819),af=a.i(47427),ag=a.i(60380),ah=a.i(41387),ai=a.i(97045),aj=a.i(30419),ak=a.i(69471),al=["PageUp","PageDown"],am=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],an={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ao="Slider",[ap,aq,ar]=(0,ak.createCollection)(ao),[as,at]=(0,ae.createContextScope)(ao,[ar]),[au,av]=as(ao),aw=c.forwardRef((a,d)=>{let{name:e,min:f=0,max:g=100,step:h=1,orientation:i="horizontal",disabled:j=!1,minStepsBetweenThumbs:k=0,defaultValue:l=[f],value:m,onValueChange:n=()=>{},onValueCommit:o=()=>{},inverted:p=!1,form:q,...r}=a,s=c.useRef(new Set),t=c.useRef(0),u="horizontal"===i,[v=[],w]=(0,af.useControllableState)({prop:m,defaultProp:l,onChange:a=>{let b=[...s.current];b[t.current]?.focus(),n(a)}}),x=c.useRef(v);function y(a,b,{commit:c}={commit:!1}){let d,e=(String(h).split(".")[1]||"").length,i=Math.round((Math.round((a-f)/h)*h+f)*(d=Math.pow(10,e)))/d,j=(0,ab.clamp)(i,[f,g]);w((a=[])=>{let d=function(a=[],b,c){let d=[...a];return d[c]=b,d.sort((a,b)=>a-b)}(a,j,b);if(!function(a,b){if(b>0)return Math.min(...a.slice(0,-1).map((b,c)=>a[c+1]-b))>=b;return!0}(d,k*h))return a;{t.current=d.indexOf(j);let b=String(d)!==String(a);return b&&c&&o(d),b?d:a}})}return(0,b.jsx)(au,{scope:a.__scopeSlider,name:e,disabled:j,min:f,max:g,valueIndexToChangeRef:t,thumbs:s.current,values:v,orientation:i,form:q,children:(0,b.jsx)(ap.Provider,{scope:a.__scopeSlider,children:(0,b.jsx)(ap.Slot,{scope:a.__scopeSlider,children:(0,b.jsx)(u?az:aA,{"aria-disabled":j,"data-disabled":j?"":void 0,...r,ref:d,onPointerDown:(0,ac.composeEventHandlers)(r.onPointerDown,()=>{j||(x.current=v)}),min:f,max:g,inverted:p,onSlideStart:j?void 0:function(a){let b=function(a,b){if(1===a.length)return 0;let c=a.map(a=>Math.abs(a-b)),d=Math.min(...c);return c.indexOf(d)}(v,a);y(a,b)},onSlideMove:j?void 0:function(a){y(a,t.current)},onSlideEnd:j?void 0:function(){let a=x.current[t.current];v[t.current]!==a&&o(v)},onHomeKeyDown:()=>!j&&y(f,0,{commit:!0}),onEndKeyDown:()=>!j&&y(g,v.length-1,{commit:!0}),onStepKeyDown:({event:a,direction:b})=>{if(!j){let c=al.includes(a.key)||a.shiftKey&&am.includes(a.key),d=t.current;y(v[d]+h*(c?10:1)*b,d,{commit:!0})}}})})})})});aw.displayName=ao;var[ax,ay]=as(ao,{startEdge:"left",endEdge:"right",size:"width",direction:1}),az=c.forwardRef((a,d)=>{let{min:e,max:f,dir:g,inverted:h,onSlideStart:i,onSlideMove:j,onSlideEnd:k,onStepKeyDown:l,...m}=a,[n,o]=c.useState(null),p=(0,ad.useComposedRefs)(d,a=>o(a)),q=c.useRef(void 0),r=(0,ag.useDirection)(g),s="ltr"===r,t=s&&!h||!s&&h;function u(a){let b=q.current||n.getBoundingClientRect(),c=aL([0,b.width],t?[e,f]:[f,e]);return q.current=b,c(a-b.left)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:t?"left":"right",endEdge:t?"right":"left",direction:t?1:-1,size:"width",children:(0,b.jsx)(aB,{dir:r,"data-orientation":"horizontal",...m,ref:p,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:a=>{let b=u(a.clientX);i?.(b)},onSlideMove:a=>{let b=u(a.clientX);j?.(b)},onSlideEnd:()=>{q.current=void 0,k?.()},onStepKeyDown:a=>{let b=an[t?"from-left":"from-right"].includes(a.key);l?.({event:a,direction:b?-1:1})}})})}),aA=c.forwardRef((a,d)=>{let{min:e,max:f,inverted:g,onSlideStart:h,onSlideMove:i,onSlideEnd:j,onStepKeyDown:k,...l}=a,m=c.useRef(null),n=(0,ad.useComposedRefs)(d,m),o=c.useRef(void 0),p=!g;function q(a){let b=o.current||m.current.getBoundingClientRect(),c=aL([0,b.height],p?[f,e]:[e,f]);return o.current=b,c(a-b.top)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,b.jsx)(aB,{"data-orientation":"vertical",...l,ref:n,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:a=>{let b=q(a.clientY);h?.(b)},onSlideMove:a=>{let b=q(a.clientY);i?.(b)},onSlideEnd:()=>{o.current=void 0,j?.()},onStepKeyDown:a=>{let b=an[p?"from-bottom":"from-top"].includes(a.key);k?.({event:a,direction:b?-1:1})}})})}),aB=c.forwardRef((a,c)=>{let{__scopeSlider:d,onSlideStart:e,onSlideMove:f,onSlideEnd:g,onHomeKeyDown:h,onEndKeyDown:i,onStepKeyDown:j,...k}=a,l=av(ao,d);return(0,b.jsx)(aj.Primitive.span,{...k,ref:c,onKeyDown:(0,ac.composeEventHandlers)(a.onKeyDown,a=>{"Home"===a.key?(h(a),a.preventDefault()):"End"===a.key?(i(a),a.preventDefault()):al.concat(am).includes(a.key)&&(j(a),a.preventDefault())}),onPointerDown:(0,ac.composeEventHandlers)(a.onPointerDown,a=>{let b=a.target;b.setPointerCapture(a.pointerId),a.preventDefault(),l.thumbs.has(b)?b.focus():e(a)}),onPointerMove:(0,ac.composeEventHandlers)(a.onPointerMove,a=>{a.target.hasPointerCapture(a.pointerId)&&f(a)}),onPointerUp:(0,ac.composeEventHandlers)(a.onPointerUp,a=>{let b=a.target;b.hasPointerCapture(a.pointerId)&&(b.releasePointerCapture(a.pointerId),g(a))})})}),aC="SliderTrack",aD=c.forwardRef((a,c)=>{let{__scopeSlider:d,...e}=a,f=av(aC,d);return(0,b.jsx)(aj.Primitive.span,{"data-disabled":f.disabled?"":void 0,"data-orientation":f.orientation,...e,ref:c})});aD.displayName=aC;var aE="SliderRange",aF=c.forwardRef((a,d)=>{let{__scopeSlider:e,...f}=a,g=av(aE,e),h=ay(aE,e),i=c.useRef(null),j=(0,ad.useComposedRefs)(d,i),k=g.values.length,l=g.values.map(a=>aK(a,g.min,g.max)),m=k>1?Math.min(...l):0,n=100-Math.max(...l);return(0,b.jsx)(aj.Primitive.span,{"data-orientation":g.orientation,"data-disabled":g.disabled?"":void 0,...f,ref:j,style:{...a.style,[h.startEdge]:m+"%",[h.endEdge]:n+"%"}})});aF.displayName=aE;var aG="SliderThumb",aH=c.forwardRef((a,d)=>{let e=aq(a.__scopeSlider),[f,g]=c.useState(null),h=(0,ad.useComposedRefs)(d,a=>g(a)),i=c.useMemo(()=>f?e().findIndex(a=>a.ref.current===f):-1,[e,f]);return(0,b.jsx)(aI,{...a,ref:h,index:i})}),aI=c.forwardRef((a,d)=>{var e,f,g,h,i;let j,k,{__scopeSlider:l,index:m,name:n,...o}=a,p=av(aG,l),q=ay(aG,l),[r,s]=c.useState(null),t=(0,ad.useComposedRefs)(d,a=>s(a)),u=!r||p.form||!!r.closest("form"),v=(0,ai.useSize)(r),w=p.values[m],x=void 0===w?0:aK(w,p.min,p.max),y=(e=m,(f=p.values.length)>2?`Value ${e+1} of ${f}`:2===f?["Minimum","Maximum"][e]:void 0),z=v?.[q.size],A=z?(g=z,h=x,i=q.direction,k=aL([0,50],[0,j=g/2]),(j-k(h)*i)*i):0;return c.useEffect(()=>{if(r)return p.thumbs.add(r),()=>{p.thumbs.delete(r)}},[r,p.thumbs]),(0,b.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[q.startEdge]:`calc(${x}% + ${A}px)`},children:[(0,b.jsx)(ap.ItemSlot,{scope:a.__scopeSlider,children:(0,b.jsx)(aj.Primitive.span,{role:"slider","aria-label":a["aria-label"]||y,"aria-valuemin":p.min,"aria-valuenow":w,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...o,ref:t,style:void 0===w?{display:"none"}:a.style,onFocus:(0,ac.composeEventHandlers)(a.onFocus,()=>{p.valueIndexToChangeRef.current=m})})}),u&&(0,b.jsx)(aJ,{name:n??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:w},m)]})});aH.displayName=aG;var aJ=c.forwardRef(({__scopeSlider:a,value:d,...e},f)=>{let g=c.useRef(null),h=(0,ad.useComposedRefs)(g,f),i=(0,ah.usePrevious)(d);return c.useEffect(()=>{let a=g.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(i!==d&&b){let c=new Event("input",{bubbles:!0});b.call(a,d),a.dispatchEvent(c)}},[i,d]),(0,b.jsx)(aj.Primitive.input,{style:{display:"none"},...e,ref:h,defaultValue:d})});function aK(a,b,c){return(0,ab.clamp)(100/(c-b)*(a-b),[0,100])}function aL(a,b){return c=>{if(a[0]===a[1]||b[0]===b[1])return b[0];let d=(b[1]-b[0])/(a[1]-a[0]);return b[0]+d*(c-a[0])}}aJ.displayName="RadioBubbleInput",a.s(["Range",0,aF,"Root",0,aw,"Slider",0,aw,"SliderRange",0,aF,"SliderThumb",0,aH,"SliderTrack",0,aD,"Thumb",0,aH,"Track",0,aD,"createSliderScope",0,at],40432);var aM=a.i(40432),aM=aM;function aN({className:a,defaultValue:d,value:e,min:f=0,max:g=100,...h}){let i=c.useMemo(()=>Array.isArray(e)?e:Array.isArray(d)?d:[f,g],[e,d,f,g]);return(0,b.jsxs)(aM.Root,{"data-slot":"slider",defaultValue:d,value:e,min:f,max:g,className:(0,r.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",a),...h,children:[(0,b.jsx)(aM.Track,{"data-slot":"slider-track",className:(0,r.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,b.jsx)(aM.Range,{"data-slot":"slider-range",className:(0,r.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:i.length},(a,c)=>(0,b.jsx)(aM.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},c))]})}let aO=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],aP=aO.length-1;function aQ(a){let b=0,c=Math.abs(a-aO[0]);for(let d=1;d<aO.length;d++){let e=Math.abs(a-aO[d]);e<c&&(c=e,b=d)}return b}function aR({id:a,testId:d,value:e,onChange:f,onBlur:g,defaultSeconds:h=1800}){var i;let j,k,l=(""===e?h:parseInt(e,10))||h,[m,n]=(0,c.useState)(()=>aQ(l)),o=aQ(l);o!==m&&aO[m]!==l&&n(o);let p=(0,c.useCallback)(([a])=>{n(a),f(String(aO[a]))},[f]);return(0,b.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,b.jsx)(aN,{id:a,"data-testid":d,min:0,max:aP,step:1,value:[m],onValueChange:p,onValueCommit:()=>g(),className:"min-w-0 flex-1"}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(j=Math.floor((i=aO[m])/3600),k=Math.round(i%3600/60),0===j?`${k}m`:0===k?`${j}h`:`${j}h ${k}m`)})]})}function aS(a){if(void 0===a)return;let b=function(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}(a);return null!=b?1e3*b:void 0}function aT({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.workflow.stageTimeouts,g=a.workflow.analyzeRepoTimeouts,[h,i]=(0,c.useState)(String(Math.round((f?.analyzeMs??18e5)/1e3))),[j,k]=(0,c.useState)(String(Math.round((f?.requirementsMs??18e5)/1e3))),[m,n]=(0,c.useState)(String(Math.round((f?.researchMs??18e5)/1e3))),[o,p]=(0,c.useState)(String(Math.round((f?.planMs??18e5)/1e3))),[r,s]=(0,c.useState)(String(Math.round((f?.implementMs??18e5)/1e3))),[t,u]=(0,c.useState)(String(Math.round((f?.mergeMs??18e5)/1e3))),[v,w]=(0,c.useState)(String(Math.round((g?.analyzeMs??6e5)/1e3))),x=f?.analyzeMs!=null?String(Math.round(f.analyzeMs/1e3)):"",y=f?.requirementsMs!=null?String(Math.round(f.requirementsMs/1e3)):"",z=f?.researchMs!=null?String(Math.round(f.researchMs/1e3)):"",B=f?.planMs!=null?String(Math.round(f.planMs/1e3)):"",D=f?.implementMs!=null?String(Math.round(f.implementMs/1e3)):"",F=f?.mergeMs!=null?String(Math.round(f.mergeMs/1e3)):"",H=g?.analyzeMs!=null?String(Math.round(g.analyzeMs/1e3)):"";function I(a){return{workflow:{stageTimeouts:{analyzeMs:aS(a.analyzeTimeout??h),requirementsMs:aS(a.requirementsTimeout??j),researchMs:aS(a.researchTimeout??m),planMs:aS(a.planTimeout??o),implementMs:aS(a.implementTimeout??r),mergeMs:aS(a.mergeTimeout??t)},analyzeRepoTimeouts:{analyzeMs:aS(a.analyzeRepoTimeout??v)}}}}function J(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:l.Timer,title:d("settings.stageTimeouts.title"),description:d("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",tooltip:d("settings.stageTimeouts.hint"),children:[(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.featureAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,b.jsx)(aR,{id:"timeout-analyze",testId:"timeout-analyze-input",value:h,onChange:i,onBlur:()=>{h!==x&&J(I({analyzeTimeout:h}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.requirements"),description:d("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,b.jsx)(aR,{id:"timeout-requirements",testId:"timeout-requirements-input",value:j,onChange:k,onBlur:()=>{j!==y&&J(I({requirementsTimeout:j}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.research"),description:d("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,b.jsx)(aR,{id:"timeout-research",testId:"timeout-research-input",value:m,onChange:n,onBlur:()=>{m!==z&&J(I({researchTimeout:m}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.plan"),description:d("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,b.jsx)(aR,{id:"timeout-plan",testId:"timeout-plan-input",value:o,onChange:p,onBlur:()=>{o!==B&&J(I({planTimeout:o}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.implement"),description:d("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,b.jsx)(aR,{id:"timeout-implement",testId:"timeout-implement-input",value:r,onChange:s,onBlur:()=>{r!==D&&J(I({implementTimeout:r}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.merge"),description:d("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,b.jsx)(aR,{id:"timeout-merge",testId:"timeout-merge-input",value:t,onChange:u,onBlur:()=>{t!==F&&J(I({mergeTimeout:t}))},defaultSeconds:1800})}),(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,b.jsx)(aR,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:v,onChange:w,onBlur:()=>{v!==H&&J(I({analyzeRepoTimeout:v}))},defaultSeconds:600})})]})}function aU({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.notifications.inApp.enabled),[h,j]=(0,c.useState)({...a.notifications.events});function k(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function l(a={}){return{notifications:{inApp:{enabled:a.inApp??f},events:a.events??h}}}return(0,b.jsxs)(C,{icon:i,title:d("settings.notifications.title"),description:d("settings.notifications.sectionDescription"),testId:"notification-settings-section",tooltip:d("settings.notifications.hint"),tooltipLinks:[{label:d("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:[(0,b.jsx)(E,{children:d("settings.notifications.channels")}),(0,b.jsx)(B,{label:d("settings.notifications.inAppLabel"),description:d("settings.notifications.inAppDescription"),tooltip:"Master toggle for in-app toast notifications. When disabled, no event toasts will appear regardless of individual event settings below.",id:"notif-in-app",testId:"switch-in-app",checked:f,onChange:a=>{g(a),k(l({inApp:a}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.agentEvents")}),(0,b.jsx)(B,{label:d("settings.notifications.events.agentStarted"),tooltip:"Controls whether you receive an in-app toast notification when an agent begins working on a feature.",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:h.agentStarted,onChange:a=>{let b={...h,agentStarted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.phaseCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent completes a workflow phase (e.g., requirements, planning, implementation).",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:h.phaseCompleted,onChange:a=>{let b={...h,phaseCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.waitingApproval"),tooltip:"Controls whether you receive an in-app toast notification when a feature is paused and waiting for your approval to continue.",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:h.waitingApproval,onChange:a=>{let b={...h,waitingApproval:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.agentCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent finishes all work on a feature successfully.",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:h.agentCompleted,onChange:a=>{let b={...h,agentCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.agentFailed"),tooltip:"Controls whether you receive an in-app toast notification when an agent encounters an error and stops working on a feature.",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:h.agentFailed,onChange:a=>{let b={...h,agentFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.pullRequestEvents")}),(0,b.jsx)(B,{label:d("settings.notifications.events.prMerged"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is merged into the target branch.",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:h.prMerged,onChange:a=>{let b={...h,prMerged:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prClosed"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is closed without merging.",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:h.prClosed,onChange:a=>{let b={...h,prClosed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prChecksPassed"),tooltip:"Controls whether you receive an in-app toast notification when all CI checks pass on a feature's pull request.",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:h.prChecksPassed,onChange:a=>{let b={...h,prChecksPassed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prChecksFailed"),tooltip:"Controls whether you receive an in-app toast notification when CI checks fail on a feature's pull request.",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:h.prChecksFailed,onChange:a=>{let b={...h,prChecksFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.prBlocked"),tooltip:"Controls whether you receive an in-app toast notification when a pull request is blocked by merge conflicts or branch protection rules.",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:h.prBlocked,onChange:a=>{let b={...h,prBlocked:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("settings.notifications.events.mergeReviewReady"),tooltip:"Controls whether you receive an in-app toast notification when a feature's PR passes all checks and is ready for your merge review.",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:h.mergeReviewReady,onChange:a=>{let b={...h,mergeReviewReady:a};j(b),k(l({events:b}))}})]})}function aV({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1,plugins:!1,mcpServers:!1},[g,h]=(0,c.useState)({...f});function i(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:j,title:d("settings.featureFlags.title"),description:d("settings.featureFlags.sectionDescription"),badge:d("settings.featureFlags.badge"),testId:"feature-flags-settings-section",tooltip:d("settings.featureFlags.hint"),children:[(0,b.jsx)(B,{label:d("settings.featureFlags.skills"),description:d("settings.featureFlags.skillsDescription"),tooltip:"Enables the Skills page in the sidebar for browsing and managing Claude Code skills.",id:"flag-skills",testId:"switch-flag-skills",checked:g.skills,onChange:a=>{let b={...g,skills:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.deployments"),description:d("settings.featureFlags.deploymentsDescription"),tooltip:"Enables experimental deployment features for environment management.",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:g.envDeploy,onChange:a=>{let b={...g,envDeploy:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.debug"),description:d("settings.featureFlags.debugDescription"),tooltip:"Shows additional debugging information in the UI for troubleshooting.",id:"flag-debug",testId:"switch-flag-debug",checked:g.debug,onChange:a=>{let b={...g,debug:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.githubImport"),description:d("settings.featureFlags.githubImportDescription"),tooltip:"Enables importing repositories directly from GitHub.",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:g.githubImport,onChange:a=>{let b={...g,githubImport:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.adoptBranch"),description:d("settings.featureFlags.adoptBranchDescription"),tooltip:"Enables adopting existing git branches as ShipIT features.",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:g.adoptBranch,onChange:a=>{let b={...g,adoptBranch:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.gitRebaseSync"),description:d("settings.featureFlags.gitRebaseSyncDescription"),tooltip:"Uses git rebase instead of merge when syncing feature branches with the upstream branch.",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:g.gitRebaseSync,onChange:a=>{let b={...g,gitRebaseSync:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.reactFileManager"),description:d("settings.featureFlags.reactFileManagerDescription"),tooltip:"Replaces the native file picker dialog with a React-based file browser for selecting project folders.",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:g.reactFileManager,onChange:a=>{let b={...g,reactFileManager:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.plugins"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.pluginsDescription"):`${d("settings.featureFlags.pluginsDescription")} — ${d("plugins.noProxy")}`,tooltip:"Enables the Plugins page for browsing and managing Claude Code plugins from a LiteLLM marketplace. Requires a LiteLLM proxy URL to be configured.",id:"flag-plugins",testId:"switch-flag-plugins",checked:g.plugins,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,plugins:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.mcpServers"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.mcpServersDescription"):`${d("settings.featureFlags.mcpServersDescription")} — ${d("mcpServers.noProxy")}`,tooltip:"Enables the MCP Servers page for viewing MCP servers deployed on your LiteLLM proxy. Requires a LiteLLM proxy URL to be configured.",id:"flag-mcp-servers",testId:"switch-flag-mcp-servers",checked:g.mcpServers,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,mcpServers:a};h(b),i({featureFlags:b})}})]})}function aW({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[g,h]=(0,c.useState)(f.enabled),[i,j]=(0,c.useState)(String(f.autoTimeoutMinutes)),[k,l]=(0,c.useState)(String(f.maxConcurrentSessions));function n(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:m.MessageSquare,title:d("settings.interactiveAgent.title"),description:d("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",tooltip:d("settings.interactiveAgent.hint"),children:[(0,b.jsx)(B,{label:d("settings.interactiveAgent.enableChatTab"),description:d("settings.interactiveAgent.enableChatTabDescription"),tooltip:"Shows or hides the Chat tab on feature detail pages. When enabled, you can have interactive conversations with the agent about a specific feature.",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:g,onChange:a=>{h(a),n({interactiveAgent:{enabled:a,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:parseInt(k,10)||3}})}}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.autoTimeout"),description:d("settings.interactiveAgent.autoTimeoutDescription"),tooltip:"Minutes of inactivity before a chat agent session is automatically terminated. Prevents idle agent processes from consuming resources indefinitely.",htmlFor:"interactive-agent-timeout",children:(0,b.jsx)(D,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:i,placeholder:"15",min:1,max:120,suffix:"min",onChange:j,onBlur:()=>{let a=parseInt(i,10),b=Number.isNaN(a)?15:Math.min(120,Math.max(1,a));j(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:b,maxConcurrentSessions:parseInt(k,10)||3}})}})}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.maxConcurrentSessions"),description:d("settings.interactiveAgent.maxConcurrentSessionsDescription"),tooltip:"Maximum number of interactive agent sessions that can run simultaneously. Each session spawns a separate agent process, so higher values use more CPU and memory.",htmlFor:"interactive-agent-sessions",children:(0,b.jsx)(D,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:k,placeholder:"3",min:1,max:10,onChange:l,onBlur:()=>{let a=parseInt(k,10),b=Number.isNaN(a)?3:Math.min(10,Math.max(1,a));l(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:b}})}})})]})}function aX({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.fabLayout??{swapPosition:!1},[g,h]=(0,c.useState)(f.swapPosition);return(0,b.jsx)(C,{icon:n,title:d("settings.fabLayout.title"),description:d("settings.fabLayout.description"),testId:"fab-layout-settings-section",tooltip:d("settings.fabLayout.hint"),children:(0,b.jsx)(B,{label:d("settings.fabLayout.swapPosition"),description:d("settings.fabLayout.swapPositionDescription"),tooltip:"Swaps the Create button (bottom-right) and Chat button (bottom-left) positions on the control center canvas.",id:"fab-swap-position",testId:"switch-fab-swap-position",checked:g,onChange:a=>{var b;h(a),b={fabLayout:{swapPosition:a}},e(async()=>{let a=await K(b);a.success||G.toast.error(a.error??d("settings.failedToSave"))})}})})}function aY({shipitAiHome:a,dbFileSize:c}){let{t:d}=(0,q.useTranslation)("web");return(0,b.jsxs)(C,{icon:k,title:d("settings.database.title"),description:d("settings.database.sectionDescription"),testId:"database-settings-section",tooltip:d("settings.database.hint"),tooltipLinks:[{label:d("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:d("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.database.location"),description:d("settings.database.locationDescription"),tooltip:"The directory where ShipIT stores its SQLite database, logs, and configuration files. Change this via the SHIPIT_AI_HOME environment variable.",children:(0,b.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:a})}),(0,b.jsx)(A,{label:d("settings.database.size"),tooltip:"Current size of the SQLite database file on disk. Large databases may slow down startup; consider archiving old features if this grows significantly.",children:(0,b.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:c})})]})}var aZ=a.i(98680),aZ=aZ,a$=a.i(74605),a$=a$;let a_=(0,J.createServerReference)("407329e02bb583589f55ced75635fe34b22ac57faf",J.callServer,void 0,J.findSourceMapURL,"addMarketplaceAction");var a0=a.i(90920),a1=a.i(18948);function a2({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.litellmProxy?.baseUrl??""),[h,i]=(0,c.useState)(a.litellmProxy?.apiKey??""),[j,k]=(0,c.useState)("idle"),[l,m]=(0,c.useState)(!1),n=a.litellmProxy?.baseUrl??"",o=a.litellmProxy?.apiKey??"";function r(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function s(a){let b=a?.baseUrl??f;return{litellmProxy:{baseUrl:b,apiKey:a?.apiKey??h,marketplaceEnabled:!!b}}}async function t(){if(f){m(!0),k("idle");try{let a=`${f.replace(/\/+$/,"")}/claude-code/marketplace.json`,b=await a_(a);k(b.success?"success":"failed"),b.success?G.toast.success(d("settings.litellmProxy.testSuccess")):G.toast.error(d("settings.litellmProxy.testFailed"))}catch{k("failed"),G.toast.error(d("settings.litellmProxy.testFailed"))}finally{m(!1)}}}return(0,b.jsxs)(C,{icon:p.Server,title:d("settings.litellmProxy.title"),description:d("settings.litellmProxy.description"),testId:"litellm-proxy-settings-section",tooltip:d("settings.litellmProxy.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.baseUrl"),description:d("settings.litellmProxy.baseUrlDescription"),tooltip:"The base URL of your LiteLLM proxy server. This is used to fetch the plugin marketplace catalog and route model requests.",htmlFor:"litellm-proxy-url",children:(0,b.jsx)(a0.Input,{id:"litellm-proxy-url","data-testid":"litellm-proxy-url-input",type:"text",placeholder:"http://localhost:4000",value:f,onChange:a=>{g(a.target.value),k("idle")},onBlur:()=>{f!==n&&r(s({baseUrl:f}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.apiKey"),description:d("settings.litellmProxy.apiKeyDescription"),tooltip:"A virtual API key for authenticating with the LiteLLM proxy. Stored locally alongside other agent credentials.",htmlFor:"litellm-api-key",children:(0,b.jsx)(a0.Input,{id:"litellm-api-key","data-testid":"litellm-api-key-input",type:"password",placeholder:"sk-...",value:h,onChange:a=>i(a.target.value),onBlur:()=>{h!==o&&r(s({apiKey:h}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.testConnection"),tooltip:"Attempt to connect to the proxy and fetch the marketplace catalog to verify the configuration is correct.",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a1.Button,{variant:"outline",size:"sm","data-testid":"litellm-test-connection-btn",disabled:!f||l,onClick:t,className:"cursor-pointer text-xs",children:l?d("settings.saving"):d("settings.litellmProxy.testConnection")}),"success"===j&&(0,b.jsx)(aZ.default,{className:"h-4 w-4 text-emerald-500","data-testid":"litellm-test-success"}),"failed"===j&&(0,b.jsx)(a$.default,{className:"text-destructive h-4 w-4","data-testid":"litellm-test-failed"})]})})]})}let a3=(0,h.default)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);var a4=a.i(79620);let a5=new Set(["claude-code","gemini-cli","codex-cli"]),a6=new Set(["cursor","copilot-cli"]);function a7({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.agent.type,g=a.litellmProxy?.claudeCode,[h,i]=(0,c.useState)(function(a){switch(a.agent.type){case"claude-code":return a.litellmProxy?.claudeCode?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"gemini-cli":return a.litellmProxy?.geminiCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"codex-cli":return a.litellmProxy?.codexCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;default:return L.LiteLLMProxyRoutingMode.direct}}(a)),[j,k]=(0,c.useState)(g?.customHeaders??""),[l,m]=(0,c.useState)(g?.sonnetModel??""),[n,o]=(0,c.useState)(g?.haikuModel??""),[p,r]=(0,c.useState)(g?.opusModel??""),s=g?.customHeaders??"",t=g?.sonnetModel??"",u=g?.haikuModel??"",v=g?.opusModel??"",w=h!==L.LiteLLMProxyRoutingMode.direct,x=a5.has(f),y=a6.has(f),z=a.litellmProxy?.baseUrl??"",B=a.litellmProxy?.apiKey??"";function D(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function E(a){let b=function(a){switch(a){case"claude-code":return"claudeCode";case"gemini-cli":return"geminiCli";case"codex-cli":return"codexCli";default:return null}}(f);return b?"claude-code"===f?{litellmProxy:{claudeCode:{routingMode:a?.routingMode??h,customHeaders:a?.customHeaders??j,sonnetModel:a?.sonnetModel??l,haikuModel:a?.haikuModel??n,opusModel:a?.opusModel??p}}}:{litellmProxy:{[b]:{routingMode:a?.routingMode??h}}}:{}}if(!x&&!y)return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.notSupported"),children:(0,b.jsx)("span",{})})});if(y){let a="cursor"===f,c=z?a?`${z.replace(/\/+$/,"")}/cursor`:z:"";return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:a?d("settings.litellmProxy.routing.cursorInstructions"):d("settings.litellmProxy.routing.copilotInstructions"),description:a?d("settings.litellmProxy.routing.cursorDescription"):d("settings.litellmProxy.routing.copilotDescription"),children:(0,b.jsxs)("div",{className:"w-64 space-y-2",children:[(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:c}),a&&B?(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:B}):null]})})})}return(0,b.jsxs)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.mode"),description:d("settings.litellmProxy.routing.modeDescription"),htmlFor:"litellm-routing-mode",children:(0,b.jsxs)(H.Select,{value:h,onValueChange:function(a){i(a),D(E({routingMode:a}))},children:[(0,b.jsx)(H.SelectTrigger,{id:"litellm-routing-mode","data-testid":"litellm-routing-mode-select",className:"w-48 text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsxs)(H.SelectContent,{children:[(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.direct,children:d("settings.litellmProxy.routing.modeDirect")}),(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.proxy,children:d("settings.litellmProxy.routing.modeProxy")}),"claude-code"===f&&(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.passthrough,children:d("settings.litellmProxy.routing.modePassthrough")})]})]})}),h===L.LiteLLMProxyRoutingMode.passthrough&&(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.passthroughHelp"),children:(0,b.jsx)("span",{})}),w&&"claude-code"===f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.customHeaders"),description:d("settings.litellmProxy.routing.customHeadersDescription"),htmlFor:"litellm-custom-headers",children:(0,b.jsx)(a4.Textarea,{id:"litellm-custom-headers","data-testid":"litellm-custom-headers-input",placeholder:"x-litellm-customer-id: my-user\nx-litellm-tags: project:acme",value:j,onChange:a=>k(a.target.value),onBlur:()=>{j!==s&&D(E({customHeaders:j}))},rows:3,className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.sonnetModel"),description:d("settings.litellmProxy.routing.modelOverrideDescription"),htmlFor:"litellm-sonnet-model",children:(0,b.jsx)(a0.Input,{id:"litellm-sonnet-model","data-testid":"litellm-sonnet-model-input",type:"text",placeholder:"claude-sonnet-4-6",value:l,onChange:a=>m(a.target.value),onBlur:()=>{l!==t&&D(E({sonnetModel:l}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.haikuModel"),htmlFor:"litellm-haiku-model",children:(0,b.jsx)(a0.Input,{id:"litellm-haiku-model","data-testid":"litellm-haiku-model-input",type:"text",placeholder:"claude-haiku-4-5",value:n,onChange:a=>o(a.target.value),onBlur:()=>{n!==u&&D(E({haikuModel:n}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.opusModel"),htmlFor:"litellm-opus-model",children:(0,b.jsx)(a0.Input,{id:"litellm-opus-model","data-testid":"litellm-opus-model-input",type:"text",placeholder:"claude-opus-4-6",value:p,onChange:a=>r(a.target.value),onBlur:()=>{p!==v&&D(E({opusModel:p}))},className:"w-64 text-xs"})})]}):null]})}let a8=[{id:"agent",labelKey:"settings.sections.agent",icon:d.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:e.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:f.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:g.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:l.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:i},{id:"feature-flags",labelKey:"settings.sections.flags",icon:j},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:m.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:n},{id:"database",labelKey:"settings.sections.database",icon:k},{id:"litellm-proxy",labelKey:"settings.sections.proxy",icon:p.Server}],a9=[{id:"all",labelKey:"settings.sections.all",icon:o},...a8];a.s(["SettingsPageClient",0,function({settings:a,shipitAiHome:d,dbFileSize:e,availableTerminals:f,availableEditors:g,availableShells:h}){let{t:i}=(0,q.useTranslation)("web"),[j,k]=(0,c.useState)("all"),[l,m]=(0,c.useState)("agent");return(0,c.useEffect)(()=>{if("all"!==j)return;let a=a8.map(a=>document.getElementById(`section-${a.id}`)).filter(Boolean);if(0===a.length)return;let b=new IntersectionObserver(a=>{for(let b of a)b.isIntersecting&&m(b.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let c of a)b.observe(c);return()=>b.disconnect()},[j]),(0,b.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl px-8 pt-8",children:[(0,b.jsxs)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 pb-4 backdrop-blur",children:[(0,b.jsxs)("div",{className:"mb-4 space-y-1.5",children:[(0,b.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:"Developer Portal"}),(0,b.jsx)("div",{className:"flex items-baseline gap-3",children:(0,b.jsx)("h1",{className:"text-foreground text-3xl font-black tracking-tight",children:i("settings.title")})})]}),(0,b.jsx)("nav",{className:"bg-card editorial-shadow flex flex-wrap items-center gap-0.5 rounded-lg p-1",children:a9.map(a=>{let c=a.icon,d=j===a.id||"all"===j&&"all"!==a.id&&l===a.id;return(0,b.jsxs)("button",{type:"button",onClick:()=>k(a.id),className:(0,r.cn)("flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-bold transition-all",d?"bg-muted text-primary shadow-sm ring-1 ring-slate-200/70 dark:ring-slate-700/50":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[(0,b.jsx)(c,{className:"h-3 w-3"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:i(a.labelKey)})]},a.id)})})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3",children:[("all"===j||"agent"===j)&&(0,b.jsx)("div",{id:"section-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(F,{settings:a})}),("all"===j||"environment"===j)&&(0,b.jsx)("div",{id:"section-environment",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(Y,{settings:a,availableEditors:g,availableShells:h,availableTerminals:f})}),("all"===j||"workflow"===j)&&(0,b.jsx)("div",{id:"section-workflow",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)($,{settings:a})}),("all"===j||"ci"===j)&&(0,b.jsx)("div",{id:"section-ci",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aa,{settings:a})}),("all"===j||"stage-timeouts"===j)&&(0,b.jsx)("div",{id:"section-stage-timeouts",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aT,{settings:a})}),("all"===j||"notifications"===j)&&(0,b.jsx)("div",{id:"section-notifications",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aU,{settings:a})}),("all"===j||"feature-flags"===j)&&(0,b.jsx)("div",{id:"section-feature-flags",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aV,{settings:a})}),("all"===j||"interactive-agent"===j)&&(0,b.jsx)("div",{id:"section-interactive-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aW,{settings:a})}),("all"===j||"fab-layout"===j)&&(0,b.jsx)("div",{id:"section-fab-layout",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aX,{settings:a})}),("all"===j||"database"===j)&&(0,b.jsx)("div",{id:"section-database",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aY,{shipitAiHome:d,dbFileSize:e})}),("all"===j||"litellm-proxy"===j)&&(0,b.jsxs)("div",{id:"section-litellm-proxy",className:"scroll-mt-18 rounded-lg",children:[(0,b.jsx)(a2,{settings:a}),a.litellmProxy?.baseUrl?(0,b.jsx)(a7,{settings:a}):null]})]})]})}],79020)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map
|