tower-studio 0.1.11 → 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.
Files changed (181) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/diagnostics/route-bundle-stats.json +41 -41
  6. package/.next/fallback-build-manifest.json +3 -3
  7. package/.next/prerender-manifest.json +3 -3
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
  16. package/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
  17. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_not-found.html +1 -1
  20. package/.next/server/app/_not-found.rsc +13 -13
  21. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  22. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  23. package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  24. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  25. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  26. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  27. package/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  29. package/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  30. package/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  31. package/.next/server/app/api/internal/assistant/images/route.js.nft.json +1 -1
  32. package/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  33. package/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  34. package/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  35. package/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  36. package/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  37. package/.next/server/app/index.html +1 -1
  38. package/.next/server/app/index.rsc +13 -13
  39. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  40. package/.next/server/app/index.segments/_full.segment.rsc +13 -13
  41. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  42. package/.next/server/app/index.segments/_index.segment.rsc +8 -8
  43. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  44. package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  45. package/.next/server/app/missions/page/server-reference-manifest.json +53 -53
  46. package/.next/server/app/missions/page.js.nft.json +1 -1
  47. package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  48. package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  49. package/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
  50. package/.next/server/app/onboarding/page.js.nft.json +1 -1
  51. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/onboarding.html +1 -1
  53. package/.next/server/app/onboarding.rsc +15 -15
  54. package/.next/server/app/onboarding.segments/_full.segment.rsc +15 -15
  55. package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
  56. package/.next/server/app/onboarding.segments/_index.segment.rsc +8 -8
  57. package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
  58. package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  59. package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  60. package/.next/server/app/page/react-loadable-manifest.json +1 -1
  61. package/.next/server/app/page/server-reference-manifest.json +25 -25
  62. package/.next/server/app/page.js.nft.json +1 -1
  63. package/.next/server/app/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  65. package/.next/server/app/settings/page/server-reference-manifest.json +34 -34
  66. package/.next/server/app/settings/page.js.nft.json +1 -1
  67. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  68. package/.next/server/app/settings.html +1 -1
  69. package/.next/server/app/settings.rsc +15 -15
  70. package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  71. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  72. package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
  73. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  74. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  75. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  76. package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  77. package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +73 -73
  78. package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  79. package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  80. package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  81. package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +58 -58
  82. package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  83. package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  85. package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +53 -53
  86. package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  87. package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  88. package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  89. package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +53 -53
  90. package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  91. package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  92. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
  93. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
  94. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  95. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
  97. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +54 -54
  98. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  99. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
  101. package/.next/server/app/workspaces/page/server-reference-manifest.json +39 -39
  102. package/.next/server/app/workspaces/page.js.nft.json +1 -1
  103. package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  104. package/.next/server/chunks/0uz~_next_dist_esm_build_templates_app-route_05yec2y.js +2 -2
  105. package/.next/server/chunks/[root-of-the-server]__0~33o~m._.js +1 -1
  106. package/.next/server/chunks/project_f_tower_0n1s3ym._.js +1 -1
  107. package/.next/server/chunks/project_f_tower_src_11e.cv5._.js +1 -1
  108. package/.next/server/chunks/ssr/04uy_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_01.s1p0._.js +1 -1
  109. package/.next/server/chunks/ssr/0y0r_f_tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0n4g3bn._.js +1 -1
  110. package/.next/server/chunks/ssr/[root-of-the-server]__06qzctf._.js +1 -1
  111. package/.next/server/chunks/ssr/[root-of-the-server]__0ffdrwp._.js +1 -1
  112. package/.next/server/chunks/ssr/[root-of-the-server]__0fwuc5u._.js +1 -1
  113. package/.next/server/chunks/ssr/[root-of-the-server]__0i4rk9v._.js +3 -3
  114. package/.next/server/chunks/ssr/[root-of-the-server]__0nmyvwk._.js +1 -1
  115. package/.next/server/chunks/ssr/[root-of-the-server]__0p59u95._.js +3 -0
  116. package/.next/server/chunks/ssr/{[root-of-the-server]__06japut._.js → [root-of-the-server]__0ukbsy0._.js} +2 -2
  117. package/.next/server/chunks/ssr/[root-of-the-server]__0w7gbe7._.js +1 -1
  118. package/.next/server/chunks/ssr/{[root-of-the-server]__0fu82np._.js → [root-of-the-server]__118z55s._.js} +2 -2
  119. package/.next/server/chunks/ssr/[root-of-the-server]__11j4k9o._.js +1 -1
  120. package/.next/server/chunks/ssr/[root-of-the-server]__13cjs8r._.js +1 -1
  121. package/.next/server/chunks/ssr/[root-of-the-server]__13eo85g._.js +1 -1
  122. package/.next/server/chunks/ssr/project_f_tower_0.txwd8._.js +1 -1
  123. package/.next/server/chunks/ssr/{project_f_tower_0xkqjno._.js → project_f_tower_0d_85uz._.js} +2 -2
  124. package/.next/server/chunks/ssr/project_f_tower_0f0-wva._.js +1 -1
  125. package/.next/server/chunks/ssr/{project_f_tower_0n6q9zh._.js → project_f_tower_0fdpm0.._.js} +2 -2
  126. package/.next/server/chunks/ssr/{project_f_tower_0h79vn0._.js → project_f_tower_0gp-92y._.js} +2 -2
  127. package/.next/server/chunks/ssr/project_f_tower_0hgtev9._.js +1 -1
  128. package/.next/server/chunks/ssr/project_f_tower_0ivvjwd._.js +1 -1
  129. package/.next/server/chunks/ssr/project_f_tower_0jy~1uf._.js +1 -1
  130. package/.next/server/chunks/ssr/project_f_tower_0l6ssf8._.js +1 -1
  131. package/.next/server/chunks/ssr/project_f_tower_0o5.y1e._.js +1 -1
  132. package/.next/server/chunks/ssr/project_f_tower_0qe3y7w._.js +3 -0
  133. package/.next/server/chunks/ssr/project_f_tower_0ym-aea._.js +1 -1
  134. package/.next/server/chunks/ssr/{project_f_tower_0jdkold._.js → project_f_tower_103i_mo._.js} +2 -2
  135. package/.next/server/chunks/ssr/{project_f_tower_0ghw~2t._.js → project_f_tower_11iv6rj._.js} +2 -2
  136. package/.next/server/chunks/ssr/{project_f_tower_src_0yr8rna._.js → project_f_tower_src_0dhz712._.js} +2 -2
  137. package/.next/server/chunks/ssr/project_f_tower_src_actions_agent-actions_ts_0.s4~m-._.js +1 -1
  138. package/.next/server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js +1 -1
  139. package/.next/server/chunks/ssr/project_f_tower_src_app_missions_missions-client_tsx_0ums4qx._.js +1 -1
  140. package/.next/server/chunks/ssr/project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js +1 -1
  141. package/.next/server/chunks/ssr/project_f_tower_src_app_settings_page_tsx_0oo06~d._.js +1 -1
  142. package/.next/server/chunks/ssr/project_f_tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0jmj1xz._.js +1 -1
  143. package/.next/server/instrumentation.js.nft.json +1 -1
  144. package/.next/server/middleware-build-manifest.js +3 -3
  145. package/.next/server/pages/404.html +1 -1
  146. package/.next/server/pages/500.html +1 -1
  147. package/.next/server/server-reference-manifest.js +1 -1
  148. package/.next/server/server-reference-manifest.json +202 -202
  149. package/.next/static/chunks/09k2v2gb9asa~.js +1 -0
  150. package/.next/static/chunks/0b2l7e_-hz6uu.js +1 -0
  151. package/.next/static/chunks/0d8czythhy15~.js +1 -0
  152. package/.next/static/chunks/0hbu0b_cpu234.js +1 -0
  153. package/.next/static/chunks/0i-bk-_pxq3kf.js +1 -0
  154. package/.next/static/chunks/0qz9.02.c_xy9.js +1 -0
  155. package/.next/static/chunks/0s.v9zvpavx.p.js +1 -0
  156. package/.next/static/chunks/0svo2_2.iajx0.js +1 -0
  157. package/.next/static/chunks/{0dlrmobwx~tvz.js → 0ufq5z-zsc_rq.js} +1 -1
  158. package/.next/static/chunks/{0kyb0fcxzykkx.js → 0uvcabj7_ht1m.js} +1 -1
  159. package/.next/static/chunks/{0upxmdjt9neoj.js → 0v6j_niujykvw.js} +1 -1
  160. package/.next/static/chunks/{006_yes1e~uq-.js → 0zk37-fhd4h6q.js} +1 -1
  161. package/.next/static/chunks/{06xnbktd_jmb4.js → 11y66l77sw_f_.js} +1 -1
  162. package/.next/static/chunks/{0afji0z13kos5.js → 150hyh9in9gbd.js} +2 -2
  163. package/.next/static/chunks/{10xx474hrm.03.js → 160iuo21rl~gx.js} +1 -1
  164. package/.next/trace +2 -2
  165. package/.next/trace-build +1 -1
  166. package/bin/tower.mjs +41 -1
  167. package/package.json +1 -1
  168. package/scripts/generate-prisma-client.js +2 -17
  169. package/.next/server/chunks/ssr/[root-of-the-server]__0db_p8v._.js +0 -3
  170. package/.next/server/chunks/ssr/project_f_tower_03k0qr1._.js +0 -3
  171. package/.next/static/chunks/03~7u57dwxswo.js +0 -1
  172. package/.next/static/chunks/054pu3m7e37gx.js +0 -1
  173. package/.next/static/chunks/05fge.5j9lnpa.js +0 -1
  174. package/.next/static/chunks/06hfc~t6~gtz9.js +0 -1
  175. package/.next/static/chunks/0azbwlqgcxx~9.js +0 -1
  176. package/.next/static/chunks/0g-rx4evmd.pa.js +0 -1
  177. package/.next/static/chunks/0sa5eiyws1~n0.js +0 -1
  178. package/.next/static/chunks/16ow8w3exqm6p.js +0 -1
  179. /package/.next/static/{qVmkMYUuxwdsiFTnn1wfK → z3fBPUSyN4JFEFJowhSmx}/_buildManifest.js +0 -0
  180. /package/.next/static/{qVmkMYUuxwdsiFTnn1wfK → z3fBPUSyN4JFEFJowhSmx}/_clientMiddlewareManifest.js +0 -0
  181. /package/.next/static/{qVmkMYUuxwdsiFTnn1wfK → z3fBPUSyN4JFEFJowhSmx}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,117474,e=>{"use strict";let t=(0,e.i(863961).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],117474)},803041,e=>{"use strict";var t=e.i(422364);e.s(["ChevronRight",()=>t.default])},750986,1156,e=>{"use strict";var t=e.i(419613);e.s(["CheckCircle2",()=>t.default],750986);let s=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],1156)},950211,e=>{"use strict";let t=(0,e.i(863961).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],950211)},864056,e=>{"use strict";let t=(0,e.i(863961).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],864056)},690951,e=>{"use strict";var t=e.i(432377),s=e.i(85212),a=e.i(309542),l=e.i(275283),r=e.i(711296),i=e.i(831349),n=e.i(584685),o=e.i(937756);function d({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,o.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function c({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,o.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var m=e.i(946960),x=e.i(893832),h=e.i(996032),u=e.i(950211),p=e.i(750986),g=e.i(1156),f=e.i(625054);function b({adapterType:e,adapterLabel:a,onResult:l}){let[i,n]=(0,s.useState)(!1),[j,v]=(0,s.useState)(null),{t:N}=(0,f.useI18n)();async function y(){if(!i){n(!0),v(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e})}),s=await t.json();v(s),l?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};v(e),l?.(e)}finally{n(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(u.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:N("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:N("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(d,{children:(0,t.jsxs)(c,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(r.Button,{onClick:y,disabled:i,variant:"outline",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),N("settings.aiTools.testing")]}):N("settings.aiTools.testConnection")})]}),j&&(0,t.jsxs)("div",{className:(0,o.cn)("rounded-lg border p-4 space-y-3",j.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[j.ok?(0,t.jsx)(p.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(g.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,o.cn)("text-sm font-medium",j.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:N(j.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:j.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(x.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(h.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,o.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var j=e.i(543485);let v=(0,j.createServerReference)("4008da5fb2e740b1e3c6df4ff7e170a1140d107426",j.callServer,void 0,j.findSourceMapURL,"completeOnboarding");var N=e.i(885861),y=e.i(117474),k=e.i(357334),w=e.i(864056),C=e.i(803041),T=e.i(811424),S=e.i(809250),L=e.i(863961);let P=(0,L.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),B=(0,L.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var M=e.i(780156),$=e.i(909260);function R({step:e}){let s=[y.User,u.Terminal,k.GitBranch][e-1]??y.User,a=["Profile","Connect","Configure"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let U={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,o,d,c=(0,a.useRouter)(),{t:m,locale:h,setLocale:p}=(0,f.useI18n)(),{theme:g,setTheme:j}=(0,l.useTheme)(),[L,z]=(0,s.useState)(!1),[I,H]=(0,s.useState)(1),[F,G]=(0,s.useState)(""),[O,D]=(0,s.useState)(null),[W,_]=(0,s.useState)([]),[q,V]=(0,s.useState)({...U}),[X,A]=(0,s.useState)(!0),[E,K]=(0,s.useState)(0),[Z,J]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1);(0,s.useEffect)(()=>z(!0),[]);let ee=[{value:"light",label:(0,t.jsx)(T.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(S.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function et(){H(e=>e+1)}function es(){H(e=>Math.max(1,e-1))}async function ea(){Y(!0);try{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),await v(F.trim()),c.replace("/workspaces")}catch{Y(!1)}}let el=[{icon:y.User,label:m("onboarding.step1.title")},{icon:u.Terminal,label:m("onboarding.step2.title")},{icon:k.GitBranch,label:m("onboarding.step3.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(R,{step:I})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:el.map((e,s)=>{let a=s+1,l=a===I,r=a<I,i=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${r?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":r?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[r?(0,t.jsx)(x.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(i,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:m("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:F,onChange:e=>G(e.target.value),placeholder:m("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.language")})]}),(0,t.jsx)(n.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:h,onChange:e=>p(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.theme")})]}),L?(0,t.jsx)(n.SegmentedControl,{options:ee.map(e=>({value:e.value,label:e.label})),value:g??"system",onChange:e=>j(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(r.Button,{onClick:et,disabled:0===F.trim().length,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step2.desc")})]}),(0,t.jsx)(b,{adapterType:"claude_code",adapterLabel:"Claude CLI",onResult:D}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:et,disabled:!O?.ok,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===I&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:m("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void _(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)($.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),X?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.hostLabel")}),(0,t.jsx)(i.Input,{value:q.host,onChange:e=>V(t=>({...t,host:e.target.value})),placeholder:m("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.ownerLabel")}),(0,t.jsx)(i.Input,{value:q.ownerMatch,onChange:e=>V(t=>({...t,ownerMatch:e.target.value})),placeholder:m("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Input,{value:q.localPathTemplate,onChange:e=>V(t=>({...t,localPathTemplate:e.target.value})),placeholder:m("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsx)("button",{type:"button",onClick:()=>{J(e=>(e||K(2),!e))},className:`shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors ${Z?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"{path}"})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:m(Z?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),q.localPathTemplate&&(e=q.localPathTemplate.trim().replace(/\/+$/,""),o=Z?`${e}/{path}`:e,d=[{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,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:d.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>K(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${E===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:d[E].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let r=a[0],i=a[a.length-1],n=a.join("/");if(e.includes("{path}"))return e.replace("{path}",n).replace("{owner}",r).replace("{repo}",i).replace(/\/+$/,"");let o=e.replace("{owner}",r).replace("{repo}","").replace(/\/+$/,"");return`${o}/${i}`}(o,d[E].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>A(!1),children:m("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{onClick:function(){if(!q.host.trim()||!q.localPathTemplate.trim())return;let e=q.localPathTemplate.trim().replace(/\/+$/,""),t=Z?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:q.host.trim(),ownerMatch:q.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};_(e=>[...e,s]),V({...U}),J(!1),A(!1)},disabled:!q.host.trim()||!q.localPathTemplate.trim(),children:[(0,t.jsx)(x.Check,{className:"h-4 w-4 mr-1"}),m("settings.config.git.save")]})]})]}):(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{V({...U}),A(!0)},children:[(0,t.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),m("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:ea,disabled:Q,className:"px-5",children:[m("onboarding.complete"),(0,t.jsx)(x.Check,{className:"h-4 w-4 ml-1"})]})]})]})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:m("onboarding.stepIndicator").replace("{current}",String(I)).replace("{total}",String(3))})]})})]})}],690951)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,117474,e=>{"use strict";let t=(0,e.i(863961).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],117474)},803041,e=>{"use strict";var t=e.i(422364);e.s(["ChevronRight",()=>t.default])},750986,1156,e=>{"use strict";var t=e.i(419613);e.s(["CheckCircle2",()=>t.default],750986);let s=(0,e.i(863961).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,s],1156)},950211,e=>{"use strict";let t=(0,e.i(863961).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],950211)},864056,e=>{"use strict";let t=(0,e.i(863961).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],864056)},690951,e=>{"use strict";var t=e.i(432377),s=e.i(85212),a=e.i(309542),l=e.i(275283),r=e.i(711296),i=e.i(831349),n=e.i(584685),o=e.i(937756);function d({className:e,size:s="default",...a}){return(0,t.jsx)("div",{"data-slot":"card","data-size":s,className:(0,o.cn)("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...a})}function c({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,o.cn)("px-4 group-data-[size=sm]/card:px-3",e),...s})}var m=e.i(946960),x=e.i(893832),h=e.i(996032),u=e.i(950211),p=e.i(750986),g=e.i(1156),b=e.i(625054);function f({adapterType:e,adapterLabel:a,onResult:l}){let[i,n]=(0,s.useState)(!1),[j,v]=(0,s.useState)(null),{t:N}=(0,b.useI18n)();async function y(){if(!i){n(!0),v(null);try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e})}),s=await t.json();v(s),l?.(s)}catch{let e={ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]};v(e),l?.(e)}finally{n(!1)}}}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"rounded-lg bg-emerald-100 dark:bg-emerald-900/30 p-2",children:(0,t.jsx)(u.Terminal,{className:"h-5 w-5 text-emerald-600 dark:text-emerald-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"font-semibold",children:N("settings.aiTools.cliVerification")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:N("settings.aiTools.cliVerificationDesc")})]})]}),(0,t.jsx)(d,{children:(0,t.jsxs)(c,{className:"p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:a&&(0,t.jsx)("p",{className:"font-medium",children:a})}),(0,t.jsx)(r.Button,{onClick:y,disabled:i,variant:"outline",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Loader2,{className:"h-4 w-4 animate-spin mr-2"}),N("settings.aiTools.testing")]}):N("settings.aiTools.testConnection")})]}),j&&(0,t.jsxs)("div",{className:(0,o.cn)("rounded-lg border p-4 space-y-3",j.ok?"bg-green-50 border-green-200 dark:bg-green-950/20 dark:border-green-800":"bg-red-50 border-red-200 dark:bg-red-950/20 dark:border-red-800"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[j.ok?(0,t.jsx)(p.CheckCircle2,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):(0,t.jsx)(g.XCircle,{className:"h-4 w-4 text-red-600 dark:text-red-400"}),(0,t.jsx)("span",{className:(0,o.cn)("text-sm font-medium",j.ok?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:N(j.ok?"settings.aiTools.testPassed":"settings.aiTools.testFailed")})]}),(0,t.jsx)("div",{className:"space-y-2",children:j.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[s.passed?(0,t.jsx)(x.Check,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}):(0,t.jsx)(h.X,{className:"h-4 w-4 text-red-500 mt-0.5 shrink-0"}),(0,t.jsx)("span",{className:(0,o.cn)(s.passed?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"),children:s.message})]},`${e}-${s.name}`))})]})]})})]})}var j=e.i(543485);let v=(0,j.createServerReference)("408131d9114dbbcb470b8ebd8a59952c6fe74c7b1b",j.callServer,void 0,j.findSourceMapURL,"completeOnboarding");var N=e.i(380402),y=e.i(117474),k=e.i(357334),w=e.i(864056),C=e.i(803041),T=e.i(811424),S=e.i(809250),L=e.i(863961);let P=(0,L.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),B=(0,L.default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);var M=e.i(780156),$=e.i(909260);function R({step:e}){let s=[y.User,u.Terminal,k.GitBranch][e-1]??y.User,a=["Profile","Connect","Configure"][e-1]??"";return(0,t.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute inset-0 opacity-[0.07] text-white",style:{backgroundImage:"radial-gradient(circle, currentColor 1px, transparent 1px)",backgroundSize:"24px 24px"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{width:"380px",height:"380px",background:"radial-gradient(circle, oklch(0.80 0.14 75 / 0.25) 0%, oklch(0.80 0.14 75 / 0.08) 45%, transparent 70%)",animation:"ob-pulse 6s ease-in-out infinite"}}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/25",style:{width:"260px",height:"260px",animation:"ob-spin 20s linear infinite"},children:(0,t.jsx)("div",{className:"absolute -top-1.5 left-1/2 -translate-x-1/2 h-3 w-3 rounded-full bg-amber-400",style:{boxShadow:"0 0 16px oklch(0.80 0.14 75 / 0.7)"}})}),(0,t.jsxs)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-amber-400/15",style:{width:"380px",height:"380px",animation:"ob-spin 30s linear infinite reverse"},children:[(0,t.jsx)("div",{className:"absolute -top-1 left-1/2 -translate-x-1/2 h-2 w-2 rounded-full bg-amber-400/70"}),(0,t.jsx)("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full bg-amber-400/50"})]}),(0,t.jsx)("svg",{className:"absolute",style:{top:"18%",right:"22%",animation:"ob-float 8s ease-in-out infinite"},width:"44",height:"50",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.4)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.06)"})}),(0,t.jsx)("svg",{className:"absolute",style:{bottom:"22%",left:"18%",animation:"ob-float 10s ease-in-out 2s infinite"},width:"32",height:"36",viewBox:"0 0 40 46",fill:"none",children:(0,t.jsx)("path",{d:"M20 1 L38 12 L38 34 L20 45 L2 34 L2 12 Z",stroke:"oklch(0.80 0.14 75 / 0.3)",strokeWidth:"1.5",fill:"oklch(0.80 0.14 75 / 0.05)"})}),(0,t.jsx)("div",{className:"absolute h-3.5 w-3.5 rounded-full bg-amber-400/40",style:{top:"30%",left:"28%",animation:"ob-float 7s ease-in-out 1s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2.5 w-2.5 rounded-full bg-amber-400/30",style:{top:"65%",right:"30%",animation:"ob-float 9s ease-in-out 3s infinite"}}),(0,t.jsx)("div",{className:"absolute h-2 w-2 rounded-full bg-amber-400/20",style:{top:"45%",right:"15%",animation:"ob-float 6s ease-in-out 0.5s infinite"}}),(0,t.jsxs)("svg",{className:"absolute inset-0 h-full w-full text-white opacity-[0.12]",children:[(0,t.jsx)("line",{x1:"30%",y1:"25%",x2:"70%",y2:"45%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 12s linear infinite"}}),(0,t.jsx)("line",{x1:"65%",y1:"30%",x2:"35%",y2:"70%",stroke:"currentColor",strokeWidth:"1",strokeDasharray:"4 6",style:{animation:"ob-dash 15s linear infinite reverse"}})]}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl border border-amber-400/35 bg-amber-500/10 backdrop-blur-sm transition-all duration-700",style:{boxShadow:"0 0 50px oklch(0.80 0.14 75 / 0.2)"},children:(0,t.jsx)(s,{className:"h-7 w-7 text-amber-400"})})}),(0,t.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 translate-y-12 text-center",children:(0,t.jsx)("p",{className:"text-[11px] font-medium tracking-widest uppercase text-amber-400/60",children:a})})]})}let U={host:"",ownerMatch:"*",localPathTemplate:""};e.s(["default",0,function(){let e,o,d,c=(0,a.useRouter)(),{t:m,locale:h,setLocale:p}=(0,b.useI18n)(),{theme:g,setTheme:j}=(0,l.useTheme)(),[L,z]=(0,s.useState)(!1),[I,H]=(0,s.useState)(1),[F,G]=(0,s.useState)(""),[O,D]=(0,s.useState)(null),[W,_]=(0,s.useState)([]),[q,V]=(0,s.useState)({...U}),[X,A]=(0,s.useState)(!0),[E,K]=(0,s.useState)(0),[Z,J]=(0,s.useState)(!1),[Q,Y]=(0,s.useState)(!1);(0,s.useEffect)(()=>z(!0),[]);let ee=[{value:"light",label:(0,t.jsx)(T.Sun,{className:"h-4 w-4"})},{value:"dark",label:(0,t.jsx)(S.Moon,{className:"h-4 w-4"})},{value:"system",label:(0,t.jsx)(P,{className:"h-4 w-4"})}];function et(){H(e=>e+1)}function es(){H(e=>Math.max(1,e-1))}async function ea(){Y(!0);try{W.length>0&&await (0,N.setConfigValue)("git.pathMappingRules",W),await v(F.trim()),c.replace("/workspaces")}catch{Y(!1)}}let el=[{icon:y.User,label:m("onboarding.step1.title")},{icon:u.Terminal,label:m("onboarding.step2.title")},{icon:k.GitBranch,label:m("onboarding.step3.title")}];return(0,t.jsxs)("div",{className:"flex h-screen bg-background",children:[(0,t.jsx)("div",{className:"hidden xl:block xl:w-3/5 border-r border-border/50 bg-[oklch(0.13_0.006_260)]",children:(0,t.jsx)(R,{step:I})}),(0,t.jsx)("div",{className:"flex w-full flex-col items-center px-8 pt-[10vh] pb-10 xl:w-2/5 xl:px-16 overflow-y-auto",children:(0,t.jsxs)("div",{className:"w-full max-w-lg space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("img",{src:"/logo.png",alt:"Tower",className:"h-8 w-8 rounded-lg"}),(0,t.jsx)("span",{className:"text-lg font-semibold tracking-tight",children:"Tower"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:el.map((e,s)=>{let a=s+1,l=a===I,r=a<I,i=e.icon;return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[s>0&&(0,t.jsx)("div",{className:`h-px w-4 transition-colors duration-500 ${r?"bg-primary":"bg-border"}`}),(0,t.jsxs)("div",{className:`flex items-center gap-1 shrink-0 rounded-full px-2 py-1 text-[11px] font-medium whitespace-nowrap transition-all duration-500 ${l?"bg-primary text-primary-foreground shadow-sm":r?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"}`,children:[r?(0,t.jsx)(x.Check,{className:"h-3 w-3 shrink-0"}):(0,t.jsx)(i,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{children:e.label})]})]},s)})})]}),(0,t.jsxs)("div",{children:[1===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step1.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step1.desc")})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"onboarding-username",className:"text-sm font-medium",children:m("onboarding.step1.usernameLabel")}),(0,t.jsx)("input",{id:"onboarding-username",type:"text",value:F,onChange:e=>G(e.target.value),placeholder:m("onboarding.step1.usernamePlaceholder"),className:"flex h-10 w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",maxLength:64,autoFocus:!0,autoComplete:"username"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(B,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.language")})]}),(0,t.jsx)(n.SegmentedControl,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}].map(e=>({value:e.value,label:e.label})),value:h,onChange:e=>p(e)})]}),(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Sun,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("label",{className:"text-sm font-medium",children:m("settings.theme")})]}),L?(0,t.jsx)(n.SegmentedControl,{options:ee.map(e=>({value:e.value,label:e.label})),value:g??"system",onChange:e=>j(e)}):(0,t.jsx)("div",{className:"inline-flex h-8 rounded-md border border-border bg-muted p-1 gap-1 w-[120px]"})]})]}),(0,t.jsx)("div",{className:"flex justify-end pt-3",children:(0,t.jsxs)(r.Button,{onClick:et,disabled:0===F.trim().length,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})})]}),2===I&&(0,t.jsxs)("div",{className:"space-y-7 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step2.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step2.desc")})]}),(0,t.jsx)(f,{adapterType:"claude_code",adapterLabel:"Claude CLI",onResult:D}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:et,disabled:!O?.ok,className:"px-5",children:[m("onboarding.step1.next"),(0,t.jsx)(C.ChevronRight,{className:"h-4 w-4 ml-1"})]})]})]}),3===I&&(0,t.jsxs)("div",{className:"space-y-5 animate-in fade-in slide-in-from-left-4 duration-500",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:m("onboarding.step3.title")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m("onboarding.step3.desc")})]}),W.length>0&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:m("onboarding.step3.added").replace("{count}",String(W.length))}),W.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border bg-muted/30 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"text-sm font-medium truncate",children:[e.host,(0,t.jsx)("span",{className:"text-muted-foreground",children:"*"!==e.ownerMatch?` / ${e.ownerMatch}`:""})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground font-mono truncate",children:e.localPathTemplate})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>{var t;return t=e.id,void _(e=>e.filter(e=>e.id!==t))},children:(0,t.jsx)($.Trash2,{className:"h-3.5 w-3.5"})})]},e.id))]}),X?(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.hostLabel")}),(0,t.jsx)(i.Input,{value:q.host,onChange:e=>V(t=>({...t,host:e.target.value})),placeholder:m("onboarding.step3.hostPlaceholder"),className:"h-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.ownerLabel")}),(0,t.jsx)(i.Input,{value:q.ownerMatch,onChange:e=>V(t=>({...t,ownerMatch:e.target.value})),placeholder:m("onboarding.step3.ownerPlaceholder"),className:"h-9"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.pathLabel")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Input,{value:q.localPathTemplate,onChange:e=>V(t=>({...t,localPathTemplate:e.target.value})),placeholder:m("onboarding.step3.pathPlaceholder"),className:"h-9 font-mono text-xs flex-1"}),(0,t.jsx)("button",{type:"button",onClick:()=>{J(e=>(e||K(2),!e))},className:`shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors ${Z?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:"{path}"})]}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:m(Z?"onboarding.step3.pathHintFull":"onboarding.step3.pathHintRepo")})]}),q.localPathTemplate&&(e=q.localPathTemplate.trim().replace(/\/+$/,""),o=Z?`${e}/{path}`:e,d=[{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,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:m("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1 flex-wrap",children:d.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>K(s),className:`rounded-md px-2 py-1 text-[11px] font-medium transition-colors ${E===s?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:e.label},s))}),(0,t.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2 space-y-1",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:d[E].url}),(0,t.jsxs)("p",{className:"font-mono text-xs",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-primary",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],l=s.match(/^git@[^:]+:(.+)$/);if(l)a=l[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let r=a[0],i=a[a.length-1],n=a.join("/");if(e.includes("{path}"))return e.replace("{path}",n).replace("{owner}",r).replace("{repo}",i).replace(/\/+$/,"");let o=e.replace("{owner}",r).replace("{repo}","").replace(/\/+$/,"");return`${o}/${i}`}(o,d[E].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[W.length>0&&(0,t.jsx)(r.Button,{variant:"ghost",onClick:()=>A(!1),children:m("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{onClick:function(){if(!q.host.trim()||!q.localPathTemplate.trim())return;let e=q.localPathTemplate.trim().replace(/\/+$/,""),t=Z?`${e}/{path}`:e,s={id:crypto.randomUUID(),host:q.host.trim(),ownerMatch:q.ownerMatch.trim()||"*",localPathTemplate:t,priority:W.length};_(e=>[...e,s]),V({...U}),J(!1),A(!1)},disabled:!q.host.trim()||!q.localPathTemplate.trim(),children:[(0,t.jsx)(x.Check,{className:"h-4 w-4 mr-1"}),m("settings.config.git.save")]})]})]}):(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>{V({...U}),A(!0)},children:[(0,t.jsx)(M.Plus,{className:"h-4 w-4 mr-1"}),m("settings.config.git.addRule")]}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-3",children:[(0,t.jsxs)(r.Button,{variant:"ghost",className:"text-muted-foreground",onClick:es,children:[(0,t.jsx)(w.ChevronLeft,{className:"h-4 w-4 mr-1"}),m("onboarding.back")]}),(0,t.jsxs)(r.Button,{onClick:ea,disabled:Q,className:"px-5",children:[m("onboarding.complete"),(0,t.jsx)(x.Check,{className:"h-4 w-4 ml-1"})]})]})]})]}),(0,t.jsx)("div",{className:"pt-6 text-xs text-muted-foreground",children:m("onboarding.stepIndicator").replace("{current}",String(I)).replace("{total}",String(3))})]})})]})}],690951)}]);
package/.next/trace CHANGED
@@ -1,2 +1,2 @@
1
- [{"name":"generate-buildid","duration":118,"timestamp":1576059338951,"id":4,"parentId":1,"tags":{},"startTime":1777358572171,"traceId":"4a59455202141294"},{"name":"load-custom-routes","duration":210,"timestamp":1576059339199,"id":5,"parentId":1,"tags":{},"startTime":1777358572171,"traceId":"4a59455202141294"},{"name":"create-dist-dir","duration":237,"timestamp":1576059339425,"id":6,"parentId":1,"tags":{},"startTime":1777358572171,"traceId":"4a59455202141294"},{"name":"clean","duration":151,"timestamp":1576059340427,"id":7,"parentId":1,"tags":{},"startTime":1777358572172,"traceId":"4a59455202141294"},{"name":"discover-routes","duration":12663,"timestamp":1576059347120,"id":8,"parentId":1,"tags":{},"startTime":1777358572179,"traceId":"4a59455202141294"},{"name":"create-root-mapping","duration":49,"timestamp":1576059359816,"id":9,"parentId":1,"tags":{},"startTime":1777358572192,"traceId":"4a59455202141294"},{"name":"generate-route-types","duration":34824,"timestamp":1576059360900,"id":10,"parentId":1,"tags":{},"startTime":1777358572193,"traceId":"4a59455202141294"},{"name":"public-dir-conflict-check","duration":43,"timestamp":1576059395836,"id":11,"parentId":1,"tags":{},"startTime":1777358572228,"traceId":"4a59455202141294"},{"name":"generate-routes-manifest","duration":1648,"timestamp":1576059395917,"id":12,"parentId":1,"tags":{},"startTime":1777358572228,"traceId":"4a59455202141294"},{"name":"run-turbopack","duration":6324051,"timestamp":1576059401189,"id":14,"parentId":1,"tags":{},"startTime":1777358572233,"traceId":"4a59455202141294"},{"name":"turbopack-build-events","duration":42,"timestamp":1576059550865,"id":15,"parentId":1,"tags":{},"startTime":1777358572383,"traceId":"4a59455202141294"},{"name":"run-typescript","duration":6662840,"timestamp":1576065778025,"id":16,"parentId":1,"tags":{},"startTime":1777358578610,"traceId":"4a59455202141294"},{"name":"generate-required-server-files","duration":4161,"timestamp":1576072445966,"id":18,"parentId":1,"tags":{},"startTime":1777358585278,"traceId":"4a59455202141294"},{"name":"check-static-error-page","duration":52441,"timestamp":1576072494090,"id":20,"parentId":19,"tags":{},"startTime":1777358585326,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":219396,"timestamp":1576072550106,"id":61,"parentId":22,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":267349,"timestamp":1576072502302,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1777358585334,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":268849,"timestamp":1576072550177,"id":63,"parentId":24,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":316186,"timestamp":1576072502899,"id":24,"parentId":19,"tags":{"page":"/api/browse-fs"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":275624,"timestamp":1576072550202,"id":64,"parentId":25,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":322990,"timestamp":1576072502961,"id":25,"parentId":19,"tags":{"page":"/api/files/assets/[projectId]/[filename]"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":292314,"timestamp":1576072553225,"id":69,"parentId":45,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":331832,"timestamp":1576072513732,"id":45,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1777358585346,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":298343,"timestamp":1576072553006,"id":68,"parentId":44,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":340248,"timestamp":1576072511211,"id":44,"parentId":19,"tags":{"page":"/apple-icon.png"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":304900,"timestamp":1576072553295,"id":71,"parentId":47,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":319816,"timestamp":1576072538402,"id":47,"parentId":19,"tags":{"page":"/icon1.png"},"startTime":1777358585371,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":307278,"timestamp":1576072553302,"id":72,"parentId":48,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":321352,"timestamp":1576072539250,"id":48,"parentId":19,"tags":{"page":"/manifest.json"},"startTime":1777358585371,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":306658,"timestamp":1576072557799,"id":73,"parentId":28,"tags":{},"startTime":1777358585390,"traceId":"4a59455202141294"},{"name":"check-page","duration":359378,"timestamp":1576072505225,"id":28,"parentId":19,"tags":{"page":"/api/internal/assets/reveal"},"startTime":1777358585337,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":328909,"timestamp":1576072550296,"id":65,"parentId":26,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":376266,"timestamp":1576072503005,"id":26,"parentId":19,"tags":{"page":"/api/git"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":326166,"timestamp":1576072553278,"id":70,"parentId":46,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":365365,"timestamp":1576072514093,"id":46,"parentId":19,"tags":{"page":"/icon0.svg"},"startTime":1777358585347,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":333795,"timestamp":1576072549932,"id":60,"parentId":21,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":385360,"timestamp":1576072498391,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1777358585331,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":335177,"timestamp":1576072550142,"id":62,"parentId":23,"tags":{},"startTime":1777358585382,"traceId":"4a59455202141294"},{"name":"check-page","duration":382594,"timestamp":1576072502765,"id":23,"parentId":19,"tags":{"page":"/api/adapters/test"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":327094,"timestamp":1576072558472,"id":76,"parentId":33,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":377602,"timestamp":1576072507978,"id":33,"parentId":19,"tags":{"page":"/api/internal/cache/[...segments]"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":329870,"timestamp":1576072558285,"id":75,"parentId":32,"tags":{},"startTime":1777358585390,"traceId":"4a59455202141294"},{"name":"check-page","duration":380264,"timestamp":1576072507907,"id":32,"parentId":19,"tags":{"page":"/api/internal/assistant/sessions"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":329442,"timestamp":1576072559160,"id":79,"parentId":27,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":385541,"timestamp":1576072503074,"id":27,"parentId":19,"tags":{"page":"/api/internal/assets/[projectId]/[filename]"},"startTime":1777358585335,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":330745,"timestamp":1576072558133,"id":74,"parentId":31,"tags":{},"startTime":1777358585390,"traceId":"4a59455202141294"},{"name":"check-page","duration":381036,"timestamp":1576072507848,"id":31,"parentId":19,"tags":{"page":"/api/internal/assistant"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":330713,"timestamp":1576072560459,"id":81,"parentId":38,"tags":{},"startTime":1777358585393,"traceId":"4a59455202141294"},{"name":"check-page","duration":382464,"timestamp":1576072508728,"id":38,"parentId":19,"tags":{"page":"/api/internal/notifications/pending"},"startTime":1777358585341,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":356271,"timestamp":1576072550885,"id":66,"parentId":42,"tags":{},"startTime":1777358585383,"traceId":"4a59455202141294"},{"name":"check-page","duration":396239,"timestamp":1576072510946,"id":42,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/diff"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":354472,"timestamp":1576072552764,"id":67,"parentId":43,"tags":{},"startTime":1777358585385,"traceId":"4a59455202141294"},{"name":"check-page","duration":396148,"timestamp":1576072511098,"id":43,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/merge"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":351208,"timestamp":1576072558978,"id":78,"parentId":35,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":401829,"timestamp":1576072508374,"id":35,"parentId":19,"tags":{"page":"/api/internal/hooks/session"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":348349,"timestamp":1576072563910,"id":84,"parentId":37,"tags":{},"startTime":1777358585396,"traceId":"4a59455202141294"},{"name":"check-page","duration":403760,"timestamp":1576072508573,"id":37,"parentId":19,"tags":{"page":"/api/internal/hooks/upload"},"startTime":1777358585341,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":349756,"timestamp":1576072562670,"id":83,"parentId":40,"tags":{},"startTime":1777358585395,"traceId":"4a59455202141294"},{"name":"check-page","duration":401855,"timestamp":1576072510585,"id":40,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/input"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":349399,"timestamp":1576072564718,"id":86,"parentId":29,"tags":{},"startTime":1777358585397,"traceId":"4a59455202141294"},{"name":"check-page","duration":406692,"timestamp":1576072507467,"id":29,"parentId":19,"tags":{"page":"/api/internal/assistant/chat"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":352972,"timestamp":1576072564054,"id":85,"parentId":41,"tags":{},"startTime":1777358585396,"traceId":"4a59455202141294"},{"name":"check-page","duration":406233,"timestamp":1576072510813,"id":41,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/start"},"startTime":1777358585343,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":366218,"timestamp":1576072558777,"id":77,"parentId":34,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":416977,"timestamp":1576072508044,"id":34,"parentId":19,"tags":{"page":"/api/internal/hooks/install"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":363828,"timestamp":1576072561262,"id":82,"parentId":39,"tags":{},"startTime":1777358585393,"traceId":"4a59455202141294"},{"name":"check-page","duration":415265,"timestamp":1576072509832,"id":39,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/buffer"},"startTime":1777358585342,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":377477,"timestamp":1576072559343,"id":80,"parentId":30,"tags":{},"startTime":1777358585391,"traceId":"4a59455202141294"},{"name":"check-page","duration":429093,"timestamp":1576072507747,"id":30,"parentId":19,"tags":{"page":"/api/internal/assistant/images"},"startTime":1777358585340,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":371997,"timestamp":1576072564882,"id":87,"parentId":36,"tags":{},"startTime":1777358585397,"traceId":"4a59455202141294"},{"name":"check-page","duration":428371,"timestamp":1576072508514,"id":36,"parentId":19,"tags":{"page":"/api/internal/hooks/stop"},"startTime":1777358585341,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":384095,"timestamp":1576072566024,"id":89,"parentId":51,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":408142,"timestamp":1576072542023,"id":51,"parentId":19,"tags":{"page":"/"},"startTime":1777358585374,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":388681,"timestamp":1576072566010,"id":88,"parentId":50,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":413834,"timestamp":1576072540881,"id":50,"parentId":19,"tags":{"page":"/onboarding"},"startTime":1777358585373,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":392290,"timestamp":1576072566030,"id":91,"parentId":53,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":416156,"timestamp":1576072542184,"id":53,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/archive"},"startTime":1777358585374,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":393383,"timestamp":1576072566027,"id":90,"parentId":52,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":417307,"timestamp":1576072542141,"id":52,"parentId":19,"tags":{"page":"/settings"},"startTime":1777358585374,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":395236,"timestamp":1576072566102,"id":95,"parentId":58,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":416065,"timestamp":1576072545298,"id":58,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/tasks/[taskId]"},"startTime":1777358585377,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":396596,"timestamp":1576072566116,"id":97,"parentId":57,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":419404,"timestamp":1576072543326,"id":57,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/projects/[projectId]"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":397461,"timestamp":1576072566107,"id":96,"parentId":49,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":424024,"timestamp":1576072539555,"id":49,"parentId":19,"tags":{"page":"/missions"},"startTime":1777358585372,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":408586,"timestamp":1576072566120,"id":98,"parentId":59,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":429271,"timestamp":1576072545466,"id":59,"parentId":19,"tags":{"page":"/workspaces"},"startTime":1777358585378,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":417220,"timestamp":1576072566035,"id":93,"parentId":55,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":440058,"timestamp":1576072543224,"id":55,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/notes"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":420711,"timestamp":1576072566099,"id":94,"parentId":56,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":443546,"timestamp":1576072543282,"id":56,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"is-page-static","duration":427619,"timestamp":1576072566032,"id":92,"parentId":54,"tags":{},"startTime":1777358585398,"traceId":"4a59455202141294"},{"name":"check-page","duration":450805,"timestamp":1576072542861,"id":54,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/assets"},"startTime":1777358585375,"traceId":"4a59455202141294"},{"name":"static-check","duration":503450,"timestamp":1576072490240,"id":19,"parentId":1,"tags":{},"startTime":1777358585322,"traceId":"4a59455202141294"},{"name":"write-routes-manifest","duration":363,"timestamp":1576072994722,"id":100,"parentId":1,"tags":{},"startTime":1777358585827,"traceId":"4a59455202141294"},{"name":"load-dotenv","duration":12,"timestamp":1576073002724,"id":103,"parentId":102,"tags":{},"startTime":1777358585835,"traceId":"4a59455202141294"},{"name":"run-export-path-map","duration":283,"timestamp":1576073004330,"id":104,"parentId":102,"tags":{},"startTime":1777358585836,"traceId":"4a59455202141294"},{"name":"next-export","duration":247582,"timestamp":1576073002123,"id":102,"parentId":1,"tags":{},"startTime":1777358585834,"traceId":"4a59455202141294"},{"name":"move-exported-app-not-found-","duration":344,"timestamp":1576073250890,"id":105,"parentId":101,"tags":{},"startTime":1777358586083,"traceId":"4a59455202141294"},{"name":"move-exported-app-global-error-","duration":200,"timestamp":1576073251267,"id":106,"parentId":101,"tags":{},"startTime":1777358586083,"traceId":"4a59455202141294"},{"name":"static-generation","duration":254645,"timestamp":1576072997449,"id":101,"parentId":1,"tags":{},"startTime":1777358585830,"traceId":"4a59455202141294"},{"name":"write-routes-manifest","duration":216,"timestamp":1576073252190,"id":107,"parentId":1,"tags":{},"startTime":1777358586084,"traceId":"4a59455202141294"}]
2
- [{"name":"print-tree-view","duration":3015,"timestamp":1576073261429,"id":108,"parentId":1,"tags":{},"startTime":1777358586094,"traceId":"4a59455202141294"},{"name":"write-route-bundle-stats","duration":7314,"timestamp":1576073264459,"id":109,"parentId":1,"tags":{},"startTime":1777358586097,"traceId":"4a59455202141294"},{"name":"telemetry-flush","duration":490338,"timestamp":1576073271787,"id":110,"parentId":1,"tags":{},"startTime":1777358586104,"traceId":"4a59455202141294"},{"name":"next-build","duration":14566525,"timestamp":1576059195615,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777358572028,"traceId":"4a59455202141294"}]
1
+ [{"name":"generate-buildid","duration":98,"timestamp":1581215747816,"id":4,"parentId":1,"tags":{},"startTime":1777363728419,"traceId":"539ab8a30042cdf2"},{"name":"load-custom-routes","duration":180,"timestamp":1581215748017,"id":5,"parentId":1,"tags":{},"startTime":1777363728420,"traceId":"539ab8a30042cdf2"},{"name":"create-dist-dir","duration":183,"timestamp":1581215748209,"id":6,"parentId":1,"tags":{},"startTime":1777363728420,"traceId":"539ab8a30042cdf2"},{"name":"clean","duration":121,"timestamp":1581215748866,"id":7,"parentId":1,"tags":{},"startTime":1777363728420,"traceId":"539ab8a30042cdf2"},{"name":"discover-routes","duration":11239,"timestamp":1581215755502,"id":8,"parentId":1,"tags":{},"startTime":1777363728427,"traceId":"539ab8a30042cdf2"},{"name":"create-root-mapping","duration":57,"timestamp":1581215766773,"id":9,"parentId":1,"tags":{},"startTime":1777363728438,"traceId":"539ab8a30042cdf2"},{"name":"generate-route-types","duration":36949,"timestamp":1581215767988,"id":10,"parentId":1,"tags":{},"startTime":1777363728440,"traceId":"539ab8a30042cdf2"},{"name":"public-dir-conflict-check","duration":54,"timestamp":1581215805061,"id":11,"parentId":1,"tags":{},"startTime":1777363728477,"traceId":"539ab8a30042cdf2"},{"name":"generate-routes-manifest","duration":1705,"timestamp":1581215805155,"id":12,"parentId":1,"tags":{},"startTime":1777363728477,"traceId":"539ab8a30042cdf2"},{"name":"run-turbopack","duration":7360611,"timestamp":1581215809423,"id":14,"parentId":1,"tags":{},"startTime":1777363728481,"traceId":"539ab8a30042cdf2"},{"name":"turbopack-build-events","duration":38,"timestamp":1581215971784,"id":15,"parentId":1,"tags":{},"startTime":1777363728643,"traceId":"539ab8a30042cdf2"},{"name":"run-typescript","duration":6242952,"timestamp":1581223219204,"id":16,"parentId":1,"tags":{},"startTime":1777363735891,"traceId":"539ab8a30042cdf2"},{"name":"generate-required-server-files","duration":1721,"timestamp":1581229465538,"id":18,"parentId":1,"tags":{},"startTime":1777363742137,"traceId":"539ab8a30042cdf2"},{"name":"check-static-error-page","duration":18488,"timestamp":1581229485016,"id":20,"parentId":19,"tags":{},"startTime":1777363742156,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":189727,"timestamp":1581229504732,"id":61,"parentId":22,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":206738,"timestamp":1581229487788,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1777363742159,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":229863,"timestamp":1581229504787,"id":63,"parentId":24,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":246582,"timestamp":1581229488105,"id":24,"parentId":19,"tags":{"page":"/api/browse-fs"},"startTime":1777363742159,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":240415,"timestamp":1581229504811,"id":64,"parentId":25,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":257094,"timestamp":1581229488163,"id":25,"parentId":19,"tags":{"page":"/api/files/assets/[projectId]/[filename]"},"startTime":1777363742160,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":240404,"timestamp":1581229504893,"id":65,"parentId":26,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":257100,"timestamp":1581229488202,"id":26,"parentId":19,"tags":{"page":"/api/git"},"startTime":1777363742160,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":245922,"timestamp":1581229505008,"id":68,"parentId":44,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":255481,"timestamp":1581229495487,"id":44,"parentId":19,"tags":{"page":"/apple-icon.png"},"startTime":1777363742167,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":259292,"timestamp":1581229505071,"id":69,"parentId":45,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":266835,"timestamp":1581229497552,"id":45,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1777363742169,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":262734,"timestamp":1581229505092,"id":72,"parentId":48,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":265047,"timestamp":1581229502803,"id":48,"parentId":19,"tags":{"page":"/manifest.json"},"startTime":1777363742174,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":264446,"timestamp":1581229505090,"id":71,"parentId":47,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":267370,"timestamp":1581229502188,"id":47,"parentId":19,"tags":{"page":"/icon1.png"},"startTime":1777363742174,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":266935,"timestamp":1581229505085,"id":70,"parentId":46,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":274143,"timestamp":1581229497900,"id":46,"parentId":19,"tags":{"page":"/icon0.svg"},"startTime":1777363742169,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":268314,"timestamp":1581229506245,"id":73,"parentId":27,"tags":{},"startTime":1777363742178,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":286310,"timestamp":1581229488272,"id":27,"parentId":19,"tags":{"page":"/api/internal/assets/[projectId]/[filename]"},"startTime":1777363742160,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":274462,"timestamp":1581229504760,"id":62,"parentId":23,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":291193,"timestamp":1581229488051,"id":23,"parentId":19,"tags":{"page":"/api/adapters/test"},"startTime":1777363742159,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":281751,"timestamp":1581229504608,"id":60,"parentId":21,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":299309,"timestamp":1581229487086,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1777363742158,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":280183,"timestamp":1581229506881,"id":74,"parentId":29,"tags":{},"startTime":1777363742178,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":296246,"timestamp":1581229490834,"id":29,"parentId":19,"tags":{"page":"/api/internal/assistant/chat"},"startTime":1777363742162,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":291376,"timestamp":1581229504997,"id":67,"parentId":43,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":300955,"timestamp":1581229495446,"id":43,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/merge"},"startTime":1777363742167,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":291573,"timestamp":1581229504968,"id":66,"parentId":42,"tags":{},"startTime":1777363742176,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":301159,"timestamp":1581229495393,"id":42,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/diff"},"startTime":1777363742167,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":286548,"timestamp":1581229512320,"id":79,"parentId":28,"tags":{},"startTime":1777363742184,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":308188,"timestamp":1581229490697,"id":28,"parentId":19,"tags":{"page":"/api/internal/assets/reveal"},"startTime":1777363742162,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":291386,"timestamp":1581229508353,"id":77,"parentId":32,"tags":{},"startTime":1777363742180,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":307121,"timestamp":1581229492657,"id":32,"parentId":19,"tags":{"page":"/api/internal/assistant/sessions"},"startTime":1777363742164,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":291970,"timestamp":1581229508025,"id":76,"parentId":31,"tags":{},"startTime":1777363742179,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":307614,"timestamp":1581229492415,"id":31,"parentId":19,"tags":{"page":"/api/internal/assistant"},"startTime":1777363742164,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":287356,"timestamp":1581229512777,"id":81,"parentId":35,"tags":{},"startTime":1777363742184,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":306936,"timestamp":1581229493213,"id":35,"parentId":19,"tags":{"page":"/api/internal/hooks/session"},"startTime":1777363742165,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":288628,"timestamp":1581229512487,"id":80,"parentId":34,"tags":{},"startTime":1777363742184,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":308302,"timestamp":1581229492822,"id":34,"parentId":19,"tags":{"page":"/api/internal/hooks/install"},"startTime":1777363742164,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":289262,"timestamp":1581229513085,"id":83,"parentId":38,"tags":{},"startTime":1777363742184,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":307160,"timestamp":1581229495200,"id":38,"parentId":19,"tags":{"page":"/api/internal/notifications/pending"},"startTime":1777363742167,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":288874,"timestamp":1581229516657,"id":85,"parentId":37,"tags":{},"startTime":1777363742188,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":310436,"timestamp":1581229495114,"id":37,"parentId":19,"tags":{"page":"/api/internal/hooks/upload"},"startTime":1777363742166,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":292862,"timestamp":1581229516947,"id":87,"parentId":40,"tags":{},"startTime":1777363742188,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":314525,"timestamp":1581229495307,"id":40,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/input"},"startTime":1777363742167,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":293781,"timestamp":1581229516801,"id":86,"parentId":41,"tags":{},"startTime":1777363742188,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":315247,"timestamp":1581229495353,"id":41,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/start"},"startTime":1777363742167,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":310690,"timestamp":1581229508805,"id":78,"parentId":33,"tags":{},"startTime":1777363742180,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":326769,"timestamp":1581229492751,"id":33,"parentId":19,"tags":{"page":"/api/internal/cache/[...segments]"},"startTime":1777363742164,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":306332,"timestamp":1581229513228,"id":84,"parentId":39,"tags":{},"startTime":1777363742185,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":324311,"timestamp":1581229495256,"id":39,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/buffer"},"startTime":1777363742167,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":317768,"timestamp":1581229513013,"id":82,"parentId":36,"tags":{},"startTime":1777363742184,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":337173,"timestamp":1581229493633,"id":36,"parentId":19,"tags":{"page":"/api/internal/hooks/stop"},"startTime":1777363742165,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":324867,"timestamp":1581229507839,"id":75,"parentId":30,"tags":{},"startTime":1777363742179,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":341172,"timestamp":1581229491549,"id":30,"parentId":19,"tags":{"page":"/api/internal/assistant/images"},"startTime":1777363742163,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":325309,"timestamp":1581229517705,"id":88,"parentId":50,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":339978,"timestamp":1581229503083,"id":50,"parentId":19,"tags":{"page":"/onboarding"},"startTime":1777363742174,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":332577,"timestamp":1581229517713,"id":91,"parentId":53,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":347076,"timestamp":1581229503237,"id":53,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/archive"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":335832,"timestamp":1581229517721,"id":95,"parentId":58,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":350155,"timestamp":1581229503417,"id":58,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/tasks/[taskId]"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":336893,"timestamp":1581229517709,"id":89,"parentId":51,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":351460,"timestamp":1581229503178,"id":51,"parentId":19,"tags":{"page":"/"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":340278,"timestamp":1581229517711,"id":90,"parentId":52,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":354800,"timestamp":1581229503207,"id":52,"parentId":19,"tags":{"page":"/settings"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":341114,"timestamp":1581229517725,"id":96,"parentId":49,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":355885,"timestamp":1581229502984,"id":49,"parentId":19,"tags":{"page":"/missions"},"startTime":1777363742174,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":341345,"timestamp":1581229517729,"id":97,"parentId":57,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":355726,"timestamp":1581229503364,"id":57,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/projects/[projectId]"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":353481,"timestamp":1581229517731,"id":98,"parentId":59,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":367783,"timestamp":1581229503453,"id":59,"parentId":19,"tags":{"page":"/workspaces"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":363107,"timestamp":1581229517717,"id":93,"parentId":55,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":377547,"timestamp":1581229503302,"id":55,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/notes"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":364541,"timestamp":1581229517719,"id":94,"parentId":56,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":378944,"timestamp":1581229503332,"id":56,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"is-page-static","duration":372035,"timestamp":1581229517715,"id":92,"parentId":54,"tags":{},"startTime":1777363742189,"traceId":"539ab8a30042cdf2"},{"name":"check-page","duration":386498,"timestamp":1581229503269,"id":54,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/assets"},"startTime":1777363742175,"traceId":"539ab8a30042cdf2"},{"name":"static-check","duration":406338,"timestamp":1581229483443,"id":19,"parentId":1,"tags":{},"startTime":1777363742155,"traceId":"539ab8a30042cdf2"},{"name":"write-routes-manifest","duration":252,"timestamp":1581229890682,"id":100,"parentId":1,"tags":{},"startTime":1777363742562,"traceId":"539ab8a30042cdf2"},{"name":"load-dotenv","duration":14,"timestamp":1581229897477,"id":103,"parentId":102,"tags":{},"startTime":1777363742569,"traceId":"539ab8a30042cdf2"},{"name":"run-export-path-map","duration":272,"timestamp":1581229899106,"id":104,"parentId":102,"tags":{},"startTime":1777363742570,"traceId":"539ab8a30042cdf2"},{"name":"next-export","duration":258164,"timestamp":1581229896908,"id":102,"parentId":1,"tags":{},"startTime":1777363742568,"traceId":"539ab8a30042cdf2"},{"name":"move-exported-app-not-found-","duration":402,"timestamp":1581230156298,"id":105,"parentId":101,"tags":{},"startTime":1777363742828,"traceId":"539ab8a30042cdf2"},{"name":"move-exported-app-global-error-","duration":202,"timestamp":1581230156730,"id":106,"parentId":101,"tags":{},"startTime":1777363742828,"traceId":"539ab8a30042cdf2"},{"name":"static-generation","duration":264813,"timestamp":1581229892812,"id":101,"parentId":1,"tags":{},"startTime":1777363742564,"traceId":"539ab8a30042cdf2"},{"name":"write-routes-manifest","duration":128,"timestamp":1581230157722,"id":107,"parentId":1,"tags":{},"startTime":1777363742829,"traceId":"539ab8a30042cdf2"}]
2
+ [{"name":"print-tree-view","duration":1953,"timestamp":1581230164942,"id":108,"parentId":1,"tags":{},"startTime":1777363742836,"traceId":"539ab8a30042cdf2"},{"name":"write-route-bundle-stats","duration":7226,"timestamp":1581230166911,"id":109,"parentId":1,"tags":{},"startTime":1777363742838,"traceId":"539ab8a30042cdf2"},{"name":"telemetry-flush","duration":1072702,"timestamp":1581230174148,"id":110,"parentId":1,"tags":{},"startTime":1777363742845,"traceId":"539ab8a30042cdf2"},{"name":"next-build","duration":15564557,"timestamp":1581215682346,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777363728354,"traceId":"539ab8a30042cdf2"}]
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-turbopack","duration":6324051,"timestamp":1576059401189,"id":14,"parentId":1,"tags":{},"startTime":1777358572233,"traceId":"4a59455202141294"},{"name":"turbopack-build-events","duration":42,"timestamp":1576059550865,"id":15,"parentId":1,"tags":{},"startTime":1777358572383,"traceId":"4a59455202141294"},{"name":"run-typescript","duration":6662840,"timestamp":1576065778025,"id":16,"parentId":1,"tags":{},"startTime":1777358578610,"traceId":"4a59455202141294"},{"name":"static-check","duration":503450,"timestamp":1576072490240,"id":19,"parentId":1,"tags":{},"startTime":1777358585322,"traceId":"4a59455202141294"},{"name":"static-generation","duration":254645,"timestamp":1576072997449,"id":101,"parentId":1,"tags":{},"startTime":1777358585830,"traceId":"4a59455202141294"},{"name":"telemetry-flush","duration":490338,"timestamp":1576073271787,"id":110,"parentId":1,"tags":{},"startTime":1777358586104,"traceId":"4a59455202141294"},{"name":"next-build","duration":14566525,"timestamp":1576059195615,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777358572028,"traceId":"4a59455202141294"}]
1
+ [{"name":"run-turbopack","duration":7360611,"timestamp":1581215809423,"id":14,"parentId":1,"tags":{},"startTime":1777363728481,"traceId":"539ab8a30042cdf2"},{"name":"turbopack-build-events","duration":38,"timestamp":1581215971784,"id":15,"parentId":1,"tags":{},"startTime":1777363728643,"traceId":"539ab8a30042cdf2"},{"name":"run-typescript","duration":6242952,"timestamp":1581223219204,"id":16,"parentId":1,"tags":{},"startTime":1777363735891,"traceId":"539ab8a30042cdf2"},{"name":"static-check","duration":406338,"timestamp":1581229483443,"id":19,"parentId":1,"tags":{},"startTime":1777363742155,"traceId":"539ab8a30042cdf2"},{"name":"static-generation","duration":264813,"timestamp":1581229892812,"id":101,"parentId":1,"tags":{},"startTime":1777363742564,"traceId":"539ab8a30042cdf2"},{"name":"telemetry-flush","duration":1072702,"timestamp":1581230174148,"id":110,"parentId":1,"tags":{},"startTime":1777363742845,"traceId":"539ab8a30042cdf2"},{"name":"next-build","duration":15564557,"timestamp":1581215682346,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777363728354,"traceId":"539ab8a30042cdf2"}]
package/bin/tower.mjs CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { existsSync, readFileSync, mkdirSync } from "fs";
18
18
  import { join, dirname, resolve } from "path";
19
- import { execFileSync } from "child_process";
19
+ import { execFileSync, spawnSync } from "child_process";
20
20
  import { createServer } from "http";
21
21
  import { fileURLToPath } from "url";
22
22
  import { parseArgs } from "node:util";
@@ -112,6 +112,33 @@ function run(binPath, args) {
112
112
  }
113
113
  }
114
114
 
115
+ function hasGeneratedPrismaClient() {
116
+ const probe = spawnSync(
117
+ process.execPath,
118
+ [
119
+ "-e",
120
+ "const {PrismaClient}=require('@prisma/client'); const prisma=new PrismaClient(); console.log('ok'); prisma.$disconnect();",
121
+ ],
122
+ {
123
+ cwd: PROJECT_ROOT,
124
+ env: { ...process.env, DATABASE_URL: DB_URL },
125
+ encoding: "utf-8",
126
+ }
127
+ );
128
+
129
+ if (probe.status === 0) {
130
+ return true;
131
+ }
132
+
133
+ const output = `${probe.stdout ?? ""}\n${probe.stderr ?? ""}`;
134
+ if (output.includes('@prisma/client did not initialize yet')) {
135
+ return false;
136
+ }
137
+
138
+ logError(`Prisma client check failed:\n${output.trim()}`);
139
+ process.exit(1);
140
+ }
141
+
115
142
  function needsInit() {
116
143
  return !existsSync(DB_PATH);
117
144
  }
@@ -124,6 +151,16 @@ function ensureDirs() {
124
151
  }
125
152
  }
126
153
 
154
+ function ensurePrismaClientGenerated() {
155
+ if (hasGeneratedPrismaClient()) {
156
+ return;
157
+ }
158
+
159
+ const prismaBin = resolveBin("prisma", "prisma");
160
+ log("Generating Prisma client...");
161
+ run(prismaBin, ["generate", "--schema", "prisma/schema.prisma"]);
162
+ }
163
+
127
164
  async function initDatabase() {
128
165
  const prismaBin = resolveBin("prisma", "prisma");
129
166
  const tsxBin = resolveBin("tsx", "tsx");
@@ -131,6 +168,7 @@ async function initDatabase() {
131
168
  log("Initializing Tower...");
132
169
  ensureDirs();
133
170
  log(`Data directory: ${TOWER_DIR}`);
171
+ ensurePrismaClientGenerated();
134
172
 
135
173
  log("Syncing database schema...");
136
174
  run(prismaBin, ["db", "push", "--skip-generate"]);
@@ -152,6 +190,8 @@ async function cmdMigrate() {
152
190
  }
153
191
 
154
192
  async function cmdStart() {
193
+ ensurePrismaClientGenerated();
194
+
155
195
  if (needsInit()) {
156
196
  await initDatabase();
157
197
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tower-studio",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",
5
5
  "bin": {
6
6
  "tower": "bin/tower.mjs"
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  const { execFileSync } = require("child_process");
3
- const fs = require("fs");
4
3
  const path = require("path");
5
4
 
6
5
  const packageRoot = path.join(__dirname, "..");
7
6
 
8
7
  function resolvePrismaBin() {
9
8
  const pkgJsonPath = require.resolve("prisma/package.json", { paths: [packageRoot] });
10
- const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
9
+ const pkgJson = require(pkgJsonPath);
11
10
  const binField = typeof pkgJson.bin === "string" ? pkgJson.bin : pkgJson.bin?.prisma;
12
11
 
13
12
  if (!binField) {
@@ -17,20 +16,6 @@ function resolvePrismaBin() {
17
16
  return path.resolve(path.dirname(pkgJsonPath), binField);
18
17
  }
19
18
 
20
- function hasGeneratedClient() {
21
- try {
22
- require.resolve(".prisma/client/default", { paths: [packageRoot] });
23
- return true;
24
- } catch {
25
- return false;
26
- }
27
- }
28
-
29
- if (hasGeneratedClient()) {
30
- console.log("[generate-prisma] Prisma client already generated");
31
- process.exit(0);
32
- }
33
-
34
19
  try {
35
20
  execFileSync(process.execPath, [resolvePrismaBin(), "generate", "--schema", "prisma/schema.prisma"], {
36
21
  cwd: packageRoot,
@@ -39,5 +24,5 @@ try {
39
24
  });
40
25
  } catch (error) {
41
26
  console.warn(`[generate-prisma] Failed to generate Prisma client: ${error.message}`);
42
- process.exit(0);
27
+ process.exit(1);
43
28
  }
@@ -1,3 +0,0 @@
1
- module.exports=[750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},515205,a=>{"use strict";var b=a.i(858360),c=a.i(759985),d=a.i(448287),e=a.i(59711),f=a.i(161604),g=a.i(986379),h=a.i(14180),i=a.i(584335);let j=[{key:"notes",icon:f.FileText},{key:"assets",icon:g.FolderOpen},{key:"archive",icon:h.Archive}];a.s(["SubPageNav",0,function({workspaceId:a}){let{t:f}=(0,i.useI18n)(),g=(0,d.usePathname)(),h=j.find(a=>g.includes(`/${a.key}`))?.key;return(0,b.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,b.jsxs)(c.default,{href:`/workspaces/${a}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f("archive.backToBoard")})]}),(0,b.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),j.map(d=>{let e=d.icon,g=h===d.key;return(0,b.jsxs)(c.default,{href:`/workspaces/${a}/${d.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${g?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,b.jsx)(e,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f(`sidebar.${d.key}`)})]},d.key)})]})}])},59711,a=>{"use strict";let b=(0,a.i(302856).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],59711)},468518,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},113620,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},27645,222873,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4013f3990e7ab63645a7a0eba9f894a2dead93edf5",b.callServer,void 0,b.findSourceMapURL,"createNote");a.s(["createNote",0,c],27645);let d=(0,b.createServerReference)("4031f43902bbd8a30d1aafd8c1463fca31a0ca6c2e",b.callServer,void 0,b.findSourceMapURL,"deleteNote");a.s(["deleteNote",0,d],222873)},25226,a=>{"use strict";var b=a.i(858360),c=a.i(175391),d=a.i(263973),e=a.i(109434),f=a.i(515205),g=a.i(584335),h=a.i(113620),i=a.i(27645),j=a.i(879876);let k=(0,j.createServerReference)("6092865255a76c411056db6faab43ac884694328e2",j.callServer,void 0,j.findSourceMapURL,"updateNote");var l=a.i(222873);let m=(0,j.createServerReference)("609e4a606d36feb436e29527b4809e11eb5603e6e3",j.callServer,void 0,j.findSourceMapURL,"getProjectNotes");var n=a.i(44585);function o({active:a,onSelect:c}){let{t:d}=(0,g.useI18n)();return(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,b.jsx)("button",{onClick:()=>c("all"),className:(0,n.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors","all"===a?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:d("notes.allCategories")}),h.NOTE_CATEGORIES_PRESET.map(d=>(0,b.jsx)("button",{onClick:()=>c(d),className:(0,n.cn)("rounded-lg px-3 py-1 text-xs font-medium transition-colors",a===d?"bg-primary/15 text-primary ring-1 ring-primary/20":"text-muted-foreground hover:bg-accent"),children:d},d))]})}var p=a.i(410756),q=a.i(224372),r=a.i(161604),s=a.i(468518),t=a.i(94202),u=a.i(569210),v=a.i(448709),w=a.i(238848);function x({note:a,onEdit:c,onDelete:d}){let{t:e}=(0,g.useI18n)(),f=a.content.slice(0,300);return(0,b.jsxs)("div",{className:"group relative rounded-lg border border-border bg-card p-4 transition-colors hover:border-border/80 hover:bg-accent/20",children:[(0,b.jsxs)("div",{className:"absolute right-3 top-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,b.jsx)(p.Button,{variant:"ghost",size:"icon-sm",onClick:()=>c(a),className:"text-muted-foreground","aria-label":e("notes.edit"),children:(0,b.jsx)(t.Pencil,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(p.Button,{variant:"ghost",size:"icon-sm",onClick:()=>d(a.id),className:"text-muted-foreground hover:text-rose-400","aria-label":e("notes.delete"),children:(0,b.jsx)(u.Trash2,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)("div",{className:"mb-2 pr-16",children:(0,b.jsx)("h3",{className:"truncate text-sm font-semibold text-foreground",children:a.title})}),(0,b.jsx)("span",{className:"mb-3 inline-block rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:a.category}),(0,b.jsx)("div",{className:"prose prose-sm dark:prose-invert max-h-24 overflow-hidden text-muted-foreground",children:(0,b.jsx)(v.default,{remarkPlugins:[w.default],children:f})})]})}function y({notes:a,onEdit:c,onDelete:d}){let{t:e}=(0,g.useI18n)();return 0===a.length?(0,b.jsx)(s.EmptyState,{icon:r.FileText,title:e("notes.empty"),description:e("notes.emptyHint")}):(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:a.map(a=>(0,b.jsx)(x,{note:a,onEdit:c,onDelete:d},a.id))})}var z=a.i(246962);function A({value:a,onChange:c}){return(0,b.jsxs)("div",{className:"relative grid grid-cols-2 gap-4 flex-1 min-h-64",children:[(0,b.jsx)(z.Textarea,{value:a,onChange:a=>c(a.target.value),className:"absolute inset-0 w-1/2 pr-2 resize-none font-mono text-sm border rounded-md p-3 bg-background text-foreground border-border focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Write Markdown here..."}),(0,b.jsx)("div",{className:"absolute inset-0 left-1/2 pl-2",children:(0,b.jsx)("div",{className:"h-full overflow-y-auto border rounded-md p-3 border-border prose prose-sm dark:prose-invert max-w-none",children:(0,b.jsx)(v.default,{remarkPlugins:[w.default],children:a})})})]})}a.s(["NotesPageClient",0,function({allWorkspaces:a,initialWorkspaceId:j,initialProjectId:n,initialNotes:r}){let s,t,{t:u}=(0,g.useI18n)(),[v,w]=(0,c.useTransition)(),[x,z]=(0,c.useState)(j),[B,C]=(0,c.useState)(n),[D,E]=(0,c.useState)(r),[F,G]=(0,c.useState)("all"),[H,I]=(0,c.useState)(null),[J,K]=(0,c.useState)(!1),[L,M]=(0,c.useState)(""),[N,O]=(0,c.useState)(""),[P,Q]=(0,c.useState)(h.NOTE_CATEGORIES_PRESET[3]),[R,S]=(0,c.useState)(j),[T,U]=(0,c.useState)(n),V=a.find(a=>a.id===x),W=V?.projects??[],X=a.find(a=>a.id===R),Y=X?.projects??[],Z=(0,c.useCallback)(a=>{a?w(async()=>{E(await m(a))}):E([])},[w]),$=async()=>{T&&L.trim()&&(await (0,i.createNote)({title:L.trim(),content:N,category:P,projectId:T}),K(!1),T===B&&Z(B))},_=async()=>{H&&L.trim()&&(await k(H.id,{title:L.trim(),content:N,category:P}),I(null),Z(B))},aa=async a=>{let b=D.find(b=>b.id===a);!b||confirm(u("notes.deleteConfirm",{title:b.title}))&&(await (0,l.deleteNote)(a),Z(B))},ab="all"===F?D.map(a=>({...a,updatedAt:new Date(a.updatedAt)})):D.filter(a=>a.category===F).map(a=>({...a,updatedAt:new Date(a.updatedAt)})),ac=J||null!==H;return(0,b.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,b.jsx)(f.SubPageNav,{workspaceId:x}),(0,b.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,b.jsxs)(q.Select,{value:x,onValueChange:b=>b&&(b=>{if(b===x)return;z(b);let c=a.find(a=>a.id===b),d=c?.projects[0]??null;C(d?.id??null),G("all"),Z(d?.id??null)})(b),children:[(0,b.jsx)(q.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,b.jsx)("span",{className:"truncate",children:a.find(a=>a.id===x)?.name??x})}),(0,b.jsx)(q.SelectContent,{children:a.map(a=>(0,b.jsx)(q.SelectItem,{value:a.id,children:a.name},a.id))})]}),W.length>0&&(0,b.jsxs)(q.Select,{value:B??"",onValueChange:a=>a&&void(a!==B&&(C(a),G("all"),Z(a))),children:[(0,b.jsx)(q.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,b.jsx)("span",{className:"truncate",children:(s=W.find(a=>a.id===B))?s.alias?`${s.name} (${s.alias})`:s.name:""})}),(0,b.jsx)(q.SelectContent,{children:W.map(a=>(0,b.jsxs)(q.SelectItem,{value:a.id,children:[a.name,a.alias?` (${a.alias})`:""]},a.id))})]}),!ac&&(0,b.jsxs)(p.Button,{onClick:()=>{M(""),O(""),Q(h.NOTE_CATEGORIES_PRESET[3]),S(x),U(B),I(null),K(!0)},className:"ml-auto bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(d.Plus,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:u("notes.newNote")})]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-hidden px-6 py-4 flex flex-col",children:ac?(0,b.jsxs)("div",{className:"flex flex-col gap-4 flex-1 min-h-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[!H&&(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:u("notes.workspace")}),(0,b.jsxs)(q.Select,{value:R,onValueChange:b=>b&&(b=>{if(b===R)return;S(b);let c=a.find(a=>a.id===b),d=c?.projects[0]??null;U(d?.id??null)})(b),children:[(0,b.jsx)(q.SelectTrigger,{className:"min-w-[140px] text-xs",children:(0,b.jsx)("span",{className:"truncate",children:a.find(a=>a.id===R)?.name??R})}),(0,b.jsx)(q.SelectContent,{children:a.map(a=>(0,b.jsx)(q.SelectItem,{value:a.id,children:a.name},a.id))})]})]}),!H&&Y.length>0&&(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:u("notes.project")}),(0,b.jsxs)(q.Select,{value:T??"",onValueChange:a=>a&&U(a),children:[(0,b.jsx)(q.SelectTrigger,{className:"min-w-[160px] text-xs",children:(0,b.jsx)("span",{className:"truncate",children:(t=Y.find(a=>a.id===T))?t.alias?`${t.name} (${t.alias})`:t.name:""})}),(0,b.jsx)(q.SelectContent,{children:Y.map(a=>(0,b.jsxs)(q.SelectItem,{value:a.id,children:[a.name,a.alias?` (${a.alias})`:""]},a.id))})]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("label",{className:"text-xs text-muted-foreground whitespace-nowrap",children:u("notes.categoryLabel")}),(0,b.jsxs)(q.Select,{value:P,onValueChange:a=>a&&Q(a),children:[(0,b.jsx)(q.SelectTrigger,{className:"min-w-[120px] text-xs",children:(0,b.jsx)("span",{className:"truncate",children:P})}),(0,b.jsx)(q.SelectContent,{children:h.NOTE_CATEGORIES_PRESET.map(a=>(0,b.jsx)(q.SelectItem,{value:a,children:a},a))})]})]})]}),(0,b.jsx)("input",{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:u("notes.titlePlaceholder"),className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),(0,b.jsx)(A,{value:N,onChange:O}),(0,b.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,b.jsx)(p.Button,{variant:"outline",onClick:()=>{K(!1),I(null)},children:u("notes.cancel")}),(0,b.jsx)(p.Button,{onClick:H?_:$,disabled:!L.trim()||!H&&!T,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:u("notes.save")})]})]}):(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(o,{active:F,onSelect:G}),(0,b.jsxs)("div",{className:`relative ${v?"opacity-40 pointer-events-none":""} transition-opacity`,children:[v&&(0,b.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,b.jsx)(e.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===W.length?(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:u("notes.noProject")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:u("notes.noProjectHint")})]}):(0,b.jsx)(y,{notes:ab,onEdit:a=>{M(a.title),O(a.content),Q(a.category),I(a),K(!1)},onDelete:aa})]})]})})]})}],25226)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0db_p8v._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[194135,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("7839f6340d8e220203392fedeee21e01e0831c8012",b.callServer,void 0,b.findSourceMapURL,"startPtyExecution");a.s(["startPtyExecution",0,c])},793972,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("403ff6fb6679e7d59c36b91d1641a70cef02d4b234",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c])},541566,595313,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("60d8d343d6d5c044dadeb71b8d3a7e5f3fff699d6d",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,c],541566);let d=(0,a.i(302856).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);a.s(["RotateCcw",0,d],595313)},57726,891903,a=>{"use strict";var b=a.i(65735);a.s(["CheckCircle2",()=>b.default],57726);let c=(0,a.i(302856).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);a.s(["XCircle",0,c],891903)},236413,a=>{"use strict";let b=(0,a.i(302856).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],236413)},506008,a=>{"use strict";var b=a.i(360295);a.s(["ChevronRight",()=>b.default])},769726,a=>{"use strict";let b=(0,a.i(302856).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",0,b],769726)},113620,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},27645,222873,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4013f3990e7ab63645a7a0eba9f894a2dead93edf5",b.callServer,void 0,b.findSourceMapURL,"createNote");a.s(["createNote",0,c],27645);let d=(0,b.createServerReference)("4031f43902bbd8a30d1aafd8c1463fca31a0ca6c2e",b.callServer,void 0,b.findSourceMapURL,"deleteNote");a.s(["deleteNote",0,d],222873)},48300,a=>{"use strict";var b=a.i(293785),c=a.i(256116),d=a.i(488137),e=a.i(44585);let f=(0,d.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],48300)},978113,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("4080109083f5a4d4901787d0c9ca64a3763b552df4",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},889822,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...d})}])},59711,a=>{"use strict";let b=(0,a.i(302856).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],59711)},468518,a=>{"use strict";var b=a.i(858360),c=a.i(44585);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},236345,a=>{"use strict";let b=(0,a.i(302856).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["PlayCircle",0,b],236345)},208168,319884,a=>{"use strict";let b=(0,a.i(302856).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);a.s(["Upload",0,b],208168);var c=a.i(879876);let d=(0,c.createServerReference)("405e1016a806f0737b6513e65c99049263410f5b20",c.callServer,void 0,c.findSourceMapURL,"uploadAsset");a.s(["uploadAsset",0,d],319884)},245095,a=>{"use strict";var b=a.i(879876);let c=(0,b.createServerReference)("40f5eb7f5803dd1b46b71a47e34ff8dbe539f1a5e3",b.callServer,void 0,b.findSourceMapURL,"deleteAsset");a.s(["deleteAsset",0,c])}];
2
-
3
- //# sourceMappingURL=project_f_tower_03k0qr1._.js.map
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,255779,e=>{"use strict";var t=e.i(432377),s=e.i(85212),a=e.i(309542),i=e.i(275283),n=e.i(625054),r=e.i(711296),l=e.i(831349),o=e.i(540032),c=e.i(9433),d=e.i(203529),m=e.i(330521),u=e.i(718837),g=e.i(937756),x=e.i(103295),h=e.i(863961);let p=(0,h.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 f=e.i(555159);let b=(0,h.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 j=e.i(950211),v=e.i(316403),N=e.i(996032),y=e.i(780156);let w=(0,h.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 C=e.i(909260);let k=(0,h.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"}]]),M=(0,h.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 S=e.i(946960),P=e.i(893832),T=e.i(750986),B=e.i(1156),R=e.i(919887),D=e.i(885861),L=e.i(3191),V=e.i(543485);let z=(0,V.createServerReference)("00b7bf47e3452b8d8e8894dcd22bb8e41da7341170",V.callServer,void 0,V.findSourceMapURL,"getAvailableTerminalApps");var I=e.i(874905);let H=(0,V.createServerReference)("40893ff99bb7ceb2d6956fc8f86f8cee6880c088fd",V.callServer,void 0,V.findSourceMapURL,"createPrompt"),U=(0,V.createServerReference)("60497df3d205c43d7f1947ab028bee5ddc724047eb",V.callServer,void 0,V.findSourceMapURL,"updatePrompt"),E=(0,V.createServerReference)("409abc480662dc07b5891cee50c85f506f0e29955a",V.callServer,void 0,V.findSourceMapURL,"deletePrompt"),K=(0,V.createServerReference)("60fd0a74b1f7d623d3b669f6cf4b3e32ba765e00d3",V.callServer,void 0,V.findSourceMapURL,"setDefaultPrompt"),$=(0,V.createServerReference)("00232983b637333e28e353874b7a9348d429947fe4",V.callServer,void 0,V.findSourceMapURL,"getDefaultCliProfile"),O=(0,V.createServerReference)("60dacf1279337b28a68bf965936a067462423313e2",V.callServer,void 0,V.findSourceMapURL,"updateCliProfile");function A({options:e,value:s,onChange:a}){return(0,t.jsx)("div",{className:"inline-flex rounded-lg border border-border/50 bg-muted/30 p-1 gap-0.5",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a(e.value),className:(0,g.cn)("rounded-md px-3.5 py-1.5 text-sm font-medium transition-all duration-200 cursor-pointer",s===e.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:e.label},e.value))})}function F({label:e,description:s,children:a,className:i}){return(0,t.jsxs)("div",{className:(0,g.cn)("flex items-center justify-between py-4 border-b border-border/50 last:border-0",i),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:e}),s&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:s})]}),(0,t.jsx)("div",{className:"shrink-0",children:a})]})}let q=[{id:"general",labelKey:"settings.general",descKey:"settings.generalDesc",icon:x.Settings,accent:"blue"},{id:"ai-tools",labelKey:"settings.aiTools.title",descKey:"settings.aiTools.cliVerificationDesc",icon:p,accent:"emerald"},{id:"prompts",labelKey:"settings.prompts",descKey:"settings.promptsDesc",icon:f.FileText,accent:"violet"},{id:"config",labelKey:"settings.config",descKey:"settings.configDesc",icon:b,accent:"amber"},{id:"cli-profile",labelKey:"settings.cliProfile.title",descKey:"settings.cliProfile.navDesc",icon:j.Terminal,accent:"cyan"},{id:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:v.Bell,accent:"rose"}],J={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"}},G="ai-manager:default-cli-adapter",X=[{type:"claude_local",label:"Claude Code",source:"builtin"}],_={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function Y(){let e=(0,a.useRouter)(),{t:x}=(0,n.useI18n)(),{theme:h,setTheme:p}=(0,i.useTheme)(),{locale:f,setLocale:b}=(0,n.useI18n)(),[j,v]=(0,s.useState)("general"),V=(0,s.useRef)(null),[Y,Q]=(0,s.useState)({left:0,width:0}),[W,Z]=(0,s.useState)(!1),[ee,et]=(0,s.useState)("Terminal"),[es,ea]=(0,s.useState)([]),[ei,en]=(0,s.useState)(180),[er,el]=(0,s.useState)("claude_local"),[eo,ec]=(0,s.useState)(null),[ed,em]=(0,s.useState)({}),[eu,eg]=(0,s.useState)([]),[ex,eh]=(0,s.useState)(!1),[ep,ef]=(0,s.useState)(null),[eb,ej]=(0,s.useState)(null),[ev,eN]=(0,s.useState)(""),[ey,ew]=(0,s.useState)(""),[eC,ek]=(0,s.useState)(""),[eM,eS]=(0,s.useState)([]),[eP,eT]=(0,s.useState)(null),[eB,eR]=(0,s.useState)({..._}),[eD,eL]=(0,s.useState)(!1),[eV,ez]=(0,s.useState)({..._}),[eI,eH]=(0,s.useState)(!1),[eU,eE]=(0,s.useState)(0),[eK,e$]=(0,s.useState)(null),[eO,eA]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3}),[eF,eq]=(0,s.useState)({timeoutSec:30}),[eJ,eG]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80}),[eX,e_]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[eY,eQ]=(0,s.useState)(null),[eW,eZ]=(0,s.useState)(!1),[e0,e1]=(0,s.useState)(""),[e2,e5]=(0,s.useState)(null),[e3,e4]=(0,s.useState)(""),[e8,e6]=(0,s.useState)(""),[e7,e9]=(0,s.useState)(""),[te,tt]=(0,s.useState)(""),[ts,ta]=(0,s.useState)(!0),[ti,tn]=(0,s.useState)(!0);(0,s.useEffect)(()=>Z(!0),[]),(0,s.useEffect)(()=>{(0,R.getConfigValue)("terminal.app","Terminal").then(et),(0,R.getConfigValue)("terminal.idleTimeoutSec",180).then(en),z().then(ea)},[]),(0,s.useEffect)(()=>{let e=localStorage.getItem(G);e&&el(e)},[]),(0,s.useEffect)(()=>{(0,I.getPrompts)().then(eg)},[]);let tr=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();eQ(t)}}catch{}};async function tl(){await (0,D.setConfigValue)("terminal.app",ee)}async function to(){let e=Math.max(180,ei);en(e),await (0,D.setConfigValue)("terminal.idleTimeoutSec",e)}async function tc(e){if(!eo){ec(e),em(t=>{let s={...t};return delete s[e],s});try{let t=await fetch("/api/adapters/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adapterType:e})}),s=await t.json();em(t=>({...t,[e]:s}))}catch{em(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{ec(null)}}}(0,s.useEffect)(()=>{(0,R.getConfigValue)("git.pathMappingRules",[]).then(eS),(0,R.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{e1(e.join(", "))}),tr(),(0,L.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(e=>{eA({maxUploadMb:Math.round((e["system.maxUploadBytes"]??0x3200000)/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3}),eq({timeoutSec:e["git.timeoutSec"]??30}),eG({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80}),e_({minCols:e["missions.grid.minCols"]??1,maxCols:e["missions.grid.maxCols"]??5,minRows:e["missions.grid.minRows"]??1,maxRows:e["missions.grid.maxRows"]??5})})},[]),(0,s.useEffect)(()=>{$().then(e=>{e&&(e5(e),e4(e.command),e6(function(e){try{let t=JSON.parse(e);return Array.isArray(t)?t.join("\n"):""}catch{return""}}(e.baseArgs)),e9(function(e){try{let t=JSON.parse(e);if("object"!=typeof t||Array.isArray(t)||null===t)return"";return Object.entries(t).map(([e,t])=>`${e}=${t}`).join("\n")}catch{return""}}(e.envVars))),ta(!1)})},[]),(0,s.useEffect)(()=>{(0,R.getConfigValue)("notification.enabled",!0).then(tn)},[]);let td=(0,s.useCallback)(()=>{ef(null),eN(""),ew(""),ek(""),eh(!0)},[]),tm=(0,s.useCallback)(e=>{ef(e),eN(e.name),ew(e.description??""),ek(e.content),eh(!0)},[]),tu=(0,s.useCallback)(async()=>{ev.trim()&&eC.trim()&&(ep?await U(ep.id,{name:ev.trim(),description:ey.trim()||void 0,content:eC.trim()}):await H({name:ev.trim(),description:ey.trim()||void 0,content:eC.trim()}),eh(!1),eg(await (0,I.getPrompts)()),e.refresh())},[ev,ey,eC,ep,e]),tg=(0,s.useCallback)(async()=>{eb&&(await E(eb),ej(null),eg(await (0,I.getPrompts)()),e.refresh())},[eb,e]),tx=(0,s.useCallback)(async t=>{await K(t),eg(await (0,I.getPrompts)()),e.refresh()},[e]),th=async()=>{await (0,D.setConfigValue)("system.maxUploadBytes",1024*eO.maxUploadMb*1024),await (0,D.setConfigValue)("system.maxConcurrentExecutions",eO.maxConcurrent)},tp=async()=>{await (0,D.setConfigValue)("git.timeoutSec",eF.timeoutSec)},tf=async()=>{await (0,D.setConfigValue)("search.resultLimit",eJ.resultLimit),await (0,D.setConfigValue)("search.allModeCap",eJ.allModeCap),await (0,D.setConfigValue)("search.debounceMs",eJ.debounceMs),await (0,D.setConfigValue)("search.snippetLength",eJ.snippetLength)},tb=async()=>{let e=Math.min(eX.minCols,eX.maxCols),t=Math.max(eX.minCols,eX.maxCols),s=Math.min(eX.minRows,eX.maxRows),a=Math.max(eX.minRows,eX.maxRows);e_({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,D.setConfigValue)("missions.grid.minCols",e),await (0,D.setConfigValue)("missions.grid.maxCols",t),await (0,D.setConfigValue)("missions.grid.minRows",s),await (0,D.setConfigValue)("missions.grid.maxRows",a)},tj=async()=>{let e=e0.split(",").map(e=>e.trim()).filter(Boolean);await (0,D.setConfigValue)("hooks.autoUploadTypes",e)},tv=async()=>{if(eY){eZ(!0);try{let e=eY.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await tr()}finally{eZ(!1)}}},tN=async()=>{if(!eV.host.trim()||!eV.localPathTemplate.trim())return;let e=eV.localPathTemplate.trim().replace(/\/+$/,""),t=eI?`${e}/{path}`:e,s=[...eM,{id:crypto.randomUUID(),host:eV.host.trim(),ownerMatch:eV.ownerMatch.trim()||"*",localPathTemplate:t,priority:eV.priority}];await (0,D.setConfigValue)("git.pathMappingRules",s),eS(s),ez({..._}),eH(!1),eL(!1)},ty=async e=>{if(!eB.host.trim()||!eB.localPathTemplate.trim())return;let t=eM.map(t=>t.id===e?{...t,host:eB.host.trim(),ownerMatch:eB.ownerMatch.trim()||"*",localPathTemplate:eB.localPathTemplate.trim(),priority:eB.priority}:t);await (0,D.setConfigValue)("git.pathMappingRules",t),eS(t),eT(null)},tw=async e=>{let t=eM.filter(t=>t.id!==e);await (0,D.setConfigValue)("git.pathMappingRules",t),eS(t),e$(null)},tC=(0,s.useCallback)(async()=>{if(e2){try{let e=JSON.stringify(e8.split("\n").map(e=>e.trim()).filter(Boolean)),t={};e7.split("\n").map(e=>e.trim()).filter(Boolean).forEach(e=>{let s=e.indexOf("=");if(s>0){let a=e.slice(0,s).trim(),i=e.slice(s+1).trim();t[a]=i}});let s=JSON.stringify(t);await O(e2.id,{command:e3,baseArgs:e,envVars:s}),tt("saved")}catch{tt("error")}setTimeout(()=>tt(""),2e3)}},[e2,e3,e8,e7]);async function tk(){let e=!ti;tn(e),await (0,D.setConfigValue)("notification.enabled",e)}let tM=(0,s.useCallback)(()=>{e.back()},[e]);(0,s.useEffect)(()=>{let e=V.current;if(!e)return;let t=e.querySelector(`[data-section="${j}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();Q({left:a.left-s.left,width:a.width})},[j]);let tS=q.find(e=>e.id===j),tP=tS?J[tS.accent]:J.blue;return(0,t.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,t.jsx)("div",{className:"flex-shrink-0 border-b bg-card/50 backdrop-blur-sm",children:(0,t.jsxs)("div",{className:"mx-auto max-w-5xl px-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between pb-3 pt-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:x("settings.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:x("settings.configDesc")})]}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:tM,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(N.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{ref:V,className:"relative flex gap-1 overflow-x-auto",children:[q.map(e=>{let s=e.icon,a=j===e.id,i=J[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>v(e.id),className:(0,g.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",a?`${i.text} bg-background`:"text-muted-foreground hover:text-foreground hover:bg-muted/50"),children:[(0,t.jsx)("span",{className:(0,g.cn)("flex h-6 w-6 items-center justify-center rounded-md","transition-colors duration-200",a?i.bg:"bg-transparent"),children:(0,t.jsx)(s,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("span",{children:x(e.labelKey)})]},e.id)}),(0,t.jsx)("div",{className:(0,g.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",tP.indicator),style:{left:Y.left,width:Y.width}})]})]})}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsxs)("div",{className:"mx-auto max-w-4xl px-6 py-8",children:[tS&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,g.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",tP.bg,tP.text,tP.ring),children:(0,t.jsx)(tS.icon,{className:"h-5 w-5"})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold leading-tight",children:x(tS.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:x(tS.descKey)})]})]}),(0,t.jsx)("div",{className:"mb-6 border-t"}),function(){switch(j){case"general":let e;return e=[{value:"light",label:x("settings.themeLight")},{value:"dark",label:x("settings.themeDark")},{value:"system",label:x("settings.themeSystem")}],(0,t.jsxs)("div",{className:"divide-y divide-border/50",children:[(0,t.jsx)(F,{label:x("settings.theme"),description:x("settings.themeDesc"),children:W?(0,t.jsx)(A,{options:e,value:h??"system",onChange:e=>p(e)}):(0,t.jsx)("div",{className:"inline-flex h-9 rounded-lg border border-border/50 bg-muted/30 p-1 w-[200px]"})}),(0,t.jsx)(F,{label:x("settings.language"),description:x("settings.languageDesc"),children:(0,t.jsx)(A,{options:[{value:"zh",label:"中文"},{value:"en",label:"English"}],value:f,onChange:e=>b(e)})}),(0,t.jsxs)("div",{className:"py-4 border-b border-border/50",children:[(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsxs)("div",{className:"min-w-0 flex-1 pr-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:x("settings.terminal.label")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:x("settings.terminal.desc")})]})}),(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[es.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:es.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{et(e.value),(0,D.setConfigValue)("terminal.app",e.value)},className:(0,g.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",ee===e.value?"border-foreground bg-accent text-foreground font-medium":"border-border text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:e.name},e.value))}),(0,t.jsx)("input",{type:"text",value:ee,onChange:e=>et(e.target.value),onBlur:tl,placeholder:x("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,t.jsx)(F,{label:x("settings.terminal.idleTimeout"),description:x("settings.terminal.idleTimeoutDesc"),children:(0,t.jsx)("input",{type:"number",value:ei,onChange:e=>en(Number(e.target.value)),onBlur:to,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,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:X.map(e=>{let s=er===e.type,a=eo===e.type,i=ed[e.type];return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"px-5 py-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsx)(d.Badge,{variant:"outline",children:x("label.builtin")}),s&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),x("settings.prompts.default")]}),i&&(0,t.jsx)(d.Badge,{variant:i.ok?"secondary":"destructive",className:(0,g.cn)("shrink-0",i.ok&&"bg-green-600 text-white hover:bg-green-700"),children:i.ok?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.CheckCircle2,{className:"h-3 w-3 mr-1"}),x("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.XCircle,{className:"h-3 w-3 mr-1"}),x("settings.aiTools.testFailed")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.type})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[!s&&(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{var t;el(t=e.type),localStorage.setItem(G,t)},children:[(0,t.jsx)(w,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),x("settings.prompts.setDefault")]}),(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>tc(e.type),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.Loader2,{className:"h-3.5 w-3.5 animate-spin mr-1.5"}),x("settings.aiTools.testing")]}):x("settings.aiTools.testConnection")}),"external"===e.source&&(0,t.jsx)(r.Button,{variant:"outline",size:"icon-sm",className:"h-8 w-8 text-destructive hover:text-destructive",title:x("common.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]}),i&&(0,t.jsx)("div",{className:"mt-3 rounded-md border border-border bg-muted/30 px-4 py-3",children:(0,t.jsx)("div",{className:"space-y-1.5",children:i.checks.map(s=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:(0,g.cn)("w-1.5 h-1.5 rounded-full shrink-0",s.passed?"bg-green-500":"bg-red-500")}),(0,t.jsx)("span",{className:(0,g.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.type}-${s.name}`))})})]})},e.type)})});case"prompts":return W?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(r.Button,{onClick:td,variant:"default",children:[(0,t.jsx)(y.Plus,{className:"h-4 w-4 mr-2"}),x("settings.prompts.newPrompt")]})}),0===eu.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-center rounded-lg border border-dashed border-border/50",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:x("settings.prompts.empty")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:x("settings.prompts.emptyHint")})]}):(0,t.jsx)("div",{className:"rounded-xl border border-border/50 divide-y divide-border/50",children:eu.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 hover:bg-muted/30 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.name}),e.isDefault&&(0,t.jsxs)(d.Badge,{variant:"secondary",className:"shrink-0 rounded-full text-xs",children:[(0,t.jsx)(w,{className:"h-3 w-3 mr-1 fill-yellow-400 text-yellow-400"}),x("settings.prompts.default")]})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tx(e.id),title:x("settings.prompts.setDefault"),children:(0,t.jsx)(w,{className:(0,g.cn)("h-4 w-4",e.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>tm(e),title:x("settings.prompts.editPrompt"),children:(0,t.jsx)(k,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>ej(e.id),className:"text-destructive",title:x("settings.prompts.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]},e.id))}),(0,t.jsx)(u.Dialog,{open:ex,onOpenChange:eh,children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:ep?x("settings.prompts.editPrompt"):x("settings.prompts.newPrompt")}),(0,t.jsx)(u.DialogDescription,{children:ep?x("settings.prompts.editPrompt"):x("settings.prompts.newPrompt")})]}),(0,t.jsxs)("div",{className:"space-y-4 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-name",children:x("settings.prompts.promptName")}),(0,t.jsx)(l.Input,{id:"prompt-name",value:ev,onChange:e=>eN(e.target.value),placeholder:x("settings.prompts.promptNamePlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-description",children:x("settings.prompts.promptDescription")}),(0,t.jsx)(l.Input,{id:"prompt-description",value:ey,onChange:e=>ew(e.target.value),placeholder:x("settings.prompts.promptDescriptionPlaceholder"),className:"mt-1.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Label,{htmlFor:"prompt-content",children:x("settings.prompts.promptContent")}),(0,t.jsx)(o.Textarea,{id:"prompt-content",value:eC,onChange:e=>ek(e.target.value),placeholder:x("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>eh(!1),children:x("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{onClick:tu,disabled:!ev.trim()||!eC.trim(),children:x("settings.prompts.save")})]})]})}),(0,t.jsx)(u.Dialog,{open:!!eb,onOpenChange:e=>!e&&ej(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:x("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(u.DialogDescription,{children:x("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>ej(null),children:x("settings.prompts.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:tg,children:x("settings.prompts.delete")})]})]})})]}):(0,t.jsx)("div",{className:"h-32 rounded-lg bg-muted animate-pulse"});case"config":let s,a,i;return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:x("settings.config.git.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:x("settings.config.git.desc")})]}),(0,t.jsxs)(r.Button,{onClick:()=>{ez({..._}),eL(!0)},children:[(0,t.jsx)(y.Plus,{className:"mr-2 h-4 w-4"}),x("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==eM.length||eD?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:eM.map(e=>eP===e.id?(0,t.jsxs)("li",{className:"px-5 py-4 bg-muted/20",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:x("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:eB.host,onChange:e=>eR(t=>({...t,host:e.target.value})),placeholder:x("settings.config.git.hostPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:x("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:eB.ownerMatch,onChange:e=>eR(t=>({...t,ownerMatch:e.target.value})),placeholder:x("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1 col-span-2",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:x("settings.config.git.localPathTemplate")}),(0,t.jsx)(l.Input,{value:eB.localPathTemplate,onChange:e=>eR(t=>({...t,localPathTemplate:e.target.value})),placeholder:x("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono"})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:x("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:eB.priority,onChange:e=>eR(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 mt-3",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>eT(null),children:x("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{size:"sm",onClick:()=>ty(e.id),children:x("settings.config.git.save")})]})]},e.id):(0,t.jsx)("li",{className:"group px-5 py-4 hover:bg-muted/20 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.host}),"*"!==e.ownerMatch&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",e.ownerMatch]}),(0,t.jsxs)(d.Badge,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[x("settings.config.git.priority")," ",e.priority]})]}),(0,t.jsx)("p",{className:"mt-0.5 font-mono text-xs text-muted-foreground truncate",children:e.localPathTemplate})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{eT(e.id),eR({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:e.localPathTemplate,priority:e.priority})},title:x("settings.config.git.edit"),children:(0,t.jsx)(k,{className:"h-4 w-4"})}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>e$(e.id),className:"text-destructive",title:x("settings.config.git.delete"),children:(0,t.jsx)(C.Trash2,{className:"h-4 w-4"})})]})]})},e.id))}):(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-border p-8 text-center",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:x("settings.config.git.noRules")})}),eD&&(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/20 p-5 space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:x("settings.config.git.host")}),(0,t.jsx)(l.Input,{value:eV.host,onChange:e=>ez(t=>({...t,host:e.target.value})),placeholder:x("settings.config.git.hostPlaceholder"),className:"text-sm",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:x("settings.config.git.ownerMatch")}),(0,t.jsx)(l.Input,{value:eV.ownerMatch,onChange:e=>ez(t=>({...t,ownerMatch:e.target.value})),placeholder:x("settings.config.git.ownerMatchPlaceholder"),className:"text-sm"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:x("settings.config.git.localPathTemplate")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{value:eV.localPathTemplate,onChange:e=>ez(t=>({...t,localPathTemplate:e.target.value})),placeholder:x("settings.config.git.localPathTemplatePlaceholder"),className:"text-sm font-mono flex-1"}),(0,t.jsx)("button",{type:"button",onClick:()=>eH(e=>!e),className:(0,g.cn)("shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors cursor-pointer",eI?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:"{path}"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:eI?x("onboarding.step3.pathHintFull"):x("onboarding.step3.pathHintRepo")})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-xs font-medium",children:x("settings.config.git.priority")}),(0,t.jsx)(l.Input,{type:"number",value:eV.priority,onChange:e=>ez(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),eV.localPathTemplate&&(s=eV.localPathTemplate.trim().replace(/\/+$/,""),a=eI?`${s}/{path}`:s,i=[{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,t.jsxs)("div",{className:"rounded-lg bg-muted/40 border border-border px-4 py-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:x("onboarding.step3.previewLabel")}),(0,t.jsx)("div",{className:"flex gap-1",children:i.map((e,s)=>(0,t.jsx)("button",{type:"button",onClick:()=>eE(s),className:(0,g.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",eU===s?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"),children:e.label},s))})]}),(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("p",{className:"font-mono text-[11px] text-muted-foreground truncate",children:i[eU].url}),(0,t.jsxs)("p",{className:"font-mono text-sm",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"→ "}),(0,t.jsx)("span",{className:"text-foreground font-medium",children:function(e,t){if(!e||!t)return"";let s=t.trim(),a=[],i=s.match(/^git@[^:]+:(.+)$/);if(i)a=i[1].replace(/\.git\/?$/,"").split("/").filter(Boolean);else try{let e=new URL(s);a=decodeURIComponent(e.pathname).replace(/\.git\/?$/,"").split("/").filter(Boolean)}catch{return""}if(!a.length)return"";let n=a[0],r=a[a.length-1],l=a.join("/");if(e.includes("{path}"))return e.replace("{path}",l).replace("{owner}",n).replace("{repo}",r).replace(/\/+$/,"");let o=e.replace("{owner}",n).replace("{repo}","").replace(/\/+$/,"");return`${o}/${r}`}(a,i[eU].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>eL(!1),children:x("settings.config.git.cancel")}),(0,t.jsxs)(r.Button,{size:"sm",onClick:tN,disabled:!eV.host.trim()||!eV.localPathTemplate.trim(),children:[(0,t.jsx)(M,{className:"h-3.5 w-3.5 mr-1.5"}),x("settings.config.git.save")]})]})]})]})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:x("settings.config.system.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:x("settings.config.system.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.system.maxUpload")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.system.maxUploadHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:1,max:500,value:eO.maxUploadMb,onChange:e=>eA(t=>({...t,maxUploadMb:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"MB"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.system.maxConcurrent")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.system.maxConcurrentHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eO.maxConcurrent,onChange:e=>eA(t=>({...t,maxConcurrent:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(r.Button,{onClick:th,className:"rounded-lg",children:x("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:x("settings.config.gitParams.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:x("settings.config.gitParams.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.gitParams.timeout")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.gitParams.timeoutHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:5,max:300,value:eF.timeoutSec,onChange:e=>eq(t=>({...t,timeoutSec:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"s"})]})]}),(0,t.jsx)(r.Button,{onClick:tp,className:"rounded-lg",children:x("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:x("settings.config.search.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:x("settings.config.search.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.search.resultLimit")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.search.resultLimitHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:5,max:100,value:eJ.resultLimit,onChange:e=>eG(t=>({...t,resultLimit:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.search.allModeCap")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.search.allModeCapHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:1,max:20,value:eJ.allModeCap,onChange:e=>eG(t=>({...t,allModeCap:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.search.debounceMs")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.search.debounceMsHint")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Input,{type:"number",min:50,max:1e3,value:eJ.debounceMs,onChange:e=>eG(t=>({...t,debounceMs:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"ms"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.search.snippetLength")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.search.snippetLengthHint")})]}),(0,t.jsx)(l.Input,{type:"number",min:20,max:500,value:eJ.snippetLength,onChange:e=>eG(t=>({...t,snippetLength:Number(e.target.value)})),className:"w-24 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(r.Button,{onClick:tf,className:"rounded-lg",children:x("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:x("settings.config.missions.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:x("settings.config.missions.desc")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:x("settings.config.missions.minCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eX.minCols,onChange:e=>e_(t=>({...t,minCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:x("settings.config.missions.maxCols")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eX.maxCols,onChange:e=>e_(t=>({...t,maxCols:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:x("settings.config.missions.minRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eX.minRows,onChange:e=>e_(t=>({...t,minRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium flex-1",children:x("settings.config.missions.maxRows")}),(0,t.jsx)(l.Input,{type:"number",min:1,max:10,value:eX.maxRows,onChange:e=>e_(t=>({...t,maxRows:Number(e.target.value)})),className:"w-20 text-right rounded-lg border-border/50 bg-muted/30 focus:ring-2 focus:ring-amber-500/30"})]})]}),(0,t.jsx)(r.Button,{onClick:tb,className:"rounded-lg",children:x("common.save")})]}),(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-muted/50 p-5 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:x("settings.config.hooks.title")}),(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:x("settings.config.hooks.desc")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.config.hooks.autoUploadTypes")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.hooks.autoUploadTypesHint")})]}),(0,t.jsx)(l.Input,{value:e0,onChange:e=>e1(e.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,t.jsx)(r.Button,{onClick:tj,className:"rounded-lg",children:x("common.save")}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border/50",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:eY?.installed?x("settings.config.hooks.installed"):x("settings.config.hooks.notInstalled")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:x("settings.config.hooks.installHint")})]}),(0,t.jsx)(r.Button,{variant:eY?.installed?"destructive":"default",onClick:tv,disabled:eW||!eY,className:"rounded-lg",children:eY?.installed?x("settings.config.hooks.uninstall"):x("settings.config.hooks.install")})]})]}),(0,t.jsx)(u.Dialog,{open:!!eK,onOpenChange:e=>!e&&e$(null),children:(0,t.jsxs)(u.DialogContent,{children:[(0,t.jsxs)(u.DialogHeader,{children:[(0,t.jsx)(u.DialogTitle,{children:x("settings.config.git.deleteConfirm")}),(0,t.jsx)(u.DialogDescription,{children:x("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(u.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>e$(null),children:x("settings.config.git.cancel")}),(0,t.jsx)(r.Button,{variant:"destructive",onClick:()=>eK&&tw(eK),children:x("settings.config.git.delete")})]})]})})]});case"cli-profile":return ts?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(S.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):e2?(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-2",children:(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.cliProfile.command")})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:x("settings.cliProfile.commandHint")}),(0,t.jsx)(l.Input,{type:"text",value:e3,onChange:e=>e4(e.target.value),placeholder:x("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,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.cliProfile.baseArgs")}),(0,t.jsx)(d.Badge,{variant:"secondary",className:"text-xs rounded-full px-2 py-0",children:"one per line"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:x("settings.cliProfile.baseArgsHint")}),(0,t.jsx)(o.Textarea,{value:e8,onChange:e=>e6(e.target.value),placeholder:x("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,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium",children:x("settings.cliProfile.envVars")}),(0,t.jsx)(d.Badge,{variant:"secondary",className:"text-xs rounded-full px-2 py-0",children:"KEY=VALUE per line"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mb-2",children:x("settings.cliProfile.envVarsHint")}),(0,t.jsx)(o.Textarea,{value:e7,onChange:e=>e9(e.target.value),placeholder:x("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,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)(r.Button,{onClick:tC,className:"rounded-lg",children:[(0,t.jsx)(M,{className:"h-4 w-4 mr-2"}),x("common.save")]}),"saved"===te&&(0,t.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,t.jsx)(P.Check,{className:"h-4 w-4"}),x("settings.cliProfile.saved")]}),"error"===te&&(0,t.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,t.jsx)(B.XCircle,{className:"h-4 w-4"}),x("settings.cliProfile.saveError")]})]})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:x("settings.cliProfile.noProfile")});case"notifications":return(0,t.jsx)("div",{className:"divide-y divide-border/50",children:(0,t.jsxs)("div",{className:"flex items-center justify-between py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:x("settings.notifications.enable")}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:x("settings.notifications.enableDesc")})]}),(0,t.jsx)(m.Switch,{checked:ti,onCheckedChange:tk})]})})}}()]})})]})}e.s(["default",0,function(){return(0,t.jsx)(Y,{})}],255779)}]);