tower-studio 0.1.12 → 0.1.13
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +38 -38
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +13 -13
- package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +13 -13
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +13 -13
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/missions/page/server-reference-manifest.json +55 -55
- package/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
- package/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding.html +1 -1
- package/.next/server/app/onboarding.rsc +15 -15
- package/.next/server/app/onboarding.segments/_full.segment.rsc +15 -15
- package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/_index.segment.rsc +8 -8
- package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
- package/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +25 -25
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/settings/page/server-reference-manifest.json +34 -34
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +15 -15
- package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +77 -77
- package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +72 -72
- package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +57 -57
- package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +53 -53
- package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +58 -58
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/workspaces/page/server-reference-manifest.json +43 -43
- package/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/0uz~_next_dist_esm_build_templates_app-route_05yec2y.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0~33o~m._.js +1 -1
- package/.next/server/chunks/project_f_tower_0n1s3ym._.js +1 -1
- package/.next/server/chunks/project_f_tower_src_11e.cv5._.js +1 -1
- package/.next/server/chunks/ssr/04uy_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_01.s1p0._.js +1 -1
- package/.next/server/chunks/ssr/0y0r_f_tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0n4g3bn._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__06qzctf._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0ffdrwp._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0fwuc5u._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0i4rk9v._.js +3 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0nmyvwk._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__08meal1._.js → [root-of-the-server]__0p59u95._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0la.lch._.js → [root-of-the-server]__0ukbsy0._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0w7gbe7._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0p~~40h._.js → [root-of-the-server]__118z55s._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__11j4k9o._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__13cjs8r._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__13eo85g._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0.txwd8._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0ifpw8k._.js → project_f_tower_0d_85uz._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0f0-wva._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0.k8r5w._.js → project_f_tower_0fdpm0.._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_0ron~f-._.js → project_f_tower_0gp-92y._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0hgtev9._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0ivvjwd._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0jy~1uf._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0l6ssf8._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_0o5.y1e._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0dfyjgz._.js → project_f_tower_0qe3y7w._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_0ym-aea._.js +1 -1
- package/.next/server/chunks/ssr/{project_f_tower_0c6n7oo._.js → project_f_tower_103i_mo._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_0t0smg9._.js → project_f_tower_11iv6rj._.js} +2 -2
- package/.next/server/chunks/ssr/{project_f_tower_src_0_g15e8._.js → project_f_tower_src_0dhz712._.js} +2 -2
- package/.next/server/chunks/ssr/project_f_tower_src_actions_agent-actions_ts_0.s4~m-._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_missions_missions-client_tsx_0ums4qx._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_settings_page_tsx_0oo06~d._.js +1 -1
- package/.next/server/chunks/ssr/project_f_tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0jmj1xz._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +232 -232
- package/.next/static/chunks/09k2v2gb9asa~.js +1 -0
- package/.next/static/chunks/{09hs9w6-77im2.js → 0b2l7e_-hz6uu.js} +1 -1
- package/.next/static/chunks/0d8czythhy15~.js +1 -0
- package/.next/static/chunks/{15zclhqyib88_.js → 0hbu0b_cpu234.js} +1 -1
- package/.next/static/chunks/{0im8~yii0.2mn.js → 0i-bk-_pxq3kf.js} +1 -1
- package/.next/static/chunks/0qz9.02.c_xy9.js +1 -0
- package/.next/static/chunks/0s.v9zvpavx.p.js +1 -0
- package/.next/static/chunks/{00atyrg-7i0hj.js → 0svo2_2.iajx0.js} +1 -1
- package/.next/static/chunks/{0-plp~pgpcel9.js → 0ufq5z-zsc_rq.js} +1 -1
- package/.next/static/chunks/{01mymnegugktp.js → 0uvcabj7_ht1m.js} +1 -1
- package/.next/static/chunks/{0d.3wv6u.2g~6.js → 0v6j_niujykvw.js} +1 -1
- package/.next/static/chunks/{0c49o.5w_cw8_.js → 0zk37-fhd4h6q.js} +1 -1
- package/.next/static/chunks/{0qp~1_kfjklfg.js → 11y66l77sw_f_.js} +1 -1
- package/.next/static/chunks/{09p7-kr_vidww.js → 150hyh9in9gbd.js} +1 -1
- package/.next/static/chunks/{0vs5vey5ni44t.js → 160iuo21rl~gx.js} +1 -1
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/bin/tower.mjs +32 -1
- package/package.json +1 -1
- package/.next/static/chunks/0.do_z22ngnjd.js +0 -1
- package/.next/static/chunks/09hxu-k8oyivu.js +0 -1
- package/.next/static/chunks/0kbuf91gryyo2.js +0 -1
- package/.next/static/chunks/0p~3m91-t6p91.js +0 -1
- /package/.next/static/{jMxcHfsOSldWKgvAjGnAv → z3fBPUSyN4JFEFJowhSmx}/_buildManifest.js +0 -0
- /package/.next/static/{jMxcHfsOSldWKgvAjGnAv → z3fBPUSyN4JFEFJowhSmx}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{jMxcHfsOSldWKgvAjGnAv → z3fBPUSyN4JFEFJowhSmx}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[950004,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(432120),f=a.i(584335),g=a.i(410756),h=a.i(620235),i=a.i(246962),j=a.i(889822),k=a.i(48300),l=a.i(775788),m=a.i(857122),n=a.i(44585),o=a.i(666775),p=a.i(302856);let q=(0,p.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var r=a.i(161604);let s=(0,p.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var t=a.i(236413),u=a.i(684262),v=a.i(54709),w=a.i(263973);let x=(0,p.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var y=a.i(569210);let z=(0,p.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),A=(0,p.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var B=a.i(109434),C=a.i(858967),D=a.i(57726),E=a.i(891903),F=a.i(716502),G=a.i(385174),H=a.i(220213),I=a.i(879876);let J=(0,I.createServerReference)("00842dc3e197598d264390adccbf90436448e74dd4",I.callServer,void 0,I.findSourceMapURL,"getAvailableTerminalApps");var K=a.i(986698);let L=(0,I.createServerReference)("4068de3108c895bba61c2707fd8fce9e44f2901808",I.callServer,void 0,I.findSourceMapURL,"createPrompt"),M=(0,I.createServerReference)("607a657536f031e36c1b88fa62f59f39c052b98fd8",I.callServer,void 0,I.findSourceMapURL,"updatePrompt"),N=(0,I.createServerReference)("40405b1d5283d0c85b87ad1a8931e9f5787ccbbe8e",I.callServer,void 0,I.findSourceMapURL,"deletePrompt"),O=(0,I.createServerReference)("6064b117a304dfb3ec8c3d3611334d2601fe82ac7e",I.callServer,void 0,I.findSourceMapURL,"setDefaultPrompt"),P=(0,I.createServerReference)("003a5b1b6c5d5809691ca07ca4ef79c20598a198ab",I.callServer,void 0,I.findSourceMapURL,"getDefaultCliProfile"),Q=(0,I.createServerReference)("609f41f18587408747d2579c79c29b386efa5d1d2d",I.callServer,void 0,I.findSourceMapURL,"updateCliProfile");function R({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:a.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>d(a.value),className:(0,n.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",c===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value))})}function S({label:a,description:c,children:d,className:e}){return(0,b.jsxs)("div",{className:(0,n.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",e),children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:a}),c&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:c})]}),(0,b.jsx)("div",{className:"shrink-0",children:d})]})}let T=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:o.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:q,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:r.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:s,accent:"amber"},{id:"cli-profile",labelKey:"settings.cliProfile.title",descKey:"settings.cliProfile.navDesc",icon:t.Terminal,accent:"cyan"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:u.Bell,accent:"rose"}],U={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},V="ai-manager:default-cli-adapter",W=[{type:"claude_local",label:"Claude Code",source:"builtin"}],X={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function Y(){let a=(0,d.useRouter)(),{t:o}=(0,f.useI18n)(),{theme:p,setTheme:q}=(0,e.useTheme)(),{locale:r,setLocale:s}=(0,f.useI18n)(),[t,u]=(0,c.useState)("general"),I=(0,c.useRef)(null),[Y,Z]=(0,c.useState)({left:0,width:0}),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)("Terminal"),[ac,ad]=(0,c.useState)([]),[ae,af]=(0,c.useState)(180),[ag,ah]=(0,c.useState)("claude_local"),[ai,aj]=(0,c.useState)(null),[ak,al]=(0,c.useState)({}),[am,an]=(0,c.useState)([]),[ao,ap]=(0,c.useState)(!1),[aq,ar]=(0,c.useState)(null),[as,at]=(0,c.useState)(null),[au,av]=(0,c.useState)(""),[aw,ax]=(0,c.useState)(""),[ay,az]=(0,c.useState)(""),[aA,aB]=(0,c.useState)([]),[aC,aD]=(0,c.useState)(null),[aE,aF]=(0,c.useState)({...X}),[aG,aH]=(0,c.useState)(!1),[aI,aJ]=(0,c.useState)({...X}),[aK,aL]=(0,c.useState)(!1),[aM,aN]=(0,c.useState)(0),[aO,aP]=(0,c.useState)(null),[aQ,aR]=(0,c.useState)({maxUploadMb:50,maxConcurrent:3}),[aS,aT]=(0,c.useState)({timeoutSec:30}),[aU,aV]=(0,c.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80}),[aW,aX]=(0,c.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[aY,aZ]=(0,c.useState)(null),[a$,a_]=(0,c.useState)(!1),[a0,a1]=(0,c.useState)(""),[a2,a3]=(0,c.useState)(null),[a4,a5]=(0,c.useState)(""),[a6,a7]=(0,c.useState)(""),[a8,a9]=(0,c.useState)(""),[ba,bb]=(0,c.useState)(""),[bc,bd]=(0,c.useState)(!0),[be,bf]=(0,c.useState)(!0);(0,c.useEffect)(()=>_(!0),[]),(0,c.useEffect)(()=>{(0,F.getConfigValue)("terminal.app","Terminal").then(ab),(0,F.getConfigValue)("terminal.idleTimeoutSec",180).then(af),J().then(ad)},[]),(0,c.useEffect)(()=>{let a=localStorage.getItem(V);a&&ah(a)},[]),(0,c.useEffect)(()=>{(0,K.getPrompts)().then(an)},[]);let bg=async()=>{try{let a=await fetch("/api/internal/hooks/install");if(a.ok){let b=await a.json();aZ(b)}}catch{}};async function bh(){await (0,G.setConfigValue)("terminal.app",aa)}async function bi(){let a=Math.max(180,ae);af(a),await (0,G.setConfigValue)("terminal.idleTimeoutSec",a)}async function bj(a){if(!ai){aj(a),al(b=>{let c={...b};return delete c[a],c});try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:a})}),c=await b.json();al(b=>({...b,[a]:c}))}catch{al(b=>({...b,[a]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{aj(null)}}}(0,c.useEffect)(()=>{(0,F.getConfigValue)("git.pathMappingRules",[]).then(aB),(0,F.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(a=>{a1(a.join(", "))}),bg(),(0,H.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(a=>{aR({maxUploadMb:Math.round((a["system.maxUploadBytes"]??0x3200000)/1024/1024),maxConcurrent:a["system.maxConcurrentExecutions"]??3}),aT({timeoutSec:a["git.timeoutSec"]??30}),aV({resultLimit:a["search.resultLimit"]??20,allModeCap:a["search.allModeCap"]??5,debounceMs:a["search.debounceMs"]??250,snippetLength:a["search.snippetLength"]??80}),aX({minCols:a["missions.grid.minCols"]??1,maxCols:a["missions.grid.maxCols"]??5,minRows:a["missions.grid.minRows"]??1,maxRows:a["missions.grid.maxRows"]??5})})},[]),(0,c.useEffect)(()=>{P().then(a=>{a&&(a3(a),a5(a.command),a7(function(a){try{let b=JSON.parse(a);return Array.isArray(b)?b.join("\n"):""}catch{return""}}(a.baseArgs)),a9(function(a){try{let b=JSON.parse(a);if("object"!=typeof b||Array.isArray(b)||null===b)return"";return Object.entries(b).map(([a,b])=>`${a}=${b}`).join("\n")}catch{return""}}(a.envVars))),bd(!1)})},[]),(0,c.useEffect)(()=>{(0,F.getConfigValue)("notification.enabled",!0).then(bf)},[]);let bk=(0,c.useCallback)(()=>{ar(null),av(""),ax(""),az(""),ap(!0)},[]),bl=(0,c.useCallback)(a=>{ar(a),av(a.name),ax(a.description??""),az(a.content),ap(!0)},[]),bm=(0,c.useCallback)(async()=>{au.trim()&&ay.trim()&&(aq?await M(aq.id,{name:au.trim(),description:aw.trim()||void 0,content:ay.trim()}):await L({name:au.trim(),description:aw.trim()||void 0,content:ay.trim()}),ap(!1),an(await (0,K.getPrompts)()),a.refresh())},[au,aw,ay,aq,a]),bn=(0,c.useCallback)(async()=>{as&&(await N(as),at(null),an(await (0,K.getPrompts)()),a.refresh())},[as,a]),bo=(0,c.useCallback)(async b=>{await O(b),an(await (0,K.getPrompts)()),a.refresh()},[a]),bp=async()=>{await (0,G.setConfigValue)("system.maxUploadBytes",1024*aQ.maxUploadMb*1024),await (0,G.setConfigValue)("system.maxConcurrentExecutions",aQ.maxConcurrent)},bq=async()=>{await (0,G.setConfigValue)("git.timeoutSec",aS.timeoutSec)},br=async()=>{await (0,G.setConfigValue)("search.resultLimit",aU.resultLimit),await (0,G.setConfigValue)("search.allModeCap",aU.allModeCap),await (0,G.setConfigValue)("search.debounceMs",aU.debounceMs),await (0,G.setConfigValue)("search.snippetLength",aU.snippetLength)},bs=async()=>{let a=Math.min(aW.minCols,aW.maxCols),b=Math.max(aW.minCols,aW.maxCols),c=Math.min(aW.minRows,aW.maxRows),d=Math.max(aW.minRows,aW.maxRows);aX({minCols:a,maxCols:b,minRows:c,maxRows:d}),await (0,G.setConfigValue)("missions.grid.minCols",a),await (0,G.setConfigValue)("missions.grid.maxCols",b),await (0,G.setConfigValue)("missions.grid.minRows",c),await (0,G.setConfigValue)("missions.grid.maxRows",d)},bt=async()=>{let a=a0.split(",").map(a=>a.trim()).filter(Boolean);await (0,G.setConfigValue)("hooks.autoUploadTypes",a)},bu=async()=>{if(aY){a_(!0);try{let a=aY.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:a}),await bg()}finally{a_(!1)}}},bv=async()=>{if(!aI.host.trim()||!aI.localPathTemplate.trim())return;let a=aI.localPathTemplate.trim().replace(/\/+$/,""),b=aK?`${a}/{path}`:a,c=[...aA,{id:crypto.randomUUID(),host:aI.host.trim(),ownerMatch:aI.ownerMatch.trim()||"*",localPathTemplate:b,priority:aI.priority}];await (0,G.setConfigValue)("git.pathMappingRules",c),aB(c),aJ({...X}),aL(!1),aH(!1)},bw=async a=>{if(!aE.host.trim()||!aE.localPathTemplate.trim())return;let b=aA.map(b=>b.id===a?{...b,host:aE.host.trim(),ownerMatch:aE.ownerMatch.trim()||"*",localPathTemplate:aE.localPathTemplate.trim(),priority:aE.priority}:b);await (0,G.setConfigValue)("git.pathMappingRules",b),aB(b),aD(null)},bx=async a=>{let b=aA.filter(b=>b.id!==a);await (0,G.setConfigValue)("git.pathMappingRules",b),aB(b),aP(null)},by=(0,c.useCallback)(async()=>{if(a2){try{let a=JSON.stringify(a6.split("\n").map(a=>a.trim()).filter(Boolean)),b={};a8.split("\n").map(a=>a.trim()).filter(Boolean).forEach(a=>{let c=a.indexOf("=");if(c>0){let d=a.slice(0,c).trim(),e=a.slice(c+1).trim();b[d]=e}});let c=JSON.stringify(b);await Q(a2.id,{command:a4,baseArgs:a,envVars:c}),bb("saved")}catch{bb("error")}setTimeout(()=>bb(""),2e3)}},[a2,a4,a6,a8]);async function bz(){let a=!be;bf(a),await (0,G.setConfigValue)("notification.enabled",a)}let bA=(0,c.useCallback)(()=>{a.back()},[a]);(0,c.useEffect)(()=>{let a=I.current;if(!a)return;let b=a.querySelector(`[data-section="${t}"]`);if(!b)return;let c=a.getBoundingClientRect(),d=b.getBoundingClientRect();Z({left:d.left-c.left,width:d.width})},[t]);let bB=T.find(a=>a.id===t),bC=bB?U[bB.accent]:U.blue;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:o("settings.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o("settings.configDesc")})]}),(0,b.jsxs)(g.Button,{variant:"outline",onClick:bA,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,b.jsx)(v.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,b.jsxs)("div",{ref:I,className:"relative flex gap-1 overflow-x-auto",children:[T.map(a=>{let c=a.icon,d=t===a.id,e=U[a.accent];return(0,b.jsxs)("button",{"data-section":a.id,onClick:()=>u(a.id),className:(0,n.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d?`${e.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,b.jsx)("span",{className:(0,n.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",d?e.bg:"bg-transparent"),children:(0,b.jsx)(c,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("span",{children:o(a.labelKey)})]},a.id)}),(0,b.jsx)("div",{className:(0,n.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",bC.indicator),style:{left:Y.left,width:Y.width}})]})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:(0,b.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[bB&&(0,b.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,b.jsx)("div",{className:(0,n.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",bC.bg,bC.text,bC.ring),children:(0,b.jsx)(bB.icon,{className:"h-5 w-5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:o(bB.labelKey)}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o(bB.descKey)})]})]}),(0,b.jsx)("div",{className:"mb-6 border-t"}),function(){switch(t){case"general":let a;return a=[{value:"light",label:o("settings.themeLight")},{value:"dark",label:o("settings.themeDark")},{value:"system",label:o("settings.themeSystem")}],(0,b.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,b.jsx)(S,{label:o("settings.theme"),description:o("settings.themeDesc"),children:$?(0,b.jsx)(R,{options:a,value:p??"system",onChange:a=>q(a)}):(0,b.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,b.jsx)(S,{label:o("settings.language"),description:o("settings.languageDesc"),children:(0,b.jsx)(R,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:r,onChange:a=>s(a)})}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsx)("div",{className:"flex items-center justify-between",children:(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.terminal.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.terminal.desc")})]})}),(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[ac.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:ac.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{ab(a.value),(0,G.setConfigValue)("terminal.app",a.value)},className:(0,n.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",aa===a.value?"border-foreground bg-accent text-foreground font-medium":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:a.name},a.value))}),(0,b.jsx)("input",{type:"text",value:aa,onChange:a=>ab(a.target.value),onBlur:bh,placeholder:o("settings.terminal.placeholder"),className:"h-9 w-64 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/30"})]})]}),(0,b.jsx)(S,{label:o("settings.terminal.idleTimeout"),description:o("settings.terminal.idleTimeoutDesc"),children:(0,b.jsx)("input",{type:"number",value:ae,onChange:a=>af(Number(a.target.value)),onBlur:bi,min:180,className:"h-9 w-28 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm text-right focus:outline-none focus:ring-2 focus:ring-blue-500/30"})})]});case"ai-tools":return(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:W.map(a=>{let c=ag===a.type,d=ai===a.type,e=ak[a.type];return(0,b.jsx)("li",{children:(0,b.jsxs)("div",{className:"px-5 py-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium",children:a.label}),(0,b.jsx)(k.Badge,{variant:"outline",children:o("label.builtin")}),c&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0",children:[(0,b.jsx)(x,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]}),e&&(0,b.jsx)(k.Badge,{variant:e.ok?"secondary":"destructive",className:(0,n.cn)("shrink-0",e.ok&&"bg-green-600 text-white hover:bg-green-700"),children:e.ok?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(D.CheckCircle2,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testPassed")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(E.XCircle,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testFailed")]})})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.type})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!c&&(0,b.jsxs)(g.Button,{variant:"outline",size:"sm",onClick:()=>{var b;ah(b=a.type),localStorage.setItem(V,b)},children:[(0,b.jsx)(x,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),o("settings.prompts.setDefault")]}),(0,b.jsx)(g.Button,{variant:"outline",size:"sm",onClick:()=>bj(a.type),disabled:d,children:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),o("settings.aiTools.testing")]}):o("settings.aiTools.testConnection")}),"external"===a.source&&(0,b.jsx)(g.Button,{variant:"outline",size:"icon-sm",className:"h-8 w-8 text-destructive hover:text-destructive",title:o("common.delete"),children:(0,b.jsx)(y.Trash2,{className:"h-4 w-4"})})]})]}),e&&(0,b.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,b.jsx)("div",{className:"space-y-1.5",children:e.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:(0,n.cn)("w-1.5 h-1.5 rounded-full shrink-0",c.passed?"bg-green-500":"bg-red-500")}),(0,b.jsx)("span",{className:(0,n.cn)(c.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:c.message})]},`${a.type}-${c.name}`))})})]})},a.type)})});case"prompts":return $?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsxs)(g.Button,{onClick:bk,variant:"default",children:[(0,b.jsx)(w.Plus,{className:"h-4 w-4 mr-2"}),o("settings.prompts.newPrompt")]})}),0===am.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:o("settings.prompts.empty")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:o("settings.prompts.emptyHint")})]}):(0,b.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:am.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium truncate",children:a.name}),a.isDefault&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,b.jsx)(x,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]})]}),a.description&&(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:a.description})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bo(a.id),title:o("settings.prompts.setDefault"),children:(0,b.jsx)(x,{className:(0,n.cn)("h-4 w-4",a.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bl(a),title:o("settings.prompts.editPrompt"),children:(0,b.jsx)(z,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>at(a.id),className:"text-destructive",title:o("settings.prompts.delete"),children:(0,b.jsx)(y.Trash2,{className:"h-4 w-4"})})]})]},a.id))}),(0,b.jsx)(m.Dialog,{open:ao,onOpenChange:ap,children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:aq?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")}),(0,b.jsx)(m.DialogDescription,{children:aq?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")})]}),(0,b.jsxs)("div",{className:"space-y-4 py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-name",children:o("settings.prompts.promptName")}),(0,b.jsx)(h.Input,{id:"prompt-name",value:au,onChange:a=>av(a.target.value),placeholder:o("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-description",children:o("settings.prompts.promptDescription")}),(0,b.jsx)(h.Input,{id:"prompt-description",value:aw,onChange:a=>ax(a.target.value),placeholder:o("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-content",children:o("settings.prompts.promptContent")}),(0,b.jsx)(i.Textarea,{id:"prompt-content",value:ay,onChange:a=>az(a.target.value),placeholder:o("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>ap(!1),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{onClick:bm,disabled:!au.trim()||!ay.trim(),children:o("settings.prompts.save")})]})]})}),(0,b.jsx)(m.Dialog,{open:!!as,onOpenChange:a=>!a&&at(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.prompts.deleteConfirmTitle")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.prompts.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>at(null),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:bn,children:o("settings.prompts.delete")})]})]})})]}):(0,b.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let c,d,e;return(0,b.jsxs)("div",{className:"space-y-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.git.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.git.desc")})]}),(0,b.jsxs)(g.Button,{onClick:()=>{aJ({...X}),aH(!0)},children:[(0,b.jsx)(w.Plus,{className:"mr-2 h-4 w-4"}),o("settings.config.git.addRule")]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[0!==aA.length||aG?(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:aA.map(a=>aC===a.id?(0,b.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aE.host,onChange:a=>aF(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aE.ownerMatch,onChange:a=>aF(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1 col-span-2",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.localPathTemplate")}),(0,b.jsx)(h.Input,{value:aE.localPathTemplate,onChange:a=>aF(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aE.priority,onChange:a=>aF(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aD(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{size:"sm",onClick:()=>bw(a.id),children:o("settings.config.git.save")})]})]},a.id):(0,b.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium text-sm",children:a.host}),"*"!==a.ownerMatch&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",a.ownerMatch]}),(0,b.jsxs)(k.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[o("settings.config.git.priority")," ",a.priority]})]}),(0,b.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:a.localPathTemplate})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{aD(a.id),aF({host:a.host,ownerMatch:a.ownerMatch,localPathTemplate:a.localPathTemplate,priority:a.priority})},title:o("settings.config.git.edit"),children:(0,b.jsx)(z,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aP(a.id),className:"text-destructive",title:o("settings.config.git.delete"),children:(0,b.jsx)(y.Trash2,{className:"h-4 w-4"})})]})]})},a.id))}):(0,b.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:o("settings.config.git.noRules")})}),aG&&(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aI.host,onChange:a=>aJ(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aI.ownerMatch,onChange:a=>aJ(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{value:aI.localPathTemplate,onChange:a=>aJ(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsx)("button",{type:"button",onClick:()=>aL(a=>!a),className:(0,n.cn)("shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors cursor-pointer",aK?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:"{path}"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:aK?o("onboarding.step3.pathHintFull"):o("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aI.priority,onChange:a=>aJ(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]}),aI.localPathTemplate&&(c=aI.localPathTemplate.trim().replace(/\/+$/,""),d=aK?`${c}/{path}`:c,e=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:o("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:e.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>aN(c),className:(0,n.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",aM===c?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:a.label},c))})]}),(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e[aM].url}),(0,b.jsxs)("p",{className:"font-mono text-sm",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-foreground font-medium",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(d,e[aM].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aH(!1),children:o("settings.config.git.cancel")}),(0,b.jsxs)(g.Button,{size:"sm",onClick:bv,disabled:!aI.host.trim()||!aI.localPathTemplate.trim(),children:[(0,b.jsx)(A,{className:"h-3.5 w-3.5 mr-1.5"}),o("settings.config.git.save")]})]})]})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.system.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.system.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxUpload")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxUploadHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:1,max:500,value:aQ.maxUploadMb,onChange:a=>aR(b=>({...b,maxUploadMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxConcurrent")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxConcurrentHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aQ.maxConcurrent,onChange:a=>aR(b=>({...b,maxConcurrent:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bp,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.gitParams.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.gitParams.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.gitParams.timeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.gitParams.timeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:5,max:300,value:aS.timeoutSec,onChange:a=>aT(b=>({...b,timeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,b.jsx)(g.Button,{onClick:bq,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.search.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.search.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.resultLimit")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.resultLimitHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:5,max:100,value:aU.resultLimit,onChange:a=>aV(b=>({...b,resultLimit:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.allModeCap")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.allModeCapHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:20,value:aU.allModeCap,onChange:a=>aV(b=>({...b,allModeCap:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.debounceMs")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.debounceMsHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:50,max:1e3,value:aU.debounceMs,onChange:a=>aV(b=>({...b,debounceMs:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.snippetLength")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.snippetLengthHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:20,max:500,value:aU.snippetLength,onChange:a=>aV(b=>({...b,snippetLength:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:br,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.missions.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.missions.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.minCols,onChange:a=>aX(b=>({...b,minCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.maxCols,onChange:a=>aX(b=>({...b,maxCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.minRows,onChange:a=>aX(b=>({...b,minRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.maxRows,onChange:a=>aX(b=>({...b,maxRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bs,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.hooks.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.hooks.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.hooks.autoUploadTypes")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.autoUploadTypesHint")})]}),(0,b.jsx)(h.Input,{value:a0,onChange:a=>a1(a.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsx)(g.Button,{onClick:bt,className:"rounded-lg",children:o("common.save")}),(0,b.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:aY?.installed?o("settings.config.hooks.installed"):o("settings.config.hooks.notInstalled")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.installHint")})]}),(0,b.jsx)(g.Button,{variant:aY?.installed?"destructive":"default",onClick:bu,disabled:a$||!aY,className:"rounded-lg",children:aY?.installed?o("settings.config.hooks.uninstall"):o("settings.config.hooks.install")})]})]}),(0,b.jsx)(m.Dialog,{open:!!aO,onOpenChange:a=>!a&&aP(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.config.git.deleteConfirm")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.config.git.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>aP(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:()=>aO&&bx(aO),children:o("settings.config.git.delete")})]})]})})]});case"cli-profile":return bc?(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(B.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):a2?(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"flex items-center gap-2 mb-2",children:(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.cliProfile.command")})}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:o("settings.cliProfile.commandHint")}),(0,b.jsx)(h.Input,{type:"text",value:a4,onChange:a=>a5(a.target.value),placeholder:o("settings.cliProfile.commandPlaceholder"),className:"w-full rounded-lg border-border/50 bg-zinc-900 dark:bg-zinc-950 text-cyan-400 font-mono text-sm px-4 py-2.5 focus:ring-2 focus:ring-cyan-500/30 placeholder:text-zinc-600"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.cliProfile.baseArgs")}),(0,b.jsx)(k.Badge,{variant:"secondary",className:"text-xs rounded-full px-2 py-0",children:"one per line"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:o("settings.cliProfile.baseArgsHint")}),(0,b.jsx)(i.Textarea,{value:a6,onChange:a=>a7(a.target.value),placeholder:o("settings.cliProfile.baseArgsPlaceholder"),rows:4,className:"w-full rounded-lg border-border/50 bg-zinc-900 dark:bg-zinc-950 text-cyan-400 font-mono text-sm px-4 py-3 leading-relaxed focus:ring-2 focus:ring-cyan-500/30 placeholder:text-zinc-600 resize-none"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.cliProfile.envVars")}),(0,b.jsx)(k.Badge,{variant:"secondary",className:"text-xs rounded-full px-2 py-0",children:"KEY=VALUE per line"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:o("settings.cliProfile.envVarsHint")}),(0,b.jsx)(i.Textarea,{value:a8,onChange:a=>a9(a.target.value),placeholder:o("settings.cliProfile.envVarsPlaceholder"),rows:4,className:"w-full rounded-lg border-border/50 bg-zinc-900 dark:bg-zinc-950 text-cyan-400 font-mono text-sm px-4 py-3 leading-relaxed focus:ring-2 focus:ring-cyan-500/30 placeholder:text-zinc-600 resize-none"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)(g.Button,{onClick:by,className:"rounded-lg",children:[(0,b.jsx)(A,{className:"h-4 w-4 mr-2"}),o("common.save")]}),"saved"===ba&&(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-emerald-600 dark:text-emerald-400 animate-in fade-in duration-300",children:[(0,b.jsx)(C.Check,{className:"h-4 w-4"}),o("settings.cliProfile.saved")]}),"error"===ba&&(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-red-600 dark:text-red-400 animate-in fade-in duration-300",children:[(0,b.jsx)(E.XCircle,{className:"h-4 w-4"}),o("settings.cliProfile.saveError")]})]})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:o("settings.cliProfile.noProfile")});case"notifications":return(0,b.jsx)("div",{className:"divide-y divide-border/50",children:(0,b.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.notifications.enable")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.notifications.enableDesc")})]}),(0,b.jsx)(l.Switch,{checked:be,onCheckedChange:bz})]})})}}()]})})]})}a.s(["default",0,function(){return(0,b.jsx)(Y,{})}],950004)}];
|
|
1
|
+
module.exports=[950004,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(448287),e=a.i(432120),f=a.i(584335),g=a.i(410756),h=a.i(620235),i=a.i(246962),j=a.i(889822),k=a.i(48300),l=a.i(775788),m=a.i(857122),n=a.i(44585),o=a.i(666775),p=a.i(302856);let q=(0,p.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var r=a.i(161604);let s=(0,p.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var t=a.i(236413),u=a.i(684262),v=a.i(54709),w=a.i(263973);let x=(0,p.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);var y=a.i(569210);let z=(0,p.default)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),A=(0,p.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var B=a.i(109434),C=a.i(858967),D=a.i(57726),E=a.i(891903),F=a.i(111506),G=a.i(639047),H=a.i(521612),I=a.i(879876);let J=(0,I.createServerReference)("0079dffe9603d6fc268bf9324d48ab3af484967965",I.callServer,void 0,I.findSourceMapURL,"getAvailableTerminalApps");var K=a.i(578671);let L=(0,I.createServerReference)("4063507e27b569c56d0f81a3be320eacc3edc5a74b",I.callServer,void 0,I.findSourceMapURL,"createPrompt"),M=(0,I.createServerReference)("60b9d212b8f964067b80d3e72ea20b327e6b12348d",I.callServer,void 0,I.findSourceMapURL,"updatePrompt"),N=(0,I.createServerReference)("40eb489b0a8b188824db6bff86761c814e5d5e88f1",I.callServer,void 0,I.findSourceMapURL,"deletePrompt"),O=(0,I.createServerReference)("60ff43bfa8258e1c96de0e8b0719e61f4a45584ce2",I.callServer,void 0,I.findSourceMapURL,"setDefaultPrompt"),P=(0,I.createServerReference)("005ed3e8f68cd21bc7496bccadba540a945ab98d44",I.callServer,void 0,I.findSourceMapURL,"getDefaultCliProfile"),Q=(0,I.createServerReference)("60806ea6b760e862a931b9b0735844b825577dc03a",I.callServer,void 0,I.findSourceMapURL,"updateCliProfile");function R({options:a,value:c,onChange:d}){return(0,b.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:a.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>d(a.value),className:(0,n.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",c===a.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a.label},a.value))})}function S({label:a,description:c,children:d,className:e}){return(0,b.jsxs)("div",{className:(0,n.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",e),children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:a}),c&&(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:c})]}),(0,b.jsx)("div",{className:"shrink-0",children:d})]})}let T=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:o.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:q,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:r.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:s,accent:"amber"},{id:"cli-profile",labelKey:"settings.cliProfile.title",descKey:"settings.cliProfile.navDesc",icon:t.Terminal,accent:"cyan"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:u.Bell,accent:"rose"}],U={blue:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},emerald:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},violet:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},amber:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},cyan:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"},rose:{bg:"bg-accent",text:"text-foreground",ring:"ring-border",indicator:"bg-foreground"}},V="ai-manager:default-cli-adapter",W=[{type:"claude_local",label:"Claude Code",source:"builtin"}],X={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function Y(){let a=(0,d.useRouter)(),{t:o}=(0,f.useI18n)(),{theme:p,setTheme:q}=(0,e.useTheme)(),{locale:r,setLocale:s}=(0,f.useI18n)(),[t,u]=(0,c.useState)("general"),I=(0,c.useRef)(null),[Y,Z]=(0,c.useState)({left:0,width:0}),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)("Terminal"),[ac,ad]=(0,c.useState)([]),[ae,af]=(0,c.useState)(180),[ag,ah]=(0,c.useState)("claude_local"),[ai,aj]=(0,c.useState)(null),[ak,al]=(0,c.useState)({}),[am,an]=(0,c.useState)([]),[ao,ap]=(0,c.useState)(!1),[aq,ar]=(0,c.useState)(null),[as,at]=(0,c.useState)(null),[au,av]=(0,c.useState)(""),[aw,ax]=(0,c.useState)(""),[ay,az]=(0,c.useState)(""),[aA,aB]=(0,c.useState)([]),[aC,aD]=(0,c.useState)(null),[aE,aF]=(0,c.useState)({...X}),[aG,aH]=(0,c.useState)(!1),[aI,aJ]=(0,c.useState)({...X}),[aK,aL]=(0,c.useState)(!1),[aM,aN]=(0,c.useState)(0),[aO,aP]=(0,c.useState)(null),[aQ,aR]=(0,c.useState)({maxUploadMb:50,maxConcurrent:3}),[aS,aT]=(0,c.useState)({timeoutSec:30}),[aU,aV]=(0,c.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80}),[aW,aX]=(0,c.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[aY,aZ]=(0,c.useState)(null),[a$,a_]=(0,c.useState)(!1),[a0,a1]=(0,c.useState)(""),[a2,a3]=(0,c.useState)(null),[a4,a5]=(0,c.useState)(""),[a6,a7]=(0,c.useState)(""),[a8,a9]=(0,c.useState)(""),[ba,bb]=(0,c.useState)(""),[bc,bd]=(0,c.useState)(!0),[be,bf]=(0,c.useState)(!0);(0,c.useEffect)(()=>_(!0),[]),(0,c.useEffect)(()=>{(0,F.getConfigValue)("terminal.app","Terminal").then(ab),(0,F.getConfigValue)("terminal.idleTimeoutSec",180).then(af),J().then(ad)},[]),(0,c.useEffect)(()=>{let a=localStorage.getItem(V);a&&ah(a)},[]),(0,c.useEffect)(()=>{(0,K.getPrompts)().then(an)},[]);let bg=async()=>{try{let a=await fetch("/api/internal/hooks/install");if(a.ok){let b=await a.json();aZ(b)}}catch{}};async function bh(){await (0,G.setConfigValue)("terminal.app",aa)}async function bi(){let a=Math.max(180,ae);af(a),await (0,G.setConfigValue)("terminal.idleTimeoutSec",a)}async function bj(a){if(!ai){aj(a),al(b=>{let c={...b};return delete c[a],c});try{let b=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:a})}),c=await b.json();al(b=>({...b,[a]:c}))}catch{al(b=>({...b,[a]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{aj(null)}}}(0,c.useEffect)(()=>{(0,F.getConfigValue)("git.pathMappingRules",[]).then(aB),(0,F.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(a=>{a1(a.join(", "))}),bg(),(0,H.getConfigValues)(["system.maxUploadBytes","system.maxConcurrentExecutions","git.timeoutSec","search.resultLimit","search.allModeCap","search.debounceMs","search.snippetLength","missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(a=>{aR({maxUploadMb:Math.round((a["system.maxUploadBytes"]??0x3200000)/1024/1024),maxConcurrent:a["system.maxConcurrentExecutions"]??3}),aT({timeoutSec:a["git.timeoutSec"]??30}),aV({resultLimit:a["search.resultLimit"]??20,allModeCap:a["search.allModeCap"]??5,debounceMs:a["search.debounceMs"]??250,snippetLength:a["search.snippetLength"]??80}),aX({minCols:a["missions.grid.minCols"]??1,maxCols:a["missions.grid.maxCols"]??5,minRows:a["missions.grid.minRows"]??1,maxRows:a["missions.grid.maxRows"]??5})})},[]),(0,c.useEffect)(()=>{P().then(a=>{a&&(a3(a),a5(a.command),a7(function(a){try{let b=JSON.parse(a);return Array.isArray(b)?b.join("\n"):""}catch{return""}}(a.baseArgs)),a9(function(a){try{let b=JSON.parse(a);if("object"!=typeof b||Array.isArray(b)||null===b)return"";return Object.entries(b).map(([a,b])=>`${a}=${b}`).join("\n")}catch{return""}}(a.envVars))),bd(!1)})},[]),(0,c.useEffect)(()=>{(0,F.getConfigValue)("notification.enabled",!0).then(bf)},[]);let bk=(0,c.useCallback)(()=>{ar(null),av(""),ax(""),az(""),ap(!0)},[]),bl=(0,c.useCallback)(a=>{ar(a),av(a.name),ax(a.description??""),az(a.content),ap(!0)},[]),bm=(0,c.useCallback)(async()=>{au.trim()&&ay.trim()&&(aq?await M(aq.id,{name:au.trim(),description:aw.trim()||void 0,content:ay.trim()}):await L({name:au.trim(),description:aw.trim()||void 0,content:ay.trim()}),ap(!1),an(await (0,K.getPrompts)()),a.refresh())},[au,aw,ay,aq,a]),bn=(0,c.useCallback)(async()=>{as&&(await N(as),at(null),an(await (0,K.getPrompts)()),a.refresh())},[as,a]),bo=(0,c.useCallback)(async b=>{await O(b),an(await (0,K.getPrompts)()),a.refresh()},[a]),bp=async()=>{await (0,G.setConfigValue)("system.maxUploadBytes",1024*aQ.maxUploadMb*1024),await (0,G.setConfigValue)("system.maxConcurrentExecutions",aQ.maxConcurrent)},bq=async()=>{await (0,G.setConfigValue)("git.timeoutSec",aS.timeoutSec)},br=async()=>{await (0,G.setConfigValue)("search.resultLimit",aU.resultLimit),await (0,G.setConfigValue)("search.allModeCap",aU.allModeCap),await (0,G.setConfigValue)("search.debounceMs",aU.debounceMs),await (0,G.setConfigValue)("search.snippetLength",aU.snippetLength)},bs=async()=>{let a=Math.min(aW.minCols,aW.maxCols),b=Math.max(aW.minCols,aW.maxCols),c=Math.min(aW.minRows,aW.maxRows),d=Math.max(aW.minRows,aW.maxRows);aX({minCols:a,maxCols:b,minRows:c,maxRows:d}),await (0,G.setConfigValue)("missions.grid.minCols",a),await (0,G.setConfigValue)("missions.grid.maxCols",b),await (0,G.setConfigValue)("missions.grid.minRows",c),await (0,G.setConfigValue)("missions.grid.maxRows",d)},bt=async()=>{let a=a0.split(",").map(a=>a.trim()).filter(Boolean);await (0,G.setConfigValue)("hooks.autoUploadTypes",a)},bu=async()=>{if(aY){a_(!0);try{let a=aY.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:a}),await bg()}finally{a_(!1)}}},bv=async()=>{if(!aI.host.trim()||!aI.localPathTemplate.trim())return;let a=aI.localPathTemplate.trim().replace(/\/+$/,""),b=aK?`${a}/{path}`:a,c=[...aA,{id:crypto.randomUUID(),host:aI.host.trim(),ownerMatch:aI.ownerMatch.trim()||"*",localPathTemplate:b,priority:aI.priority}];await (0,G.setConfigValue)("git.pathMappingRules",c),aB(c),aJ({...X}),aL(!1),aH(!1)},bw=async a=>{if(!aE.host.trim()||!aE.localPathTemplate.trim())return;let b=aA.map(b=>b.id===a?{...b,host:aE.host.trim(),ownerMatch:aE.ownerMatch.trim()||"*",localPathTemplate:aE.localPathTemplate.trim(),priority:aE.priority}:b);await (0,G.setConfigValue)("git.pathMappingRules",b),aB(b),aD(null)},bx=async a=>{let b=aA.filter(b=>b.id!==a);await (0,G.setConfigValue)("git.pathMappingRules",b),aB(b),aP(null)},by=(0,c.useCallback)(async()=>{if(a2){try{let a=JSON.stringify(a6.split("\n").map(a=>a.trim()).filter(Boolean)),b={};a8.split("\n").map(a=>a.trim()).filter(Boolean).forEach(a=>{let c=a.indexOf("=");if(c>0){let d=a.slice(0,c).trim(),e=a.slice(c+1).trim();b[d]=e}});let c=JSON.stringify(b);await Q(a2.id,{command:a4,baseArgs:a,envVars:c}),bb("saved")}catch{bb("error")}setTimeout(()=>bb(""),2e3)}},[a2,a4,a6,a8]);async function bz(){let a=!be;bf(a),await (0,G.setConfigValue)("notification.enabled",a)}let bA=(0,c.useCallback)(()=>{a.back()},[a]);(0,c.useEffect)(()=>{let a=I.current;if(!a)return;let b=a.querySelector(`[data-section="${t}"]`);if(!b)return;let c=a.getBoundingClientRect(),d=b.getBoundingClientRect();Z({left:d.left-c.left,width:d.width})},[t]);let bB=T.find(a=>a.id===t),bC=bB?U[bB.accent]:U.blue;return(0,b.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,b.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,b.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:o("settings.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o("settings.configDesc")})]}),(0,b.jsxs)(g.Button,{variant:"outline",onClick:bA,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,b.jsx)(v.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,b.jsxs)("div",{ref:I,className:"relative flex gap-1 overflow-x-auto",children:[T.map(a=>{let c=a.icon,d=t===a.id,e=U[a.accent];return(0,b.jsxs)("button",{"data-section":a.id,onClick:()=>u(a.id),className:(0,n.cn)("relative flex items-center gap-2 rounded-t-lg px-4 py-2.5","text-sm font-medium whitespace-nowrap cursor-pointer","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d?`${e.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,b.jsx)("span",{className:(0,n.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",d?e.bg:"bg-transparent"),children:(0,b.jsx)(c,{className:"h-3.5 w-3.5"})}),(0,b.jsx)("span",{children:o(a.labelKey)})]},a.id)}),(0,b.jsx)("div",{className:(0,n.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",bC.indicator),style:{left:Y.left,width:Y.width}})]})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-auto",children:(0,b.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[bB&&(0,b.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,b.jsx)("div",{className:(0,n.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",bC.bg,bC.text,bC.ring),children:(0,b.jsx)(bB.icon,{className:"h-5 w-5"})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:o(bB.labelKey)}),(0,b.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:o(bB.descKey)})]})]}),(0,b.jsx)("div",{className:"mb-6 border-t"}),function(){switch(t){case"general":let a;return a=[{value:"light",label:o("settings.themeLight")},{value:"dark",label:o("settings.themeDark")},{value:"system",label:o("settings.themeSystem")}],(0,b.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,b.jsx)(S,{label:o("settings.theme"),description:o("settings.themeDesc"),children:$?(0,b.jsx)(R,{options:a,value:p??"system",onChange:a=>q(a)}):(0,b.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,b.jsx)(S,{label:o("settings.language"),description:o("settings.languageDesc"),children:(0,b.jsx)(R,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:r,onChange:a=>s(a)})}),(0,b.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,b.jsx)("div",{className:"flex items-center justify-between",children:(0,b.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.terminal.label")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.terminal.desc")})]})}),(0,b.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[ac.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:ac.map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>{ab(a.value),(0,G.setConfigValue)("terminal.app",a.value)},className:(0,n.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",aa===a.value?"border-foreground bg-accent text-foreground font-medium":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:a.name},a.value))}),(0,b.jsx)("input",{type:"text",value:aa,onChange:a=>ab(a.target.value),onBlur:bh,placeholder:o("settings.terminal.placeholder"),className:"h-9 w-64 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/30"})]})]}),(0,b.jsx)(S,{label:o("settings.terminal.idleTimeout"),description:o("settings.terminal.idleTimeoutDesc"),children:(0,b.jsx)("input",{type:"number",value:ae,onChange:a=>af(Number(a.target.value)),onBlur:bi,min:180,className:"h-9 w-28 rounded-lg border border-border/50 bg-muted/30 px-3 text-sm text-right focus:outline-none focus:ring-2 focus:ring-blue-500/30"})})]});case"ai-tools":return(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:W.map(a=>{let c=ag===a.type,d=ai===a.type,e=ak[a.type];return(0,b.jsx)("li",{children:(0,b.jsxs)("div",{className:"px-5 py-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium",children:a.label}),(0,b.jsx)(k.Badge,{variant:"outline",children:o("label.builtin")}),c&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0",children:[(0,b.jsx)(x,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]}),e&&(0,b.jsx)(k.Badge,{variant:e.ok?"secondary":"destructive",className:(0,n.cn)("shrink-0",e.ok&&"bg-green-600 text-white hover:bg-green-700"),children:e.ok?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(D.CheckCircle2,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testPassed")]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(E.XCircle,{className:"h-3 w-3 mr-1"}),o("settings.aiTools.testFailed")]})})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:a.type})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!c&&(0,b.jsxs)(g.Button,{variant:"outline",size:"sm",onClick:()=>{var b;ah(b=a.type),localStorage.setItem(V,b)},children:[(0,b.jsx)(x,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),o("settings.prompts.setDefault")]}),(0,b.jsx)(g.Button,{variant:"outline",size:"sm",onClick:()=>bj(a.type),disabled:d,children:d?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),o("settings.aiTools.testing")]}):o("settings.aiTools.testConnection")}),"external"===a.source&&(0,b.jsx)(g.Button,{variant:"outline",size:"icon-sm",className:"h-8 w-8 text-destructive hover:text-destructive",title:o("common.delete"),children:(0,b.jsx)(y.Trash2,{className:"h-4 w-4"})})]})]}),e&&(0,b.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,b.jsx)("div",{className:"space-y-1.5",children:e.checks.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,b.jsx)("span",{className:(0,n.cn)("w-1.5 h-1.5 rounded-full shrink-0",c.passed?"bg-green-500":"bg-red-500")}),(0,b.jsx)("span",{className:(0,n.cn)(c.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:c.message})]},`${a.type}-${c.name}`))})})]})},a.type)})});case"prompts":return $?(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"flex justify-end",children:(0,b.jsxs)(g.Button,{onClick:bk,variant:"default",children:[(0,b.jsx)(w.Plus,{className:"h-4 w-4 mr-2"}),o("settings.prompts.newPrompt")]})}),0===am.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:o("settings.prompts.empty")}),(0,b.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:o("settings.prompts.emptyHint")})]}):(0,b.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:am.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium truncate",children:a.name}),a.isDefault&&(0,b.jsxs)(k.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,b.jsx)(x,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),o("settings.prompts.default")]})]}),a.description&&(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:a.description})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bo(a.id),title:o("settings.prompts.setDefault"),children:(0,b.jsx)(x,{className:(0,n.cn)("h-4 w-4",a.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>bl(a),title:o("settings.prompts.editPrompt"),children:(0,b.jsx)(z,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>at(a.id),className:"text-destructive",title:o("settings.prompts.delete"),children:(0,b.jsx)(y.Trash2,{className:"h-4 w-4"})})]})]},a.id))}),(0,b.jsx)(m.Dialog,{open:ao,onOpenChange:ap,children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:aq?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")}),(0,b.jsx)(m.DialogDescription,{children:aq?o("settings.prompts.editPrompt"):o("settings.prompts.newPrompt")})]}),(0,b.jsxs)("div",{className:"space-y-4 py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-name",children:o("settings.prompts.promptName")}),(0,b.jsx)(h.Input,{id:"prompt-name",value:au,onChange:a=>av(a.target.value),placeholder:o("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-description",children:o("settings.prompts.promptDescription")}),(0,b.jsx)(h.Input,{id:"prompt-description",value:aw,onChange:a=>ax(a.target.value),placeholder:o("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)(j.Label,{htmlFor:"prompt-content",children:o("settings.prompts.promptContent")}),(0,b.jsx)(i.Textarea,{id:"prompt-content",value:ay,onChange:a=>az(a.target.value),placeholder:o("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>ap(!1),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{onClick:bm,disabled:!au.trim()||!ay.trim(),children:o("settings.prompts.save")})]})]})}),(0,b.jsx)(m.Dialog,{open:!!as,onOpenChange:a=>!a&&at(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.prompts.deleteConfirmTitle")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.prompts.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>at(null),children:o("settings.prompts.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:bn,children:o("settings.prompts.delete")})]})]})})]}):(0,b.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let c,d,e;return(0,b.jsxs)("div",{className:"space-y-8",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.git.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.git.desc")})]}),(0,b.jsxs)(g.Button,{onClick:()=>{aJ({...X}),aH(!0)},children:[(0,b.jsx)(w.Plus,{className:"mr-2 h-4 w-4"}),o("settings.config.git.addRule")]})]}),(0,b.jsxs)("div",{className:"space-y-3",children:[0!==aA.length||aG?(0,b.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:aA.map(a=>aC===a.id?(0,b.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aE.host,onChange:a=>aF(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aE.ownerMatch,onChange:a=>aF(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,b.jsxs)("div",{className:"space-y-1 col-span-2",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.localPathTemplate")}),(0,b.jsx)(h.Input,{value:aE.localPathTemplate,onChange:a=>aF(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono"})]}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aE.priority,onChange:a=>aF(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]})]}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aD(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{size:"sm",onClick:()=>bw(a.id),children:o("settings.config.git.save")})]})]},a.id):(0,b.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-medium text-sm",children:a.host}),"*"!==a.ownerMatch&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",a.ownerMatch]}),(0,b.jsxs)(k.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[o("settings.config.git.priority")," ",a.priority]})]}),(0,b.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:a.localPathTemplate})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{aD(a.id),aF({host:a.host,ownerMatch:a.ownerMatch,localPathTemplate:a.localPathTemplate,priority:a.priority})},title:o("settings.config.git.edit"),children:(0,b.jsx)(z,{className:"h-4 w-4"})}),(0,b.jsx)(g.Button,{variant:"ghost",size:"icon-sm",onClick:()=>aP(a.id),className:"text-destructive",title:o("settings.config.git.delete"),children:(0,b.jsx)(y.Trash2,{className:"h-4 w-4"})})]})]})},a.id))}):(0,b.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:o("settings.config.git.noRules")})}),aG&&(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.host")}),(0,b.jsx)(h.Input,{value:aI.host,onChange:a=>aJ(b=>({...b,host:a.target.value})),placeholder:o("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.ownerMatch")}),(0,b.jsx)(h.Input,{value:aI.ownerMatch,onChange:a=>aJ(b=>({...b,ownerMatch:a.target.value})),placeholder:o("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.localPathTemplate")}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{value:aI.localPathTemplate,onChange:a=>aJ(b=>({...b,localPathTemplate:a.target.value})),placeholder:o("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,b.jsx)("button",{type:"button",onClick:()=>aL(a=>!a),className:(0,n.cn)("shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors cursor-pointer",aK?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:"{path}"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:aK?o("onboarding.step3.pathHintFull"):o("onboarding.step3.pathHintRepo")})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)("label",{className:"text-xs font-medium",children:o("settings.config.git.priority")}),(0,b.jsx)(h.Input,{type:"number",value:aI.priority,onChange:a=>aJ(b=>({...b,priority:Number(a.target.value)})),className:"text-sm w-24"})]}),aI.localPathTemplate&&(c=aI.localPathTemplate.trim().replace(/\/+$/,""),d=aK?`${c}/{path}`:c,e=[{label:"GitHub SSH",url:"git@github.com:user/my-app.git"},{label:"GitHub HTTPS",url:"https://github.com/user/my-app.git"},{label:"GitLab Subgroup",url:"https://gitlab.com/org/team/sub/my-api.git"}],(0,b.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:o("onboarding.step3.previewLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:e.map((a,c)=>(0,b.jsx)("button",{type:"button",onClick:()=>aN(c),className:(0,n.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",aM===c?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:a.label},c))})]}),(0,b.jsxs)("div",{className:"space-y-0.5",children:[(0,b.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:e[aM].url}),(0,b.jsxs)("p",{className:"font-mono text-sm",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,b.jsx)("span",{className:"text-foreground font-medium",children:function(a,b){if(!a||!b)return"";let c=b.trim(),d=[],e=c.match(/^git@[^:]+:(.+)$/);if(e)d=e[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let a=new URL(c);d=decodeURIComponent(a.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!d.length)return"";let f=d[0],g=d[d.length-1],h=d.join("/");if(a.includes("{path}"))return a.replace("{path}",h).replace("{owner}",f).replace("{repo}",g).replace(/\/+$/,"");let i=a.replace("{owner}",f).replace("{repo}","").replace(/\/+$/,"");return`${i}/${g}`}(d,e[aM].url)})]})]})]})),(0,b.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,b.jsx)(g.Button,{variant:"ghost",size:"sm",onClick:()=>aH(!1),children:o("settings.config.git.cancel")}),(0,b.jsxs)(g.Button,{size:"sm",onClick:bv,disabled:!aI.host.trim()||!aI.localPathTemplate.trim(),children:[(0,b.jsx)(A,{className:"h-3.5 w-3.5 mr-1.5"}),o("settings.config.git.save")]})]})]})]})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.system.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.system.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxUpload")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxUploadHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:1,max:500,value:aQ.maxUploadMb,onChange:a=>aR(b=>({...b,maxUploadMb:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.system.maxConcurrent")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.system.maxConcurrentHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aQ.maxConcurrent,onChange:a=>aR(b=>({...b,maxConcurrent:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bp,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.gitParams.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.gitParams.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.gitParams.timeout")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.gitParams.timeoutHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:5,max:300,value:aS.timeoutSec,onChange:a=>aT(b=>({...b,timeoutSec:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,b.jsx)(g.Button,{onClick:bq,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.search.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.search.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.resultLimit")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.resultLimitHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:5,max:100,value:aU.resultLimit,onChange:a=>aV(b=>({...b,resultLimit:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.allModeCap")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.allModeCapHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:1,max:20,value:aU.allModeCap,onChange:a=>aV(b=>({...b,allModeCap:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.debounceMs")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.debounceMsHint")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.Input,{type:"number",min:50,max:1e3,value:aU.debounceMs,onChange:a=>aV(b=>({...b,debounceMs:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.search.snippetLength")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.search.snippetLengthHint")})]}),(0,b.jsx)(h.Input,{type:"number",min:20,max:500,value:aU.snippetLength,onChange:a=>aV(b=>({...b,snippetLength:Number(a.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:br,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.missions.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.missions.desc")})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.minCols,onChange:a=>aX(b=>({...b,minCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxCols")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.maxCols,onChange:a=>aX(b=>({...b,maxCols:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.minRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.minRows,onChange:a=>aX(b=>({...b,minRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)("label",{className:"text-sm font-medium flex-1",children:o("settings.config.missions.maxRows")}),(0,b.jsx)(h.Input,{type:"number",min:1,max:10,value:aW.maxRows,onChange:a=>aX(b=>({...b,maxRows:Number(a.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,b.jsx)(g.Button,{onClick:bs,className:"rounded-lg",children:o("common.save")})]}),(0,b.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:o("settings.config.hooks.title")}),(0,b.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:o("settings.config.hooks.desc")})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.config.hooks.autoUploadTypes")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.autoUploadTypesHint")})]}),(0,b.jsx)(h.Input,{value:a0,onChange:a=>a1(a.target.value),placeholder:"png, jpg, jpeg, gif, webp, svg, pdf",className:"w-80 rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,b.jsx)(g.Button,{onClick:bt,className:"rounded-lg",children:o("common.save")}),(0,b.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,b.jsxs)("div",{className:"flex-1",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:aY?.installed?o("settings.config.hooks.installed"):o("settings.config.hooks.notInstalled")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:o("settings.config.hooks.installHint")})]}),(0,b.jsx)(g.Button,{variant:aY?.installed?"destructive":"default",onClick:bu,disabled:a$||!aY,className:"rounded-lg",children:aY?.installed?o("settings.config.hooks.uninstall"):o("settings.config.hooks.install")})]})]}),(0,b.jsx)(m.Dialog,{open:!!aO,onOpenChange:a=>!a&&aP(null),children:(0,b.jsxs)(m.DialogContent,{children:[(0,b.jsxs)(m.DialogHeader,{children:[(0,b.jsx)(m.DialogTitle,{children:o("settings.config.git.deleteConfirm")}),(0,b.jsx)(m.DialogDescription,{children:o("settings.config.git.deleteConfirmMessage")})]}),(0,b.jsxs)(m.DialogFooter,{children:[(0,b.jsx)(g.Button,{variant:"outline",onClick:()=>aP(null),children:o("settings.config.git.cancel")}),(0,b.jsx)(g.Button,{variant:"destructive",onClick:()=>aO&&bx(aO),children:o("settings.config.git.delete")})]})]})})]});case"cli-profile":return bc?(0,b.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,b.jsx)(B.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):a2?(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"flex items-center gap-2 mb-2",children:(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.cliProfile.command")})}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:o("settings.cliProfile.commandHint")}),(0,b.jsx)(h.Input,{type:"text",value:a4,onChange:a=>a5(a.target.value),placeholder:o("settings.cliProfile.commandPlaceholder"),className:"w-full rounded-lg border-border/50 bg-zinc-900 dark:bg-zinc-950 text-cyan-400 font-mono text-sm px-4 py-2.5 focus:ring-2 focus:ring-cyan-500/30 placeholder:text-zinc-600"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.cliProfile.baseArgs")}),(0,b.jsx)(k.Badge,{variant:"secondary",className:"text-xs rounded-full px-2 py-0",children:"one per line"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:o("settings.cliProfile.baseArgsHint")}),(0,b.jsx)(i.Textarea,{value:a6,onChange:a=>a7(a.target.value),placeholder:o("settings.cliProfile.baseArgsPlaceholder"),rows:4,className:"w-full rounded-lg border-border/50 bg-zinc-900 dark:bg-zinc-950 text-cyan-400 font-mono text-sm px-4 py-3 leading-relaxed focus:ring-2 focus:ring-cyan-500/30 placeholder:text-zinc-600 resize-none"})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,b.jsx)("label",{className:"text-sm font-medium",children:o("settings.cliProfile.envVars")}),(0,b.jsx)(k.Badge,{variant:"secondary",className:"text-xs rounded-full px-2 py-0",children:"KEY=VALUE per line"})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:o("settings.cliProfile.envVarsHint")}),(0,b.jsx)(i.Textarea,{value:a8,onChange:a=>a9(a.target.value),placeholder:o("settings.cliProfile.envVarsPlaceholder"),rows:4,className:"w-full rounded-lg border-border/50 bg-zinc-900 dark:bg-zinc-950 text-cyan-400 font-mono text-sm px-4 py-3 leading-relaxed focus:ring-2 focus:ring-cyan-500/30 placeholder:text-zinc-600 resize-none"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)(g.Button,{onClick:by,className:"rounded-lg",children:[(0,b.jsx)(A,{className:"h-4 w-4 mr-2"}),o("common.save")]}),"saved"===ba&&(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-emerald-600 dark:text-emerald-400 animate-in fade-in duration-300",children:[(0,b.jsx)(C.Check,{className:"h-4 w-4"}),o("settings.cliProfile.saved")]}),"error"===ba&&(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-sm text-red-600 dark:text-red-400 animate-in fade-in duration-300",children:[(0,b.jsx)(E.XCircle,{className:"h-4 w-4"}),o("settings.cliProfile.saveError")]})]})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:o("settings.cliProfile.noProfile")});case"notifications":return(0,b.jsx)("div",{className:"divide-y divide-border/50",children:(0,b.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-sm font-medium",children:o("settings.notifications.enable")}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:o("settings.notifications.enableDesc")})]}),(0,b.jsx)(l.Switch,{checked:be,onCheckedChange:bz})]})})}}()]})})]})}a.s(["default",0,function(){return(0,b.jsx)(Y,{})}],950004)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=project_f_tower_src_app_settings_page_tsx_0oo06~d._.js.map
|