tower-studio 0.2.31 → 0.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +30 -30
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
- package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +67 -67
- package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +30 -30
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +30 -30
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +47 -47
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +84 -84
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +84 -84
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +62 -62
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +63 -63
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +30 -30
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +72 -72
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +77 -77
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +50 -50
- package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
- package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0122.hq._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01n7exm._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c513um._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0clvf~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0fey.8j._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gk6ftq._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kay2~d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0lioghc._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0mw.9lg._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0qif839._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0tys9pv._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__12ohpl.._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_0bkvm8c._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_02llcit._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_lib_0aowbzy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01pn3ol._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02p4lry._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b77ayk._.js +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bs_c.t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0cle18b._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0q6m-fw._.js → [root-of-the-server]__0dzfucv._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e25s-_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lx7sf8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0cjnw12._.js → [root-of-the-server]__0pik08u._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rara9.._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rv7-_r._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ggwnea._.js → [root-of-the-server]__0t0.u9.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1307ll-._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0sj20-h._.js → _0-frleg._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0.sfgns._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0fc7rh_._.js → _0.y2of~._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_04ia97a._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_06~9axc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0_kfemp._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_01jctji._.js → _0_vq_9m._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0v~zkwi._.js → _0a5f4n.._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0bkb_.9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0ex2yo6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0.5wuxq._.js → _0fb1op1._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0lr6c.q._.js → _0ia4gik._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_0jg.s-g._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_010l~rd._.js → _0kqe7k7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_12e8ueo._.js → _0lw1tq2._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{_0e2s44q._.js → _0mci_e0._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/_0qd7u-y._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_0tb5sv.._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ttg7a2._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0vl82nb._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0.i2.1y._.js → _0vz_pgd._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/src_075s.rk._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +264 -264
- package/.next/standalone/.next/static/chunks/01iha~qq-s2iq.js +1 -0
- package/.next/standalone/.next/static/chunks/{030ac851xd~gu.js → 024-z6hhx6kj8.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0jdea_ondwo2z.js → 02cdl9l647nfw.js} +1 -1
- package/.next/standalone/.next/static/chunks/02hkeaf1dqmhz.js +1 -0
- package/.next/standalone/.next/static/chunks/08fee4dmmdj39.js +5 -0
- package/.next/standalone/.next/static/chunks/{0z42w8y2ktwst.js → 08hbrv30ik~i9.js} +1 -1
- package/.next/standalone/.next/static/chunks/0b6cq1pd_clzr.js +2 -0
- package/.next/standalone/.next/static/chunks/0cx03gmt.9kfo.js +1 -0
- package/.next/standalone/.next/static/chunks/0dsr03qh0epy8.js +1 -0
- package/.next/standalone/.next/static/chunks/{0q0hf~j_0ho6u.js → 0g7kwivg0c5zn.js} +1 -1
- package/.next/standalone/.next/static/chunks/0mov-lr-7u237.js +5 -0
- package/.next/standalone/.next/static/chunks/{0204r--~nsp18.js → 0nkn227~1tu4_.js} +1 -1
- package/.next/standalone/.next/static/chunks/{05lkncv5~cymd.js → 0nxf2s5ppbm.b.js} +1 -1
- package/.next/standalone/.next/static/chunks/0n~h~45imnm42.js +1 -0
- package/.next/standalone/.next/static/chunks/{0486duu_3efe7.js → 0o.a8t_h5vwy-.js} +1 -1
- package/.next/standalone/.next/static/chunks/0qmzg_a-~~1-1.js +2 -0
- package/.next/standalone/.next/static/chunks/0s86miqs3h9gi.js +1 -0
- package/.next/standalone/.next/static/chunks/0serb6jug2wgz.js +1 -0
- package/.next/standalone/.next/static/chunks/{15jqo~pexyrdp.js → 0w6~b9luhbk1x.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0qrh5-j~zd5nb.js → 0x.izf3-isfsq.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.0j755cvqmrp.js → 0y_s_afcrfp3_.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0jj53.l_c5mi9.js → 0~moqlrzya~z_.js} +2 -2
- package/.next/standalone/.next/static/chunks/{07frdan9tq1_3.js → 13dz~n5.w6hta.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0.buvrbvzfwyy.js → 13iipzi9xw35f.js} +1 -1
- package/.next/standalone/.next/static/chunks/{13l5bumoa7m-8.js → 15550tahnp.5j.js} +1 -1
- package/.next/standalone/.next/static/chunks/17.p0kyu6y24w.js +1 -0
- package/.next/standalone/package.json +1 -1
- package/dist/mcp-server.cjs +9 -2
- package/package.json +1 -1
- package/prisma/schema.prisma +0 -7
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lho64y._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_070.dxf._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/_0jartlx._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0jixh5l._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_0p523x3._.js +0 -3
- package/.next/standalone/.next/static/chunks/03kiyommty8e..js +0 -1
- package/.next/standalone/.next/static/chunks/08i7p_8fg0alm.js +0 -5
- package/.next/standalone/.next/static/chunks/090nszcq3.6j3.js +0 -1
- package/.next/standalone/.next/static/chunks/0buf_9f~42bcs.js +0 -1
- package/.next/standalone/.next/static/chunks/0c37kkv-_mqh1.js +0 -5
- package/.next/standalone/.next/static/chunks/0ch2~x.r._~9f.js +0 -1
- package/.next/standalone/.next/static/chunks/0eskfzrdlc5ka.js +0 -1
- package/.next/standalone/.next/static/chunks/0g0ui9x6~.du4.js +0 -2
- package/.next/standalone/.next/static/chunks/0ox7k.va.hxke.js +0 -1
- package/.next/standalone/.next/static/chunks/0ps1bcdktah3z.js +0 -1
- package/.next/standalone/.next/static/chunks/0~qog0fhbtq68.js +0 -2
- package/.next/standalone/.next/static/chunks/11qbnyfcew125.js +0 -1
- /package/.next/standalone/.next/static/{91SkA26N5DQokm5Txl-cb → v4Xp8QqFHgGyfY7YcmgRm}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{91SkA26N5DQokm5Txl-cb → v4Xp8QqFHgGyfY7YcmgRm}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{91SkA26N5DQokm5Txl-cb → v4Xp8QqFHgGyfY7YcmgRm}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
module.exports=[487373,a=>{"use strict";var b=a.i(815429),c=a.i(761469),d=a.i(188139),e=a.i(378322),f=a.i(855806),g=a.i(630048);let h=["terminal","summary","dreaming","analysis","assistant"];async function i(){return c.db.aiCapabilityConfig.findMany({orderBy:{slot:"asc"}})}async function j(a,b){if(!h.includes(a))throw Error(`无效的插槽: ${a}`);if(!e.providerRegistry.get(b.provider))throw Error(`未知的 Provider: ${b.provider}`);if("terminal"===a&&"cli"!==b.mode)throw Error("终端执行只支持 CLI 模式");if(!await (0,f.isProviderConnected)(b.provider))throw Error(`Provider "${b.provider}" 未连接或集成未注入完整 — 请到 Settings → Test Connection 测试通过后再选`);await c.db.aiCapabilityConfig.upsert({where:{slot:a},create:{slot:a,provider:b.provider,mode:b.mode,model:b.model??null},update:{provider:b.provider,mode:b.mode,model:b.model??null}}),(0,d.revalidatePath)("/settings")}async function k(){return e.providerRegistry.getAvailableProviders()}(0,g.ensureServerEntryExports)([i,j,k]),(0,b.registerServerReference)(i,"00db87370d11e38bbaff5fdb418a426958ed6e1e13",null),(0,b.registerServerReference)(j,"6054e464f322c3bba2ff3214d201a2fdf5c917fa70",null),(0,b.registerServerReference)(k,"00112f8366325de85f95422c98496c708cfe57bc7d",null),a.s(["getAvailableProviders",0,k])},950071,a=>{"use strict";var b=a.i(750227),c=a.i(902157),d=a.i(660526),e=a.i(744992);let f=".lock",g=/^tower-(backup|auto)-\d{8}-\d{6}\.tar\.gz$/;async function h(a,d,f,g){let h,i,j,k,l=`${g?"tower-auto":"tower-backup"}-${(h=new Date,i=a=>String(a).padStart(2,"0"),j=`${h.getFullYear()}${i(h.getMonth()+1)}${i(h.getDate())}`,k=`${i(h.getHours())}${i(h.getMinutes())}${i(h.getSeconds())}`,`${j}-${k}`)}.tar.gz`,m=(0,b.join)(d,l),n=(0,b.join)(a,"metadata.json");(0,c.writeFileSync)(n,JSON.stringify(f,null,2));try{let d=["metadata.json"];(0,c.existsSync)((0,b.join)(a,"database","tower.db"))&&d.push((0,b.join)("database","tower.db")),(0,c.existsSync)((0,b.join)(a,"storage","assets"))&&d.push((0,b.join)("storage","assets")),(0,c.existsSync)((0,b.join)(a,"assistant"))&&d.push("assistant"),(0,c.existsSync)((0,b.join)(a,"logs"))&&d.push("logs"),await e.create({gzip:!0,file:m,cwd:a},d);let h=(0,c.statSync)(m);return{filename:l,size:h.size,createdAt:f.createdAt,autoBackup:g,label:f.label??"",stats:f.stats,preview:f.preview}}catch(a){try{(0,c.unlinkSync)(m)}catch{}throw a}finally{try{(0,c.unlinkSync)(n)}catch{}}}async function i(a){let d=(0,b.join)((0,b.dirname)(a),`_meta_tmp_${Date.now()}`);try{(0,c.mkdirSync)(d,{recursive:!0}),await e.extract({file:a,cwd:d,filter:a=>"metadata.json"===a});let f=(0,b.join)(d,"metadata.json");if(!(0,c.existsSync)(f))return null;return JSON.parse((0,c.readFileSync)(f,"utf-8"))}catch{return null}finally{(0,c.rmSync)(d,{recursive:!0,force:!0})}}async function j(a){if(!(0,c.existsSync)(a))return[];let d=(0,c.readdirSync)(a).filter(a=>g.test(a)).sort().reverse(),e=[];for(let f of d){let d=(0,b.join)(a,f),g=(0,c.statSync)(d),h=await i(d);e.push({filename:f,size:g.size,createdAt:h?.createdAt??g.mtime.toISOString(),autoBackup:h?.autoBackup??f.startsWith("tower-auto"),label:h?.label??"",stats:h?.stats??{workspaces:0,projects:0,tasks:0},preview:h?.preview??[]})}return e}async function k(a,d){if((0,c.mkdirSync)(d,{recursive:!0}),await e.extract({file:a,cwd:d,filter:a=>!((0,b.isAbsolute)(a)||a.includes(".."))}),!(0,c.existsSync)((0,b.join)(d,"database","tower.db")))throw Error("Invalid archive: missing database/tower.db")}let l=["database",(0,b.join)("storage","assets"),"assistant","logs"];a.s(["acquireLock",0,function(a){let d=(0,b.join)(a,f);if((0,c.existsSync)(d)){let a=parseInt((0,c.readFileSync)(d,"utf-8").trim(),10);try{throw process.kill(a,0),Error("Another backup operation is in progress")}catch(a){if(a instanceof Error&&a.message.includes("Another backup"))throw a}}(0,c.writeFileSync)(d,String(process.pid))},"cleanupTempDirs",0,function(a){for(let d of["_restore_tmp","_old_tmp"]){let e=(0,b.join)(a,d);(0,c.existsSync)(e)&&(0,c.rmSync)(e,{recursive:!0,force:!0})}},"createArchive",0,h,"deleteWalFiles",0,function(a){let d=(0,b.join)(a,"database");for(let a of["-wal","-shm"]){let e=(0,b.join)(d,`tower.db${a}`);try{(0,c.unlinkSync)(e)}catch{}}},"extractArchive",0,k,"listArchives",0,j,"releaseLock",0,function(a){let d=(0,b.join)(a,f);try{(0,c.unlinkSync)(d)}catch{}},"swapDirs",0,function(a,d){let e=(0,b.join)(a,"_old_tmp");(0,c.mkdirSync)(e,{recursive:!0});try{for(let d of l){let f=(0,b.join)(a,d),g=(0,b.join)(e,d);(0,c.existsSync)(f)&&((0,c.mkdirSync)((0,b.dirname)((0,b.join)(e,d)),{recursive:!0}),(0,c.renameSync)(f,g))}for(let e of l){let f=(0,b.join)(d,e),g=(0,b.join)(a,e);(0,c.existsSync)(f)&&((0,c.mkdirSync)((0,b.dirname)((0,b.join)(a,e)),{recursive:!0}),(0,c.renameSync)(f,g))}(0,c.rmSync)(e,{recursive:!0,force:!0})}catch(d){for(let d of l){let f=(0,b.join)(e,d),g=(0,b.join)(a,d);if((0,c.existsSync)(f)&&!(0,c.existsSync)(g))try{(0,c.renameSync)(f,g)}catch{}}throw(0,c.rmSync)(e,{recursive:!0,force:!0}),d}},"validateBackupDir",0,function(a){if(!(0,b.isAbsolute)(a))throw Error("Backup directory must be an absolute path");let c=(0,d.homedir)(),e=(0,b.relative)(c,a);if(e.startsWith("..")||(0,b.isAbsolute)(e))throw Error("Backup directory must be within your home directory")},"validateFilename",0,function(a){if(!g.test(a))throw Error(`Invalid backup filename: ${a}`)},"wipeTowerData",0,function(a){for(let d of["database",(0,b.join)("storage","assets"),"assistant","logs"]){let e=(0,b.join)(a,d);(0,c.existsSync)(e)&&(0,c.rmSync)(e,{recursive:!0,force:!0})}}])},712072,(a,b,c)=>{b.exports={name:"tower-studio",version:"0.2.31",description:"AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",bin:{tower:"bin/tower.mjs"},files:["bin/",".next/standalone/","prisma/schema.prisma","prisma/init-fts.ts","prisma/pre-migration.sql","scripts/init-db.ts","scripts/generate-prisma-client.js","scripts/link-prisma.js","scripts/fix-native-permissions.js","scripts/post-install-banner.js","scripts/prune-standalone-natives.js","scripts/migrate-data.ts","scripts/post-tool-hook.js","scripts/session-start-hook.js","scripts/stop-hook.js","dist/mcp-server.cjs","skills/","next.config.ts","tsconfig.json"],scripts:{predev:"node scripts/ensure-dev-db.js && pnpm mcp:build",dev:"next dev --webpack -p 9022",build:"pnpm mcp:build && rm -rf .next && next build && find .next -name '*.map' -delete && cp -R .next/static .next/standalone/.next/ && cp -R public .next/standalone/ && node scripts/prune-standalone-natives.js",release:"pnpm build && npm pack","release:smoke":"node scripts/release-smoke.js","release:publish":"pnpm build && npm publish",start:"next start",lint:"eslint","db:generate":"prisma generate","db:push":"prisma db push","db:seed":"tsx prisma/seed.ts","db:studio":"prisma studio","db:init":"tsx scripts/init-db.ts","db:init-fts":"tsx prisma/init-fts.ts",test:"vitest","test:run":"vitest run","test:e2e":"NO_PROXY=localhost,127.0.0.1 no_proxy=localhost,127.0.0.1 playwright test",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s",mcp:"node dist/mcp-server.cjs","mcp:build":"esbuild src/mcp/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=dist/mcp-server.cjs --external:@prisma/client --external:@modelcontextprotocol/sdk --external:@opentelemetry/api --alias:@=./src","mcp:dev":"tsx src/mcp/index.ts",postinstall:"node scripts/generate-prisma-client.js && node scripts/link-prisma.js && node scripts/fix-native-permissions.js && node scripts/post-install-banner.js"},pnpm:{onlyBuiltDependencies:["@prisma/engines","esbuild","node-pty","prisma"]},dependencies:{"@modelcontextprotocol/sdk":"^1.28.0","@prisma/client":"^6.19.2","@vscode/ripgrep":"1.18.0","node-pty":"^1.1.0",prisma:"^6.19.2",tsx:"^4.21.0",ws:"^8.20.0"},devDependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.114","@base-ui/react":"^1.3.0","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@iconify/react":"^6.0.2","@monaco-editor/react":"4.8.0-rc.3","@playwright/test":"^1.58.2","@tailwindcss/postcss":"^4","@tailwindcss/typography":"^0.5.19","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@testing-library/user-event":"^14.6.1","@types/node":"^20","@types/react":"^19","@types/react-dom":"^19","@types/shell-quote":"^1.7.5","@types/tar":"^7.0.87","@types/ws":"^8.18.1","@uiw/react-md-editor":"^4.0.11","@vitejs/plugin-react":"^6.0.1","@xterm/addon-attach":"^0.12.0","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/addon-webgl":"^0.19.0","@xterm/xterm":"^6.0.0","class-variance-authority":"^0.7.1",clsx:"^2.1.1",cmdk:"^1.1.1","conventional-changelog-cli":"^5.0.0",eslint:"^9","eslint-config-next":"16.2.1","fuse.js":"^7.3.0",ignore:"^7.0.5",jsdom:"^29.0.1","lucide-react":"^1.6.0","monaco-editor":"^0.55.1",next:"16.2.1","next-themes":"^0.4.6","parse-diff":"^0.12.0",react:"19.2.4","react-dom":"19.2.4","react-resizable-panels":"^2.1.9","react-reverse-portal":"^2.3.0",shadcn:"^4.1.0","shell-quote":"^1.8.3","simple-git":"^3.36.0",sonner:"^2.0.7",streamdown:"^2.5.0","tailwind-merge":"^3.5.0",tailwindcss:"^4",tar:"^7.5.13","tw-animate-css":"^1.4.0",typescript:"^5",vitest:"^4.1.1",zod:"^4.3.6",zustand:"^5.0.12"}}},537944,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(761469),f=a.i(319997),g=a.i(980999),h=a.i(950071),i=a.i(750227),j=a.i(902157),k=a.i(188139),l=a.i(630048),m=b([g]);async function n(){return await (0,g.getConfigValue)("system.backupDir","")||(0,f.getBackupsDir)()}async function o(b,c){let[d,f,g]=await Promise.all([e.db.workspace.count(),e.db.project.count(),e.db.task.count()]),h=(await e.db.workspace.findMany({take:3,orderBy:{updatedAt:"desc"},select:{name:!0,description:!0,projects:{take:3,select:{name:!0},orderBy:{updatedAt:"desc"}}}})).map(a=>{let b=a.description??"";return{workspace:b?`${b} ${a.name}`:a.name,projects:a.projects.map(a=>a.name)}});return{version:1,createdAt:new Date().toISOString(),towerVersion:function(){try{return a.r(712072).version??"unknown"}catch{return"unknown"}}(),autoBackup:b,label:c||void 0,stats:{workspaces:d,projects:f,tasks:g},preview:h}}async function p(a){let b=await n();(0,h.acquireLock)(b);try{let c=await o(!1,a);return await e.db.$queryRaw`PRAGMA wal_checkpoint(TRUNCATE)`,await (0,h.createArchive)((0,f.getTowerDir)(),b,c,!1)}finally{(0,h.releaseLock)(b)}}async function q(){let a=await n();return(0,h.listArchives)(a)}async function r(a){(0,h.validateFilename)(a);let b=await n(),c=(0,i.join)(b,a);if(!(0,j.existsSync)(c))throw Error("Backup file not found");(0,j.unlinkSync)(c)}async function s(b){(0,h.validateFilename)(b);let c=(0,f.getTowerDir)(),d=await n(),g=(0,i.join)(d,b);if(!(0,j.existsSync)(g))throw Error("Backup file not found");(0,h.acquireLock)(d);let l=(0,i.join)(c,"_restore_tmp");try{let b=await o(!0);await e.db.$queryRaw`PRAGMA wal_checkpoint(TRUNCATE)`,await (0,h.createArchive)(c,d,b,!0);let{destroyAllSessions:f}=await a.A(98813);f(),await (0,h.extractArchive)(g,l),await e.db.$disconnect(),(0,h.deleteWalFiles)(c),(0,h.swapDirs)(c,l),await (0,e.resetDbConnection)(),await e.db.$executeRawUnsafe(`
|
|
1
|
+
module.exports=[487373,a=>{"use strict";var b=a.i(815429),c=a.i(761469),d=a.i(188139),e=a.i(378322),f=a.i(855806),g=a.i(630048);let h=["terminal","summary","dreaming","analysis","assistant"];async function i(){return c.db.aiCapabilityConfig.findMany({orderBy:{slot:"asc"}})}async function j(a,b){if(!h.includes(a))throw Error(`无效的插槽: ${a}`);if(!e.providerRegistry.get(b.provider))throw Error(`未知的 Provider: ${b.provider}`);if("terminal"===a&&"cli"!==b.mode)throw Error("终端执行只支持 CLI 模式");if(!await (0,f.isProviderConnected)(b.provider))throw Error(`Provider "${b.provider}" 未连接或集成未注入完整 — 请到 Settings → Test Connection 测试通过后再选`);await c.db.aiCapabilityConfig.upsert({where:{slot:a},create:{slot:a,provider:b.provider,mode:b.mode,model:b.model??null},update:{provider:b.provider,mode:b.mode,model:b.model??null}}),(0,d.revalidatePath)("/settings")}async function k(){return e.providerRegistry.getAvailableProviders()}(0,g.ensureServerEntryExports)([i,j,k]),(0,b.registerServerReference)(i,"00c5bb6f50ae6aba33788db5a09b7df343738e53f0",null),(0,b.registerServerReference)(j,"60dc7a8fd2eb2f945a8f6eeacc29fb9fc597286850",null),(0,b.registerServerReference)(k,"00bf330fdfe68af62932c5967fd9e96c2a6cbf72e5",null),a.s(["getAvailableProviders",0,k])},950071,a=>{"use strict";var b=a.i(750227),c=a.i(902157),d=a.i(660526),e=a.i(744992);let f=".lock",g=/^tower-(backup|auto)-\d{8}-\d{6}\.tar\.gz$/;async function h(a,d,f,g){let h,i,j,k,l=`${g?"tower-auto":"tower-backup"}-${(h=new Date,i=a=>String(a).padStart(2,"0"),j=`${h.getFullYear()}${i(h.getMonth()+1)}${i(h.getDate())}`,k=`${i(h.getHours())}${i(h.getMinutes())}${i(h.getSeconds())}`,`${j}-${k}`)}.tar.gz`,m=(0,b.join)(d,l),n=(0,b.join)(a,"metadata.json");(0,c.writeFileSync)(n,JSON.stringify(f,null,2));try{let d=["metadata.json"];(0,c.existsSync)((0,b.join)(a,"database","tower.db"))&&d.push((0,b.join)("database","tower.db")),(0,c.existsSync)((0,b.join)(a,"storage","assets"))&&d.push((0,b.join)("storage","assets")),(0,c.existsSync)((0,b.join)(a,"assistant"))&&d.push("assistant"),(0,c.existsSync)((0,b.join)(a,"logs"))&&d.push("logs"),await e.create({gzip:!0,file:m,cwd:a},d);let h=(0,c.statSync)(m);return{filename:l,size:h.size,createdAt:f.createdAt,autoBackup:g,label:f.label??"",stats:f.stats,preview:f.preview}}catch(a){try{(0,c.unlinkSync)(m)}catch{}throw a}finally{try{(0,c.unlinkSync)(n)}catch{}}}async function i(a){let d=(0,b.join)((0,b.dirname)(a),`_meta_tmp_${Date.now()}`);try{(0,c.mkdirSync)(d,{recursive:!0}),await e.extract({file:a,cwd:d,filter:a=>"metadata.json"===a});let f=(0,b.join)(d,"metadata.json");if(!(0,c.existsSync)(f))return null;return JSON.parse((0,c.readFileSync)(f,"utf-8"))}catch{return null}finally{(0,c.rmSync)(d,{recursive:!0,force:!0})}}async function j(a){if(!(0,c.existsSync)(a))return[];let d=(0,c.readdirSync)(a).filter(a=>g.test(a)).sort().reverse(),e=[];for(let f of d){let d=(0,b.join)(a,f),g=(0,c.statSync)(d),h=await i(d);e.push({filename:f,size:g.size,createdAt:h?.createdAt??g.mtime.toISOString(),autoBackup:h?.autoBackup??f.startsWith("tower-auto"),label:h?.label??"",stats:h?.stats??{workspaces:0,projects:0,tasks:0},preview:h?.preview??[]})}return e}async function k(a,d){if((0,c.mkdirSync)(d,{recursive:!0}),await e.extract({file:a,cwd:d,filter:a=>!((0,b.isAbsolute)(a)||a.includes(".."))}),!(0,c.existsSync)((0,b.join)(d,"database","tower.db")))throw Error("Invalid archive: missing database/tower.db")}let l=["database",(0,b.join)("storage","assets"),"assistant","logs"];a.s(["acquireLock",0,function(a){let d=(0,b.join)(a,f);if((0,c.existsSync)(d)){let a=parseInt((0,c.readFileSync)(d,"utf-8").trim(),10);try{throw process.kill(a,0),Error("Another backup operation is in progress")}catch(a){if(a instanceof Error&&a.message.includes("Another backup"))throw a}}(0,c.writeFileSync)(d,String(process.pid))},"cleanupTempDirs",0,function(a){for(let d of["_restore_tmp","_old_tmp"]){let e=(0,b.join)(a,d);(0,c.existsSync)(e)&&(0,c.rmSync)(e,{recursive:!0,force:!0})}},"createArchive",0,h,"deleteWalFiles",0,function(a){let d=(0,b.join)(a,"database");for(let a of["-wal","-shm"]){let e=(0,b.join)(d,`tower.db${a}`);try{(0,c.unlinkSync)(e)}catch{}}},"extractArchive",0,k,"listArchives",0,j,"releaseLock",0,function(a){let d=(0,b.join)(a,f);try{(0,c.unlinkSync)(d)}catch{}},"swapDirs",0,function(a,d){let e=(0,b.join)(a,"_old_tmp");(0,c.mkdirSync)(e,{recursive:!0});try{for(let d of l){let f=(0,b.join)(a,d),g=(0,b.join)(e,d);(0,c.existsSync)(f)&&((0,c.mkdirSync)((0,b.dirname)((0,b.join)(e,d)),{recursive:!0}),(0,c.renameSync)(f,g))}for(let e of l){let f=(0,b.join)(d,e),g=(0,b.join)(a,e);(0,c.existsSync)(f)&&((0,c.mkdirSync)((0,b.dirname)((0,b.join)(a,e)),{recursive:!0}),(0,c.renameSync)(f,g))}(0,c.rmSync)(e,{recursive:!0,force:!0})}catch(d){for(let d of l){let f=(0,b.join)(e,d),g=(0,b.join)(a,d);if((0,c.existsSync)(f)&&!(0,c.existsSync)(g))try{(0,c.renameSync)(f,g)}catch{}}throw(0,c.rmSync)(e,{recursive:!0,force:!0}),d}},"validateBackupDir",0,function(a){if(!(0,b.isAbsolute)(a))throw Error("Backup directory must be an absolute path");let c=(0,d.homedir)(),e=(0,b.relative)(c,a);if(e.startsWith("..")||(0,b.isAbsolute)(e))throw Error("Backup directory must be within your home directory")},"validateFilename",0,function(a){if(!g.test(a))throw Error(`Invalid backup filename: ${a}`)},"wipeTowerData",0,function(a){for(let d of["database",(0,b.join)("storage","assets"),"assistant","logs"]){let e=(0,b.join)(a,d);(0,c.existsSync)(e)&&(0,c.rmSync)(e,{recursive:!0,force:!0})}}])},712072,(a,b,c)=>{b.exports={name:"tower-studio",version:"0.2.32",description:"AI Task Orchestration Platform — Kanban + Terminal + Code Editor + MCP",bin:{tower:"bin/tower.mjs"},files:["bin/",".next/standalone/","prisma/schema.prisma","prisma/init-fts.ts","prisma/pre-migration.sql","scripts/init-db.ts","scripts/generate-prisma-client.js","scripts/link-prisma.js","scripts/fix-native-permissions.js","scripts/post-install-banner.js","scripts/prune-standalone-natives.js","scripts/migrate-data.ts","scripts/post-tool-hook.js","scripts/session-start-hook.js","scripts/stop-hook.js","dist/mcp-server.cjs","skills/","next.config.ts","tsconfig.json"],scripts:{predev:"node scripts/ensure-dev-db.js && pnpm mcp:build",dev:"next dev --webpack -p 9022",build:"pnpm mcp:build && rm -rf .next && next build && find .next -name '*.map' -delete && cp -R .next/static .next/standalone/.next/ && cp -R public .next/standalone/ && node scripts/prune-standalone-natives.js",release:"pnpm build && npm pack","release:smoke":"node scripts/release-smoke.js","release:publish":"pnpm build && npm publish",start:"next start",lint:"eslint","db:generate":"prisma generate","db:push":"prisma db push","db:seed":"tsx prisma/seed.ts","db:studio":"prisma studio","db:init":"tsx scripts/init-db.ts","db:init-fts":"tsx prisma/init-fts.ts",test:"vitest","test:run":"vitest run","test:e2e":"NO_PROXY=localhost,127.0.0.1 no_proxy=localhost,127.0.0.1 playwright test",changelog:"conventional-changelog -p angular -i CHANGELOG.md -s",mcp:"node dist/mcp-server.cjs","mcp:build":"esbuild src/mcp/index.ts --bundle --platform=node --target=node18 --format=cjs --outfile=dist/mcp-server.cjs --external:@prisma/client --external:@modelcontextprotocol/sdk --external:@opentelemetry/api --alias:@=./src","mcp:dev":"tsx src/mcp/index.ts",postinstall:"node scripts/generate-prisma-client.js && node scripts/link-prisma.js && node scripts/fix-native-permissions.js && node scripts/post-install-banner.js"},pnpm:{onlyBuiltDependencies:["@prisma/engines","esbuild","node-pty","prisma"]},dependencies:{"@modelcontextprotocol/sdk":"^1.28.0","@prisma/client":"^6.19.2","@vscode/ripgrep":"1.18.0","node-pty":"^1.1.0",prisma:"^6.19.2",tsx:"^4.21.0",ws:"^8.20.0"},devDependencies:{"@anthropic-ai/claude-agent-sdk":"^0.2.114","@base-ui/react":"^1.3.0","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@iconify/react":"^6.0.2","@monaco-editor/react":"4.8.0-rc.3","@playwright/test":"^1.58.2","@tailwindcss/postcss":"^4","@tailwindcss/typography":"^0.5.19","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.2","@testing-library/user-event":"^14.6.1","@types/node":"^20","@types/react":"^19","@types/react-dom":"^19","@types/shell-quote":"^1.7.5","@types/tar":"^7.0.87","@types/ws":"^8.18.1","@uiw/react-md-editor":"^4.0.11","@vitejs/plugin-react":"^6.0.1","@xterm/addon-attach":"^0.12.0","@xterm/addon-fit":"^0.11.0","@xterm/addon-web-links":"^0.12.0","@xterm/addon-webgl":"^0.19.0","@xterm/xterm":"^6.0.0","class-variance-authority":"^0.7.1",clsx:"^2.1.1",cmdk:"^1.1.1","conventional-changelog-cli":"^5.0.0",eslint:"^9","eslint-config-next":"16.2.1","fuse.js":"^7.3.0",ignore:"^7.0.5",jsdom:"^29.0.1","lucide-react":"^1.6.0","monaco-editor":"^0.55.1",next:"16.2.1","next-themes":"^0.4.6","parse-diff":"^0.12.0",react:"19.2.4","react-dom":"19.2.4","react-resizable-panels":"^2.1.9","react-reverse-portal":"^2.3.0",shadcn:"^4.1.0","shell-quote":"^1.8.3","simple-git":"^3.36.0",sonner:"^2.0.7",streamdown:"^2.5.0","tailwind-merge":"^3.5.0",tailwindcss:"^4",tar:"^7.5.13","tw-animate-css":"^1.4.0",typescript:"^5",vitest:"^4.1.1",zod:"^4.3.6",zustand:"^5.0.12"}}},537944,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(761469),f=a.i(319997),g=a.i(980999),h=a.i(950071),i=a.i(750227),j=a.i(902157),k=a.i(188139),l=a.i(630048),m=b([g]);async function n(){return await (0,g.getConfigValue)("system.backupDir","")||(0,f.getBackupsDir)()}async function o(b,c){let[d,f,g]=await Promise.all([e.db.workspace.count(),e.db.project.count(),e.db.task.count()]),h=(await e.db.workspace.findMany({take:3,orderBy:{updatedAt:"desc"},select:{name:!0,description:!0,projects:{take:3,select:{name:!0},orderBy:{updatedAt:"desc"}}}})).map(a=>{let b=a.description??"";return{workspace:b?`${b} ${a.name}`:a.name,projects:a.projects.map(a=>a.name)}});return{version:1,createdAt:new Date().toISOString(),towerVersion:function(){try{return a.r(712072).version??"unknown"}catch{return"unknown"}}(),autoBackup:b,label:c||void 0,stats:{workspaces:d,projects:f,tasks:g},preview:h}}async function p(a){let b=await n();(0,h.acquireLock)(b);try{let c=await o(!1,a);return await e.db.$queryRaw`PRAGMA wal_checkpoint(TRUNCATE)`,await (0,h.createArchive)((0,f.getTowerDir)(),b,c,!1)}finally{(0,h.releaseLock)(b)}}async function q(){let a=await n();return(0,h.listArchives)(a)}async function r(a){(0,h.validateFilename)(a);let b=await n(),c=(0,i.join)(b,a);if(!(0,j.existsSync)(c))throw Error("Backup file not found");(0,j.unlinkSync)(c)}async function s(b){(0,h.validateFilename)(b);let c=(0,f.getTowerDir)(),d=await n(),g=(0,i.join)(d,b);if(!(0,j.existsSync)(g))throw Error("Backup file not found");(0,h.acquireLock)(d);let l=(0,i.join)(c,"_restore_tmp");try{let b=await o(!0);await e.db.$queryRaw`PRAGMA wal_checkpoint(TRUNCATE)`,await (0,h.createArchive)(c,d,b,!0);let{destroyAllSessions:f}=await a.A(98813);f(),await (0,h.extractArchive)(g,l),await e.db.$disconnect(),(0,h.deleteWalFiles)(c),(0,h.swapDirs)(c,l),await (0,e.resetDbConnection)(),await e.db.$executeRawUnsafe(`
|
|
2
2
|
CREATE VIRTUAL TABLE IF NOT EXISTS notes_fts
|
|
3
3
|
USING fts5(note_id UNINDEXED, title, content, tokenize='trigram case_sensitive 0')
|
|
4
|
-
`);let{syncNoteToFts:i}=await a.A(195404);for(let a of(await e.db.projectNote.findMany({select:{id:!0,title:!0,content:!0}})))await i(e.db,a);(0,k.revalidatePath)("/")}finally{(0,h.cleanupTempDirs)(c),(0,h.releaseLock)(d)}}async function t(b){if("RESET"!==b)throw Error("Invalid confirmation");let c=(0,f.getTowerDir)(),d=await n();(0,h.acquireLock)(d);try{let b=await o(!0);await e.db.$queryRaw`PRAGMA wal_checkpoint(TRUNCATE)`,await (0,h.createArchive)(c,d,b,!0);let{destroyAllSessions:f}=await a.A(98813);f(),await e.db.$disconnect(),(0,h.wipeTowerData)(c),await (0,e.resetDbConnection)(),(0,k.revalidatePath)("/")}finally{(0,h.releaseLock)(d)}}async function u(){return await (0,g.getConfigValue)("system.backupDir","")||(0,f.getBackupsDir)()}async function v(a){(0,h.validateBackupDir)(a),await (0,g.setConfigValue)("system.backupDir",a)}[g]=m.then?(await m)():m,(0,l.ensureServerEntryExports)([p,q,r,s,t,u,v]),(0,d.registerServerReference)(p,"
|
|
4
|
+
`);let{syncNoteToFts:i}=await a.A(195404);for(let a of(await e.db.projectNote.findMany({select:{id:!0,title:!0,content:!0}})))await i(e.db,a);(0,k.revalidatePath)("/")}finally{(0,h.cleanupTempDirs)(c),(0,h.releaseLock)(d)}}async function t(b){if("RESET"!==b)throw Error("Invalid confirmation");let c=(0,f.getTowerDir)(),d=await n();(0,h.acquireLock)(d);try{let b=await o(!0);await e.db.$queryRaw`PRAGMA wal_checkpoint(TRUNCATE)`,await (0,h.createArchive)(c,d,b,!0);let{destroyAllSessions:f}=await a.A(98813);f(),await e.db.$disconnect(),(0,h.wipeTowerData)(c),await (0,e.resetDbConnection)(),(0,k.revalidatePath)("/")}finally{(0,h.releaseLock)(d)}}async function u(){return await (0,g.getConfigValue)("system.backupDir","")||(0,f.getBackupsDir)()}async function v(a){(0,h.validateBackupDir)(a),await (0,g.setConfigValue)("system.backupDir",a)}[g]=m.then?(await m)():m,(0,l.ensureServerEntryExports)([p,q,r,s,t,u,v]),(0,d.registerServerReference)(p,"40f4bbb1595f6edad99a91db8b1e88dec3a7798c3a",null),(0,d.registerServerReference)(q,"00106c652512a93b7b28ee60a6430fcc7bafae1fe0",null),(0,d.registerServerReference)(r,"406f1a32722261e5881959ceaa94cb2f4b85fe41be",null),(0,d.registerServerReference)(s,"40f547001ed633f344e2cc1ee79f6d9da5bbc22aac",null),(0,d.registerServerReference)(t,"40e612f75054d36cd6655325a26e577b466a1a4a99",null),(0,d.registerServerReference)(u,"004b82a7b9672755ce4d25bb54bae7e7a4d9dee101",null),(0,d.registerServerReference)(v,"40603aec91d58b9bc7b331ef2c91cb084a058cd5a0",null),a.s(["createBackup",0,p,"deleteBackupFile",0,r,"getBackupDir",0,u,"listBackupFiles",0,q,"resetSystem",0,t,"restoreBackup",0,s,"setBackupDir",0,v]),c()}catch(a){c(a)}},!1),415673,a=>{"use strict";var b=a.i(815429),c=a.i(902157),d=a.i(750227),e=a.i(75681),f=a.i(761469),g=a.i(319997),h=a.i(630048);async function i(){return{current:(0,g.getStorageDir)(),default:(0,g.getDefaultStorageDir)(),isDefault:null===(0,g.readStoragePointer)()}}let j=e.z.object({newPath:e.z.string().min(1)});async function k(a){let{newPath:b}=j.parse(a),e=d.resolve(b),h=d.resolve((0,g.getStorageDir)()),i=d.resolve((0,g.getDefaultStorageDir)());if(!d.isAbsolute(e))return{ok:!1,error:"请输入绝对路径"};if(e===h)return{ok:!0,moved:0};if(e.startsWith(h+d.sep)||h.startsWith(e+d.sep))return{ok:!1,error:"新路径不能是当前存储目录的父级或子级"};if(c.existsSync(e)){if(!c.statSync(e).isDirectory())return{ok:!1,error:"目标路径已存在且不是目录"};if(c.readdirSync(e).length>0)return{ok:!1,error:"目标目录非空,请选择一个空目录或新目录"}}let k=d.dirname(e);try{c.mkdirSync(e,{recursive:!0}),c.accessSync(e,c.constants.W_OK)}catch{return{ok:!1,error:`无法写入目标目录(检查权限):${k}`}}try{c.existsSync(h)&&(c.cpSync(h,e,{recursive:!0}),c.rmSync(h,{recursive:!0,force:!0}))}catch(a){return{ok:!1,error:`迁移文件失败:${a instanceof Error?a.message:String(a)}`}}let l=0,m=h+d.sep;for(let a of(await f.db.projectAsset.findMany({select:{id:!0,path:!0}})))if(a.path.startsWith(m)){let b=d.join(e,a.path.slice(h.length+1));await f.db.projectAsset.update({where:{id:a.id},data:{path:b}}),l+=1}return(0,g.writeStoragePointer)(e===i?null:e),{ok:!0,moved:l}}(0,h.ensureServerEntryExports)([i,k]),(0,b.registerServerReference)(i,"00b180841412996049bd8ee1033c4c01201b0212ba",null),(0,b.registerServerReference)(k,"40cdd13c1714e99705a0fd45864fd0e152133a3205",null),a.s(["getStorageLocation",0,i,"setStorageLocation",0,k])},520288,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634),a.i(925886),a.i(487373);var f=a.i(537944);a.i(415673);var g=b([d,e,f]);[d,e,f]=g.then?(await g)():g,a.s([]),c()}catch(a){c(a)}},!1),857434,a=>a.a(async(b,c)=>{try{var d=a.i(520288),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=a.i(925886),m=a.i(487373),n=a.i(537944),o=a.i(415673),p=b([d,g,h,n]);[d,g,h,n]=p.then?(await p)():p,a.s(["000d14bf95e77f5146ecedeafe36dd0cf4f69bef2b",()=>k.getOnboardingStatus,"000ef5644a74d2cb87838153533141bf8e3d6dc301",()=>h.getAvailableEditors,"00106c652512a93b7b28ee60a6430fcc7bafae1fe0",()=>n.listBackupFiles,"0013b21d67a7ce907696bad27cf0af74419e936884",()=>h.getActualWsPort,"004b82a7b9672755ce4d25bb54bae7e7a4d9dee101",()=>n.getBackupDir,"00a37ed9d7817ae2f43835e3ba3f7a6372a7c44f2b",()=>j.listAllExtensionStatus,"00b180841412996049bd8ee1033c4c01201b0212ba",()=>o.getStorageLocation,"00bf330fdfe68af62932c5967fd9e96c2a6cbf72e5",()=>m.getAvailableProviders,"00efa63e5ad5c88ad23570d460c7e51e389903e249",()=>h.getAvailableTerminalApps,"4007aed739a0ce03f191023d9d814279807cc7e067",()=>e.deleteWorkspace,"402b5bbcb9000f82183949dd6bd27fcd4b6f35334a",()=>j.checkExtension,"402bed4755ff79e2867db3780af837f50e5a57dfca",()=>e.createWorkspace,"403571b0157629e00faaad8d6db072c4b80039727f",()=>f.createLabel,"404202ed461e1dc3979fcf4b4e3f43e192015924f8",()=>f.deleteLabel,"40439232ece3bb831138972c38d756e8e8a05b1ac6",()=>e.reorderWorkspaces,"4044312e78a830b6c91ca5b12ce1119bc5b8646e35",()=>l.deletePrompt,"4053f3ebcfeadf7a83ad60b52ee632cbed0ae485b4",()=>l.createPrompt,"40603aec91d58b9bc7b331ef2c91cb084a058cd5a0",()=>n.setBackupDir,"4069332f44db7650fccc2f480d27ffb20dc9f17f4a",()=>j.installExtension,"406a27b6e3dcf314ab94933879e542f5d5807c687a",()=>k.setOnboardingProgress,"406cf57ab441b87fe26b4e4ba61492f885d99c626c",()=>h.resolveGitLocalPath,"406f1a32722261e5881959ceaa94cb2f4b85fe41be",()=>n.deleteBackupFile,"40b5222e72e32cd9f45dc74923a7de5adbd67bc035",()=>j.uninstallExtension,"40bbb15b95b61da428c7e4c39a37b1859d070f0d4a",()=>h.getConfigValues,"40bbf2511527d659cda23200ebab62c449b3333981",()=>k.dispatchTaskCompletionEvent,"40c41ee3dbd5922ea86bfa9c171b0cf86fd70be5fb",()=>f.getLabelsForWorkspace,"40c537d4a523dd876dc26956b554758fd7a5893c2c",()=>i.checkMigrationSafety,"40cdd13c1714e99705a0fd45864fd0e152133a3205",()=>o.setStorageLocation,"40e612f75054d36cd6655325a26e577b466a1a4a99",()=>n.resetSystem,"40ec078238dc42004bc617c4035896dcd15be6787f",()=>l.getPrompts,"40f0fdb5e9a1a34468de5b220651e1d97fe652c148",()=>e.createProject,"40f4bbb1595f6edad99a91db8b1e88dec3a7798c3a",()=>n.createBackup,"40f547001ed633f344e2cc1ee79f6d9da5bbc22aac",()=>n.restoreBackup,"6023f7fd9697f8622ec6253be83036fb51f78a003f",()=>h.getConfigValue,"6024dbc330f4c524daa08e7ac710214e9e81039cc8",()=>i.analyzeProjectDirectory,"60419002d165e0acbafb67ca7d3daa91b1a43038f4",()=>h.setConfigValue,"604ed770eae5fe6c7eb9bb3e7920034f2876adcc93",()=>i.migrateProjectPath,"605776670179f7e81aa8dc4c1efdf239d4bcee2b24",()=>e.updateWorkspace,"607b46546c21022e3504570aab2b4b255dc23822af",()=>l.updatePrompt,"6081ca3a9f7e3c1d98a66990fbeaecf602ce9baa44",()=>l.setDefaultPrompt,"609fd24cefe3230b2272c1c8c2db26ea3e5a4a6234",()=>g.globalSearch,"60daedfee26db2b3db86558c507c9657419b041b19",()=>k.completeOnboarding,"60f838a02bdbc2cb7a865af120230e7d827d85ec63",()=>k.setOnboardingExtensions]),c()}catch(a){c(a)}},!1)];
|
|
5
5
|
|
|
6
6
|
//# sourceMappingURL=_070t_mh._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[846195,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),861951,a=>a.a(async(b,c)=>{try{var d=a.i(846195),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["
|
|
1
|
+
module.exports=[846195,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),861951,a=>a.a(async(b,c)=>{try{var d=a.i(846195),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["000d14bf95e77f5146ecedeafe36dd0cf4f69bef2b",()=>k.getOnboardingStatus,"0013b21d67a7ce907696bad27cf0af74419e936884",()=>h.getActualWsPort,"00a37ed9d7817ae2f43835e3ba3f7a6372a7c44f2b",()=>j.listAllExtensionStatus,"4007aed739a0ce03f191023d9d814279807cc7e067",()=>e.deleteWorkspace,"402b5bbcb9000f82183949dd6bd27fcd4b6f35334a",()=>j.checkExtension,"402bed4755ff79e2867db3780af837f50e5a57dfca",()=>e.createWorkspace,"403571b0157629e00faaad8d6db072c4b80039727f",()=>f.createLabel,"404202ed461e1dc3979fcf4b4e3f43e192015924f8",()=>f.deleteLabel,"40439232ece3bb831138972c38d756e8e8a05b1ac6",()=>e.reorderWorkspaces,"4069332f44db7650fccc2f480d27ffb20dc9f17f4a",()=>j.installExtension,"406a27b6e3dcf314ab94933879e542f5d5807c687a",()=>k.setOnboardingProgress,"406cf57ab441b87fe26b4e4ba61492f885d99c626c",()=>h.resolveGitLocalPath,"40b5222e72e32cd9f45dc74923a7de5adbd67bc035",()=>j.uninstallExtension,"40bbb15b95b61da428c7e4c39a37b1859d070f0d4a",()=>h.getConfigValues,"40bbf2511527d659cda23200ebab62c449b3333981",()=>k.dispatchTaskCompletionEvent,"40c41ee3dbd5922ea86bfa9c171b0cf86fd70be5fb",()=>f.getLabelsForWorkspace,"40c537d4a523dd876dc26956b554758fd7a5893c2c",()=>i.checkMigrationSafety,"40f0fdb5e9a1a34468de5b220651e1d97fe652c148",()=>e.createProject,"6023f7fd9697f8622ec6253be83036fb51f78a003f",()=>h.getConfigValue,"6024dbc330f4c524daa08e7ac710214e9e81039cc8",()=>i.analyzeProjectDirectory,"60419002d165e0acbafb67ca7d3daa91b1a43038f4",()=>h.setConfigValue,"604ed770eae5fe6c7eb9bb3e7920034f2876adcc93",()=>i.migrateProjectPath,"605776670179f7e81aa8dc4c1efdf239d4bcee2b24",()=>e.updateWorkspace,"609fd24cefe3230b2272c1c8c2db26ea3e5a4a6234",()=>g.globalSearch,"60daedfee26db2b3db86558c507c9657419b041b19",()=>k.completeOnboarding,"60f838a02bdbc2cb7a865af120230e7d827d85ec63",()=>k.setOnboardingExtensions]),c()}catch(a){c(a)}},!1),76052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_0qlnl~c._.js"].map(b=>a.l(b))).then(()=>b(492067)))},98813,a=>{a.v(a=>Promise.resolve().then(()=>a(962620)))},507502,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js"].map(b=>a.l(b))).then(()=>b(845427)))},752453,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__037nnpo._.js"].map(b=>a.l(b))).then(()=>b(897667)))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0_kfemp._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.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,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.filename))},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:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("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,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.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"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},140597,694116,a=>{"use strict";let b=(0,a.i(711796).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["default",0,b],694116),a.s(["File",0,b],140597)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.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"}]]);a.s(["History",0,d],359948)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},771313,307373,646788,806671,114884,604456,703903,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);a.s(["FilePlus",0,c],771313);let d=(0,b.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);a.s(["FileMinus",0,d],307373);let e=(0,b.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);a.s(["FileQuestion",0,e],646788);let f=(0,b.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);a.s(["FileEdit",0,f],806671);let g=(0,b.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,g],114884);let h=(0,b.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,h],604456);let i=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["Minus",0,i],703903)},324263,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["ArrowUpFromLine",0,b],324263)},985716,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(140597),e=a.i(771313),f=a.i(307373),g=a.i(646788),h=a.i(806671),i=a.i(704494),j=a.i(114884),k=a.i(604456),l=a.i(668116),m=a.i(10390),n=a.i(442620),o=a.i(146758),p=a.i(703903),q=a.i(774881),r=a.i(336771),s=a.i(192369),t=a.i(607219),u=a.i(324263);let v=(0,a.i(711796).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var w=a.i(577565),x=a.i(573242),y=a.i(851378),z=a.i(975231),A=a.i(699570),B=a.i(335732),C=a.i(269876),D=a.i(599209),E=a.i(785259),F=a.i(814574),G=a.i(866718),H=a.i(429246),I=a.i(951192);function J({open:a,onOpenChange:d,branches:e,currentBranch:f,localPath:g,onCreated:h,onError:j}){let{t:k}=(0,I.useI18n)(),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(f),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,y]=(0,c.useState)(""),[z,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(o(""),q(f),s(""),y(""))},[a,f]);let C=[...new Set(e)].filter(a=>a.toLowerCase().includes(v.toLowerCase())),D=async()=>{if(m.trim()){u(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:m.trim(),baseBranch:p})});if(a.ok)d(!1),h();else{let b=await a.json();j(b.error||"Unknown error")}}catch{j("Network error")}finally{u(!1)}}};return(0,b.jsx)(F.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(F.DialogHeader,{children:(0,b.jsx)(F.DialogTitle,{children:k("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchName")}),(0,b.jsx)(G.Input,{value:m,onChange:a=>o(a.target.value),placeholder:k("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&D()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>B(!z),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,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:p,children:p})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${z?"rotate-180":""}`})]}),z&&(0,b.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,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:v,onChange:a=>y(a.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,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:C.map(a=>(0,b.jsxs)("button",{onClick:()=>{q(a),B(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===p?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),a===p&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchDesc")}),(0,b.jsx)(H.Textarea,{value:r,onChange:a=>s(a.target.value),placeholder:k("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,b.jsxs)(F.DialogFooter,{children:[(0,b.jsx)(A.Button,{variant:"outline",onClick:()=>d(!1),children:k("common.cancel")}),(0,b.jsxs)(A.Button,{onClick:D,disabled:!m.trim()||t,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[t?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,k("common.create")]})]})]})})}var K=a.i(952313),L=a.i(7285);let M={modified:h.FileEdit,added:e.FilePlus,deleted:f.FileMinus,untracked:g.FileQuestion,renamed:h.FileEdit},N={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},O={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function P(a){let b={name:"",path:"",isDir:!0,children:[]};for(let c of a){let a=c.file.split("/").filter(Boolean);if(0===a.length)continue;let d=b;for(let b=0;b<a.length;b++){let e=a[b],f=b===a.length-1,g=a.slice(0,b+1).join("/");if(f)d.children.push({name:e,path:g,isDir:!1,children:[],file:c});else{let a=d.children.find(a=>a.isDir&&a.name===e);a||(a={name:e,path:g,isDir:!0,children:[]},d.children.push(a)),d=a}}}return(function a(b){if(b.isDir&&(b.children=b.children.map(a),1===b.children.length&&b.children[0].isDir&&""!==b.name)){let a=b.children[0];return{...a,name:`${b.name}/${a.name}`}}return b})(b).children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name))}function Q({scroll:a,children:c}){return a?(0,b.jsx)(C.ScrollArea,{className:"flex-1 min-h-0",children:c}):(0,b.jsx)("div",{children:c})}function R({label:a,count:d,labelColor:e,tree:f,batchAction:g,batchLabel:h,batchIcon:i,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r}){let[s,t]=(0,c.useState)(!0);return 0===d?null:(0,b.jsxs)("div",{className:"border-b border-border",children:[(0,b.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,b.jsxs)("button",{onClick:()=>t(!s),className:"flex items-center gap-1 flex-1 min-w-0",children:[s?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${e}`,children:[a," (",d,")"]})]}),(0,b.jsx)(A.Button,{variant:"ghost",size:"icon-xs",onClick:g,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":h,children:i})]}),s&&(0,b.jsx)("div",{className:"pb-1",children:f.map(a=>(0,b.jsx)(S,{node:a,depth:0,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r},a.path))})]})}function S({node:a,depth:e,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l}){let[p,q]=(0,c.useState)(!0),r={paddingLeft:`calc(${e} * 8px + 4px)`};if(a.isDir)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{onClick:()=>q(!p),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:r,children:[p?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsx)(o.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:a.name})]}),p&&a.children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name)).map(a=>(0,b.jsx)(S,{node:a,depth:e+1,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l},a.path))]});let s=a.file,t=M[s.status]||d.File,u=N[s.status]||"text-muted-foreground",v=O[s.status]||"?";return(0,b.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:r,onClick:()=>f(s),children:[(0,b.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,b.jsx)(t,{className:`h-3.5 w-3.5 shrink-0 ${u}`}),(0,b.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:a.name}),(0,b.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${u}`,children:v}),j&&(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),j(s.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":l??"",children:k}),l&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:l})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),g(s.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":i??"",children:h}),i&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:i})]})]})}a.s(["EditorGitPanel",0,function({localPath:a,onFileSelect:d,mode:e="project"}){let f="task"===e,{t:g}=(0,I.useI18n)(),[h,m]=(0,c.useState)(null),[o,C]=(0,c.useState)(!0),[F,G]=(0,c.useState)(""),[H,M]=(0,c.useState)(!1),[N,O]=(0,c.useState)(!1),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(!1),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(""),[$,_]=(0,c.useState)(!1),aa=(0,c.useCallback)(async()=>{try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let c=await b.json();m({changedFiles:c.changedFiles??[],ahead:c.ahead??0,behind:c.behind??0,remoteUrl:c.remoteUrl??"",currentBranch:c.currentBranch??"",branches:c.branches??[],remoteBranches:c.remoteBranches??[],topLevel:c.topLevel??a})}}catch{}finally{C(!1)}},[a]);(0,c.useEffect)(()=>{aa();let a=setInterval(aa,5e3);return()=>clearInterval(a)},[aa]);let ab=async b=>{try{await (0,L.gitAction)(a,"stage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ac=async b=>{try{await (0,L.gitAction)(a,"unstage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ad=async()=>{if(F.trim()){M(!0);try{await (0,L.gitAction)(a,"commit",{message:F}),G(""),K.toast.success(g("git.commitSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{M(!1)}}},ae=async b=>{O(!0);try{await (0,L.gitAction)(a,"pull",b?{branch:b}:{}),K.toast.success(g("git.pullSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{O(!1)}},af=async b=>{T(!0);try{await (0,L.gitAction)(a,"push",b?{branch:b}:{}),K.toast.success(g("git.pushSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{T(!1)}},ag=async()=>{V(!0);try{await (0,L.gitAction)(a,"fetch"),K.toast.success(g("git.fetchSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{V(!1)}},ah=async b=>{try{await (0,L.gitAction)(a,"checkout",{branch:b}),X(!1),K.toast.success(`${g("git.switchSuccess")} ${b}`),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ai=async()=>{try{await (0,L.gitAction)(a,"stash-save",{message:F||void 0}),G(""),K.toast.success(g("git.stashSaved")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},aj=async()=>{try{await (0,L.gitAction)(a,"stash-pop",{index:0}),K.toast.success(g("git.stashApplied")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ak=async b=>{try{await (0,L.gitAction)(a,"discard-file",{file:b}),K.toast.success(g("git.discardFileSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},al=async()=>{try{await (0,L.gitAction)(a,"discard-all"),K.toast.success(g("git.discardSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},am=async b=>{if("deleted"===b.status)return;let c=h?.topLevel??a;try{let e=await (0,L.gitAction)(a,"show",{file:b.file});d?.(b.file,e.content??"",c)}catch{d?.(b.file,"",c)}},an=h?.changedFiles.filter(a=>a.staged)??[],ao=h?.changedFiles.filter(a=>!a.staged)??[],ap=(0,c.useMemo)(()=>P(an),[an]),aq=(0,c.useMemo)(()=>P(ao),[ao]);if(o)return(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)(i.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!h)return null;function ar(a){let b=[];for(let c of a)c.isDir?b.push(...ar(c.children)):c.file&&b.push(c.file.file);return b}let as=[...h?.branches??[],...(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a))],at=Y?as.filter(a=>a.toLowerCase().includes(Y.toLowerCase())):as;return(0,b.jsxs)("div",{className:f?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,b.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[f?(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{render:(0,b.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:h?.currentBranch||"—"})]})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:h?.currentBranch||"—"})]}):(0,b.jsxs)(D.Popover,{open:W,onOpenChange:a=>{X(a),a&&Z("")},children:[(0,b.jsxs)(D.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:h?.currentBranch||void 0,children:h?.currentBranch||"—"})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${W?"rotate-180":""}`})]}),(0,b.jsxs)(D.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:Y,onChange:a=>Z(a.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,b.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.localBranches")}),(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>{let c=a===h?.currentBranch;return(0,b.jsxs)("button",{onClick:()=>{c?X(!1):ah(a)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${c?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),c&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${a}`)}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.remoteBranches")}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>(0,b.jsxs)("button",{onClick:()=>ah(a),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,b.jsx)(y.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a})]},`remote-${a}`)),0===at.length&&(0,b.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:ag,disabled:U,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 ${U?"animate-spin":""}`})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:()=>{X(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":g("git.createBranch"),children:(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:g("git.createBranch")})]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),placeholder:g("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&ad()}}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsxs)(A.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:ad,disabled:H||!F.trim()||0===an.length,children:[H?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(l.Check,{className:"h-3 w-3"}),g("git.commit")]}),(0,b.jsxs)(B.DropdownMenu,{children:[(0,b.jsx)(B.DropdownMenuTrigger,{render:(0,b.jsx)(A.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,b.jsx)(r.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(B.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.commit")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ad,disabled:!F.trim()||0===an.length,children:[(0,b.jsx)(l.Check,{className:"h-3.5 w-3.5 mr-2"}),g("git.commit")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.changes")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ab(ar(aq)),disabled:0===ao.length,children:[(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5 mr-2"}),g("git.stageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ac(ar(ap)),disabled:0===an.length,children:[(0,b.jsx)(p.Minus,{className:"h-3.5 w-3.5 mr-2"}),g("git.unstageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:al,disabled:0===ao.length,children:[(0,b.jsx)(v,{className:"h-3.5 w-3.5 mr-2"}),g("git.discardAll")]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.sync")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pull")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.push")]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pullFrom"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.behind>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",h.behind]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.pushTo"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.ahead>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",h.ahead]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ag,disabled:U,children:[(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${U?"animate-spin":""}`}),g("git.fetchAll")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.stash")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ai,disabled:0===h.changedFiles.length,children:[(0,b.jsx)(t.Archive,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashSave")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:aj,children:[(0,b.jsx)(u.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashPopLatest")]})]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,b.jsx)(w.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),h.currentBranch]})]})]})]})]}),(0,b.jsxs)(Q,{scroll:f,children:[(0,b.jsx)(R,{label:g("git.stagedChanges"),count:an.length,labelColor:"text-emerald-400",tree:ap,batchAction:()=>ac(ar(ap)),batchLabel:g("git.unstageAll"),batchIcon:(0,b.jsx)(p.Minus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ac([a]),fileActionIcon:"−",fileActionLabel:g("git.unstageFile")}),(0,b.jsx)(R,{label:g("git.unstagedChanges"),count:ao.length,labelColor:"text-muted-foreground",tree:aq,batchAction:()=>ab(ar(aq)),batchLabel:g("git.stageAll"),batchIcon:(0,b.jsx)(q.Plus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ab([a]),fileActionIcon:"+",fileActionLabel:g("git.stageFile"),onFileSecondaryAction:a=>ak(a),fileSecondaryIcon:(0,b.jsx)(z.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:g("git.discardFile")}),0===h.changedFiles.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,b.jsx)(l.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g("git.noChanges")})]})]}),(0,b.jsx)(J,{open:$,onOpenChange:_,branches:[...h?.branches??[],...h?.remoteBranches??[]],currentBranch:h?.currentBranch??"",localPath:a,onCreated:async()=>{K.toast.success(g("git.createSuccess")),await aa()},onError:a=>K.toast.error(`${g("git.createFailed")}: ${a}`)})]})}],985716)},944438,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("602733e7b9eead7ed11a9e7dae74aefb29d012dd86",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])},133378,262427,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c89d23a5a766f86df88299b157166d5d9d9b05d7e",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],133378);let d=(0,b.createServerReference)("4086ec77580b4acbbf1a853b0771a521304661b02b",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],262427)},10307,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402825ac195e861229bce982a5e5b69a1c2cb4a60d",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},244843,398194,817823,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60e97ebc1896656c6b16ce6f513fb997145cc65b04",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],244843);let d=(0,b.createServerReference)("406de8f0882a35d03f24d64a87ea655bda6af15e62",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],398194);let e=(0,b.createServerReference)("60c1dc2b57f8553c8a2d9c3432a59fc92e59bb6a1f",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],817823)},283857,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["Lightbulb",0,b],283857)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(747798),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.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:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.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:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.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:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])}];
|
|
1
|
+
module.exports=[300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.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,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.filename))},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:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("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,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.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"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},140597,694116,a=>{"use strict";let b=(0,a.i(711796).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["default",0,b],694116),a.s(["File",0,b],140597)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.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"}]]);a.s(["History",0,d],359948)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},771313,307373,646788,806671,114884,604456,703903,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);a.s(["FilePlus",0,c],771313);let d=(0,b.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);a.s(["FileMinus",0,d],307373);let e=(0,b.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);a.s(["FileQuestion",0,e],646788);let f=(0,b.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);a.s(["FileEdit",0,f],806671);let g=(0,b.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,g],114884);let h=(0,b.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,h],604456);let i=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["Minus",0,i],703903)},324263,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["ArrowUpFromLine",0,b],324263)},985716,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(140597),e=a.i(771313),f=a.i(307373),g=a.i(646788),h=a.i(806671),i=a.i(704494),j=a.i(114884),k=a.i(604456),l=a.i(668116),m=a.i(10390),n=a.i(442620),o=a.i(146758),p=a.i(703903),q=a.i(774881),r=a.i(336771),s=a.i(192369),t=a.i(607219),u=a.i(324263);let v=(0,a.i(711796).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var w=a.i(577565),x=a.i(573242),y=a.i(851378),z=a.i(975231),A=a.i(699570),B=a.i(335732),C=a.i(269876),D=a.i(599209),E=a.i(785259),F=a.i(814574),G=a.i(866718),H=a.i(429246),I=a.i(951192);function J({open:a,onOpenChange:d,branches:e,currentBranch:f,localPath:g,onCreated:h,onError:j}){let{t:k}=(0,I.useI18n)(),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(f),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,y]=(0,c.useState)(""),[z,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(o(""),q(f),s(""),y(""))},[a,f]);let C=[...new Set(e)].filter(a=>a.toLowerCase().includes(v.toLowerCase())),D=async()=>{if(m.trim()){u(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:m.trim(),baseBranch:p})});if(a.ok)d(!1),h();else{let b=await a.json();j(b.error||"Unknown error")}}catch{j("Network error")}finally{u(!1)}}};return(0,b.jsx)(F.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(F.DialogHeader,{children:(0,b.jsx)(F.DialogTitle,{children:k("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchName")}),(0,b.jsx)(G.Input,{value:m,onChange:a=>o(a.target.value),placeholder:k("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&D()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>B(!z),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,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:p,children:p})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${z?"rotate-180":""}`})]}),z&&(0,b.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,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:v,onChange:a=>y(a.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,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:C.map(a=>(0,b.jsxs)("button",{onClick:()=>{q(a),B(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===p?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),a===p&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.branchDesc")}),(0,b.jsx)(H.Textarea,{value:r,onChange:a=>s(a.target.value),placeholder:k("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,b.jsxs)(F.DialogFooter,{children:[(0,b.jsx)(A.Button,{variant:"outline",onClick:()=>d(!1),children:k("common.cancel")}),(0,b.jsxs)(A.Button,{onClick:D,disabled:!m.trim()||t,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[t?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,k("common.create")]})]})]})})}var K=a.i(952313),L=a.i(7285);let M={modified:h.FileEdit,added:e.FilePlus,deleted:f.FileMinus,untracked:g.FileQuestion,renamed:h.FileEdit},N={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},O={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function P(a){let b={name:"",path:"",isDir:!0,children:[]};for(let c of a){let a=c.file.split("/").filter(Boolean);if(0===a.length)continue;let d=b;for(let b=0;b<a.length;b++){let e=a[b],f=b===a.length-1,g=a.slice(0,b+1).join("/");if(f)d.children.push({name:e,path:g,isDir:!1,children:[],file:c});else{let a=d.children.find(a=>a.isDir&&a.name===e);a||(a={name:e,path:g,isDir:!0,children:[]},d.children.push(a)),d=a}}}return(function a(b){if(b.isDir&&(b.children=b.children.map(a),1===b.children.length&&b.children[0].isDir&&""!==b.name)){let a=b.children[0];return{...a,name:`${b.name}/${a.name}`}}return b})(b).children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name))}function Q({scroll:a,children:c}){return a?(0,b.jsx)(C.ScrollArea,{className:"flex-1 min-h-0",children:c}):(0,b.jsx)("div",{children:c})}function R({label:a,count:d,labelColor:e,tree:f,batchAction:g,batchLabel:h,batchIcon:i,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r}){let[s,t]=(0,c.useState)(!0);return 0===d?null:(0,b.jsxs)("div",{className:"border-b border-border",children:[(0,b.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,b.jsxs)("button",{onClick:()=>t(!s),className:"flex items-center gap-1 flex-1 min-w-0",children:[s?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${e}`,children:[a," (",d,")"]})]}),(0,b.jsx)(A.Button,{variant:"ghost",size:"icon-xs",onClick:g,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":h,children:i})]}),s&&(0,b.jsx)("div",{className:"pb-1",children:f.map(a=>(0,b.jsx)(S,{node:a,depth:0,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r},a.path))})]})}function S({node:a,depth:e,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l}){let[p,q]=(0,c.useState)(!0),r={paddingLeft:`calc(${e} * 8px + 4px)`};if(a.isDir)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{onClick:()=>q(!p),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:r,children:[p?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsx)(o.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:a.name})]}),p&&a.children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name)).map(a=>(0,b.jsx)(S,{node:a,depth:e+1,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l},a.path))]});let s=a.file,t=M[s.status]||d.File,u=N[s.status]||"text-muted-foreground",v=O[s.status]||"?";return(0,b.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:r,onClick:()=>f(s),children:[(0,b.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,b.jsx)(t,{className:`h-3.5 w-3.5 shrink-0 ${u}`}),(0,b.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:a.name}),(0,b.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${u}`,children:v}),j&&(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),j(s.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":l??"",children:k}),l&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:l})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),g(s.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":i??"",children:h}),i&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:i})]})]})}a.s(["EditorGitPanel",0,function({localPath:a,onFileSelect:d,mode:e="project"}){let f="task"===e,{t:g}=(0,I.useI18n)(),[h,m]=(0,c.useState)(null),[o,C]=(0,c.useState)(!0),[F,G]=(0,c.useState)(""),[H,M]=(0,c.useState)(!1),[N,O]=(0,c.useState)(!1),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(!1),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(""),[$,_]=(0,c.useState)(!1),aa=(0,c.useCallback)(async()=>{try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let c=await b.json();m({changedFiles:c.changedFiles??[],ahead:c.ahead??0,behind:c.behind??0,remoteUrl:c.remoteUrl??"",currentBranch:c.currentBranch??"",branches:c.branches??[],remoteBranches:c.remoteBranches??[],topLevel:c.topLevel??a})}}catch{}finally{C(!1)}},[a]);(0,c.useEffect)(()=>{aa();let a=setInterval(aa,5e3);return()=>clearInterval(a)},[aa]);let ab=async b=>{try{await (0,L.gitAction)(a,"stage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ac=async b=>{try{await (0,L.gitAction)(a,"unstage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ad=async()=>{if(F.trim()){M(!0);try{await (0,L.gitAction)(a,"commit",{message:F}),G(""),K.toast.success(g("git.commitSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{M(!1)}}},ae=async b=>{O(!0);try{await (0,L.gitAction)(a,"pull",b?{branch:b}:{}),K.toast.success(g("git.pullSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{O(!1)}},af=async b=>{T(!0);try{await (0,L.gitAction)(a,"push",b?{branch:b}:{}),K.toast.success(g("git.pushSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{T(!1)}},ag=async()=>{V(!0);try{await (0,L.gitAction)(a,"fetch"),K.toast.success(g("git.fetchSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{V(!1)}},ah=async b=>{try{await (0,L.gitAction)(a,"checkout",{branch:b}),X(!1),K.toast.success(`${g("git.switchSuccess")} ${b}`),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ai=async()=>{try{await (0,L.gitAction)(a,"stash-save",{message:F||void 0}),G(""),K.toast.success(g("git.stashSaved")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},aj=async()=>{try{await (0,L.gitAction)(a,"stash-pop",{index:0}),K.toast.success(g("git.stashApplied")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ak=async b=>{try{await (0,L.gitAction)(a,"discard-file",{file:b}),K.toast.success(g("git.discardFileSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},al=async()=>{try{await (0,L.gitAction)(a,"discard-all"),K.toast.success(g("git.discardSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},am=async b=>{if("deleted"===b.status)return;let c=h?.topLevel??a;try{let e=await (0,L.gitAction)(a,"show",{file:b.file});d?.(b.file,e.content??"",c)}catch{d?.(b.file,"",c)}},an=h?.changedFiles.filter(a=>a.staged)??[],ao=h?.changedFiles.filter(a=>!a.staged)??[],ap=(0,c.useMemo)(()=>P(an),[an]),aq=(0,c.useMemo)(()=>P(ao),[ao]);if(o)return(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)(i.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!h)return null;function ar(a){let b=[];for(let c of a)c.isDir?b.push(...ar(c.children)):c.file&&b.push(c.file.file);return b}let as=[...h?.branches??[],...(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a))],at=Y?as.filter(a=>a.toLowerCase().includes(Y.toLowerCase())):as;return(0,b.jsxs)("div",{className:f?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,b.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[f?(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{render:(0,b.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:h?.currentBranch||"—"})]})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:h?.currentBranch||"—"})]}):(0,b.jsxs)(D.Popover,{open:W,onOpenChange:a=>{X(a),a&&Z("")},children:[(0,b.jsxs)(D.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:h?.currentBranch||void 0,children:h?.currentBranch||"—"})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${W?"rotate-180":""}`})]}),(0,b.jsxs)(D.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:Y,onChange:a=>Z(a.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,b.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.localBranches")}),(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>{let c=a===h?.currentBranch;return(0,b.jsxs)("button",{onClick:()=>{c?X(!1):ah(a)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${c?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),c&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${a}`)}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.remoteBranches")}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>(0,b.jsxs)("button",{onClick:()=>ah(a),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,b.jsx)(y.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a})]},`remote-${a}`)),0===at.length&&(0,b.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:ag,disabled:U,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 ${U?"animate-spin":""}`})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:()=>{X(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":g("git.createBranch"),children:(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:g("git.createBranch")})]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),placeholder:g("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&ad()}}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsxs)(A.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:ad,disabled:H||!F.trim()||0===an.length,children:[H?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(l.Check,{className:"h-3 w-3"}),g("git.commit")]}),(0,b.jsxs)(B.DropdownMenu,{children:[(0,b.jsx)(B.DropdownMenuTrigger,{render:(0,b.jsx)(A.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,b.jsx)(r.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(B.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.commit")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ad,disabled:!F.trim()||0===an.length,children:[(0,b.jsx)(l.Check,{className:"h-3.5 w-3.5 mr-2"}),g("git.commit")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.changes")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ab(ar(aq)),disabled:0===ao.length,children:[(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5 mr-2"}),g("git.stageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ac(ar(ap)),disabled:0===an.length,children:[(0,b.jsx)(p.Minus,{className:"h-3.5 w-3.5 mr-2"}),g("git.unstageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:al,disabled:0===ao.length,children:[(0,b.jsx)(v,{className:"h-3.5 w-3.5 mr-2"}),g("git.discardAll")]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.sync")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pull")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.push")]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pullFrom"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.behind>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",h.behind]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.pushTo"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.ahead>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",h.ahead]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ag,disabled:U,children:[(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${U?"animate-spin":""}`}),g("git.fetchAll")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.stash")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ai,disabled:0===h.changedFiles.length,children:[(0,b.jsx)(t.Archive,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashSave")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:aj,children:[(0,b.jsx)(u.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashPopLatest")]})]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,b.jsx)(w.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),h.currentBranch]})]})]})]})]}),(0,b.jsxs)(Q,{scroll:f,children:[(0,b.jsx)(R,{label:g("git.stagedChanges"),count:an.length,labelColor:"text-emerald-400",tree:ap,batchAction:()=>ac(ar(ap)),batchLabel:g("git.unstageAll"),batchIcon:(0,b.jsx)(p.Minus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ac([a]),fileActionIcon:"−",fileActionLabel:g("git.unstageFile")}),(0,b.jsx)(R,{label:g("git.unstagedChanges"),count:ao.length,labelColor:"text-muted-foreground",tree:aq,batchAction:()=>ab(ar(aq)),batchLabel:g("git.stageAll"),batchIcon:(0,b.jsx)(q.Plus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ab([a]),fileActionIcon:"+",fileActionLabel:g("git.stageFile"),onFileSecondaryAction:a=>ak(a),fileSecondaryIcon:(0,b.jsx)(z.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:g("git.discardFile")}),0===h.changedFiles.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,b.jsx)(l.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g("git.noChanges")})]})]}),(0,b.jsx)(J,{open:$,onOpenChange:_,branches:[...h?.branches??[],...h?.remoteBranches??[]],currentBranch:h?.currentBranch??"",localPath:a,onCreated:async()=>{K.toast.success(g("git.createSuccess")),await aa()},onError:a=>K.toast.error(`${g("git.createFailed")}: ${a}`)})]})}],985716)},392260,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60cf6b2d326d0946ce8d37c175c468c1e69b765fae",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])},643701,997775,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c44f67c33631945c23e44f17e91cb623eb6bedfb2",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],643701);let d=(0,b.createServerReference)("40fff72f22835092abeb3d0397d5bee7f7fb3bad18",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],997775)},372178,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40a895ba3eccb79f3fb8a1462a05537757a30a1413",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},473858,485673,91473,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60cf7fbcf67ea83b8c27f49c5bcb609d4618ba551c",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],473858);let d=(0,b.createServerReference)("40baa85f3c2053e9a098e3ac7f1088fa940ffa23bc",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],485673);let e=(0,b.createServerReference)("60179f334352ae295d3f7b9c209df818f4a8f82257",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],91473)},283857,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["Lightbulb",0,b],283857)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(747798),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.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:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.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:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.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:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_0_vq_9m._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[264589,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["Package",0,b],264589)},786304,a=>{"use strict";var b=a.i(475295),c=a.i(213200),d=a.i(142261),e=a.i(368114);let f=(0,d.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],786304)},
|
|
1
|
+
module.exports=[264589,a=>{"use strict";let b=(0,a.i(711796).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"}]]);a.s(["Package",0,b],264589)},786304,a=>{"use strict";var b=a.i(475295),c=a.i(213200),d=a.i(142261),e=a.i(368114);let f=(0,d.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],786304)},595069,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40bbb15b95b61da428c7e4c39a37b1859d070f0d4a",b.callServer,void 0,b.findSourceMapURL,"getConfigValues");a.s(["getConfigValues",0,c])},412783,22761,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...d})}],412783);let d=(0,a.i(711796).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"}]]);a.s(["Copy",0,d],22761)},747798,a=>{"use strict";let b=(0,a.i(711796).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);a.s(["RotateCcw",0,b],747798)},324954,a=>{"use strict";let b=(0,a.i(711796).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);a.s(["Upload",0,b],324954)},913284,468862,a=>{"use strict";var b=a.i(884664);a.s(["CheckCircle2",()=>b.default],913284);let c=(0,a.i(711796).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);a.s(["XCircle",0,c],468862)},963326,a=>{"use strict";let b=(0,a.i(711796).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);a.s(["ExternalLink",0,b],963326)},810462,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40ec078238dc42004bc617c4035896dcd15be6787f",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},811344,a=>{"use strict";var b=a.i(622945);a.s(["AlertTriangle",()=>b.default])},627141,a=>{"use strict";var b=a.i(374637),c=a.i(87309);a.s(["useExtension",0,function(a){let d=(0,b.useContext)(c.ExtensionContext);if(!d)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:d.statusMap[a],loading:d.loading,isInstalling:d.installing.has(a),install:()=>d.install(a),uninstall:()=>d.uninstall(a),refresh:()=>d.refresh(a)}}])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=_0a5f4n.._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[402854,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),101752,a=>a.a(async(b,c)=>{try{var d=a.i(402854),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["
|
|
1
|
+
module.exports=[402854,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),101752,a=>a.a(async(b,c)=>{try{var d=a.i(402854),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["000d14bf95e77f5146ecedeafe36dd0cf4f69bef2b",()=>k.getOnboardingStatus,"0013b21d67a7ce907696bad27cf0af74419e936884",()=>h.getActualWsPort,"009a8310daa43caed254189f3df8ca9e4cd9ec15ce",()=>e.getWorkspacesWithProjects,"00a37ed9d7817ae2f43835e3ba3f7a6372a7c44f2b",()=>j.listAllExtensionStatus,"4007aed739a0ce03f191023d9d814279807cc7e067",()=>e.deleteWorkspace,"401507e22bdf8ed89380da82391a5cc3b4680d6523",()=>e.deleteProject,"4024cd5e25a73f70ee2ad32d713ed63bded909c1e9",()=>e.getWorkspacesWithRecentTasks,"402b5bbcb9000f82183949dd6bd27fcd4b6f35334a",()=>j.checkExtension,"402bed4755ff79e2867db3780af837f50e5a57dfca",()=>e.createWorkspace,"403188dbd789058a2242037e5cb4c1b414c6d4dd82",()=>e.getProjectByLocalPath,"403571b0157629e00faaad8d6db072c4b80039727f",()=>f.createLabel,"404202ed461e1dc3979fcf4b4e3f43e192015924f8",()=>f.deleteLabel,"40439232ece3bb831138972c38d756e8e8a05b1ac6",()=>e.reorderWorkspaces,"4069332f44db7650fccc2f480d27ffb20dc9f17f4a",()=>j.installExtension,"406a27b6e3dcf314ab94933879e542f5d5807c687a",()=>k.setOnboardingProgress,"406cf57ab441b87fe26b4e4ba61492f885d99c626c",()=>h.resolveGitLocalPath,"40b5222e72e32cd9f45dc74923a7de5adbd67bc035",()=>j.uninstallExtension,"40bbb15b95b61da428c7e4c39a37b1859d070f0d4a",()=>h.getConfigValues,"40bbf2511527d659cda23200ebab62c449b3333981",()=>k.dispatchTaskCompletionEvent,"40bf13d805ba5df8c98104966626fa3c379fe124fe",()=>e.getWorkspaceById,"40c41ee3dbd5922ea86bfa9c171b0cf86fd70be5fb",()=>f.getLabelsForWorkspace,"40c537d4a523dd876dc26956b554758fd7a5893c2c",()=>i.checkMigrationSafety,"40cdddf74c4871e58a967171910cd4e70f66d9fcb9",()=>e.getOrCreateTowerTaskId,"40f0fdb5e9a1a34468de5b220651e1d97fe652c148",()=>e.createProject,"40f4bc7d33dfc4192f63cea49ce2d3321a9a6daf65",()=>e.getRecentLocalProjects,"6023f7fd9697f8622ec6253be83036fb51f78a003f",()=>h.getConfigValue,"6024dbc330f4c524daa08e7ac710214e9e81039cc8",()=>i.analyzeProjectDirectory,"60419002d165e0acbafb67ca7d3daa91b1a43038f4",()=>h.setConfigValue,"604ed770eae5fe6c7eb9bb3e7920034f2876adcc93",()=>i.migrateProjectPath,"605776670179f7e81aa8dc4c1efdf239d4bcee2b24",()=>e.updateWorkspace,"609fd24cefe3230b2272c1c8c2db26ea3e5a4a6234",()=>g.globalSearch,"60b0380e165f524a2d94cf6eeea69d6a79b8c869e3",()=>e.updateProject,"60daedfee26db2b3db86558c507c9657419b041b19",()=>k.completeOnboarding,"60f838a02bdbc2cb7a865af120230e7d827d85ec63",()=>k.setOnboardingExtensions]),c()}catch(a){c(a)}},!1),76052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_007-dd1._.js"].map(b=>a.l(b))).then(()=>b(492067)))},98813,a=>{a.v(a=>Promise.resolve().then(()=>a(962620)))},507502,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js"].map(b=>a.l(b))).then(()=>b(845427)))},752453,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0mv64fw._.js"].map(b=>a.l(b))).then(()=>b(897667)))}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0bkb_.9._.js.map
|