tower-studio 0.1.18 → 0.1.19

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 (177) 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/cache/.tsbuildinfo +1 -1
  6. package/.next/diagnostics/route-bundle-stats.json +38 -38
  7. package/.next/fallback-build-manifest.json +3 -3
  8. package/.next/prerender-manifest.json +3 -3
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
  17. package/.next/server/app/_not-found/page/server-reference-manifest.json +25 -25
  18. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/_not-found.html +1 -1
  21. package/.next/server/app/_not-found.rsc +13 -13
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  23. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  24. package/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
  25. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  26. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  27. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  28. package/.next/server/app/index.html +1 -1
  29. package/.next/server/app/index.rsc +13 -13
  30. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  31. package/.next/server/app/index.segments/_full.segment.rsc +13 -13
  32. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  33. package/.next/server/app/index.segments/_index.segment.rsc +8 -8
  34. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  35. package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  36. package/.next/server/app/missions/page/server-reference-manifest.json +57 -57
  37. package/.next/server/app/missions/page.js +2 -2
  38. package/.next/server/app/missions/page.js.nft.json +1 -1
  39. package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  41. package/.next/server/app/onboarding/page/server-reference-manifest.json +25 -25
  42. package/.next/server/app/onboarding/page.js.nft.json +1 -1
  43. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/onboarding.html +1 -1
  45. package/.next/server/app/onboarding.rsc +15 -15
  46. package/.next/server/app/onboarding.segments/_full.segment.rsc +15 -15
  47. package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
  48. package/.next/server/app/onboarding.segments/_index.segment.rsc +8 -8
  49. package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
  50. package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  51. package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  52. package/.next/server/app/page/react-loadable-manifest.json +1 -1
  53. package/.next/server/app/page/server-reference-manifest.json +25 -25
  54. package/.next/server/app/page.js.nft.json +1 -1
  55. package/.next/server/app/page_client-reference-manifest.js +1 -1
  56. package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  57. package/.next/server/app/settings/page/server-reference-manifest.json +32 -32
  58. package/.next/server/app/settings/page.js.nft.json +1 -1
  59. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  60. package/.next/server/app/settings.html +1 -1
  61. package/.next/server/app/settings.rsc +15 -15
  62. package/.next/server/app/settings.segments/_full.segment.rsc +15 -15
  63. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  64. package/.next/server/app/settings.segments/_index.segment.rsc +8 -8
  65. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  66. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  67. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  68. package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  69. package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +81 -81
  70. package/.next/server/app/workspaces/[workspaceId]/archive/page.js +1 -1
  71. package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  72. package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  74. package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +62 -62
  75. package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  76. package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  78. package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +57 -57
  79. package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  80. package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  81. package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  82. package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +53 -53
  83. package/.next/server/app/workspaces/[workspaceId]/page.js +2 -2
  84. package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  85. package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  86. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
  87. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +25 -25
  88. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  89. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  90. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
  91. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +58 -58
  92. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +1 -1
  93. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  94. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  95. package/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
  96. package/.next/server/app/workspaces/page/server-reference-manifest.json +43 -43
  97. package/.next/server/app/workspaces/page.js.nft.json +1 -1
  98. package/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  99. package/.next/server/chunks/0uz~_next_dist_esm_build_templates_app-route_05yec2y.js +1 -1
  100. package/.next/server/chunks/[root-of-the-server]__00~8_qz._.js +1 -1
  101. package/.next/server/chunks/[root-of-the-server]__05mc_xk._.js +1 -1
  102. package/.next/server/chunks/[root-of-the-server]__0bvqbq0._.js +1 -1
  103. package/.next/server/chunks/[root-of-the-server]__0p5iuez._.js +2 -2
  104. package/.next/server/chunks/[root-of-the-server]__0rb-ear._.js +2 -2
  105. package/.next/server/chunks/[root-of-the-server]__0u4~z7h._.js +1 -1
  106. package/.next/server/chunks/[root-of-the-server]__0ze75mm._.js +1 -1
  107. package/.next/server/chunks/project_f_tower_0n1s3ym._.js +1 -1
  108. package/.next/server/chunks/project_f_tower_src_11e.cv5._.js +1 -1
  109. package/.next/server/chunks/project_f_tower_src_lib_10p8sue._.js +1 -1
  110. package/.next/server/chunks/ssr/04uy_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_01.s1p0._.js +1 -1
  111. package/.next/server/chunks/ssr/0y0r_f_tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0n4g3bn._.js +1 -1
  112. package/.next/server/chunks/ssr/{[root-of-the-server]__00_.ri0._.js → [root-of-the-server]__032ms~2._.js} +2 -2
  113. package/.next/server/chunks/ssr/[root-of-the-server]__06qzctf._.js +1 -1
  114. package/.next/server/chunks/ssr/[root-of-the-server]__0_47k-j._.js +1 -1
  115. package/.next/server/chunks/ssr/[root-of-the-server]__0aidehy._.js +1 -1
  116. package/.next/server/chunks/ssr/[root-of-the-server]__0ffdrwp._.js +1 -1
  117. package/.next/server/chunks/ssr/[root-of-the-server]__0hiekzn._.js +1 -1
  118. package/.next/server/chunks/ssr/[root-of-the-server]__0i4rk9v._.js +3 -3
  119. package/.next/server/chunks/ssr/{[root-of-the-server]__0jpbiq_._.js → [root-of-the-server]__0p21gac._.js} +2 -2
  120. package/.next/server/chunks/ssr/[root-of-the-server]__0w7gbe7._.js +1 -1
  121. package/.next/server/chunks/ssr/[root-of-the-server]__0zaw-fl._.js +1 -1
  122. package/.next/server/chunks/ssr/[root-of-the-server]__10j18zh._.js +3 -0
  123. package/.next/server/chunks/ssr/[root-of-the-server]__13eo85g._.js +1 -1
  124. package/.next/server/chunks/ssr/project_f_tower_0.txwd8._.js +1 -1
  125. package/.next/server/chunks/ssr/{project_f_tower_09re1~6._.js → project_f_tower_08rgm20._.js} +2 -2
  126. package/.next/server/chunks/ssr/project_f_tower_0f0-wva._.js +1 -1
  127. package/.next/server/chunks/ssr/{project_f_tower_0vfw8sn._.js → project_f_tower_0ge0mtj._.js} +2 -2
  128. package/.next/server/chunks/ssr/project_f_tower_0hgtev9._.js +1 -1
  129. package/.next/server/chunks/ssr/{project_f_tower_006ysi2._.js → project_f_tower_0hzcbgq._.js} +2 -2
  130. package/.next/server/chunks/ssr/project_f_tower_0h~8iz.._.js +3 -0
  131. package/.next/server/chunks/ssr/project_f_tower_0ivvjwd._.js +1 -1
  132. package/.next/server/chunks/ssr/project_f_tower_0jy~1uf._.js +1 -1
  133. package/.next/server/chunks/ssr/project_f_tower_0l6ssf8._.js +1 -1
  134. package/.next/server/chunks/ssr/project_f_tower_0o5.y1e._.js +1 -1
  135. package/.next/server/chunks/ssr/{project_f_tower_13hdtgf._.js → project_f_tower_0s1jqt5._.js} +2 -2
  136. package/.next/server/chunks/ssr/{project_f_tower_0m76uwh._.js → project_f_tower_0s~f55k._.js} +2 -2
  137. package/.next/server/chunks/ssr/project_f_tower_0w01kgd._.js +1 -1
  138. package/.next/server/chunks/ssr/project_f_tower_0ym-aea._.js +1 -1
  139. package/.next/server/chunks/ssr/{project_f_tower_src_13jw2_q._.js → project_f_tower_src_128.lqf._.js} +2 -2
  140. package/.next/server/chunks/ssr/project_f_tower_src_actions_agent-actions_ts_0.s4~m-._.js +1 -1
  141. package/.next/server/chunks/ssr/project_f_tower_src_actions_file-actions_ts_02i742t._.js +1 -1
  142. package/.next/server/chunks/ssr/project_f_tower_src_app_missions_missions-client_tsx_0ums4qx._.js +1 -1
  143. package/.next/server/chunks/ssr/project_f_tower_src_app_onboarding_page_tsx_0_9_yoq._.js +1 -1
  144. package/.next/server/chunks/ssr/project_f_tower_src_app_settings_page_tsx_0oo06~d._.js +1 -1
  145. package/.next/server/chunks/ssr/project_f_tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0jmj1xz._.js +1 -1
  146. package/.next/server/middleware-build-manifest.js +3 -3
  147. package/.next/server/pages/404.html +1 -1
  148. package/.next/server/pages/500.html +1 -1
  149. package/.next/server/server-reference-manifest.js +1 -1
  150. package/.next/server/server-reference-manifest.json +211 -211
  151. package/.next/static/chunks/{0a93fdjk-37r7.js → 0-d4licj-hata.js} +1 -1
  152. package/.next/static/chunks/{0jm.d2tvttdcy.js → 0.094wo3-wbr_.js} +1 -1
  153. package/.next/static/chunks/02myf8ud-x1x0.js +1 -0
  154. package/.next/static/chunks/{0ejd72g7tekop.js → 05.r3gya2y0_d.js} +1 -1
  155. package/.next/static/chunks/059sctu5sue65.js +1 -0
  156. package/.next/static/chunks/{0~wu849la7jq2.js → 07jb~oukvvhv~.js} +1 -1
  157. package/.next/static/chunks/{163-h-672vjtc.js → 08y-dar2a2nv~.js} +1 -1
  158. package/.next/static/chunks/{0x9x7bxnrbi1..js → 08~h~n9ldz4.q.js} +1 -1
  159. package/.next/static/chunks/0hsqm_60.b18j.js +1 -0
  160. package/.next/static/chunks/{0j3ixh~tlr2~~.js → 0ifhv76k2rmn9.js} +2 -2
  161. package/.next/static/chunks/{0x2z0sza~9erw.js → 0w-f5xcz~0~a9.js} +1 -1
  162. package/.next/static/chunks/{1068kwso1r._u.js → 0yzmd3i5vfggs.js} +1 -1
  163. package/.next/static/chunks/{14ul.txcdkz4n.js → 12m3c8he3v-d-.js} +1 -1
  164. package/.next/static/chunks/{0kjm.xm_~nzz0.js → 13yyy7cl_d5za.js} +1 -1
  165. package/.next/static/chunks/15orsd353tllt.js +1 -0
  166. package/.next/trace +2 -2
  167. package/.next/trace-build +1 -1
  168. package/package.json +1 -1
  169. package/.next/server/chunks/ssr/[root-of-the-server]__0.yn90z._.js +0 -3
  170. package/.next/server/chunks/ssr/project_f_tower_0d9_kxc._.js +0 -3
  171. package/.next/static/chunks/09mbyvk8z.wx2.js +0 -1
  172. package/.next/static/chunks/0mf6fqi52ca~q.js +0 -1
  173. package/.next/static/chunks/0vhwphmq69i0d.js +0 -1
  174. package/.next/static/chunks/17b4edxd7wg5~.js +0 -1
  175. /package/.next/static/{EMk0oZpCVYuq8amkRB5za → Jspb2q16y1AMCvOLB3nv_}/_buildManifest.js +0 -0
  176. /package/.next/static/{EMk0oZpCVYuq8amkRB5za → Jspb2q16y1AMCvOLB3nv_}/_clientMiddlewareManifest.js +0 -0
  177. /package/.next/static/{EMk0oZpCVYuq8amkRB5za → Jspb2q16y1AMCvOLB3nv_}/_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)},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)},803041,e=>{"use strict";var t=e.i(422364);e.s(["ChevronRight",()=>t.default])},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)("40c64a99851b9cf49554c71b8c97f91c24632d635b",j.callServer,void 0,j.findSourceMapURL,"completeOnboarding");var N=e.i(312687),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)},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)},803041,e=>{"use strict";var t=e.i(422364);e.s(["ChevronRight",()=>t.default])},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)("402408ec9f92a8ccc27825f3b1ca78ce2ce9e3a7bf",j.callServer,void 0,j.findSourceMapURL,"completeOnboarding");var N=e.i(479341),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 +1 @@
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),l=e.i(711296),r=e.i(831349),o=e.i(540032),c=e.i(9433),d=e.i(203529),m=e.i(330521),g=e.i(718837),u=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(316403),v=e.i(996032),N=e.i(780156);let y=(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 w=e.i(909260);let C=(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"}]]),k=(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 M=e.i(946960),S=e.i(750986),T=e.i(1156),P=e.i(730489),B=e.i(312687),R=e.i(330092),D=e.i(543485);let L=(0,D.createServerReference)("004f1a77e55d8bdf466af93a84f85dd6153e1efab6",D.callServer,void 0,D.findSourceMapURL,"getAvailableTerminalApps");var I=e.i(646917);let V=(0,D.createServerReference)("40bfb3cb79883e2768cea9b1a18d89a01e7b1f8d67",D.callServer,void 0,D.findSourceMapURL,"createPrompt"),H=(0,D.createServerReference)("6025a527a57d3023dac08fb0af1aa2c5520ddf6df5",D.callServer,void 0,D.findSourceMapURL,"updatePrompt"),U=(0,D.createServerReference)("406ebc5ada1c7d97d94766f447fdccc90b49179f6b",D.callServer,void 0,D.findSourceMapURL,"deletePrompt"),z=(0,D.createServerReference)("60535812c2ccdabf1dd33129c66bec4c80008c59d8",D.callServer,void 0,D.findSourceMapURL,"setDefaultPrompt");function E({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,u.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 K({label:e,description:s,children:a,className:i}){return(0,t.jsxs)("div",{className:(0,u.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 $=[{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:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:j.Bell,accent:"rose"}],F={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"}},q="ai-manager:default-cli-adapter",O=[{type:"claude_local",label:"Claude Code",source:"builtin"}],A={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function G(){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,D]=(0,s.useState)("general"),G=(0,s.useRef)(null),[_,X]=(0,s.useState)({left:0,width:0}),[J,Q]=(0,s.useState)(!1),[W,Y]=(0,s.useState)("Terminal"),[Z,ee]=(0,s.useState)([]),[et,es]=(0,s.useState)(180),[ea,ei]=(0,s.useState)("claude_local"),[en,el]=(0,s.useState)(null),[er,eo]=(0,s.useState)({}),[ec,ed]=(0,s.useState)([]),[em,eg]=(0,s.useState)(!1),[eu,ex]=(0,s.useState)(null),[eh,ep]=(0,s.useState)(null),[ef,eb]=(0,s.useState)(""),[ej,ev]=(0,s.useState)(""),[eN,ey]=(0,s.useState)(""),[ew,eC]=(0,s.useState)([]),[ek,eM]=(0,s.useState)(null),[eS,eT]=(0,s.useState)({...A}),[eP,eB]=(0,s.useState)(!1),[eR,eD]=(0,s.useState)({...A}),[eL,eI]=(0,s.useState)(!1),[eV,eH]=(0,s.useState)(0),[eU,ez]=(0,s.useState)(null),[eE,eK]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3}),[e$,eF]=(0,s.useState)({timeoutSec:30}),[eq,eO]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80}),[eA,eG]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[e_,eX]=(0,s.useState)(null),[eJ,eQ]=(0,s.useState)(!1),[eW,eY]=(0,s.useState)(""),[eZ,e0]=(0,s.useState)(!0);(0,s.useEffect)(()=>Q(!0),[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("terminal.app","Terminal").then(Y),(0,P.getConfigValue)("terminal.idleTimeoutSec",180).then(es),L().then(ee)},[]),(0,s.useEffect)(()=>{let e=localStorage.getItem(q);e&&ei(e)},[]),(0,s.useEffect)(()=>{(0,I.getPrompts)().then(ed)},[]);let e1=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();eX(t)}}catch{}};async function e2(){await (0,B.setConfigValue)("terminal.app",W)}async function e5(){let e=Math.max(180,et);es(e),await (0,B.setConfigValue)("terminal.idleTimeoutSec",e)}async function e3(e){if(!en){el(e),eo(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();eo(t=>({...t,[e]:s}))}catch{eo(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{el(null)}}}(0,s.useEffect)(()=>{(0,P.getConfigValue)("git.pathMappingRules",[]).then(eC),(0,P.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{eY(e.join(", "))}),e1(),(0,R.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=>{eK({maxUploadMb:Math.round((e["system.maxUploadBytes"]??0x3200000)/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3}),eF({timeoutSec:e["git.timeoutSec"]??30}),eO({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80}),eG({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)(()=>{(0,P.getConfigValue)("notification.enabled",!0).then(e0)},[]);let e4=(0,s.useCallback)(()=>{ex(null),eb(""),ev(""),ey(""),eg(!0)},[]),e8=(0,s.useCallback)(e=>{ex(e),eb(e.name),ev(e.description??""),ey(e.content),eg(!0)},[]),e7=(0,s.useCallback)(async()=>{ef.trim()&&eN.trim()&&(eu?await H(eu.id,{name:ef.trim(),description:ej.trim()||void 0,content:eN.trim()}):await V({name:ef.trim(),description:ej.trim()||void 0,content:eN.trim()}),eg(!1),ed(await (0,I.getPrompts)()),e.refresh())},[ef,ej,eN,eu,e]),e6=(0,s.useCallback)(async()=>{eh&&(await U(eh),ep(null),ed(await (0,I.getPrompts)()),e.refresh())},[eh,e]),e9=(0,s.useCallback)(async t=>{await z(t),ed(await (0,I.getPrompts)()),e.refresh()},[e]),te=async()=>{await (0,B.setConfigValue)("system.maxUploadBytes",1024*eE.maxUploadMb*1024),await (0,B.setConfigValue)("system.maxConcurrentExecutions",eE.maxConcurrent)},tt=async()=>{await (0,B.setConfigValue)("git.timeoutSec",e$.timeoutSec)},ts=async()=>{await (0,B.setConfigValue)("search.resultLimit",eq.resultLimit),await (0,B.setConfigValue)("search.allModeCap",eq.allModeCap),await (0,B.setConfigValue)("search.debounceMs",eq.debounceMs),await (0,B.setConfigValue)("search.snippetLength",eq.snippetLength)},ta=async()=>{let e=Math.min(eA.minCols,eA.maxCols),t=Math.max(eA.minCols,eA.maxCols),s=Math.min(eA.minRows,eA.maxRows),a=Math.max(eA.minRows,eA.maxRows);eG({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,B.setConfigValue)("missions.grid.minCols",e),await (0,B.setConfigValue)("missions.grid.maxCols",t),await (0,B.setConfigValue)("missions.grid.minRows",s),await (0,B.setConfigValue)("missions.grid.maxRows",a)},ti=async()=>{let e=eW.split(",").map(e=>e.trim()).filter(Boolean);await (0,B.setConfigValue)("hooks.autoUploadTypes",e)},tn=async()=>{if(e_){eQ(!0);try{let e=e_.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await e1()}finally{eQ(!1)}}},tl=async()=>{if(!eR.host.trim()||!eR.localPathTemplate.trim())return;let e=eR.localPathTemplate.trim().replace(/\/+$/,""),t=eL?`${e}/{path}`:e,s=[...ew,{id:crypto.randomUUID(),host:eR.host.trim(),ownerMatch:eR.ownerMatch.trim()||"*",localPathTemplate:t,priority:eR.priority}];await (0,B.setConfigValue)("git.pathMappingRules",s),eC(s),eD({...A}),eI(!1),eB(!1)},tr=async e=>{if(!eS.host.trim()||!eS.localPathTemplate.trim())return;let t=ew.map(t=>t.id===e?{...t,host:eS.host.trim(),ownerMatch:eS.ownerMatch.trim()||"*",localPathTemplate:eS.localPathTemplate.trim(),priority:eS.priority}:t);await (0,B.setConfigValue)("git.pathMappingRules",t),eC(t),eM(null)},to=async e=>{let t=ew.filter(t=>t.id!==e);await (0,B.setConfigValue)("git.pathMappingRules",t),eC(t),ez(null)};async function tc(){let e=!eZ;e0(e),await (0,B.setConfigValue)("notification.enabled",e)}let td=(0,s.useCallback)(()=>{e.back()},[e]);(0,s.useEffect)(()=>{let e=G.current;if(!e)return;let t=e.querySelector(`[data-section="${j}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();X({left:a.left-s.left,width:a.width})},[j]);let tm=$.find(e=>e.id===j),tg=tm?F[tm.accent]:F.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)(l.Button,{variant:"outline",onClick:td,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(v.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{ref:G,className:"relative flex gap-1 overflow-x-auto",children:[$.map(e=>{let s=e.icon,a=j===e.id,i=F[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>D(e.id),className:(0,u.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,u.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,u.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",tg.indicator),style:{left:_.left,width:_.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:[tm&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,u.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",tg.bg,tg.text,tg.ring),children:(0,t.jsx)(tm.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(tm.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:x(tm.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)(K,{label:x("settings.theme"),description:x("settings.themeDesc"),children:J?(0,t.jsx)(E,{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)(K,{label:x("settings.language"),description:x("settings.languageDesc"),children:(0,t.jsx)(E,{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:[Z.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Z.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{Y(e.value),(0,B.setConfigValue)("terminal.app",e.value)},className:(0,u.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",W===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:W,onChange:e=>Y(e.target.value),onBlur:e2,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)(K,{label:x("settings.terminal.idleTimeout"),description:x("settings.terminal.idleTimeoutDesc"),children:(0,t.jsx)("input",{type:"number",value:et,onChange:e=>es(Number(e.target.value)),onBlur:e5,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:O.map(e=>{let s=ea===e.type,a=en===e.type,i=er[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)(y,{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,u.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)(S.CheckCircle2,{className:"h-3 w-3 mr-1"}),x("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.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)(l.Button,{variant:"outline",size:"sm",onClick:()=>{var t;ei(t=e.type),localStorage.setItem(q,t)},children:[(0,t.jsx)(y,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),x("settings.prompts.setDefault")]}),(0,t.jsx)(l.Button,{variant:"outline",size:"sm",onClick:()=>e3(e.type),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.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)(l.Button,{variant:"outline",size:"icon-sm",className:"h-8 w-8 text-destructive hover:text-destructive",title:x("common.delete"),children:(0,t.jsx)(w.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,u.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,u.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.type}-${s.name}`))})})]})},e.type)})});case"prompts":return J?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(l.Button,{onClick:e4,variant:"default",children:[(0,t.jsx)(N.Plus,{className:"h-4 w-4 mr-2"}),x("settings.prompts.newPrompt")]})}),0===ec.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:ec.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)(y,{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)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>e9(e.id),title:x("settings.prompts.setDefault"),children:(0,t.jsx)(y,{className:(0,u.cn)("h-4 w-4",e.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>e8(e),title:x("settings.prompts.editPrompt"),children:(0,t.jsx)(C,{className:"h-4 w-4"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>ep(e.id),className:"text-destructive",title:x("settings.prompts.delete"),children:(0,t.jsx)(w.Trash2,{className:"h-4 w-4"})})]})]},e.id))}),(0,t.jsx)(g.Dialog,{open:em,onOpenChange:eg,children:(0,t.jsxs)(g.DialogContent,{children:[(0,t.jsxs)(g.DialogHeader,{children:[(0,t.jsx)(g.DialogTitle,{children:eu?x("settings.prompts.editPrompt"):x("settings.prompts.newPrompt")}),(0,t.jsx)(g.DialogDescription,{children:eu?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)(r.Input,{id:"prompt-name",value:ef,onChange:e=>eb(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)(r.Input,{id:"prompt-description",value:ej,onChange:e=>ev(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:eN,onChange:e=>ey(e.target.value),placeholder:x("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,t.jsxs)(g.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>eg(!1),children:x("settings.prompts.cancel")}),(0,t.jsx)(l.Button,{onClick:e7,disabled:!ef.trim()||!eN.trim(),children:x("settings.prompts.save")})]})]})}),(0,t.jsx)(g.Dialog,{open:!!eh,onOpenChange:e=>!e&&ep(null),children:(0,t.jsxs)(g.DialogContent,{children:[(0,t.jsxs)(g.DialogHeader,{children:[(0,t.jsx)(g.DialogTitle,{children:x("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(g.DialogDescription,{children:x("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(g.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>ep(null),children:x("settings.prompts.cancel")}),(0,t.jsx)(l.Button,{variant:"destructive",onClick:e6,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)(l.Button,{onClick:()=>{eD({...A}),eB(!0)},children:[(0,t.jsx)(N.Plus,{className:"mr-2 h-4 w-4"}),x("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==ew.length||eP?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ew.map(e=>ek===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)(r.Input,{value:eS.host,onChange:e=>eT(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)(r.Input,{value:eS.ownerMatch,onChange:e=>eT(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)(r.Input,{value:eS.localPathTemplate,onChange:e=>eT(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)(r.Input,{type:"number",value:eS.priority,onChange:e=>eT(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)(l.Button,{variant:"ghost",size:"sm",onClick:()=>eM(null),children:x("settings.config.git.cancel")}),(0,t.jsx)(l.Button,{size:"sm",onClick:()=>tr(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)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{eM(e.id),eT({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:e.localPathTemplate,priority:e.priority})},title:x("settings.config.git.edit"),children:(0,t.jsx)(C,{className:"h-4 w-4"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>ez(e.id),className:"text-destructive",title:x("settings.config.git.delete"),children:(0,t.jsx)(w.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")})}),eP&&(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)(r.Input,{value:eR.host,onChange:e=>eD(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)(r.Input,{value:eR.ownerMatch,onChange:e=>eD(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)(r.Input,{value:eR.localPathTemplate,onChange:e=>eD(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:()=>eI(e=>!e),className:(0,u.cn)("shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors cursor-pointer",eL?"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:eL?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)(r.Input,{type:"number",value:eR.priority,onChange:e=>eD(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),eR.localPathTemplate&&(s=eR.localPathTemplate.trim().replace(/\/+$/,""),a=eL?`${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:()=>eH(s),className:(0,u.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",eV===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[eV].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],l=a[a.length-1],r=a.join("/");if(e.includes("{path}"))return e.replace("{path}",r).replace("{owner}",n).replace("{repo}",l).replace(/\/+$/,"");let o=e.replace("{owner}",n).replace("{repo}","").replace(/\/+$/,"");return`${o}/${l}`}(a,i[eV].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",onClick:()=>eB(!1),children:x("settings.config.git.cancel")}),(0,t.jsxs)(l.Button,{size:"sm",onClick:tl,disabled:!eR.host.trim()||!eR.localPathTemplate.trim(),children:[(0,t.jsx)(k,{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)(r.Input,{type:"number",min:1,max:500,value:eE.maxUploadMb,onChange:e=>eK(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)(r.Input,{type:"number",min:1,max:10,value:eE.maxConcurrent,onChange:e=>eK(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)(l.Button,{onClick:te,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)(r.Input,{type:"number",min:5,max:300,value:e$.timeoutSec,onChange:e=>eF(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)(l.Button,{onClick:tt,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)(r.Input,{type:"number",min:5,max:100,value:eq.resultLimit,onChange:e=>eO(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)(r.Input,{type:"number",min:1,max:20,value:eq.allModeCap,onChange:e=>eO(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)(r.Input,{type:"number",min:50,max:1e3,value:eq.debounceMs,onChange:e=>eO(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)(r.Input,{type:"number",min:20,max:500,value:eq.snippetLength,onChange:e=>eO(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)(l.Button,{onClick:ts,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)(r.Input,{type:"number",min:1,max:10,value:eA.minCols,onChange:e=>eG(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)(r.Input,{type:"number",min:1,max:10,value:eA.maxCols,onChange:e=>eG(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)(r.Input,{type:"number",min:1,max:10,value:eA.minRows,onChange:e=>eG(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)(r.Input,{type:"number",min:1,max:10,value:eA.maxRows,onChange:e=>eG(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)(l.Button,{onClick:ta,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)(r.Input,{value:eW,onChange:e=>eY(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)(l.Button,{onClick:ti,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:e_?.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)(l.Button,{variant:e_?.installed?"destructive":"default",onClick:tn,disabled:eJ||!e_,className:"rounded-lg",children:e_?.installed?x("settings.config.hooks.uninstall"):x("settings.config.hooks.install")})]})]}),(0,t.jsx)(g.Dialog,{open:!!eU,onOpenChange:e=>!e&&ez(null),children:(0,t.jsxs)(g.DialogContent,{children:[(0,t.jsxs)(g.DialogHeader,{children:[(0,t.jsx)(g.DialogTitle,{children:x("settings.config.git.deleteConfirm")}),(0,t.jsx)(g.DialogDescription,{children:x("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(g.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>ez(null),children:x("settings.config.git.cancel")}),(0,t.jsx)(l.Button,{variant:"destructive",onClick:()=>eU&&to(eU),children:x("settings.config.git.delete")})]})]})})]});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:eZ,onCheckedChange:tc})]})})}}()]})})]})}e.s(["default",0,function(){return(0,t.jsx)(G,{})}],255779)}]);
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),l=e.i(711296),r=e.i(831349),o=e.i(540032),c=e.i(9433),d=e.i(203529),m=e.i(330521),g=e.i(718837),u=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(316403),v=e.i(996032),N=e.i(780156);let y=(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 w=e.i(909260);let C=(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"}]]),k=(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 M=e.i(946960),S=e.i(750986),T=e.i(1156),P=e.i(887352),B=e.i(479341),R=e.i(869379),D=e.i(543485);let L=(0,D.createServerReference)("00a143613802d70ffe8c5baf1134582334cfe30c5a",D.callServer,void 0,D.findSourceMapURL,"getAvailableTerminalApps");var I=e.i(888740);let V=(0,D.createServerReference)("407f1160355fe377ff7a85368ab1e8613771fb40d3",D.callServer,void 0,D.findSourceMapURL,"createPrompt"),H=(0,D.createServerReference)("601de894668f25f6bb8b1dc9ee5d712a5dd3ecf814",D.callServer,void 0,D.findSourceMapURL,"updatePrompt"),U=(0,D.createServerReference)("40b31a05b410ea4f459c2ad3ee2d287359426adc48",D.callServer,void 0,D.findSourceMapURL,"deletePrompt"),z=(0,D.createServerReference)("60273ea6aca5a66668014a28ba49dcae4f44c2a847",D.callServer,void 0,D.findSourceMapURL,"setDefaultPrompt");function E({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,u.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 K({label:e,description:s,children:a,className:i}){return(0,t.jsxs)("div",{className:(0,u.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 $=[{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:"notifications",labelKey:"settings.notifications.title",descKey:"settings.notifications.navDesc",icon:j.Bell,accent:"rose"}],F={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"}},q="ai-manager:default-cli-adapter",O=[{type:"claude_local",label:"Claude Code",source:"builtin"}],A={host:"",ownerMatch:"*",localPathTemplate:"",priority:0};function G(){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,D]=(0,s.useState)("general"),G=(0,s.useRef)(null),[_,X]=(0,s.useState)({left:0,width:0}),[J,Q]=(0,s.useState)(!1),[W,Y]=(0,s.useState)("Terminal"),[Z,ee]=(0,s.useState)([]),[et,es]=(0,s.useState)(180),[ea,ei]=(0,s.useState)("claude_local"),[en,el]=(0,s.useState)(null),[er,eo]=(0,s.useState)({}),[ec,ed]=(0,s.useState)([]),[em,eg]=(0,s.useState)(!1),[eu,ex]=(0,s.useState)(null),[eh,ep]=(0,s.useState)(null),[ef,eb]=(0,s.useState)(""),[ej,ev]=(0,s.useState)(""),[eN,ey]=(0,s.useState)(""),[ew,eC]=(0,s.useState)([]),[ek,eM]=(0,s.useState)(null),[eS,eT]=(0,s.useState)({...A}),[eP,eB]=(0,s.useState)(!1),[eR,eD]=(0,s.useState)({...A}),[eL,eI]=(0,s.useState)(!1),[eV,eH]=(0,s.useState)(0),[eU,ez]=(0,s.useState)(null),[eE,eK]=(0,s.useState)({maxUploadMb:50,maxConcurrent:3}),[e$,eF]=(0,s.useState)({timeoutSec:30}),[eq,eO]=(0,s.useState)({resultLimit:20,allModeCap:5,debounceMs:250,snippetLength:80}),[eA,eG]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5}),[e_,eX]=(0,s.useState)(null),[eJ,eQ]=(0,s.useState)(!1),[eW,eY]=(0,s.useState)(""),[eZ,e0]=(0,s.useState)(!0);(0,s.useEffect)(()=>Q(!0),[]),(0,s.useEffect)(()=>{(0,P.getConfigValue)("terminal.app","Terminal").then(Y),(0,P.getConfigValue)("terminal.idleTimeoutSec",180).then(es),L().then(ee)},[]),(0,s.useEffect)(()=>{let e=localStorage.getItem(q);e&&ei(e)},[]),(0,s.useEffect)(()=>{(0,I.getPrompts)().then(ed)},[]);let e1=async()=>{try{let e=await fetch("/api/internal/hooks/install");if(e.ok){let t=await e.json();eX(t)}}catch{}};async function e2(){await (0,B.setConfigValue)("terminal.app",W)}async function e5(){let e=Math.max(180,et);es(e),await (0,B.setConfigValue)("terminal.idleTimeoutSec",e)}async function e3(e){if(!en){el(e),eo(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();eo(t=>({...t,[e]:s}))}catch{eo(t=>({...t,[e]:{ok:!1,checks:[{name:"network_error",passed:!1,message:"Network request failed"}]}}))}finally{el(null)}}}(0,s.useEffect)(()=>{(0,P.getConfigValue)("git.pathMappingRules",[]).then(eC),(0,P.getConfigValue)("hooks.autoUploadTypes",["png","jpg","jpeg","gif","webp","svg","pdf","md","txt","json"]).then(e=>{eY(e.join(", "))}),e1(),(0,R.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=>{eK({maxUploadMb:Math.round((e["system.maxUploadBytes"]??0x3200000)/1024/1024),maxConcurrent:e["system.maxConcurrentExecutions"]??3}),eF({timeoutSec:e["git.timeoutSec"]??30}),eO({resultLimit:e["search.resultLimit"]??20,allModeCap:e["search.allModeCap"]??5,debounceMs:e["search.debounceMs"]??250,snippetLength:e["search.snippetLength"]??80}),eG({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)(()=>{(0,P.getConfigValue)("notification.enabled",!0).then(e0)},[]);let e4=(0,s.useCallback)(()=>{ex(null),eb(""),ev(""),ey(""),eg(!0)},[]),e8=(0,s.useCallback)(e=>{ex(e),eb(e.name),ev(e.description??""),ey(e.content),eg(!0)},[]),e7=(0,s.useCallback)(async()=>{ef.trim()&&eN.trim()&&(eu?await H(eu.id,{name:ef.trim(),description:ej.trim()||void 0,content:eN.trim()}):await V({name:ef.trim(),description:ej.trim()||void 0,content:eN.trim()}),eg(!1),ed(await (0,I.getPrompts)()),e.refresh())},[ef,ej,eN,eu,e]),e6=(0,s.useCallback)(async()=>{eh&&(await U(eh),ep(null),ed(await (0,I.getPrompts)()),e.refresh())},[eh,e]),e9=(0,s.useCallback)(async t=>{await z(t),ed(await (0,I.getPrompts)()),e.refresh()},[e]),te=async()=>{await (0,B.setConfigValue)("system.maxUploadBytes",1024*eE.maxUploadMb*1024),await (0,B.setConfigValue)("system.maxConcurrentExecutions",eE.maxConcurrent)},tt=async()=>{await (0,B.setConfigValue)("git.timeoutSec",e$.timeoutSec)},ts=async()=>{await (0,B.setConfigValue)("search.resultLimit",eq.resultLimit),await (0,B.setConfigValue)("search.allModeCap",eq.allModeCap),await (0,B.setConfigValue)("search.debounceMs",eq.debounceMs),await (0,B.setConfigValue)("search.snippetLength",eq.snippetLength)},ta=async()=>{let e=Math.min(eA.minCols,eA.maxCols),t=Math.max(eA.minCols,eA.maxCols),s=Math.min(eA.minRows,eA.maxRows),a=Math.max(eA.minRows,eA.maxRows);eG({minCols:e,maxCols:t,minRows:s,maxRows:a}),await (0,B.setConfigValue)("missions.grid.minCols",e),await (0,B.setConfigValue)("missions.grid.maxCols",t),await (0,B.setConfigValue)("missions.grid.minRows",s),await (0,B.setConfigValue)("missions.grid.maxRows",a)},ti=async()=>{let e=eW.split(",").map(e=>e.trim()).filter(Boolean);await (0,B.setConfigValue)("hooks.autoUploadTypes",e)},tn=async()=>{if(e_){eQ(!0);try{let e=e_.installed?"DELETE":"POST";await fetch("/api/internal/hooks/install",{method:e}),await e1()}finally{eQ(!1)}}},tl=async()=>{if(!eR.host.trim()||!eR.localPathTemplate.trim())return;let e=eR.localPathTemplate.trim().replace(/\/+$/,""),t=eL?`${e}/{path}`:e,s=[...ew,{id:crypto.randomUUID(),host:eR.host.trim(),ownerMatch:eR.ownerMatch.trim()||"*",localPathTemplate:t,priority:eR.priority}];await (0,B.setConfigValue)("git.pathMappingRules",s),eC(s),eD({...A}),eI(!1),eB(!1)},tr=async e=>{if(!eS.host.trim()||!eS.localPathTemplate.trim())return;let t=ew.map(t=>t.id===e?{...t,host:eS.host.trim(),ownerMatch:eS.ownerMatch.trim()||"*",localPathTemplate:eS.localPathTemplate.trim(),priority:eS.priority}:t);await (0,B.setConfigValue)("git.pathMappingRules",t),eC(t),eM(null)},to=async e=>{let t=ew.filter(t=>t.id!==e);await (0,B.setConfigValue)("git.pathMappingRules",t),eC(t),ez(null)};async function tc(){let e=!eZ;e0(e),await (0,B.setConfigValue)("notification.enabled",e)}let td=(0,s.useCallback)(()=>{e.back()},[e]);(0,s.useEffect)(()=>{let e=G.current;if(!e)return;let t=e.querySelector(`[data-section="${j}"]`);if(!t)return;let s=e.getBoundingClientRect(),a=t.getBoundingClientRect();X({left:a.left-s.left,width:a.width})},[j]);let tm=$.find(e=>e.id===j),tg=tm?F[tm.accent]:F.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)(l.Button,{variant:"outline",onClick:td,className:"gap-1.5 bg-card shadow-sm cursor-pointer",children:[(0,t.jsx)(v.X,{className:"h-3.5 w-3.5"}),"ESC"]})]}),(0,t.jsxs)("div",{ref:G,className:"relative flex gap-1 overflow-x-auto",children:[$.map(e=>{let s=e.icon,a=j===e.id,i=F[e.accent];return(0,t.jsxs)("button",{"data-section":e.id,onClick:()=>D(e.id),className:(0,u.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,u.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,u.cn)("absolute bottom-0 h-0.5 rounded-full","transition-all duration-250 ease-out",tg.indicator),style:{left:_.left,width:_.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:[tm&&(0,t.jsxs)("div",{className:"mb-6 flex items-start gap-4",children:[(0,t.jsx)("div",{className:(0,u.cn)("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl","ring-1",tg.bg,tg.text,tg.ring),children:(0,t.jsx)(tm.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(tm.labelKey)}),(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:x(tm.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)(K,{label:x("settings.theme"),description:x("settings.themeDesc"),children:J?(0,t.jsx)(E,{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)(K,{label:x("settings.language"),description:x("settings.languageDesc"),children:(0,t.jsx)(E,{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:[Z.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Z.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{Y(e.value),(0,B.setConfigValue)("terminal.app",e.value)},className:(0,u.cn)("rounded-lg border px-3.5 py-1.5 text-xs font-medium transition-all duration-200 cursor-pointer",W===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:W,onChange:e=>Y(e.target.value),onBlur:e2,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)(K,{label:x("settings.terminal.idleTimeout"),description:x("settings.terminal.idleTimeoutDesc"),children:(0,t.jsx)("input",{type:"number",value:et,onChange:e=>es(Number(e.target.value)),onBlur:e5,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:O.map(e=>{let s=ea===e.type,a=en===e.type,i=er[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)(y,{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,u.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)(S.CheckCircle2,{className:"h-3 w-3 mr-1"}),x("settings.aiTools.testPassed")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T.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)(l.Button,{variant:"outline",size:"sm",onClick:()=>{var t;ei(t=e.type),localStorage.setItem(q,t)},children:[(0,t.jsx)(y,{className:"h-3.5 w-3.5 mr-1.5 text-muted-foreground"}),x("settings.prompts.setDefault")]}),(0,t.jsx)(l.Button,{variant:"outline",size:"sm",onClick:()=>e3(e.type),disabled:a,children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.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)(l.Button,{variant:"outline",size:"icon-sm",className:"h-8 w-8 text-destructive hover:text-destructive",title:x("common.delete"),children:(0,t.jsx)(w.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,u.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,u.cn)(s.passed?"text-foreground":"text-red-700 dark:text-red-300"),children:s.message})]},`${e.type}-${s.name}`))})})]})},e.type)})});case"prompts":return J?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(l.Button,{onClick:e4,variant:"default",children:[(0,t.jsx)(N.Plus,{className:"h-4 w-4 mr-2"}),x("settings.prompts.newPrompt")]})}),0===ec.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:ec.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)(y,{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)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>e9(e.id),title:x("settings.prompts.setDefault"),children:(0,t.jsx)(y,{className:(0,u.cn)("h-4 w-4",e.isDefault?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>e8(e),title:x("settings.prompts.editPrompt"),children:(0,t.jsx)(C,{className:"h-4 w-4"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>ep(e.id),className:"text-destructive",title:x("settings.prompts.delete"),children:(0,t.jsx)(w.Trash2,{className:"h-4 w-4"})})]})]},e.id))}),(0,t.jsx)(g.Dialog,{open:em,onOpenChange:eg,children:(0,t.jsxs)(g.DialogContent,{children:[(0,t.jsxs)(g.DialogHeader,{children:[(0,t.jsx)(g.DialogTitle,{children:eu?x("settings.prompts.editPrompt"):x("settings.prompts.newPrompt")}),(0,t.jsx)(g.DialogDescription,{children:eu?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)(r.Input,{id:"prompt-name",value:ef,onChange:e=>eb(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)(r.Input,{id:"prompt-description",value:ej,onChange:e=>ev(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:eN,onChange:e=>ey(e.target.value),placeholder:x("settings.prompts.promptContentPlaceholder"),rows:8,className:"mt-1.5 font-mono text-sm"})]})]}),(0,t.jsxs)(g.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>eg(!1),children:x("settings.prompts.cancel")}),(0,t.jsx)(l.Button,{onClick:e7,disabled:!ef.trim()||!eN.trim(),children:x("settings.prompts.save")})]})]})}),(0,t.jsx)(g.Dialog,{open:!!eh,onOpenChange:e=>!e&&ep(null),children:(0,t.jsxs)(g.DialogContent,{children:[(0,t.jsxs)(g.DialogHeader,{children:[(0,t.jsx)(g.DialogTitle,{children:x("settings.prompts.deleteConfirmTitle")}),(0,t.jsx)(g.DialogDescription,{children:x("settings.prompts.deleteConfirmMessage")})]}),(0,t.jsxs)(g.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>ep(null),children:x("settings.prompts.cancel")}),(0,t.jsx)(l.Button,{variant:"destructive",onClick:e6,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)(l.Button,{onClick:()=>{eD({...A}),eB(!0)},children:[(0,t.jsx)(N.Plus,{className:"mr-2 h-4 w-4"}),x("settings.config.git.addRule")]})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[0!==ew.length||eP?(0,t.jsx)("ul",{className:"divide-y rounded-xl border border-border bg-card",children:ew.map(e=>ek===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)(r.Input,{value:eS.host,onChange:e=>eT(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)(r.Input,{value:eS.ownerMatch,onChange:e=>eT(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)(r.Input,{value:eS.localPathTemplate,onChange:e=>eT(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)(r.Input,{type:"number",value:eS.priority,onChange:e=>eT(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)(l.Button,{variant:"ghost",size:"sm",onClick:()=>eM(null),children:x("settings.config.git.cancel")}),(0,t.jsx)(l.Button,{size:"sm",onClick:()=>tr(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)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{eM(e.id),eT({host:e.host,ownerMatch:e.ownerMatch,localPathTemplate:e.localPathTemplate,priority:e.priority})},title:x("settings.config.git.edit"),children:(0,t.jsx)(C,{className:"h-4 w-4"})}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon-sm",onClick:()=>ez(e.id),className:"text-destructive",title:x("settings.config.git.delete"),children:(0,t.jsx)(w.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")})}),eP&&(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)(r.Input,{value:eR.host,onChange:e=>eD(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)(r.Input,{value:eR.ownerMatch,onChange:e=>eD(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)(r.Input,{value:eR.localPathTemplate,onChange:e=>eD(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:()=>eI(e=>!e),className:(0,u.cn)("shrink-0 rounded-full px-2.5 py-1 text-[11px] font-mono font-medium transition-colors cursor-pointer",eL?"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:eL?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)(r.Input,{type:"number",value:eR.priority,onChange:e=>eD(t=>({...t,priority:Number(e.target.value)})),className:"text-sm w-24"})]}),eR.localPathTemplate&&(s=eR.localPathTemplate.trim().replace(/\/+$/,""),a=eL?`${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:()=>eH(s),className:(0,u.cn)("rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors cursor-pointer",eV===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[eV].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],l=a[a.length-1],r=a.join("/");if(e.includes("{path}"))return e.replace("{path}",r).replace("{owner}",n).replace("{repo}",l).replace(/\/+$/,"");let o=e.replace("{owner}",n).replace("{repo}","").replace(/\/+$/,"");return`${o}/${l}`}(a,i[eV].url)})]})]})]})),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(l.Button,{variant:"ghost",size:"sm",onClick:()=>eB(!1),children:x("settings.config.git.cancel")}),(0,t.jsxs)(l.Button,{size:"sm",onClick:tl,disabled:!eR.host.trim()||!eR.localPathTemplate.trim(),children:[(0,t.jsx)(k,{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)(r.Input,{type:"number",min:1,max:500,value:eE.maxUploadMb,onChange:e=>eK(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)(r.Input,{type:"number",min:1,max:10,value:eE.maxConcurrent,onChange:e=>eK(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)(l.Button,{onClick:te,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)(r.Input,{type:"number",min:5,max:300,value:e$.timeoutSec,onChange:e=>eF(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)(l.Button,{onClick:tt,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)(r.Input,{type:"number",min:5,max:100,value:eq.resultLimit,onChange:e=>eO(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)(r.Input,{type:"number",min:1,max:20,value:eq.allModeCap,onChange:e=>eO(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)(r.Input,{type:"number",min:50,max:1e3,value:eq.debounceMs,onChange:e=>eO(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)(r.Input,{type:"number",min:20,max:500,value:eq.snippetLength,onChange:e=>eO(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)(l.Button,{onClick:ts,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)(r.Input,{type:"number",min:1,max:10,value:eA.minCols,onChange:e=>eG(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)(r.Input,{type:"number",min:1,max:10,value:eA.maxCols,onChange:e=>eG(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)(r.Input,{type:"number",min:1,max:10,value:eA.minRows,onChange:e=>eG(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)(r.Input,{type:"number",min:1,max:10,value:eA.maxRows,onChange:e=>eG(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)(l.Button,{onClick:ta,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)(r.Input,{value:eW,onChange:e=>eY(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)(l.Button,{onClick:ti,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:e_?.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)(l.Button,{variant:e_?.installed?"destructive":"default",onClick:tn,disabled:eJ||!e_,className:"rounded-lg",children:e_?.installed?x("settings.config.hooks.uninstall"):x("settings.config.hooks.install")})]})]}),(0,t.jsx)(g.Dialog,{open:!!eU,onOpenChange:e=>!e&&ez(null),children:(0,t.jsxs)(g.DialogContent,{children:[(0,t.jsxs)(g.DialogHeader,{children:[(0,t.jsx)(g.DialogTitle,{children:x("settings.config.git.deleteConfirm")}),(0,t.jsx)(g.DialogDescription,{children:x("settings.config.git.deleteConfirmMessage")})]}),(0,t.jsxs)(g.DialogFooter,{children:[(0,t.jsx)(l.Button,{variant:"outline",onClick:()=>ez(null),children:x("settings.config.git.cancel")}),(0,t.jsx)(l.Button,{variant:"destructive",onClick:()=>eU&&to(eU),children:x("settings.config.git.delete")})]})]})})]});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:eZ,onCheckedChange:tc})]})})}}()]})})]})}e.s(["default",0,function(){return(0,t.jsx)(G,{})}],255779)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869379,e=>{"use strict";var t=e.i(543485);let s=(0,t.createServerReference)("4013418b6eb924796e5ba9c335f6c2bdd43cdffca8",t.callServer,void 0,t.findSourceMapURL,"getConfigValues");e.s(["getConfigValues",0,s])},726111,e=>{"use strict";var t=e.i(432377),s=e.i(937756);e.s(["EmptyState",0,function({icon:e,title:r,description:a,action:i,className:n}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",n),children:[e&&(0,t.jsx)(e,{className:"h-10 w-10 text-muted-foreground/40"}),(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:r}),a&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:a}),i&&(0,t.jsx)("div",{className:"mt-2",children:i})]})}])},203529,e=>{"use strict";var t=e.i(337590),s=e.i(793988),r=e.i(164688),a=e.i(937756);let i=(0,r.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"}});e.s(["Badge",0,function({className:e,variant:r="default",render:n,...l}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,a.cn)(i({variant:r}),e)},l),render:n,state:{slot:"badge",variant:r}},(0,s.useRenderElement)(o.defaultTagName??"div",o,o)}],203529)},82513,e=>{"use strict";var t=e.i(543485);let s=(0,t.createServerReference)("409d276af9507cf3ce16c99f1e007b274674ed8587",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,s])},445054,e=>{"use strict";var t=e.i(543485);let s=(0,t.createServerReference)("7824656e82d6a4167268f5bd9b52b660bd49751db1",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,s])},122679,351101,e=>{"use strict";var t=e.i(543485);let s=(0,t.createServerReference)("604e62dc720e397ef1a064dc1dadbcd289b7718853",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,s],122679);let r=(0,e.i(863961).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"}]]);e.s(["RotateCcw",0,r],351101)},349413,e=>{"use strict";var t=e.i(543485);let s=(0,t.createServerReference)("4092b2aec8433ee48de3a2a69ca9a055eedf4df4ca",t.callServer,void 0,t.findSourceMapURL,"openInTerminal");e.s(["openInTerminal",0,s])},877938,e=>{"use strict";var t=e.i(432377),s=e.i(85212),r=e.i(625054),a=e.i(543485);let i=(0,a.createServerReference)("00e65273fbac412d34cda8187473de97aa07e52d01",a.callServer,void 0,a.findSourceMapURL,"getActiveExecutionsAcrossWorkspaces");var n=e.i(82513);let l=[{id:"1x1",label:"1×1",cols:1,rows:1,minHeight:"480px",desc:"Focus mode"},{id:"2x1",label:"2×1",cols:2,rows:1,minHeight:"480px",desc:"Side by side"},{id:"3x2",label:"3×2",cols:3,rows:2,minHeight:"300px",desc:"Default"},{id:"2x2",label:"2×2",cols:2,rows:2,minHeight:"300px",desc:"Balanced"},{id:"4x2",label:"4×2",cols:4,rows:2,minHeight:"240px",desc:"Wide monitor"},{id:"3x3",label:"3×3",cols:3,rows:3,minHeight:"240px",desc:"Max overview"}];var o=e.i(610874),c=e.i(711296),d=e.i(726111),u=e.i(863961);let m=(0,u.default)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);var x=e.i(869379);function h({cols:e,rows:s,active:r}){let a=Array.from({length:e*s});return(0,t.jsx)("div",{className:`grid gap-[1px] w-7 h-5 p-[3px] rounded-sm border shrink-0 ${r?"border-primary bg-primary/10":"border-border bg-muted"}`,style:{gridTemplateColumns:`repeat(${e}, 1fr)`,gridTemplateRows:`repeat(${s}, 1fr)`},children:a.map((e,s)=>(0,t.jsx)("div",{className:`rounded-[1px] min-w-0 min-h-0 ${r?"bg-primary":"bg-muted-foreground/40"}`},s))})}let p="custom";function f({value:e,customValue:a,onChange:i}){let{t:n}=(0,r.useI18n)(),[o,d]=(0,s.useState)(!1),u=(0,s.useRef)(null),m=e===p,g=m?null:l.find(t=>t.id===e)??l[2],[v,b]=(0,s.useState)(a?.cols??2),[j,w]=(0,s.useState)(a?.rows??2),[y,k]=(0,s.useState)({minCols:1,maxCols:5,minRows:1,maxRows:5});(0,s.useEffect)(()=>{(0,x.getConfigValues)(["missions.grid.minCols","missions.grid.maxCols","missions.grid.minRows","missions.grid.maxRows"]).then(e=>{k({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)(()=>{a&&(b(a.cols),w(a.rows))},[a?.cols,a?.rows]),(0,s.useEffect)(()=>{if(o)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){u.current&&!u.current.contains(e.target)&&d(!1)}},[o]);let N=(e,t,s)=>Math.max(t,Math.min(s,e)),S=m?v:g?.cols??2,I=m?j:g?.rows??2,C=m?`${v}\xd7${j}`:g?.label??"";return(0,t.jsxs)("div",{ref:u,className:"relative",children:[(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>d(e=>!e),className:"gap-2",children:[(0,t.jsx)(h,{cols:S,rows:I,active:!1}),(0,t.jsx)("span",{children:C}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"▼"})]}),o&&(0,t.jsxs)("div",{className:"absolute right-0 z-50 mt-1 w-72 rounded-lg border border-border bg-popover shadow-xl p-3",children:[(0,t.jsx)("h5",{className:"text-sm font-semibold text-foreground mb-3",children:n("missions.gridPreset")}),(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[l.map(s=>{let r=s.id===e;return(0,t.jsxs)("button",{onClick:()=>{i(s.id),d(!1)},className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors ${r?"bg-primary/10":"hover:bg-accent"}`,children:[(0,t.jsx)(h,{cols:s.cols,rows:s.rows,active:r}),(0,t.jsx)("span",{className:`text-sm font-medium flex-1 text-left ${r?"text-primary":"text-foreground"}`,children:s.label}),(0,t.jsx)("span",{className:`text-xs ${r?"text-primary/60":"text-muted-foreground"}`,children:s.desc})]},s.id)}),(0,t.jsxs)("div",{className:"mt-1 border-t border-border pt-2",children:[(0,t.jsxs)("button",{onClick:()=>{m||i(p,{cols:v,rows:j})},className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors w-full ${m?"bg-primary/10":"hover:bg-accent"}`,children:[(0,t.jsx)(h,{cols:v,rows:j,active:m}),(0,t.jsx)("span",{className:`text-sm font-medium flex-1 text-left ${m?"text-primary":"text-foreground"}`,children:n("missions.gridCustom")}),(0,t.jsxs)("span",{className:`text-xs ${m?"text-primary/60":"text-muted-foreground"}`,children:[v,"×",j]})]}),m&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:n("missions.gridCols")}),(0,t.jsx)("input",{type:"number",min:y.minCols,max:y.maxCols,value:v,onChange:e=>{let t;b(t=N(Number(e.target.value),y.minCols,y.maxCols)),i(p,{cols:t,rows:j})},className:"h-7 w-14 rounded-md border border-border bg-background px-2 text-sm text-center"})]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"×"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:n("missions.gridRows")}),(0,t.jsx)("input",{type:"number",min:y.minRows,max:y.maxRows,value:j,onChange:e=>{let t;w(t=N(Number(e.target.value),y.minRows,y.maxRows)),i(p,{cols:v,rows:t})},className:"h-7 w-14 rounded-md border border-border bg-background px-2 text-sm text-center"})]})]})]})]})]})]})}var g=e.i(139302),v=e.i(254059),b=e.i(415411),j=e.i(309542),w=e.i(280121);let y=(0,u.default)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),k=(0,u.default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);var N=e.i(996032);let S=(0,u.default)("square-terminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);var I=e.i(11915),C=e.i(203529),R=e.i(349413),T=e.i(286302);let E=(0,b.default)(()=>e.A(172854).then(e=>e.TaskTerminal),{loadableGenerated:{modules:[467005]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"h-full w-full bg-[#0a0a0a] animate-pulse"})});function M({execution:e,isRemoving:a,removeReason:i,onStop:n,onSessionEnd:l}){let{t:o}=(0,r.useI18n)(),d=(0,j.useRouter)(),{attributes:u,listeners:m,setNodeRef:x,transform:h,transition:p}=(0,v.useSortable)({id:e.executionId}),f={transform:w.CSS.Transform.toString(h),transition:p,opacity:+!a},[g,b]=(0,s.useState)(()=>e.startedAt?Math.floor((Date.now()-new Date(e.startedAt).getTime())/1e3):0);(0,s.useEffect)(()=>{if(a)return;let t=setInterval(()=>{b(e.startedAt?Math.floor((Date.now()-new Date(e.startedAt).getTime())/1e3):0)},1e3);return()=>clearInterval(t)},[e.startedAt,a]);let L=Math.floor(g/60),P=`${L}m ${g%60}s`;async function A(){if(e.projectLocalPath)try{await (0,R.openInTerminal)(e.projectLocalPath)}catch{T.toast.error(o("preview.terminalError"))}}return(0,t.jsxs)("div",{ref:x,style:f,className:"border border-border rounded-lg overflow-hidden flex flex-col transition-opacity duration-300",...u,children:[(0,t.jsxs)("div",{className:"h-10 px-3 flex items-center gap-1 border-b border-border bg-card shrink-0",children:[(0,t.jsx)("button",{...m,"aria-label":o("missions.dragHandle"),"aria-roledescription":"sortable",className:"cursor-grab text-muted-foreground hover:text-foreground mr-1",children:(0,t.jsx)(y,{className:"h-3.5 w-3.5"})}),(0,t.jsxs)("span",{className:"text-[11px] text-muted-foreground truncate flex-1",children:[e.workspaceName," ›"," ",e.projectAlias||e.projectName," ›"," ",(0,t.jsx)("span",{className:"text-foreground font-semibold",children:e.taskTitle})]}),a?(0,t.jsx)(C.Badge,{variant:"outline",className:"text-[11px] text-muted-foreground bg-muted ml-1 shrink-0",children:"stopped"===i?o("missions.statusStopped"):o("missions.statusCompleted")}):(0,t.jsx)(C.Badge,{variant:"outline",className:"text-[11px] text-primary border-primary/30 bg-primary/10 ml-1 shrink-0",children:o("missions.statusRunning")}),(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground ml-1 shrink-0",children:P}),e.projectLocalPath&&(0,t.jsxs)(I.Tooltip,{children:[(0,t.jsx)(I.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"ml-1 shrink-0 text-muted-foreground",onClick:A}),children:(0,t.jsx)(S,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(I.TooltipContent,{children:o("missions.openInTerminal")})]}),(0,t.jsxs)(I.Tooltip,{children:[(0,t.jsx)(I.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"ghost",size:"icon",className:"ml-1 shrink-0 text-muted-foreground",onClick:()=>d.push(`/workspaces/${e.workspaceId}/tasks/${e.taskId}`)}),children:(0,t.jsx)(k,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(I.TooltipContent,{children:o("missions.openFullView")})]}),(0,t.jsxs)(I.Tooltip,{children:[(0,t.jsx)(I.TooltipTrigger,{render:(0,t.jsx)(c.Button,{variant:"destructive",size:"icon",className:"ml-1 shrink-0",onClick:()=>n(e.taskId),disabled:a}),children:(0,t.jsx)(N.X,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(I.TooltipContent,{children:o("missions.stopTask")})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,t.jsx)(E,{taskId:e.taskId,worktreePath:e.worktreePath??e.projectLocalPath,onSessionEnd:t=>l?.(e.taskId,t),useCanvasRenderer:!0})})]})}let L=(0,a.createServerReference)("401126298d4c00f18366cf428b331b2424b6858c87",a.callServer,void 0,a.findSourceMapURL,"getWorkspacesWithRecentTasks"),P=(0,a.createServerReference)("409646a78d53848f6b9284e6c46f78a8f16a148872",a.callServer,void 0,a.findSourceMapURL,"getProjectTasks");var A=e.i(445054),O=e.i(122679),$=e.i(718837);let D=(0,u.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var B=e.i(351101),H=e.i(142124);let z={TODO:"TODO",IN_PROGRESS:"Running",IN_REVIEW:"Review"},V={LOW:"Low",MEDIUM:"Med",HIGH:"High",CRITICAL:"Crit"};function U({status:e}){return(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-medium ${{TODO:"bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400",IN_PROGRESS:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",IN_REVIEW:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"}[e]??"bg-slate-100 text-slate-600"}`,children:z[e]??e})}function F({task:e,isRunning:s,launchingId:r,onLaunchNew:a,onResume:i,t:n}){let l=e.executions?.[0]?.sessionId,o=r===e.id;return(0,t.jsxs)("div",{className:"group/task flex items-center gap-2 px-3 py-1.5 hover:bg-accent/50 cursor-default",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("p",{className:`text-sm truncate ${s?"italic text-muted-foreground":""}`,children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,t.jsx)(U,{status:e.status}),(0,t.jsx)("span",{className:"text-[10px] text-muted-foreground",children:V[e.priority]??e.priority})]})]}),s?(0,t.jsx)("span",{className:"text-[10px] italic text-muted-foreground shrink-0",children:n("missions.alreadyMonitored")}):(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover/task:opacity-100 transition-opacity shrink-0",children:[l&&(0,t.jsxs)(c.Button,{variant:"outline",className:"h-6 px-2 text-xs",onClick:()=>i(e.id,l),disabled:o,title:n("missions.continueSession"),children:[(0,t.jsx)(B.RotateCcw,{className:"h-3 w-3 mr-1"}),n("missions.continueLabel")]}),(0,t.jsxs)(c.Button,{variant:"outline",className:"h-6 px-2 text-xs",onClick:()=>a(e.id),disabled:o,title:n("missions.launchNew"),children:[(0,t.jsx)(D,{className:"h-3 w-3 mr-1"}),o?"...":n("missions.launchNewLabel")]})]})]})}function W({open:e,onOpenChange:a,onLaunchNew:i,onResume:n,runningTaskIds:l,launchingId:c}){let{t:d}=(0,r.useI18n)(),[u,m]=(0,s.useState)([]),[x,h]=(0,s.useState)(""),[p,f]=(0,s.useState)(""),[g,v]=(0,s.useState)([]);(0,s.useEffect)(()=>{e&&(h(""),f(""),v([]),L(100).then(m).catch(()=>T.toast.error(d("missions.error.launchFailed"))))},[e,d]),(0,s.useEffect)(()=>{p?P(p).then(e=>{v(e.filter(e=>"TODO"===e.status||"IN_PROGRESS"===e.status||"IN_REVIEW"===e.status))}).catch(()=>T.toast.error(d("missions.error.launchFailed"))):v([])},[p,d]);let b=u.find(e=>e.id===x),j=b?.projects??[];return(0,t.jsx)($.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)($.DialogContent,{className:"max-w-lg max-h-[70vh] flex flex-col",children:[(0,t.jsx)($.DialogHeader,{children:(0,t.jsx)($.DialogTitle,{children:d("missions.fullPickerTitle")})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,t.jsxs)(o.Select,{value:x,onValueChange:e=>{h(e??""),f("")},children:[(0,t.jsx)(o.SelectTrigger,{id:"full-picker-ws",className:"w-48 h-8",children:(0,t.jsx)("span",{className:"truncate",children:u.find(e=>e.id===x)?.name??d("missions.launcher.selectWorkspace")})}),(0,t.jsx)(o.SelectContent,{children:u.map(e=>(0,t.jsx)(o.SelectItem,{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)(o.Select,{value:p,onValueChange:e=>f(e??""),disabled:!x,children:[(0,t.jsx)(o.SelectTrigger,{id:"full-picker-proj",className:"w-48 h-8",children:(0,t.jsx)("span",{className:"truncate",children:j.find(e=>e.id===p)?.name??d("missions.launcher.selectProject")})}),(0,t.jsx)(o.SelectContent,{children:j.map(e=>(0,t.jsx)(o.SelectItem,{value:e.id,children:e.alias??e.name},e.id))})]})]}),(0,t.jsx)(H.ScrollArea,{className:"flex-1 min-h-0 -mx-2",children:0===g.length&&p?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:d("missions.launcher.noTasks")}):0===g.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:d("missions.fullPickerHint")}):g.map(e=>(0,t.jsx)(F,{task:e,isRunning:l.has(e.id),launchingId:c,onLaunchNew:i,onResume:n,t:d},e.id))})]})})}function _({open:e,onOpenChange:a,onLaunched:i,runningTaskIds:n=new Set,anchorRef:l}){let{t:o}=(0,r.useI18n)(),d=(0,s.useRef)(null),[u,m]=(0,s.useState)([]),[x,h]=(0,s.useState)(!1),[p,f]=(0,s.useState)(null),[g,v]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&(h(!0),L(3).then(m).catch(()=>T.toast.error(o("missions.error.launchFailed"))).finally(()=>h(!1)))},[e,o]),(0,s.useEffect)(()=>{if(e)return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t);function t(e){let t=e.target;if(d.current&&!d.current.contains(t)){if(l?.current&&l.current.contains(t))return;a(!1)}}},[e,a,l]);let b=(0,s.useCallback)(async e=>{try{f(e),await (0,A.startPtyExecution)(e,""),i(e),a(!1),v(!1)}catch{T.toast.error(o("missions.error.launchFailed"))}finally{f(null)}},[i,a,o]),j=(0,s.useCallback)(async(e,t)=>{try{f(e),await (0,O.resumePtyExecution)(e,t),i(e),a(!1),v(!1)}catch{T.toast.error(o("missions.error.launchFailed"))}finally{f(null)}},[i,a,o]),w=(0,s.useCallback)(()=>{a(!1),v(!0)},[a]);return e||g?(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsxs)("div",{ref:d,className:"absolute right-0 z-50 mt-1 w-96 rounded-lg border border-border bg-popover shadow-xl flex flex-col overflow-hidden",style:{maxHeight:"480px"},children:[(0,t.jsx)("div",{className:"px-3 py-2 border-b border-border shrink-0",children:(0,t.jsx)("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:o("missions.pickerTitle")})}),(0,t.jsx)(H.ScrollArea,{className:"flex-1 min-h-0",children:x?(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"Loading..."}):0===u.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:o("missions.noAvailableTasks")}):u.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"sticky top-0 z-10 px-3 py-1.5 bg-popover border-b border-border/50",children:(0,t.jsx)("span",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:e.name})}),e.projects.map(e=>0===e._count.tasks?null:(0,t.jsxs)("div",{className:"mb-1",children:[(0,t.jsx)("div",{className:"px-3 pt-2 pb-0.5",children:(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:e.alias??e.name})}),e.tasks.map(e=>(0,t.jsx)(F,{task:e,isRunning:n.has(e.id),launchingId:p,onLaunchNew:b,onResume:j,t:o},e.id))]},e.id))]},e.id))}),(0,t.jsx)("div",{className:"shrink-0 border-t border-border",children:(0,t.jsx)(c.Button,{variant:"ghost",className:"w-full rounded-none text-xs text-primary font-medium",onClick:w,children:o("missions.showMoreTasks")})})]}),(0,t.jsx)(W,{open:g,onOpenChange:v,onLaunchNew:b,onResume:j,runningTaskIds:n,launchingId:p})]}):null}e.s(["MissionsClient",0,function({initialExecutions:e}){let{t:a}=(0,r.useI18n)(),[u,x]=(0,s.useState)(e),[h,p]=(0,s.useState)(()=>localStorage.getItem("missions-grid-preset")??"3x2"),[b,j]=(0,s.useState)(()=>{try{let e=localStorage.getItem("missions-grid-custom");if(e){let t=JSON.parse(e);if("number"==typeof t?.cols&&"number"==typeof t?.rows)return{cols:Math.max(1,Math.min(10,t.cols)),rows:Math.max(1,Math.min(10,t.rows))}}}catch{}return{cols:2,rows:2}}),[w,y]=(0,s.useState)(!1),[k,N]=(0,s.useState)(""),S=(0,s.useRef)(null),[I,C]=(0,s.useState)(new Map),R=(0,s.useRef)(I);(0,s.useEffect)(()=>{R.current=I},[I]);let E=(0,s.useRef)(new Map),L=l.find(e=>e.id===h)??l[2],P="custom"===h?b.cols:L.cols,A="custom"===h?b.rows:L.rows,O=(0,s.useRef)(null),[$,D]=(0,s.useState)("480px");(0,s.useEffect)(()=>{let e=O.current;if(!e)return;let t=()=>{let t=(e.clientHeight-32-16*(A-1))/A;D(`${Math.max(t,200)}px`)};t();let s=new ResizeObserver(t);return s.observe(e),()=>s.disconnect()},[A]);let B=(0,s.useCallback)((e,t)=>{e&&(p(e),localStorage.setItem("missions-grid-preset",e),"custom"===e&&t&&(j(t),localStorage.setItem("missions-grid-custom",JSON.stringify(t))))},[]),H=(0,g.useSensors)((0,g.useSensor)(g.PointerSensor,{activationConstraint:{distance:8}})),z=(0,s.useCallback)(e=>{let{active:t,over:s}=e;s&&t.id!==s.id&&x(e=>{let r=e.findIndex(e=>e.executionId===t.id),a=e.findIndex(e=>e.executionId===s.id);return(0,v.arrayMove)(e,r,a)})},[]),V=(0,s.useCallback)((e,t)=>{if(R.current.has(e))return;C(s=>new Map([...s,[e,t]]));let s=setTimeout(()=>{x(t=>t.filter(t=>t.executionId!==e)),C(t=>{let s=new Map(t);return s.delete(e),s}),E.current.delete(e)},500);E.current.set(e,s)},[]);(0,s.useEffect)(()=>{let e=setInterval(async()=>{try{let e=await i();x(t=>{let s=R.current,{merged:r,goneIds:a}=function({prev:e,fresh:t,removingIds:s}){let r=new Set(t.map(e=>e.executionId)),a=[];e.forEach(e=>{r.has(e.executionId)||s.has(e.executionId)||a.push(e.executionId)});let i=e.filter(e=>r.has(e.executionId)||s.has(e.executionId)),n=new Set(e.map(e=>e.executionId));return{merged:[...i,...t.filter(e=>!n.has(e.executionId))],goneIds:a}}({prev:t,fresh:e,removingIds:new Set(s.keys())});return a.forEach(e=>V(e,"completed")),r})}catch{}},4e3);return()=>clearInterval(e)},[V]),(0,s.useEffect)(()=>{let e=E.current;return()=>{e.forEach(e=>clearTimeout(e))}},[]);let U=(0,s.useCallback)(async e=>{try{await (0,n.stopPtyExecution)(e),x(t=>{let s=t.find(t=>t.taskId===e);return s&&V(s.executionId,"stopped"),t})}catch{T.toast.error(a("missions.error.stopFailed"))}},[V,a]),F=(0,s.useCallback)((e,t)=>{x(t=>{let s=t.find(t=>t.taskId===e);return s&&V(s.executionId,"completed"),t})},[V]),W=(0,s.useCallback)(e=>{i().then(e=>{x(t=>{let s=new Set(t.map(e=>e.executionId));return[...t,...e.filter(e=>!s.has(e.executionId))]})}).catch(()=>{})},[]),G=Array.from(new Map(u.map(e=>[e.workspaceId,e.workspaceName])).entries()).map(([e,t])=>({id:e,name:t})),q=k?u.filter(e=>e.workspaceId===k):u,J=new Set(u.map(e=>e.taskId));return(0,t.jsxs)("div",{className:"flex h-full flex-col",children:[(0,t.jsxs)("div",{className:"header-sm shrink-0 px-4 flex items-center gap-3",children:[(0,t.jsx)("h1",{className:"text-base font-semibold",children:a("missions.pageTitle")}),(0,t.jsxs)(o.Select,{value:k,onValueChange:e=>N(e??""),children:[(0,t.jsx)(o.SelectTrigger,{className:"w-36 h-8",children:(0,t.jsx)("span",{className:"truncate",children:k?G.find(e=>e.id===k)?.name??a("missions.filterAll"):a("missions.filterAll")})}),(0,t.jsxs)(o.SelectContent,{children:[(0,t.jsx)(o.SelectItem,{value:"",children:a("missions.filterAll")}),G.map(e=>(0,t.jsx)(o.SelectItem,{value:e.id,children:e.name},e.id))]})]}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)(f,{value:h,customValue:b,onChange:B}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(c.Button,{ref:S,onClick:()=>y(e=>!e),children:a("missions.launchTask")}),(0,t.jsx)(_,{open:w,onOpenChange:y,onLaunched:W,runningTaskIds:J,anchorRef:S})]})]}),(0,t.jsx)("div",{ref:O,className:"flex-1 overflow-auto min-h-0 p-4",children:0===q.length&&0===I.size?(0,t.jsx)(d.EmptyState,{icon:m,title:a("missions.emptyTitle"),description:a("missions.emptyDesc"),className:"h-full",action:(0,t.jsx)(c.Button,{onClick:()=>y(!0),children:a("missions.launchTask")})}):(0,t.jsx)(g.DndContext,{id:"missions-dnd",sensors:H,collisionDetection:g.closestCenter,onDragEnd:z,children:(0,t.jsx)(v.SortableContext,{items:q.map(e=>e.executionId),strategy:v.rectSortingStrategy,children:(0,t.jsx)("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${P}, 1fr)`,gridAutoRows:$},children:q.map(e=>(0,t.jsx)(M,{execution:e,isRemoving:I.has(e.executionId),removeReason:I.get(e.executionId),onStop:U,onSessionEnd:F},e.executionId))})})})})]})}],877938)}]);
package/.next/trace CHANGED
@@ -1,2 +1,2 @@
1
- [{"name":"generate-buildid","duration":138,"timestamp":1592256162075,"id":4,"parentId":1,"tags":{},"startTime":1777374768992,"traceId":"de22cf699d79aa4a"},{"name":"load-custom-routes","duration":211,"timestamp":1592256162337,"id":5,"parentId":1,"tags":{},"startTime":1777374768992,"traceId":"de22cf699d79aa4a"},{"name":"create-dist-dir","duration":174,"timestamp":1592256162562,"id":6,"parentId":1,"tags":{},"startTime":1777374768993,"traceId":"de22cf699d79aa4a"},{"name":"clean","duration":124,"timestamp":1592256163061,"id":7,"parentId":1,"tags":{},"startTime":1777374768993,"traceId":"de22cf699d79aa4a"},{"name":"discover-routes","duration":11457,"timestamp":1592256169139,"id":8,"parentId":1,"tags":{},"startTime":1777374768999,"traceId":"de22cf699d79aa4a"},{"name":"create-root-mapping","duration":48,"timestamp":1592256180625,"id":9,"parentId":1,"tags":{},"startTime":1777374769011,"traceId":"de22cf699d79aa4a"},{"name":"generate-route-types","duration":35296,"timestamp":1592256181741,"id":10,"parentId":1,"tags":{},"startTime":1777374769012,"traceId":"de22cf699d79aa4a"},{"name":"public-dir-conflict-check","duration":78,"timestamp":1592256217204,"id":11,"parentId":1,"tags":{},"startTime":1777374769047,"traceId":"de22cf699d79aa4a"},{"name":"generate-routes-manifest","duration":1874,"timestamp":1592256217329,"id":12,"parentId":1,"tags":{},"startTime":1777374769047,"traceId":"de22cf699d79aa4a"},{"name":"run-turbopack","duration":4530743,"timestamp":1592256223593,"id":14,"parentId":1,"tags":{},"startTime":1777374769054,"traceId":"de22cf699d79aa4a"},{"name":"turbopack-build-events","duration":41,"timestamp":1592256374627,"id":15,"parentId":1,"tags":{},"startTime":1777374769205,"traceId":"de22cf699d79aa4a"},{"name":"run-typescript","duration":6440029,"timestamp":1592260770790,"id":16,"parentId":1,"tags":{},"startTime":1777374773601,"traceId":"de22cf699d79aa4a"},{"name":"generate-required-server-files","duration":1060,"timestamp":1592267212033,"id":18,"parentId":1,"tags":{},"startTime":1777374780042,"traceId":"de22cf699d79aa4a"},{"name":"check-static-error-page","duration":16243,"timestamp":1592267233329,"id":20,"parentId":19,"tags":{},"startTime":1777374780063,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":180980,"timestamp":1592267250863,"id":61,"parentId":22,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":196110,"timestamp":1592267235792,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1777374780066,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":221597,"timestamp":1592267250915,"id":63,"parentId":24,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":236435,"timestamp":1592267236146,"id":24,"parentId":19,"tags":{"page":"/api/browse-fs"},"startTime":1777374780066,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":223473,"timestamp":1592267250940,"id":64,"parentId":25,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":238275,"timestamp":1592267236199,"id":25,"parentId":19,"tags":{"page":"/api/files/assets/[projectId]/[filename]"},"startTime":1777374780066,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":232316,"timestamp":1592267251131,"id":68,"parentId":44,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":240269,"timestamp":1592267243205,"id":44,"parentId":19,"tags":{"page":"/apple-icon.png"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":232567,"timestamp":1592267251013,"id":65,"parentId":26,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":248202,"timestamp":1592267236241,"id":26,"parentId":19,"tags":{"page":"/api/git"},"startTime":1777374780066,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":245999,"timestamp":1592267251192,"id":69,"parentId":45,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":252014,"timestamp":1592267245203,"id":45,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1777374780075,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":246054,"timestamp":1592267251212,"id":71,"parentId":47,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":249092,"timestamp":1592267248179,"id":47,"parentId":19,"tags":{"page":"/icon1.png"},"startTime":1777374780078,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":258724,"timestamp":1592267251215,"id":72,"parentId":48,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":261080,"timestamp":1592267248911,"id":48,"parentId":19,"tags":{"page":"/manifest.json"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":255954,"timestamp":1592267254164,"id":73,"parentId":27,"tags":{},"startTime":1777374780084,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":273840,"timestamp":1592267236309,"id":27,"parentId":19,"tags":{"page":"/api/internal/assets/[projectId]/[filename]"},"startTime":1777374780066,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":258287,"timestamp":1592267254957,"id":74,"parentId":28,"tags":{},"startTime":1777374780085,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":273924,"timestamp":1592267239345,"id":28,"parentId":19,"tags":{"page":"/api/internal/assets/reveal"},"startTime":1777374780069,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":264904,"timestamp":1592267250892,"id":62,"parentId":23,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":279764,"timestamp":1592267236074,"id":23,"parentId":19,"tags":{"page":"/api/adapters/test"},"startTime":1777374780066,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":269354,"timestamp":1592267250718,"id":60,"parentId":21,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":285015,"timestamp":1592267235082,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1777374780065,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":272262,"timestamp":1592267251206,"id":70,"parentId":46,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":277929,"timestamp":1592267245565,"id":46,"parentId":19,"tags":{"page":"/icon0.svg"},"startTime":1777374780076,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":271900,"timestamp":1592267258119,"id":79,"parentId":33,"tags":{},"startTime":1777374780088,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":289761,"timestamp":1592267240283,"id":33,"parentId":19,"tags":{"page":"/api/internal/cache/[...segments]"},"startTime":1777374780070,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":282779,"timestamp":1592267251119,"id":67,"parentId":43,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":290762,"timestamp":1592267243163,"id":43,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/merge"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":282896,"timestamp":1592267251089,"id":66,"parentId":42,"tags":{},"startTime":1777374780081,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":290879,"timestamp":1592267243112,"id":42,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/diff"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":276016,"timestamp":1592267258277,"id":80,"parentId":34,"tags":{},"startTime":1777374780088,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":293983,"timestamp":1592267240337,"id":34,"parentId":19,"tags":{"page":"/api/internal/hooks/install"},"startTime":1777374780070,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":278503,"timestamp":1592267255860,"id":76,"parentId":29,"tags":{},"startTime":1777374780086,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":294574,"timestamp":1592267239796,"id":29,"parentId":19,"tags":{"page":"/api/internal/assistant/chat"},"startTime":1777374780070,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":279381,"timestamp":1592267258447,"id":81,"parentId":35,"tags":{},"startTime":1777374780089,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":297230,"timestamp":1592267240622,"id":35,"parentId":19,"tags":{"page":"/api/internal/hooks/session"},"startTime":1777374780071,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":279172,"timestamp":1592267258745,"id":83,"parentId":38,"tags":{},"startTime":1777374780089,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":295013,"timestamp":1592267242912,"id":38,"parentId":19,"tags":{"page":"/api/internal/notifications/pending"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":284118,"timestamp":1592267256304,"id":77,"parentId":31,"tags":{},"startTime":1777374780086,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":300280,"timestamp":1592267240159,"id":31,"parentId":19,"tags":{"page":"/api/internal/assistant"},"startTime":1777374780070,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":279473,"timestamp":1592267261006,"id":84,"parentId":37,"tags":{},"startTime":1777374780091,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":297658,"timestamp":1592267242828,"id":37,"parentId":19,"tags":{"page":"/api/internal/hooks/upload"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":283563,"timestamp":1592267261656,"id":85,"parentId":39,"tags":{},"startTime":1777374780092,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":302291,"timestamp":1592267242975,"id":39,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/buffer"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":289027,"timestamp":1592267261948,"id":87,"parentId":41,"tags":{},"startTime":1777374780092,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":307965,"timestamp":1592267243071,"id":41,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/start"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":296637,"timestamp":1592267256473,"id":78,"parentId":32,"tags":{},"startTime":1777374780087,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":313015,"timestamp":1592267240219,"id":32,"parentId":19,"tags":{"page":"/api/internal/assistant/sessions"},"startTime":1777374780070,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":295908,"timestamp":1592267261823,"id":86,"parentId":40,"tags":{},"startTime":1777374780092,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":314728,"timestamp":1592267243026,"id":40,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/input"},"startTime":1777374780073,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":305602,"timestamp":1592267258674,"id":82,"parentId":36,"tags":{},"startTime":1777374780089,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":322098,"timestamp":1592267242203,"id":36,"parentId":19,"tags":{"page":"/api/internal/hooks/stop"},"startTime":1777374780072,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":309096,"timestamp":1592267255274,"id":75,"parentId":30,"tags":{},"startTime":1777374780085,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":324300,"timestamp":1592267240077,"id":30,"parentId":19,"tags":{"page":"/api/internal/assistant/images"},"startTime":1777374780070,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":311753,"timestamp":1592267263469,"id":88,"parentId":50,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":326163,"timestamp":1592267249114,"id":50,"parentId":19,"tags":{"page":"/onboarding"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":319050,"timestamp":1592267263487,"id":91,"parentId":53,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":333291,"timestamp":1592267249276,"id":53,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/archive"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":321539,"timestamp":1592267263481,"id":89,"parentId":51,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":335825,"timestamp":1592267249214,"id":51,"parentId":19,"tags":{"page":"/"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":322395,"timestamp":1592267263497,"id":95,"parentId":58,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":336437,"timestamp":1592267249475,"id":58,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/tasks/[taskId]"},"startTime":1777374780080,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":328079,"timestamp":1592267263510,"id":98,"parentId":57,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":342234,"timestamp":1592267249412,"id":57,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/projects/[projectId]"},"startTime":1777374780080,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":330347,"timestamp":1592267263502,"id":96,"parentId":49,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":344860,"timestamp":1592267249003,"id":49,"parentId":19,"tags":{"page":"/missions"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":330663,"timestamp":1592267263484,"id":90,"parentId":52,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":344908,"timestamp":1592267249246,"id":52,"parentId":19,"tags":{"page":"/settings"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":338446,"timestamp":1592267263505,"id":97,"parentId":59,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":352462,"timestamp":1592267249515,"id":59,"parentId":19,"tags":{"page":"/workspaces"},"startTime":1777374780080,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":347057,"timestamp":1592267263494,"id":94,"parentId":56,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":361199,"timestamp":1592267249378,"id":56,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]"},"startTime":1777374780080,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":349680,"timestamp":1592267263492,"id":93,"parentId":55,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":363842,"timestamp":1592267249346,"id":55,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/notes"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"is-page-static","duration":370019,"timestamp":1592267263489,"id":92,"parentId":54,"tags":{},"startTime":1777374780094,"traceId":"de22cf699d79aa4a"},{"name":"check-page","duration":384219,"timestamp":1592267249314,"id":54,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/assets"},"startTime":1777374780079,"traceId":"de22cf699d79aa4a"},{"name":"static-check","duration":400557,"timestamp":1592267232990,"id":19,"parentId":1,"tags":{},"startTime":1777374780063,"traceId":"de22cf699d79aa4a"},{"name":"write-routes-manifest","duration":354,"timestamp":1592267634383,"id":100,"parentId":1,"tags":{},"startTime":1777374780465,"traceId":"de22cf699d79aa4a"},{"name":"load-dotenv","duration":13,"timestamp":1592267641042,"id":103,"parentId":102,"tags":{},"startTime":1777374780471,"traceId":"de22cf699d79aa4a"},{"name":"run-export-path-map","duration":250,"timestamp":1592267642339,"id":104,"parentId":102,"tags":{},"startTime":1777374780472,"traceId":"de22cf699d79aa4a"},{"name":"next-export","duration":269811,"timestamp":1592267640537,"id":102,"parentId":1,"tags":{},"startTime":1777374780471,"traceId":"de22cf699d79aa4a"},{"name":"move-exported-app-not-found-","duration":831,"timestamp":1592267911505,"id":105,"parentId":101,"tags":{},"startTime":1777374780742,"traceId":"de22cf699d79aa4a"},{"name":"move-exported-app-global-error-","duration":373,"timestamp":1592267912406,"id":106,"parentId":101,"tags":{},"startTime":1777374780743,"traceId":"de22cf699d79aa4a"},{"name":"static-generation","duration":276770,"timestamp":1592267636693,"id":101,"parentId":1,"tags":{},"startTime":1777374780467,"traceId":"de22cf699d79aa4a"},{"name":"write-routes-manifest","duration":256,"timestamp":1592267913581,"id":107,"parentId":1,"tags":{},"startTime":1777374780744,"traceId":"de22cf699d79aa4a"}]
2
- [{"name":"print-tree-view","duration":1818,"timestamp":1592267921571,"id":108,"parentId":1,"tags":{},"startTime":1777374780752,"traceId":"de22cf699d79aa4a"},{"name":"write-route-bundle-stats","duration":7146,"timestamp":1592267923403,"id":109,"parentId":1,"tags":{},"startTime":1777374780754,"traceId":"de22cf699d79aa4a"},{"name":"telemetry-flush","duration":277796,"timestamp":1592267930562,"id":110,"parentId":1,"tags":{},"startTime":1777374780761,"traceId":"de22cf699d79aa4a"},{"name":"next-build","duration":12112049,"timestamp":1592256096335,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777374768926,"traceId":"de22cf699d79aa4a"}]
1
+ [{"name":"generate-buildid","duration":98,"timestamp":1592562193176,"id":4,"parentId":1,"tags":{},"startTime":1777375075024,"traceId":"17ad1a661e36626b"},{"name":"load-custom-routes","duration":199,"timestamp":1592562193376,"id":5,"parentId":1,"tags":{},"startTime":1777375075024,"traceId":"17ad1a661e36626b"},{"name":"create-dist-dir","duration":159,"timestamp":1592562193588,"id":6,"parentId":1,"tags":{},"startTime":1777375075025,"traceId":"17ad1a661e36626b"},{"name":"clean","duration":117,"timestamp":1592562194062,"id":7,"parentId":1,"tags":{},"startTime":1777375075025,"traceId":"17ad1a661e36626b"},{"name":"discover-routes","duration":10450,"timestamp":1592562199551,"id":8,"parentId":1,"tags":{},"startTime":1777375075031,"traceId":"17ad1a661e36626b"},{"name":"create-root-mapping","duration":47,"timestamp":1592562210029,"id":9,"parentId":1,"tags":{},"startTime":1777375075041,"traceId":"17ad1a661e36626b"},{"name":"generate-route-types","duration":35489,"timestamp":1592562211145,"id":10,"parentId":1,"tags":{},"startTime":1777375075042,"traceId":"17ad1a661e36626b"},{"name":"public-dir-conflict-check","duration":47,"timestamp":1592562246753,"id":11,"parentId":1,"tags":{},"startTime":1777375075078,"traceId":"17ad1a661e36626b"},{"name":"generate-routes-manifest","duration":1686,"timestamp":1592562246839,"id":12,"parentId":1,"tags":{},"startTime":1777375075078,"traceId":"17ad1a661e36626b"},{"name":"run-turbopack","duration":4273641,"timestamp":1592562251234,"id":14,"parentId":1,"tags":{},"startTime":1777375075082,"traceId":"17ad1a661e36626b"},{"name":"turbopack-build-events","duration":40,"timestamp":1592562370918,"id":15,"parentId":1,"tags":{},"startTime":1777375075202,"traceId":"17ad1a661e36626b"},{"name":"run-typescript","duration":6232727,"timestamp":1592566562396,"id":16,"parentId":1,"tags":{},"startTime":1777375079393,"traceId":"17ad1a661e36626b"},{"name":"generate-required-server-files","duration":865,"timestamp":1592572796209,"id":18,"parentId":1,"tags":{},"startTime":1777375085627,"traceId":"17ad1a661e36626b"},{"name":"check-static-error-page","duration":22379,"timestamp":1592572810628,"id":20,"parentId":19,"tags":{},"startTime":1777375085642,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":169018,"timestamp":1592572833911,"id":61,"parentId":22,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":183681,"timestamp":1592572819300,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1777375085650,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":221635,"timestamp":1592572833962,"id":63,"parentId":24,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":236019,"timestamp":1592572819674,"id":24,"parentId":19,"tags":{"page":"/api/browse-fs"},"startTime":1777375085651,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":228939,"timestamp":1592572833985,"id":64,"parentId":25,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":243231,"timestamp":1592572819725,"id":25,"parentId":19,"tags":{"page":"/api/files/assets/[projectId]/[filename]"},"startTime":1777375085651,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":228937,"timestamp":1592572834066,"id":65,"parentId":26,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":243242,"timestamp":1592572819768,"id":26,"parentId":19,"tags":{"page":"/api/git"},"startTime":1777375085651,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":228942,"timestamp":1592572834176,"id":68,"parentId":44,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":235822,"timestamp":1592572827306,"id":44,"parentId":19,"tags":{"page":"/apple-icon.png"},"startTime":1777375085658,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":240434,"timestamp":1592572834259,"id":71,"parentId":47,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":243433,"timestamp":1592572831325,"id":47,"parentId":19,"tags":{"page":"/icon1.png"},"startTime":1777375085662,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":249988,"timestamp":1592572833939,"id":62,"parentId":23,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":264346,"timestamp":1592572819611,"id":23,"parentId":19,"tags":{"page":"/api/adapters/test"},"startTime":1777375085651,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":252958,"timestamp":1592572833789,"id":60,"parentId":21,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":268477,"timestamp":1592572818329,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1777375085649,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":253596,"timestamp":1592572834240,"id":69,"parentId":45,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":259418,"timestamp":1592572828579,"id":45,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1777375085660,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":255849,"timestamp":1592572834261,"id":72,"parentId":48,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":258179,"timestamp":1592572831958,"id":48,"parentId":19,"tags":{"page":"/manifest.json"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":256342,"timestamp":1592572834254,"id":70,"parentId":46,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":261744,"timestamp":1592572828864,"id":46,"parentId":19,"tags":{"page":"/icon0.svg"},"startTime":1777375085660,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":271654,"timestamp":1592572834164,"id":67,"parentId":43,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":278590,"timestamp":1592572827255,"id":43,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/merge"},"startTime":1777375085658,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":273891,"timestamp":1592572834134,"id":66,"parentId":42,"tags":{},"startTime":1777375085665,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":280885,"timestamp":1592572827183,"id":42,"parentId":19,"tags":{"page":"/api/tasks/[taskId]/diff"},"startTime":1777375085658,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":268673,"timestamp":1592572841085,"id":78,"parentId":32,"tags":{},"startTime":1777375085672,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":287848,"timestamp":1592572821931,"id":32,"parentId":19,"tags":{"page":"/api/internal/assistant/sessions"},"startTime":1777375085653,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":270645,"timestamp":1592572839188,"id":75,"parentId":29,"tags":{},"startTime":1777375085670,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":288331,"timestamp":1592572821615,"id":29,"parentId":19,"tags":{"page":"/api/internal/assistant/chat"},"startTime":1777375085653,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":271861,"timestamp":1592572839377,"id":76,"parentId":31,"tags":{},"startTime":1777375085670,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":289397,"timestamp":1592572821868,"id":31,"parentId":19,"tags":{"page":"/api/internal/assistant"},"startTime":1777375085653,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":270753,"timestamp":1592572842056,"id":80,"parentId":34,"tags":{},"startTime":1777375085673,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":288606,"timestamp":1592572824251,"id":34,"parentId":19,"tags":{"page":"/api/internal/hooks/install"},"startTime":1777375085655,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":276438,"timestamp":1592572837091,"id":73,"parentId":27,"tags":{},"startTime":1777375085668,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":293709,"timestamp":1592572819841,"id":27,"parentId":19,"tags":{"page":"/api/internal/assets/[projectId]/[filename]"},"startTime":1777375085651,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":273890,"timestamp":1592572841594,"id":79,"parentId":33,"tags":{},"startTime":1777375085673,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":291620,"timestamp":1592572823883,"id":33,"parentId":19,"tags":{"page":"/api/internal/cache/[...segments]"},"startTime":1777375085655,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":271937,"timestamp":1592572845182,"id":84,"parentId":38,"tags":{},"startTime":1777375085676,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":290998,"timestamp":1592572826137,"id":38,"parentId":19,"tags":{"page":"/api/internal/notifications/pending"},"startTime":1777375085657,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":274103,"timestamp":1592572843069,"id":82,"parentId":35,"tags":{},"startTime":1777375085674,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":291661,"timestamp":1592572825517,"id":35,"parentId":19,"tags":{"page":"/api/internal/hooks/session"},"startTime":1777375085657,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":273178,"timestamp":1592572844930,"id":83,"parentId":37,"tags":{},"startTime":1777375085676,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":292121,"timestamp":1592572826005,"id":37,"parentId":19,"tags":{"page":"/api/internal/hooks/upload"},"startTime":1777375085657,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":281947,"timestamp":1592572837942,"id":74,"parentId":28,"tags":{},"startTime":1777375085669,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":298408,"timestamp":1592572821498,"id":28,"parentId":19,"tags":{"page":"/api/internal/assets/reveal"},"startTime":1777375085653,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":277798,"timestamp":1592572845507,"id":85,"parentId":39,"tags":{},"startTime":1777375085677,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":297065,"timestamp":1592572826261,"id":39,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/buffer"},"startTime":1777375085657,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":283716,"timestamp":1592572846818,"id":89,"parentId":51,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":298341,"timestamp":1592572832247,"id":51,"parentId":19,"tags":{"page":"/"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":289820,"timestamp":1592572845842,"id":86,"parentId":41,"tags":{},"startTime":1777375085677,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":308609,"timestamp":1592572827100,"id":41,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/start"},"startTime":1777375085658,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":293288,"timestamp":1592572846015,"id":87,"parentId":40,"tags":{},"startTime":1777375085677,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":312939,"timestamp":1592572826385,"id":40,"parentId":19,"tags":{"page":"/api/internal/terminal/[taskId]/input"},"startTime":1777375085657,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":301272,"timestamp":1592572839718,"id":77,"parentId":30,"tags":{},"startTime":1777375085671,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":319210,"timestamp":1592572821796,"id":30,"parentId":19,"tags":{"page":"/api/internal/assistant/images"},"startTime":1777375085653,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":306540,"timestamp":1592572842790,"id":81,"parentId":36,"tags":{},"startTime":1777375085674,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":323536,"timestamp":1592572825843,"id":36,"parentId":19,"tags":{"page":"/api/internal/hooks/stop"},"startTime":1777375085657,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":302779,"timestamp":1592572846822,"id":91,"parentId":53,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":317315,"timestamp":1592572832313,"id":53,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/archive"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":309200,"timestamp":1592572846812,"id":88,"parentId":50,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":323915,"timestamp":1592572832145,"id":50,"parentId":19,"tags":{"page":"/onboarding"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":309631,"timestamp":1592572846820,"id":90,"parentId":52,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":324187,"timestamp":1592572832281,"id":52,"parentId":19,"tags":{"page":"/settings"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":314508,"timestamp":1592572846834,"id":96,"parentId":49,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":329426,"timestamp":1592572832022,"id":49,"parentId":19,"tags":{"page":"/missions"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":316003,"timestamp":1592572846837,"id":97,"parentId":57,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":330416,"timestamp":1592572832445,"id":57,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/projects/[projectId]"},"startTime":1777375085664,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":325891,"timestamp":1592572846840,"id":98,"parentId":59,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":340214,"timestamp":1592572832542,"id":59,"parentId":19,"tags":{"page":"/workspaces"},"startTime":1777375085664,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":340345,"timestamp":1592572846827,"id":93,"parentId":55,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":354818,"timestamp":1592572832379,"id":55,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/notes"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":340502,"timestamp":1592572846830,"id":95,"parentId":58,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":354856,"timestamp":1592572832502,"id":58,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/tasks/[taskId]"},"startTime":1777375085664,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":349852,"timestamp":1592572846828,"id":94,"parentId":56,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":364293,"timestamp":1592572832410,"id":56,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"is-page-static","duration":357437,"timestamp":1592572846825,"id":92,"parentId":54,"tags":{},"startTime":1777375085678,"traceId":"17ad1a661e36626b"},{"name":"check-page","duration":371935,"timestamp":1592572832348,"id":54,"parentId":19,"tags":{"page":"/workspaces/[workspaceId]/assets"},"startTime":1777375085663,"traceId":"17ad1a661e36626b"},{"name":"static-check","duration":396641,"timestamp":1592572807661,"id":19,"parentId":1,"tags":{},"startTime":1777375085639,"traceId":"17ad1a661e36626b"},{"name":"write-routes-manifest","duration":533,"timestamp":1592573205361,"id":100,"parentId":1,"tags":{},"startTime":1777375086036,"traceId":"17ad1a661e36626b"},{"name":"load-dotenv","duration":15,"timestamp":1592573212940,"id":103,"parentId":102,"tags":{},"startTime":1777375086044,"traceId":"17ad1a661e36626b"},{"name":"run-export-path-map","duration":309,"timestamp":1592573214428,"id":104,"parentId":102,"tags":{},"startTime":1777375086045,"traceId":"17ad1a661e36626b"},{"name":"next-export","duration":260280,"timestamp":1592573212365,"id":102,"parentId":1,"tags":{},"startTime":1777375086043,"traceId":"17ad1a661e36626b"},{"name":"move-exported-app-not-found-","duration":415,"timestamp":1592573473815,"id":105,"parentId":101,"tags":{},"startTime":1777375086305,"traceId":"17ad1a661e36626b"},{"name":"move-exported-app-global-error-","duration":236,"timestamp":1592573474273,"id":106,"parentId":101,"tags":{},"startTime":1777375086305,"traceId":"17ad1a661e36626b"},{"name":"static-generation","duration":267078,"timestamp":1592573208208,"id":101,"parentId":1,"tags":{},"startTime":1777375086039,"traceId":"17ad1a661e36626b"},{"name":"write-routes-manifest","duration":212,"timestamp":1592573475382,"id":107,"parentId":1,"tags":{},"startTime":1777375086306,"traceId":"17ad1a661e36626b"}]
2
+ [{"name":"print-tree-view","duration":1601,"timestamp":1592573483892,"id":108,"parentId":1,"tags":{},"startTime":1777375086315,"traceId":"17ad1a661e36626b"},{"name":"write-route-bundle-stats","duration":5924,"timestamp":1592573485506,"id":109,"parentId":1,"tags":{},"startTime":1777375086317,"traceId":"17ad1a661e36626b"},{"name":"telemetry-flush","duration":268776,"timestamp":1592573491439,"id":110,"parentId":1,"tags":{},"startTime":1777375086323,"traceId":"17ad1a661e36626b"},{"name":"next-build","duration":11634100,"timestamp":1592562126130,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777375074957,"traceId":"17ad1a661e36626b"}]
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-turbopack","duration":4530743,"timestamp":1592256223593,"id":14,"parentId":1,"tags":{},"startTime":1777374769054,"traceId":"de22cf699d79aa4a"},{"name":"turbopack-build-events","duration":41,"timestamp":1592256374627,"id":15,"parentId":1,"tags":{},"startTime":1777374769205,"traceId":"de22cf699d79aa4a"},{"name":"run-typescript","duration":6440029,"timestamp":1592260770790,"id":16,"parentId":1,"tags":{},"startTime":1777374773601,"traceId":"de22cf699d79aa4a"},{"name":"static-check","duration":400557,"timestamp":1592267232990,"id":19,"parentId":1,"tags":{},"startTime":1777374780063,"traceId":"de22cf699d79aa4a"},{"name":"static-generation","duration":276770,"timestamp":1592267636693,"id":101,"parentId":1,"tags":{},"startTime":1777374780467,"traceId":"de22cf699d79aa4a"},{"name":"telemetry-flush","duration":277796,"timestamp":1592267930562,"id":110,"parentId":1,"tags":{},"startTime":1777374780761,"traceId":"de22cf699d79aa4a"},{"name":"next-build","duration":12112049,"timestamp":1592256096335,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777374768926,"traceId":"de22cf699d79aa4a"}]
1
+ [{"name":"run-turbopack","duration":4273641,"timestamp":1592562251234,"id":14,"parentId":1,"tags":{},"startTime":1777375075082,"traceId":"17ad1a661e36626b"},{"name":"turbopack-build-events","duration":40,"timestamp":1592562370918,"id":15,"parentId":1,"tags":{},"startTime":1777375075202,"traceId":"17ad1a661e36626b"},{"name":"run-typescript","duration":6232727,"timestamp":1592566562396,"id":16,"parentId":1,"tags":{},"startTime":1777375079393,"traceId":"17ad1a661e36626b"},{"name":"static-check","duration":396641,"timestamp":1592572807661,"id":19,"parentId":1,"tags":{},"startTime":1777375085639,"traceId":"17ad1a661e36626b"},{"name":"static-generation","duration":267078,"timestamp":1592573208208,"id":101,"parentId":1,"tags":{},"startTime":1777375086039,"traceId":"17ad1a661e36626b"},{"name":"telemetry-flush","duration":268776,"timestamp":1592573491439,"id":110,"parentId":1,"tags":{},"startTime":1777375086323,"traceId":"17ad1a661e36626b"},{"name":"next-build","duration":11634100,"timestamp":1592562126130,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1777375074957,"traceId":"17ad1a661e36626b"}]