tower-studio 0.1.0 → 0.1.1

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 (173) 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/required-server-files.js +0 -1
  10. package/.next/required-server-files.json +0 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
  19. package/.next/server/app/_not-found/page/server-reference-manifest.json +23 -23
  20. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  21. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/_not-found.html +1 -1
  23. package/.next/server/app/_not-found.rsc +14 -14
  24. package/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  25. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  26. package/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
  27. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  28. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  29. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  30. package/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  31. package/.next/server/app/api/git/route.js.nft.json +1 -1
  32. package/.next/server/app/index.html +1 -1
  33. package/.next/server/app/index.rsc +14 -14
  34. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  35. package/.next/server/app/index.segments/_full.segment.rsc +14 -14
  36. package/.next/server/app/index.segments/_head.segment.rsc +4 -4
  37. package/.next/server/app/index.segments/_index.segment.rsc +9 -9
  38. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  39. package/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  40. package/.next/server/app/missions/page/server-reference-manifest.json +51 -51
  41. package/.next/server/app/missions/page.js.nft.json +1 -1
  42. package/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  44. package/.next/server/app/onboarding/page/server-reference-manifest.json +23 -23
  45. package/.next/server/app/onboarding/page.js.nft.json +1 -1
  46. package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/onboarding.html +1 -1
  48. package/.next/server/app/onboarding.rsc +16 -16
  49. package/.next/server/app/onboarding.segments/_full.segment.rsc +16 -16
  50. package/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
  51. package/.next/server/app/onboarding.segments/_index.segment.rsc +9 -9
  52. package/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  53. package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  54. package/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  55. package/.next/server/app/page/react-loadable-manifest.json +1 -1
  56. package/.next/server/app/page/server-reference-manifest.json +23 -23
  57. package/.next/server/app/page.js.nft.json +1 -1
  58. package/.next/server/app/page_client-reference-manifest.js +1 -1
  59. package/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  60. package/.next/server/app/settings/page/server-reference-manifest.json +32 -32
  61. package/.next/server/app/settings/page.js.nft.json +1 -1
  62. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app/settings.html +1 -1
  64. package/.next/server/app/settings.rsc +16 -16
  65. package/.next/server/app/settings.segments/_full.segment.rsc +16 -16
  66. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  67. package/.next/server/app/settings.segments/_index.segment.rsc +9 -9
  68. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  69. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  70. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  71. package/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  72. package/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +79 -79
  73. package/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  74. package/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  75. package/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  76. package/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +70 -70
  77. package/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  78. package/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  79. package/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  80. package/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +61 -61
  81. package/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  82. package/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  84. package/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +51 -51
  85. package/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  86. package/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  87. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
  88. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +23 -23
  89. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  90. package/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  91. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +1 -1
  92. package/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +56 -56
  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/10ge_next_dist_esm_build_templates_app-route_13~vb_i.js +2 -2
  100. package/.next/server/chunks/[root-of-the-server]__043lk8~._.js +2 -2
  101. package/.next/server/chunks/ssr/0~.g_src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_0bbseig._.js +1 -1
  102. package/.next/server/chunks/ssr/[root-of-the-server]__0.8y0n9._.js +1 -1
  103. package/.next/server/chunks/ssr/[root-of-the-server]__01ws4-7._.js +1 -1
  104. package/.next/server/chunks/ssr/[root-of-the-server]__02ipahf._.js +1 -1
  105. package/.next/server/chunks/ssr/{[root-of-the-server]__0h44~z8._.js → [root-of-the-server]__03swpls._.js} +2 -2
  106. package/.next/server/chunks/ssr/[root-of-the-server]__0bk3s4l._.js +1 -1
  107. package/.next/server/chunks/ssr/[root-of-the-server]__0l~dc3x._.js +1 -1
  108. package/.next/server/chunks/ssr/[root-of-the-server]__0rs7pkn._.js +1 -1
  109. package/.next/server/chunks/ssr/[root-of-the-server]__0sysz2q._.js +3 -3
  110. package/.next/server/chunks/ssr/{[root-of-the-server]__0deh_.r._.js → [root-of-the-server]__0v0dk_o._.js} +2 -2
  111. package/.next/server/chunks/ssr/[root-of-the-server]__0vpgotk._.js +3 -0
  112. package/.next/server/chunks/ssr/[root-of-the-server]__0y-lkvf._.js +1 -1
  113. package/.next/server/chunks/ssr/[root-of-the-server]__12f810l._.js +1 -1
  114. package/.next/server/chunks/ssr/tower_0_i~57x._.js +3 -0
  115. package/.next/server/chunks/ssr/{tower_0j.-goc._.js → tower_0agzi_m._.js} +2 -2
  116. package/.next/server/chunks/ssr/tower_0kl_bfy._.js +1 -1
  117. package/.next/server/chunks/ssr/{tower_0mocaf7._.js → tower_0le1h0h._.js} +2 -2
  118. package/.next/server/chunks/ssr/tower_0mz4ut.._.js +1 -1
  119. package/.next/server/chunks/ssr/tower_0pcqezm._.js +1 -1
  120. package/.next/server/chunks/ssr/{tower_0txw7ny._.js → tower_0rdk81e._.js} +2 -2
  121. package/.next/server/chunks/ssr/tower_0wvk~r.._.js +1 -1
  122. package/.next/server/chunks/ssr/{tower_0x1wfcs._.js → tower_0xg_zeq._.js} +2 -2
  123. package/.next/server/chunks/ssr/{tower_11f_poc._.js → tower_0~oir9k._.js} +2 -2
  124. package/.next/server/chunks/ssr/tower_10p15te._.js +1 -1
  125. package/.next/server/chunks/ssr/tower_117pzh8._.js +1 -1
  126. package/.next/server/chunks/ssr/tower_11q5_.m._.js +1 -1
  127. package/.next/server/chunks/ssr/tower_138qlx5._.js +1 -1
  128. package/.next/server/chunks/ssr/tower_src_0puzd-6._.js +3 -0
  129. package/.next/server/chunks/ssr/tower_src_actions_agent-actions_ts_0j.e1tn._.js +1 -1
  130. package/.next/server/chunks/ssr/tower_src_actions_file-actions_ts_0424lna._.js +1 -1
  131. package/.next/server/chunks/ssr/tower_src_app_missions_missions-client_tsx_0a9vjyr._.js +1 -1
  132. package/.next/server/chunks/ssr/tower_src_app_onboarding_page_tsx_0_3krz1._.js +1 -1
  133. package/.next/server/chunks/ssr/tower_src_app_settings_page_tsx_0vo5e-o._.js +1 -1
  134. package/.next/server/chunks/ssr/tower_src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0zfgzhi._.js +1 -1
  135. package/.next/server/chunks/ssr/tower_src_app_workspaces_[workspaceId]_board-page-client_tsx_0kjp1u0._.js +1 -1
  136. package/.next/server/chunks/tower_0a-x6m.._.js +1 -1
  137. package/.next/server/chunks/tower_src_0..vg-t._.js +1 -1
  138. package/.next/server/middleware-build-manifest.js +3 -3
  139. package/.next/server/pages/404.html +1 -1
  140. package/.next/server/pages/500.html +1 -1
  141. package/.next/server/server-reference-manifest.js +1 -1
  142. package/.next/server/server-reference-manifest.json +214 -214
  143. package/.next/static/chunks/0.uav~g39w7rr.js +1 -0
  144. package/.next/static/chunks/{11_3ea_a8knah.js → 02f8le_y~6gnd.js} +1 -1
  145. package/.next/static/chunks/{0o.ks3~iuzx4r.js → 06-mw~zl.diaf.js} +1 -1
  146. package/.next/static/chunks/{023~s6crmvsm8.js → 06fsp5nfga486.js} +1 -1
  147. package/.next/static/chunks/{0c.0-8lt3bz.1.js → 07~c.vc82_c1-.js} +1 -1
  148. package/.next/static/chunks/{179_l7917u3p2.js → 0amhu3hs4zxxw.js} +1 -1
  149. package/.next/static/chunks/0drgc-oztq6o-.css +1 -0
  150. package/.next/static/chunks/{0vg49pdw~qd37.js → 0k_9.73yz~q10.js} +1 -1
  151. package/.next/static/chunks/0ltsz~s~e4wzu.js +1 -0
  152. package/.next/static/chunks/{051mi_101oh.a.js → 0mf7~j7tvqr46.js} +1 -1
  153. package/.next/static/chunks/{0gt7r3-vbdfj9.js → 0qe.8bmmwuucu.js} +1 -1
  154. package/.next/static/chunks/0qpq1~6v-eql7.js +1 -0
  155. package/.next/static/chunks/0uxf0jd91e-0r.js +1 -0
  156. package/.next/static/chunks/{0r1oyqeuqr030.js → 0vn2y~4w7u3ui.js} +1 -1
  157. package/.next/static/chunks/{0ziax8rwv_767.js → 15gjy.xhhriy8.js} +2 -2
  158. package/.next/static/chunks/{0qagt5x67~~sx.js → 16ft9mdv3zwse.js} +1 -1
  159. package/.next/trace +2 -2
  160. package/.next/trace-build +1 -1
  161. package/next.config.ts +1 -1
  162. package/package.json +1 -1
  163. package/.next/server/chunks/ssr/[root-of-the-server]__0iluaa1._.js +0 -3
  164. package/.next/server/chunks/ssr/tower_0h2g2_e._.js +0 -3
  165. package/.next/server/chunks/ssr/tower_src_0u.-h7b._.js +0 -3
  166. package/.next/static/chunks/08g2tlzp2n4gz.js +0 -1
  167. package/.next/static/chunks/0_guif4s2s3q..css +0 -1
  168. package/.next/static/chunks/0q5~5fua-vef8.js +0 -1
  169. package/.next/static/chunks/0v1_be48b8jhu.js +0 -1
  170. package/.next/static/chunks/18augppu.eqk1.js +0 -1
  171. /package/.next/static/{BIQ1l5etqo7aJnbnv-Bqt → dwsGxWRLV_FPRJyEkai5s}/_buildManifest.js +0 -0
  172. /package/.next/static/{BIQ1l5etqo7aJnbnv-Bqt → dwsGxWRLV_FPRJyEkai5s}/_clientMiddlewareManifest.js +0 -0
  173. /package/.next/static/{BIQ1l5etqo7aJnbnv-Bqt → dwsGxWRLV_FPRJyEkai5s}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,494094,e=>{"use strict";let t=(0,e.i(258114).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",0,t],494094)},597736,e=>{"use strict";var t=e.i(794097);e.s(["ChevronRight",()=>t.default])},986633,e=>{"use strict";let t=(0,e.i(258114).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],986633)},86630,622622,e=>{"use strict";var t=e.i(258114);let r=(0,t.default)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);e.s(["ClipboardList",0,r],86630);let s=(0,t.default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,s],622622)},107414,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},800631,412618,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("40d86375834c7666d6e6d3259411a40a2f112bc6d4",t.callServer,void 0,t.findSourceMapURL,"createNote");e.s(["createNote",0,r],800631);let s=(0,t.createServerReference)("405378479c4faca2e5653db95730369b873a071957",t.callServer,void 0,t.findSourceMapURL,"deleteNote");e.s(["deleteNote",0,s],412618)},583315,e=>{"use strict";let t=(0,e.i(258114).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],583315)},113205,e=>{"use strict";var t=e.i(430989),r=e.i(47816);e.s(["EmptyState",0,function({icon:e,title:s,description:a,action:i,className:n}){return(0,t.jsxs)("div",{className:(0,r.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:s}),a&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:a}),i&&(0,t.jsx)("div",{className:"mt-2",children:i})]})}])},2139,e=>{"use strict";let t=(0,e.i(258114).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],2139)},512839,619770,e=>{"use strict";let t=(0,e.i(258114).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],512839);var r=e.i(755683);let s=(0,r.createServerReference)("4059653d273e86f9a50303a80e5daa5c8410fa3597",r.callServer,void 0,r.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,s],619770)},132471,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("4070586ed2e5cef09b54cdc9f4135aafb2110317f8",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,r])},174145,e=>{"use strict";var t=e.i(228202),r=e.i(703995),s=e.i(555138),a=e.i(47816);let i=(0,s.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:s="default",render:n,...l}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,a.cn)(i({variant:s}),e)},l),render:n,state:{slot:"badge",variant:s}},(0,r.useRenderElement)(o.defaultTagName??"div",o,o)}],174145)},170528,581511,e=>{"use strict";var t=e.i(93850);e.s(["CheckCircle2",()=>t.default],170528);let r=(0,e.i(258114).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,r],581511)},678978,e=>{"use strict";let t=(0,e.i(258114).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],678978)},751049,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("40c9f4e50b0e1ed71eaaab93bfe9ce73fddd28d884",t.callServer,void 0,t.findSourceMapURL,"getPrompts");e.s(["getPrompts",0,r])},993623,e=>{"use strict";var t=e.i(430989),r=e.i(47816);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}])},232093,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("7886ea6863d0931282634b87c57a3551c22c488c3b",t.callServer,void 0,t.findSourceMapURL,"startPtyExecution");e.s(["startPtyExecution",0,r])},806952,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("4012c0bc23424605056e6aae4956aa7718060ca459",t.callServer,void 0,t.findSourceMapURL,"stopPtyExecution");e.s(["stopPtyExecution",0,r])},302629,545315,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("60ff3af7bd9fbc86b8e4acf2805e6b108b1c083d61",t.callServer,void 0,t.findSourceMapURL,"resumePtyExecution");e.s(["resumePtyExecution",0,r],302629);let s=(0,e.i(258114).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,s],545315)},586211,e=>{"use strict";let t=(0,e.i(258114).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);e.s(["Lightbulb",0,t],586211)},352125,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("60830852add5609d46f1fa921dc10becc42c34cf9a",t.callServer,void 0,t.findSourceMapURL,"updateProject");e.s(["updateProject",0,r])},775899,e=>{"use strict";var t=e.i(430989),r=e.i(641338),s=e.i(259104),a=e.i(260949),i=e.i(811163),n=e.i(698300),l=e.i(924609),o=e.i(331548),c=e.i(744838),d=e.i(745943),u=e.i(779574),x=e.i(349369);e.s(["CreateBranchDialog",0,function({open:e,onOpenChange:m,branches:h,currentBranch:f,localPath:g,onCreated:p,onError:b}){let{t:v}=(0,x.useI18n)(),[y,j]=(0,r.useState)(""),[N,w]=(0,r.useState)(f),[k,C]=(0,r.useState)(""),[S,M]=(0,r.useState)(!1),[L,R]=(0,r.useState)(""),[D,E]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&(j(""),w(f),C(""),R(""))},[e,f]);let T=[...new Set(h)].filter(e=>e.toLowerCase().includes(L.toLowerCase())),P=async()=>{if(y.trim()){M(!0);try{let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:y.trim(),baseBranch:N})});if(e.ok)m(!1),p();else{let t=await e.json();b(t.error||"Unknown error")}}catch{b("Network error")}finally{M(!1)}}};return(0,t.jsx)(o.Dialog,{open:e,onOpenChange:m,children:(0,t.jsxs)(o.DialogContent,{className:"sm:max-w-sm",children:[(0,t.jsx)(o.DialogHeader,{children:(0,t.jsx)(o.DialogTitle,{children:v("git.createBranch")})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.branchName")}),(0,t.jsx)(d.Input,{value:y,onChange:e=>j(e.target.value),placeholder:v("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:e=>"Enter"===e.key&&P()})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.baseBranch")}),(0,t.jsxs)("div",{className:"relative mt-1.5",children:[(0,t.jsxs)("button",{onClick:()=>E(!D),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,t.jsx)("span",{className:"font-mono text-xs text-foreground",children:N})]}),(0,t.jsx)(a.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${D?"rotate-180":""}`})]}),D&&(0,t.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,t.jsx)("div",{className:"border-b border-border p-1.5",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(i.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,t.jsx)("input",{value:L,onChange:e=>R(e.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,t.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:T.map(e=>(0,t.jsxs)("button",{onClick:()=>{w(e),E(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${e===N?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,t.jsx)(s.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs",children:e}),e===N&&(0,t.jsx)(n.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},e))})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:v("git.branchDesc")}),(0,t.jsx)(u.Textarea,{value:k,onChange:e=>C(e.target.value),placeholder:v("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,t.jsxs)(o.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>m(!1),children:v("common.cancel")}),(0,t.jsxs)(c.Button,{onClick:P,disabled:!y.trim()||S,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[S?(0,t.jsx)(l.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,v("common.create")]})]})]})})}])},121505,e=>{"use strict";let t=(0,e.i(258114).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["ArrowUpFromLine",0,t],121505)},426175,e=>{"use strict";async function t(e,r,s={}){let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:r,path:e,...s})});if(!a.ok)throw Error((await a.json()).error||`${r} failed`);return a.json()}e.s(["gitAction",0,t])},421051,e=>{"use strict";var t=e.i(860875);e.s(["AlertTriangle",()=>t.default])},928951,e=>{"use strict";let t=(0,e.i(258114).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);e.s(["GitCompare",0,t],928951)},246762,960732,e=>{"use strict";var t=e.i(430989),r=e.i(641338),s=e.i(597736),a=e.i(260949),i=e.i(421051),n=e.i(928951),l=e.i(258114);let o=(0,l.default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);var c=e.i(744838),d=e.i(113205),u=e.i(174145),x=e.i(331548),m=e.i(779574),h=e.i(349369);e.s(["TaskDiffView",0,function({files:e,totalAdded:l,totalRemoved:f,hasConflicts:g,conflictFiles:p,onCommit:b,hasUncommitted:v}){let{t:y}=(0,h.useI18n)(),[j,N]=(0,r.useState)(new Set),[w,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(""),[M,L]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"flex flex-col h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-medium text-foreground",children:[e.length," files changed"]}),(0,t.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",l]}),(0,t.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",f]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:v&&b&&(0,t.jsxs)(c.Button,{variant:"outline",onClick:()=>k(!0),className:"gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4"}),y("diff.commit")]})})]}),g&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,t.jsx)(i.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",p.length," conflicting file",1!==p.length?"s":""]})]}),(0,t.jsx)("ul",{className:"ml-6 space-y-1",children:p.map(e=>(0,t.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:0===e.length?(0,t.jsx)(d.EmptyState,{icon:n.GitCompare,title:y("diff.noChanges"),className:"h-full"}):(0,t.jsx)("div",{className:"divide-y divide-border",children:e.map(e=>{let r=j.has(e.filename);return(0,t.jsxs)("div",{children:[(0,t.jsxs)(c.Button,{variant:"ghost",type:"button",onClick:()=>{var t;return t=e.filename,void N(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[r?(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,t.jsx)(s.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:e.filename}),e.isBinary?(0,t.jsx)(u.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:"Binary"}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",e.added]}),(0,t.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",e.removed]})]})]}),r&&e.patch&&(0,t.jsx)("div",{className:"border-t border-border bg-background",children:(0,t.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:e.patch.split("\n").map((e,r)=>{let s=e.startsWith("+")&&!e.startsWith("+++")?"px-4 block bg-green-500/10 text-green-400":e.startsWith("-")&&!e.startsWith("---")?"px-4 block bg-red-500/10 text-red-400":e.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,t.jsx)("span",{className:s,children:e||" "},r)})})})]},e.filename)})})}),(0,t.jsx)(x.Dialog,{open:w,onOpenChange:k,children:(0,t.jsxs)(x.DialogContent,{className:"max-w-md",children:[(0,t.jsx)(x.DialogHeader,{children:(0,t.jsx)(x.DialogTitle,{children:y("diff.commitChanges")})}),(0,t.jsx)("div",{className:"flex flex-col gap-3",children:(0,t.jsx)(m.Textarea,{value:C,onChange:e=>S(e.target.value),placeholder:y("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"ghost",onClick:()=>k(!1),children:y("common.cancel")}),(0,t.jsx)(c.Button,{onClick:async()=>{if(C.trim()&&b){L(!0);try{await b(C.trim()),S(""),k(!1)}finally{L(!1)}}},disabled:!C.trim()||M,children:M?"...":y("diff.commit")})]})]})})]})}],246762);var f=e.i(347880);let g=(0,l.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);var p=e.i(924609);e.s(["TaskMergeConfirmDialog",0,function({open:e,onOpenChange:s,taskId:a,taskTitle:i,baseBranch:n,fileCount:l,commitCount:o,commitLog:d=[],onMergeComplete:u}){let m=(0,f.useRouter)(),[h,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null),j=async()=>{b(!0),y(null);try{let e=await fetch(`/api/tasks/${a}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e.ok){s(!1),u(),m.refresh();return}let t=await e.json().catch(()=>({error:"Merge failed"}));409===e.status?y(`Merge conflicts detected: ${Array.isArray(t.conflictFiles)?t.conflictFiles.join(", "):"unknown files"}`):y(t.error??"Merge failed")}catch{y("Network error — merge failed")}finally{b(!1)}};return(0,t.jsx)(x.Dialog,{open:e,onOpenChange:s,children:(0,t.jsxs)(x.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,t.jsx)(x.DialogHeader,{children:(0,t.jsxs)(x.DialogTitle,{className:"flex items-center gap-2",children:[(0,t.jsx)(g,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,t.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:n})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:l})]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:o})]})]}),d.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,t.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:d.map((e,r)=>(0,t.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:e},r))})]}),v&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,t.jsx)("p",{className:"text-xs text-red-400",children:v})})]}),(0,t.jsxs)(x.DialogFooter,{children:[(0,t.jsx)(c.Button,{variant:"outline",onClick:()=>s(!1),disabled:h,children:"Cancel"}),(0,t.jsx)(c.Button,{onClick:j,disabled:h,className:"gap-2",children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],960732)},660289,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("40a90c7d3374bc46c6aa4f2390ae82109f7ddeddf8",t.callServer,void 0,t.findSourceMapURL,"getTaskExecutions");e.s(["getTaskExecutions",0,r])},829107,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("4085bdb12a7c36130ca4425f712f21e4c411b89a51",t.callServer,void 0,t.findSourceMapURL,"continueLatestPtyExecution");e.s(["continueLatestPtyExecution",0,r])},348045,727594,930432,43108,e=>{"use strict";var t=e.i(755683);let r=(0,t.createServerReference)("601fc56bc936bf802ec7aac5fb6fdfee34c17293ff",t.callServer,void 0,t.findSourceMapURL,"updateTaskStatus");e.s(["updateTaskStatus",0,r],348045);let s=(0,t.createServerReference)("40fea9224868c1a15421bdee8a053b20283b3bb8b8",t.callServer,void 0,t.findSourceMapURL,"checkWorktreeClean");e.s(["checkWorktreeClean",0,s],727594);let a=(0,t.createServerReference)("6090c0e8a20957323ccaaa23cfdb5fb61eb3c11374",t.callServer,void 0,t.findSourceMapURL,"commitWorktreeChanges");e.s(["commitWorktreeChanges",0,a],930432);let i=(0,e.i(258114).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,i],43108)},711958,e=>{"use strict";var t=e.i(430989),r=e.i(641338),s=e.i(260949),a=e.i(569021),i=e.i(170528),n=e.i(581511),l=e.i(924609),o=e.i(43108),c=e.i(2139),d=e.i(545315),u=e.i(586211);let x=(0,e.i(258114).default)("history",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var m=e.i(744838),h=e.i(113205),f=e.i(349369);function g({status:e}){switch(e){case"COMPLETED":return(0,t.jsx)(i.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,t.jsx)(n.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,t.jsx)(l.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-neutral-500"})}}e.s(["ExecutionTimeline",0,function({executions:e,onResume:i,onContinueLatest:n}){let{t:l,locale:o}=(0,f.useI18n)(),[p,b]=(0,r.useState)(null),[v,y]=(0,r.useState)(null);return 0===e.length?(0,t.jsx)(h.EmptyState,{icon:x,title:l("execution.noHistory")}):(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:l("execution.history")}),e.map(r=>{let x=function(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}(r.gitStats??null),h=function(e,t){if(!e||!t)return"";let r=new Date(t).getTime()-new Date(e).getTime();if(r<0)return"";let s=Math.floor(r/1e3);if(s<60)return`${s}s`;let a=Math.floor(s/60);if(a<60)return`${a}m ${s%60}s`;let i=Math.floor(a/60);return`${i}h ${a%60}m`}(r.startedAt??null,r.endedAt??null),f=p===r.id;return(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(g,{status:r.status}),(0,t.jsx)("span",{className:`font-medium ${function(e){switch(e){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(r.status)}`,children:function(e,t){switch(e){case"COMPLETED":return t("execution.success");case"FAILED":return t("execution.failed");case"RUNNING":return t("execution.running");default:return e}}(r.status,l)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:function(e,t="zh"){if(!e)return"";let r=new Date(e),s=Math.floor((new Date().getTime()-r.getTime())/864e5),a="zh"===t?"zh-CN":"en-US",i=r.toLocaleTimeString(a,{hour:"2-digit",minute:"2-digit"});return 0===s?i:1===s?"zh"===t?`昨天 ${i}`:`Yesterday ${i}`:s<7?"zh"===t?`${s}天前 ${i}`:`${s}d ago ${i}`:r.toLocaleDateString(a,{month:"2-digit",day:"2-digit"})+" "+i}(r.startedAt??null,o)}),h&&(0,t.jsxs)("span",{className:"text-muted-foreground/60",children:["(",h,")"]})]}),(0,t.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:r.summary||l("execution.noSummary")}),x&&(x.commits||x.filesChanged)&&(0,t.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[x.commits?(0,t.jsxs)("span",{children:[x.commits," ",l("execution.commits")]}):null,x.filesChanged?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{children:[x.filesChanged," ",l("execution.files")]})]}):null,x.insertions||x.deletions?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"·"}),x.insertions?(0,t.jsxs)("span",{className:"text-emerald-500",children:["+",x.insertions]}):null,x.deletions?(0,t.jsxs)("span",{className:"text-red-400",children:["-",x.deletions]}):null]}):null]}),r.insightNote&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsxs)("button",{onClick:()=>y(v===r.id?null:r.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,t.jsx)(u.Lightbulb,{className:"h-3.5 w-3.5"}),(0,t.jsxs)("span",{className:"font-medium",children:[l("execution.insight"),":"]}),(0,t.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:r.insightNote.title}),v===r.id?(0,t.jsx)(a.ChevronUp,{className:"h-3 w-3"}):(0,t.jsx)(s.ChevronDown,{className:"h-3 w-3"})]}),v===r.id&&(0,t.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:r.insightNote.content})]}),(0,t.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[r.sessionId&&i?(0,t.jsxs)(m.Button,{size:"sm",onClick:()=>i(r.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(c.PlayCircle,{className:"h-3.5 w-3.5"}),l("execution.resume")]}):!r.sessionId&&"FAILED"===r.status&&r.id===e[0]?.id&&n?(0,t.jsxs)(m.Button,{size:"sm",onClick:n,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,t.jsx)(d.RotateCcw,{className:"h-3.5 w-3.5"}),l("execution.tryRecover")]}):null,(0,t.jsxs)(m.Button,{variant:"ghost",size:"sm",onClick:()=>b(f?null:r.id),className:"bg-muted text-muted-foreground",children:[f?(0,t.jsx)(a.ChevronUp,{className:"h-3.5 w-3.5"}):(0,t.jsx)(s.ChevronDown,{className:"h-3.5 w-3.5"}),f?l("execution.collapse"):l("execution.details")]})]})]}),f&&(0,t.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[r.gitLog&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.gitLog")}),(0,t.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:r.gitLog.split("\n").slice(0,3).join("\n")})]}),r.terminalLog&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:l("execution.terminalOutput")}),(0,t.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:r.terminalLog})]}),"FAILED"===r.status&&null!=r.exitCode&&(0,t.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",r.exitCode]})]})]},r.id)})]})}],711958)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,755167,e=>{"use strict";var t=e.i(430989),s=e.i(226549),a=e.i(347880),r=e.i(583315),l=e.i(652459),n=e.i(819614),i=e.i(306308),o=e.i(349369);let d=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,o.useI18n)(),n=(0,a.usePathname)(),i=d.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),d.map(a=>{let r=a.icon,n=i===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},107414,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},509358,e=>{"use strict";var t=e.i(755683);let s=(0,t.createServerReference)("40b641eb468f39b4b3b2078ec93511d1ce34b63c8e",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},512839,962652,e=>{"use strict";let t=(0,e.i(258114).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],512839);var s=e.i(755683);let a=(0,s.createServerReference)("40b72343350b79baf0da7d1fdf2bc004c35753fdda",s.callServer,void 0,s.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,a],962652)},174145,e=>{"use strict";var t=e.i(228202),s=e.i(703995),a=e.i(555138),r=e.i(47816);let l=(0,a.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:a="default",render:n,...i}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(l({variant:a}),e)},i),render:n,state:{slot:"badge",variant:a}},(0,s.useRenderElement)(o.defaultTagName??"div",o,o)}],174145)},583315,e=>{"use strict";let t=(0,e.i(258114).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],583315)},113205,e=>{"use strict";var t=e.i(430989),s=e.i(47816);e.s(["EmptyState",0,function({icon:e,title:a,description:r,action:l,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:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},2139,e=>{"use strict";let t=(0,e.i(258114).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],2139)},653157,e=>{"use strict";let t=(0,e.i(258114).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],653157)},99752,e=>{"use strict";var t=e.i(430989),s=e.i(641338),a=e.i(924609),r=e.i(755167),l=e.i(349369),n=e.i(509358),i=e.i(755683);let o=(0,i.createServerReference)("40e6b78dc06774b1b8ccc3a29e530d4268cf5b2f01",i.callServer,void 0,i.findSourceMapURL,"getProjectAssets");var d=e.i(819614),c=e.i(113205),x=e.i(652459),u=e.i(653157),m=e.i(584451),h=e.i(744838);function p(e){let t=e.match(/(?:^|\/)(?:storage|data)\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}function f({asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n}){var i;let{t:o}=(0,l.useI18n)(),c=p(e.path),g=e.mimeType?.startsWith("image/");return(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:bg-accent/20",children:[(0,t.jsx)(h.Button,{variant:"ghost",onClick:()=>s(e),className:"flex-shrink-0 cursor-pointer p-0 h-auto",children:g?(0,t.jsx)("img",{src:c,alt:e.filename,className:"h-12 w-12 rounded object-cover border border-border"}):(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded border border-border bg-muted",children:(0,t.jsx)(x.FileText,{className:"h-6 w-6 text-muted-foreground"})})}),(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)("p",{className:"truncate text-sm font-medium text-foreground",children:e.filename}),e.taskTitle&&e.taskId&&(0,t.jsx)(h.Button,{variant:"ghost",onClick:t=>{t.stopPropagation(),n?.(e.taskId)},className:"flex-shrink-0 bg-blue-500/10 text-blue-600 dark:text-blue-400 text-xs px-1.5 py-0.5 rounded cursor-pointer hover:bg-blue-500/20 transition-colors h-auto",children:e.taskTitle.length>20?`[任务: ${e.taskTitle.slice(0,20)}...]`:`[任务: ${e.taskTitle}]`})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:null===(i=e.size)?"-":i<1024?`${i} B`:i<1048576?`${(i/1024).toFixed(1)} KB`:i<0x40000000?`${(i/1048576).toFixed(1)} MB`:`${(i/0x40000000).toFixed(1)} GB`}),(0,t.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>s(e),className:"text-muted-foreground","aria-label":o("assets.preview"),children:(0,t.jsx)(u.Eye,{className:"h-4 w-4"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>a(e),className:"text-muted-foreground","aria-label":o("assets.revealInFinder"),children:(0,t.jsx)(d.FolderOpen,{className:"h-4 w-4"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>r(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":o("assets.delete"),children:(0,t.jsx)(m.Trash2,{className:"h-4 w-4"})})]})]})}function g({assets:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n}){let{t:i}=(0,l.useI18n)();return 0===e.length?(0,t.jsx)(c.EmptyState,{icon:d.FolderOpen,title:i("assets.empty"),description:i("assets.emptyHint")}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,t.jsx)(f,{asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n},e.id))})}var j=e.i(512839),b=e.i(621994),v=e.i(962652),y=e.i(779574),N=e.i(702431);function w({allWorkspaces:e,initialWsId:a,initialProjectId:r,onUploaded:n}){let i,{t:o}=(0,l.useI18n)(),d=(0,s.useRef)(null),[c,x]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),[p,f]=(0,s.useState)(null),[g,k]=(0,s.useState)(a),[S,C]=(0,s.useState)(r),[T,I]=(0,s.useState)(""),O=e.find(e=>e.id===g),D=O?.projects??[],E=()=>{x(!1),f(null),d.current&&(d.current.value="")},R=async()=>{if(p&&S){m(!0);try{let e=new FormData;e.append("file",p),e.append("projectId",S),e.append("description",T.trim()),await (0,v.uploadAsset)(e),n(S),E()}finally{m(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.Button,{onClick:()=>{k(a),C(r),f(null),I(""),x(!0)},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(j.Upload,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:o("assets.upload")})]}),c&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:E}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-lg border border-border bg-card p-6 shadow-lg",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:E,className:"absolute right-3 top-3 text-muted-foreground",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-4",children:o("assets.uploadTitle")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.workspace")}),(0,t.jsxs)(N.Select,{value:g,onValueChange:t=>{var s;let a;return k(s=t??""),a=e.find(e=>e.id===s),void C(a?.projects[0]?.id??null)},children:[(0,t.jsx)(N.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:O?.name??g})}),(0,t.jsx)(N.SelectContent,{children:e.map(e=>(0,t.jsx)(N.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.project")}),D.length>0?(0,t.jsxs)(N.Select,{value:S??"",onValueChange:e=>C(e??""),children:[(0,t.jsx)(N.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(i=D.find(e=>e.id===S))?i.alias?`${i.name} (${i.alias})`:i.name:S})}),(0,t.jsx)(N.SelectContent,{children:D.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(N.SelectItem,{value:e.id,children:s},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o("assets.noProject")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.file")}),(0,t.jsx)("input",{type:"file",ref:d,onChange:e=>{f(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>{d.current?.click()},className:"flex-1 border-dashed bg-background px-3 py-2 text-xs text-muted-foreground hover:border-primary/50 hover:text-foreground transition-colors text-left justify-start",children:p?p.name:o("assets.selectFile")})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0 pt-1.5",children:o("assets.description")}),(0,t.jsx)(y.Textarea,{value:T,onChange:e=>I(e.target.value),placeholder:o("assets.descriptionPlaceholder"),className:"flex-1 rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring resize-none h-20"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end mt-6",children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:E,children:o("notes.cancel")}),(0,t.jsx)(h.Button,{onClick:R,disabled:!p||!S||!T.trim()||u,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:o(u?"assets.uploading":"assets.upload")})]})]})]})]})}var k=e.i(331548);function S({imageUrl:e,filename:a,open:r,onOpenChange:l}){let[n,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{i(!1)},[r]),(0,t.jsx)(k.Dialog,{open:r,onOpenChange:l,children:(0,t.jsxs)(k.DialogContent,{showCloseButton:!1,className:"max-w-[90vw] max-h-[90vh] p-0 overflow-hidden bg-black/90 ring-0",children:[(0,t.jsx)(k.DialogClose,{render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-2 right-2 z-10 h-8 w-8 p-0 text-white hover:bg-white/20 hover:text-white"}),"aria-label":"Close",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})}),e&&(0,t.jsx)(t.Fragment,{children:n?(0,t.jsx)("div",{className:"overflow-auto max-w-[90vw] max-h-[90vh]",children:(0,t.jsx)("img",{src:e,alt:a,onClick:()=>i(!1),className:"w-auto h-auto max-w-none cursor-zoom-out"})}):(0,t.jsx)("img",{src:e,alt:a,onClick:()=>i(!0),className:"max-w-full max-h-[85vh] object-contain cursor-zoom-in mx-auto"})}),(0,t.jsx)("span",{className:"absolute bottom-2 left-3 text-xs text-white/70 truncate max-w-[60%]",children:a})]})})}var C=e.i(201853),T=e.i(680538);function I({url:e,filename:r,open:n,onOpenChange:i}){let{t:o}=(0,l.useI18n)(),[d,c]=(0,s.useState)(null),[x,u]=(0,s.useState)(!1),[m,h]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!n||!e){c(null),h(null);return}let t=!1;return u(!0),h(null),c(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(c(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?h(o("assets.fileTooLarge")):h(o("assets.previewError")),u(!1))}),()=>{t=!0}},[n,e,o]);let p=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(k.Dialog,{open:n,onOpenChange:i,children:(0,t.jsxs)(k.DialogContent,{className:"max-w-3xl max-h-[80vh] flex flex-col",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-4 pt-4",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-4 pb-4 pt-2",children:(()=>{if(x)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o("assets.loadingPreview")})]});if(m)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:m});if(null===d)return null;if("md"===p)return(0,t.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:(0,t.jsx)(C.default,{remarkPlugins:[T.default],children:d})});if("json"===p){let e;try{e=JSON.stringify(JSON.parse(d),null,2)}catch{e=d}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:d})})()})]})})}var O=e.i(799038),D=e.i(47816),E=e.i(943931);function R({...e}){return(0,t.jsx)(O.Dialog.Root,{"data-slot":"sheet",...e})}function A({...e}){return(0,t.jsx)(O.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function B({className:e,...s}){return(0,t.jsx)(O.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,D.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}function $({className:e,children:s,side:a="right",showCloseButton:r=!0,...l}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(B,{}),(0,t.jsxs)(O.Dialog.Popup,{"data-slot":"sheet-content","data-side":a,className:(0,D.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...l,children:[s,r&&(0,t.jsxs)(O.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(E.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function P({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,D.cn)("flex flex-col gap-0.5 p-4",e),...s})}function L({className:e,...s}){return(0,t.jsx)(O.Dialog.Title,{"data-slot":"sheet-title",className:(0,D.cn)("font-heading text-base font-medium text-foreground",e),...s})}function z({className:e,...s}){return(0,t.jsx)(O.Dialog.Description,{"data-slot":"sheet-description",className:(0,D.cn)("text-sm text-muted-foreground",e),...s})}var F=e.i(24887),M=e.i(174145);let _=(0,i.createServerReference)("40e5938aa52d0aa16a6ece106bd5a593c97babf0f6",i.callServer,void 0,i.findSourceMapURL,"getTaskOverview");var U=e.i(107414),G=e.i(258114);let V=(0,G.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),W=(0,G.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var H=e.i(2139);function J({open:e,onOpenChange:a,taskId:r}){let{t:n}=(0,l.useI18n)(),[i,o]=(0,s.useState)(null),[d,c]=(0,s.useTransition)();(0,s.useEffect)(()=>{r&&e?c(async()=>{let e=await _(r);e&&o(e)}):o(null)},[r,e]);let x=i?U.BOARD_COLUMNS.find(e=>e.id===i.status):null,u=i?U.PRIORITY_CONFIG[i.priority]:null,m=i?.executions?.[0]??null;return(0,t.jsx)(R,{open:e,onOpenChange:a,children:(0,t.jsxs)($,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(P,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(L,{className:"text-base font-semibold leading-tight pr-8",children:i?.title??""}),(0,t.jsx)(z,{className:"sr-only",children:n("taskDrawer.title")}),i&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[x&&(0,t.jsxs)(M.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${x.color}`}),x.label]}),u&&(0,t.jsx)(M.Badge,{variant:"secondary",className:`text-xs ${u.color}`,children:u.label})]})]}),(0,t.jsx)(F.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:d&&!i?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:n("assets.loading")}):i?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:n("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:i.description||n("taskDrawer.noDescription")})]}),i.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:n("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.labels.map(e=>(0,t.jsx)(M.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(V,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(i.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(W,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:i._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(H.PlayCircle,{className:"h-3.5 w-3.5"}),n("taskDrawer.lastExecution")]}),m?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(M.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:m.status}),m.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:m.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("taskDrawer.noExecution")})]})]}):null})]})})}var K=e.i(151201);e.s(["AssetsPageClient",0,function({allWorkspaces:e,initialWorkspaceId:i,initialProjectId:d,initialAssets:c}){let x,{t:u}=(0,l.useI18n)(),[m,h]=(0,s.useTransition)(),[f,j]=(0,s.useState)(i),[b,v]=(0,s.useState)(d),[y,k]=(0,s.useState)(c),[C,T]=(0,s.useState)(null),O=e.find(e=>e.id===f),D=O?.projects??[],E=(0,s.useCallback)(e=>{e?h(async()=>{k(await o(e))}):k([])},[h]),[R,A]=(0,s.useState)(null),B=R?R.mimeType?.startsWith("image/")?"image":/\.(txt|md|json)$/i.test(R.filename)?"text":null:null,$=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));K.toast.error(e.error||"Failed to reveal file")}}catch{K.toast.error("Failed to reveal file")}},P=async e=>{let t=y.find(t=>t.id===e);confirm(u("assets.deleteConfirm",{filename:t?.filename??e}))&&(await (0,n.deleteAsset)(e),E(b))};return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(r.SubPageNav,{workspaceId:f}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(N.Select,{value:f,onValueChange:t=>t&&(t=>{if(t===f)return;j(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;v(a?.id??null),E(a?.id??null)})(t),children:[(0,t.jsx)(N.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===f)?.name??f})}),(0,t.jsx)(N.SelectContent,{children:e.map(e=>(0,t.jsx)(N.SelectItem,{value:e.id,children:e.name},e.id))})]}),D.length>0&&(0,t.jsxs)(N.Select,{value:b??"",onValueChange:e=>e&&void(e!==b&&(v(e),E(e))),children:[(0,t.jsx)(N.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(x=D.find(e=>e.id===b))?x.alias?`${x.name} (${x.alias})`:x.name:""})}),(0,t.jsx)(N.SelectContent,{children:D.map(e=>(0,t.jsxs)(N.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(w,{allWorkspaces:e,initialWsId:f,initialProjectId:b,onUploaded:e=>{e===b&&E(b)}})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,t.jsxs)("div",{className:`relative ${m?"opacity-40 pointer-events-none":""} transition-opacity`,children:[m&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===D.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:u("assets.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:u("assets.noProjectHint")})]}):(0,t.jsx)(g,{assets:y.map(e=>({...e,taskId:e.task?.id??null,taskTitle:e.task?.title??null})),onPreview:e=>{let t=e.mimeType?.startsWith("image/"),s=/\.(txt|md|json)$/i.test(e.filename);(t||s)&&A(e)},onReveal:$,onDelete:P,onTaskClick:T})]})}),(0,t.jsx)(S,{imageUrl:"image"===B&&R?p(R.path):null,filename:R?.filename??"",open:"image"===B,onOpenChange:e=>{e||A(null)}}),(0,t.jsx)(I,{url:"text"===B&&R?p(R.path):null,filename:R?.filename??"",open:"text"===B,onOpenChange:e=>{e||A(null)}}),(0,t.jsx)(J,{open:!!C,onOpenChange:e=>{e||T(null)},taskId:C})]})}],99752)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,755167,e=>{"use strict";var t=e.i(430989),s=e.i(226549),a=e.i(347880),r=e.i(583315),l=e.i(652459),n=e.i(819614),i=e.i(306308),o=e.i(349369);let d=[{key:"notes",icon:l.FileText},{key:"assets",icon:n.FolderOpen},{key:"archive",icon:i.Archive}];e.s(["SubPageNav",0,function({workspaceId:e}){let{t:l}=(0,o.useI18n)(),n=(0,a.usePathname)(),i=d.find(e=>n.includes(`/${e.key}`))?.key;return(0,t.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4 py-2",children:[(0,t.jsxs)(s.default,{href:`/workspaces/${e}`,className:"mr-2 flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,t.jsx)(r.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l("archive.backToBoard")})]}),(0,t.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),d.map(a=>{let r=a.icon,n=i===a.key;return(0,t.jsxs)(s.default,{href:`/workspaces/${e}/${a.key}`,className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${n?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,t.jsx)(r,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:l(`sidebar.${a.key}`)})]},a.key)})]})}])},107414,e=>{"use strict";e.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},132471,e=>{"use strict";var t=e.i(755683);let s=(0,t.createServerReference)("4070586ed2e5cef09b54cdc9f4135aafb2110317f8",t.callServer,void 0,t.findSourceMapURL,"deleteAsset");e.s(["deleteAsset",0,s])},512839,619770,e=>{"use strict";let t=(0,e.i(258114).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],512839);var s=e.i(755683);let a=(0,s.createServerReference)("4059653d273e86f9a50303a80e5daa5c8410fa3597",s.callServer,void 0,s.findSourceMapURL,"uploadAsset");e.s(["uploadAsset",0,a],619770)},174145,e=>{"use strict";var t=e.i(228202),s=e.i(703995),a=e.i(555138),r=e.i(47816);let l=(0,a.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:a="default",render:n,...i}){var o;return o={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,r.cn)(l({variant:a}),e)},i),render:n,state:{slot:"badge",variant:a}},(0,s.useRenderElement)(o.defaultTagName??"div",o,o)}],174145)},583315,e=>{"use strict";let t=(0,e.i(258114).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],583315)},113205,e=>{"use strict";var t=e.i(430989),s=e.i(47816);e.s(["EmptyState",0,function({icon:e,title:a,description:r,action:l,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:a}),r&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:r}),l&&(0,t.jsx)("div",{className:"mt-2",children:l})]})}])},2139,e=>{"use strict";let t=(0,e.i(258114).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["PlayCircle",0,t],2139)},653157,e=>{"use strict";let t=(0,e.i(258114).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",0,t],653157)},99752,e=>{"use strict";var t=e.i(430989),s=e.i(641338),a=e.i(924609),r=e.i(755167),l=e.i(349369),n=e.i(132471),i=e.i(755683);let o=(0,i.createServerReference)("40349e38d6148d1d9f418ad6a47af9f9e45688a580",i.callServer,void 0,i.findSourceMapURL,"getProjectAssets");var d=e.i(819614),c=e.i(113205),x=e.i(652459),u=e.i(653157),m=e.i(584451),h=e.i(744838);function p(e){let t=e.match(/(?:^|\/)(?:storage|data)\/assets\/([^/]+)\/([^/]+)$/);return t?`/api/files/assets/${t[1]}/${t[2]}`:e}function f({asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n}){var i;let{t:o}=(0,l.useI18n)(),c=p(e.path),g=e.mimeType?.startsWith("image/");return(0,t.jsxs)("div",{className:"flex items-center gap-4 rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:bg-accent/20",children:[(0,t.jsx)(h.Button,{variant:"ghost",onClick:()=>s(e),className:"flex-shrink-0 cursor-pointer p-0 h-auto",children:g?(0,t.jsx)("img",{src:c,alt:e.filename,className:"h-12 w-12 rounded object-cover border border-border"}):(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded border border-border bg-muted",children:(0,t.jsx)(x.FileText,{className:"h-6 w-6 text-muted-foreground"})})}),(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)("p",{className:"truncate text-sm font-medium text-foreground",children:e.filename}),e.taskTitle&&e.taskId&&(0,t.jsx)(h.Button,{variant:"ghost",onClick:t=>{t.stopPropagation(),n?.(e.taskId)},className:"flex-shrink-0 bg-blue-500/10 text-blue-600 dark:text-blue-400 text-xs px-1.5 py-0.5 rounded cursor-pointer hover:bg-blue-500/20 transition-colors h-auto",children:e.taskTitle.length>20?`[任务: ${e.taskTitle.slice(0,20)}...]`:`[任务: ${e.taskTitle}]`})]}),e.description&&(0,t.jsx)("p",{className:"mt-0.5 text-xs text-muted-foreground truncate",children:e.description}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:null===(i=e.size)?"-":i<1024?`${i} B`:i<1048576?`${(i/1024).toFixed(1)} KB`:i<0x40000000?`${(i/1048576).toFixed(1)} MB`:`${(i/0x40000000).toFixed(1)} GB`}),(0,t.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>s(e),className:"text-muted-foreground","aria-label":o("assets.preview"),children:(0,t.jsx)(u.Eye,{className:"h-4 w-4"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>a(e),className:"text-muted-foreground","aria-label":o("assets.revealInFinder"),children:(0,t.jsx)(d.FolderOpen,{className:"h-4 w-4"})}),(0,t.jsx)(h.Button,{variant:"ghost",size:"icon",onClick:()=>r(e.id),className:"text-muted-foreground hover:text-rose-400","aria-label":o("assets.delete"),children:(0,t.jsx)(m.Trash2,{className:"h-4 w-4"})})]})]})}function g({assets:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n}){let{t:i}=(0,l.useI18n)();return 0===e.length?(0,t.jsx)(c.EmptyState,{icon:d.FolderOpen,title:i("assets.empty"),description:i("assets.emptyHint")}):(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,t.jsx)(f,{asset:e,onPreview:s,onReveal:a,onDelete:r,onTaskClick:n},e.id))})}var j=e.i(512839),v=e.i(621994),b=e.i(619770),y=e.i(779574),N=e.i(702431);function w({allWorkspaces:e,initialWsId:a,initialProjectId:r,onUploaded:n}){let i,{t:o}=(0,l.useI18n)(),d=(0,s.useRef)(null),[c,x]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),[p,f]=(0,s.useState)(null),[g,k]=(0,s.useState)(a),[S,C]=(0,s.useState)(r),[T,I]=(0,s.useState)(""),O=e.find(e=>e.id===g),D=O?.projects??[],E=()=>{x(!1),f(null),d.current&&(d.current.value="")},R=async()=>{if(p&&S){m(!0);try{let e=new FormData;e.append("file",p),e.append("projectId",S),e.append("description",T.trim()),await (0,b.uploadAsset)(e),n(S),E()}finally{m(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(h.Button,{onClick:()=>{k(a),C(r),f(null),I(""),x(!0)},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,t.jsx)(j.Upload,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:o("assets.upload")})]}),c&&(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:E}),(0,t.jsxs)("div",{className:"relative w-full max-w-md rounded-lg border border-border bg-card p-6 shadow-lg",children:[(0,t.jsx)(h.Button,{variant:"ghost",size:"icon-xs",onClick:E,className:"absolute right-3 top-3 text-muted-foreground",children:(0,t.jsx)(v.X,{className:"h-4 w-4"})}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-4",children:o("assets.uploadTitle")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.workspace")}),(0,t.jsxs)(N.Select,{value:g,onValueChange:t=>{var s;let a;return k(s=t??""),a=e.find(e=>e.id===s),void C(a?.projects[0]?.id??null)},children:[(0,t.jsx)(N.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:O?.name??g})}),(0,t.jsx)(N.SelectContent,{children:e.map(e=>(0,t.jsx)(N.SelectItem,{value:e.id,children:e.name},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.project")}),D.length>0?(0,t.jsxs)(N.Select,{value:S??"",onValueChange:e=>C(e??""),children:[(0,t.jsx)(N.SelectTrigger,{className:"flex-1 text-xs",children:(0,t.jsx)("span",{className:"truncate",children:(i=D.find(e=>e.id===S))?i.alias?`${i.name} (${i.alias})`:i.name:S})}),(0,t.jsx)(N.SelectContent,{children:D.map(e=>{let s=e.alias?`${e.name} (${e.alias})`:e.name;return(0,t.jsx)(N.SelectItem,{value:e.id,children:s},e.id)})})]}):(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o("assets.noProject")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0",children:o("assets.file")}),(0,t.jsx)("input",{type:"file",ref:d,onChange:e=>{f(e.target.files?.[0]??null)},className:"hidden"}),(0,t.jsx)(h.Button,{variant:"outline",onClick:()=>{d.current?.click()},className:"flex-1 border-dashed bg-background px-3 py-2 text-xs text-muted-foreground hover:border-primary/50 hover:text-foreground transition-colors text-left justify-start",children:p?p.name:o("assets.selectFile")})]}),(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground w-16 shrink-0 pt-1.5",children:o("assets.description")}),(0,t.jsx)(y.Textarea,{value:T,onChange:e=>I(e.target.value),placeholder:o("assets.descriptionPlaceholder"),className:"flex-1 rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-ring resize-none h-20"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 justify-end mt-6",children:[(0,t.jsx)(h.Button,{variant:"outline",onClick:E,children:o("notes.cancel")}),(0,t.jsx)(h.Button,{onClick:R,disabled:!p||!S||!T.trim()||u,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:o(u?"assets.uploading":"assets.upload")})]})]})]})]})}var k=e.i(331548);function S({imageUrl:e,filename:a,open:r,onOpenChange:l}){let[n,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{i(!1)},[r]),(0,t.jsx)(k.Dialog,{open:r,onOpenChange:l,children:(0,t.jsxs)(k.DialogContent,{showCloseButton:!1,className:"max-w-[90vw] max-h-[90vh] p-0 overflow-hidden bg-black/90 ring-0",children:[(0,t.jsx)(k.DialogClose,{render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-2 right-2 z-10 h-8 w-8 p-0 text-white hover:bg-white/20 hover:text-white"}),"aria-label":"Close",children:(0,t.jsx)(v.X,{className:"h-4 w-4"})}),e&&(0,t.jsx)(t.Fragment,{children:n?(0,t.jsx)("div",{className:"overflow-auto max-w-[90vw] max-h-[90vh]",children:(0,t.jsx)("img",{src:e,alt:a,onClick:()=>i(!1),className:"w-auto h-auto max-w-none cursor-zoom-out"})}):(0,t.jsx)("img",{src:e,alt:a,onClick:()=>i(!0),className:"max-w-full max-h-[85vh] object-contain cursor-zoom-in mx-auto"})}),(0,t.jsx)("span",{className:"absolute bottom-2 left-3 text-xs text-white/70 truncate max-w-[60%]",children:a})]})})}var C=e.i(201853),T=e.i(680538);function I({url:e,filename:r,open:n,onOpenChange:i}){let{t:o}=(0,l.useI18n)(),[d,c]=(0,s.useState)(null),[x,u]=(0,s.useState)(!1),[m,h]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!n||!e){c(null),h(null);return}let t=!1;return u(!0),h(null),c(null),fetch(e).then(e=>{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>1048576)throw Error("FILE_TOO_LARGE");return e.text()}).then(e=>{if(e.length>1048576)throw Error("FILE_TOO_LARGE");t||(c(e),u(!1))}).catch(e=>{t||(e instanceof Error&&"FILE_TOO_LARGE"===e.message?h(o("assets.fileTooLarge")):h(o("assets.previewError")),u(!1))}),()=>{t=!0}},[n,e,o]);let p=r.split(".").pop()?.toLowerCase();return(0,t.jsx)(k.Dialog,{open:n,onOpenChange:i,children:(0,t.jsxs)(k.DialogContent,{className:"max-w-3xl max-h-[80vh] flex flex-col",children:[(0,t.jsx)("h3",{className:"text-sm font-medium truncate px-4 pt-4",children:r}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-4 pb-4 pt-2",children:(()=>{if(x)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o("assets.loadingPreview")})]});if(m)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:m});if(null===d)return null;if("md"===p)return(0,t.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:(0,t.jsx)(C.default,{remarkPlugins:[T.default],children:d})});if("json"===p){let e;try{e=JSON.stringify(JSON.parse(d),null,2)}catch{e=d}return(0,t.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:e})}return(0,t.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:d})})()})]})})}var O=e.i(799038),D=e.i(47816),E=e.i(943931);function R({...e}){return(0,t.jsx)(O.Dialog.Root,{"data-slot":"sheet",...e})}function A({...e}){return(0,t.jsx)(O.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function B({className:e,...s}){return(0,t.jsx)(O.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,D.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...s})}function $({className:e,children:s,side:a="right",showCloseButton:r=!0,...l}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(B,{}),(0,t.jsxs)(O.Dialog.Popup,{"data-slot":"sheet-content","data-side":a,className:(0,D.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...l,children:[s,r&&(0,t.jsxs)(O.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(h.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(E.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function P({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,D.cn)("flex flex-col gap-0.5 p-4",e),...s})}function L({className:e,...s}){return(0,t.jsx)(O.Dialog.Title,{"data-slot":"sheet-title",className:(0,D.cn)("font-heading text-base font-medium text-foreground",e),...s})}function z({className:e,...s}){return(0,t.jsx)(O.Dialog.Description,{"data-slot":"sheet-description",className:(0,D.cn)("text-sm text-muted-foreground",e),...s})}var F=e.i(24887),M=e.i(174145);let _=(0,i.createServerReference)("40c2c0c07e368f29ef86c643e2ab5dfe9a145fed22",i.callServer,void 0,i.findSourceMapURL,"getTaskOverview");var U=e.i(107414),G=e.i(258114);let V=(0,G.default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),W=(0,G.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var H=e.i(2139);function J({open:e,onOpenChange:a,taskId:r}){let{t:n}=(0,l.useI18n)(),[i,o]=(0,s.useState)(null),[d,c]=(0,s.useTransition)();(0,s.useEffect)(()=>{r&&e?c(async()=>{let e=await _(r);e&&o(e)}):o(null)},[r,e]);let x=i?U.BOARD_COLUMNS.find(e=>e.id===i.status):null,u=i?U.PRIORITY_CONFIG[i.priority]:null,m=i?.executions?.[0]??null;return(0,t.jsx)(R,{open:e,onOpenChange:a,children:(0,t.jsxs)($,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,t.jsxs)(P,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,t.jsx)(L,{className:"text-base font-semibold leading-tight pr-8",children:i?.title??""}),(0,t.jsx)(z,{className:"sr-only",children:n("taskDrawer.title")}),i&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[x&&(0,t.jsxs)(M.Badge,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${x.color}`}),x.label]}),u&&(0,t.jsx)(M.Badge,{variant:"secondary",className:`text-xs ${u.color}`,children:u.label})]})]}),(0,t.jsx)(F.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:d&&!i?(0,t.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:n("assets.loading")}):i?(0,t.jsxs)("div",{className:"p-4 space-y-4",children:[(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:n("taskDrawer.description")}),(0,t.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:i.description||n("taskDrawer.noDescription")})]}),i.labels.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:n("taskDrawer.labels")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.labels.map(e=>(0,t.jsx)(M.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${e.label.color}20`,color:e.label.color,borderColor:`${e.label.color}40`},children:e.label.name},e.label.id))})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(V,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("taskDrawer.createdAt")}),(0,t.jsx)("span",{className:"text-foreground",children:new Date(i.createdAt).toLocaleDateString()})]}),(0,t.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(W,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:n("taskDrawer.resources")}),(0,t.jsx)("span",{className:"text-foreground",children:i._count.assets})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,t.jsx)(H.PlayCircle,{className:"h-3.5 w-3.5"}),n("taskDrawer.lastExecution")]}),m?(0,t.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,t.jsx)(M.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:m.status}),m.summary&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:m.summary.slice(0,200)})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("taskDrawer.noExecution")})]})]}):null})]})})}var K=e.i(151201);e.s(["AssetsPageClient",0,function({allWorkspaces:e,initialWorkspaceId:i,initialProjectId:d,initialAssets:c}){let x,{t:u}=(0,l.useI18n)(),[m,h]=(0,s.useTransition)(),[f,j]=(0,s.useState)(i),[v,b]=(0,s.useState)(d),[y,k]=(0,s.useState)(c),[C,T]=(0,s.useState)(null),O=e.find(e=>e.id===f),D=O?.projects??[],E=(0,s.useCallback)(e=>{e?h(async()=>{k(await o(e))}):k([])},[h]),[R,A]=(0,s.useState)(null),B=R?R.mimeType?.startsWith("image/")?"image":/\.(txt|md|json)$/i.test(R.filename)?"text":null:null,$=async e=>{try{let t=await fetch("/api/internal/assets/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(!t.ok){let e=await t.json().catch(()=>({}));K.toast.error(e.error||"Failed to reveal file")}}catch{K.toast.error("Failed to reveal file")}},P=async e=>{let t=y.find(t=>t.id===e);confirm(u("assets.deleteConfirm",{filename:t?.filename??e}))&&(await (0,n.deleteAsset)(e),E(v))};return(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsx)(r.SubPageNav,{workspaceId:f}),(0,t.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,t.jsxs)(N.Select,{value:f,onValueChange:t=>t&&(t=>{if(t===f)return;j(t);let s=e.find(e=>e.id===t),a=s?.projects[0]??null;b(a?.id??null),E(a?.id??null)})(t),children:[(0,t.jsx)(N.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,t.jsx)("span",{className:"truncate",children:e.find(e=>e.id===f)?.name??f})}),(0,t.jsx)(N.SelectContent,{children:e.map(e=>(0,t.jsx)(N.SelectItem,{value:e.id,children:e.name},e.id))})]}),D.length>0&&(0,t.jsxs)(N.Select,{value:v??"",onValueChange:e=>e&&void(e!==v&&(b(e),E(e))),children:[(0,t.jsx)(N.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,t.jsx)("span",{className:"truncate",children:(x=D.find(e=>e.id===v))?x.alias?`${x.name} (${x.alias})`:x.name:""})}),(0,t.jsx)(N.SelectContent,{children:D.map(e=>(0,t.jsxs)(N.SelectItem,{value:e.id,children:[e.name,e.alias?` (${e.alias})`:""]},e.id))})]}),(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(w,{allWorkspaces:e,initialWsId:f,initialProjectId:v,onUploaded:e=>{e===v&&E(v)}})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,t.jsxs)("div",{className:`relative ${m?"opacity-40 pointer-events-none":""} transition-opacity`,children:[m&&(0,t.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,t.jsx)(a.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===D.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:u("assets.noProject")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground/60",children:u("assets.noProjectHint")})]}):(0,t.jsx)(g,{assets:y.map(e=>({...e,taskId:e.task?.id??null,taskTitle:e.task?.title??null})),onPreview:e=>{let t=e.mimeType?.startsWith("image/"),s=/\.(txt|md|json)$/i.test(e.filename);(t||s)&&A(e)},onReveal:$,onDelete:P,onTaskClick:T})]})}),(0,t.jsx)(S,{imageUrl:"image"===B&&R?p(R.path):null,filename:R?.filename??"",open:"image"===B,onOpenChange:e=>{e||A(null)}}),(0,t.jsx)(I,{url:"text"===B&&R?p(R.path):null,filename:R?.filename??"",open:"text"===B,onOpenChange:e=>{e||A(null)}}),(0,t.jsx)(J,{open:!!C,onOpenChange:e=>{e||T(null)},taskId:C})]})}],99752)}]);