commandmate 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +8 -9
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
- package/.next/server/app/page.js +3 -3
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +3 -3
- package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +6 -6
- package/.next/server/chunks/2683.js +1 -1
- package/.next/server/chunks/5823.js +1 -1
- package/.next/server/chunks/6837.js +1 -1
- package/.next/server/chunks/7266.js +1 -1
- package/.next/server/chunks/7808.js +1 -0
- package/.next/server/chunks/8585.js +1 -1
- package/.next/server/chunks/9238.js +35 -0
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/2335-98a211e00b94c7ac.js +1 -0
- package/.next/static/chunks/{4733-50bdfc169adb4881.js → 5970-9e999084275f2995.js} +1 -1
- package/.next/static/chunks/{6140-389f1951062dcf4f.js → 8864-2f60eadc8404fdd0.js} +1 -1
- package/.next/static/chunks/app/page-a6593b9640df66a6.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-5abc1e9b59430db1.js +1 -0
- package/.next/static/css/{6a92c8ad3c94d15a.css → a69d9c70fce558b4.css} +1 -1
- package/.next/trace +5 -5
- package/README.md +2 -1
- package/package.json +1 -1
- package/.next/server/chunks/4704.js +0 -35
- package/.next/server/chunks/5781.js +0 -1
- package/.next/static/chunks/2330-0299b9879f4977d2.js +0 -1
- package/.next/static/chunks/8216-00e20326f32abd12.js +0 -1
- package/.next/static/chunks/app/page-43b5de1a0a788b1f.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-a836cda4ee0339c5.js +0 -1
- /package/.next/static/{yrO0L8bN6ioX1pKYKzlmV → 5sR3jeFe8ymnzcEan6Rdt}/_buildManifest.js +0 -0
- /package/.next/static/{yrO0L8bN6ioX1pKYKzlmV → 5sR3jeFe8ymnzcEan6Rdt}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var e={};e.id=6392,e.ids=[6392],e.modules={85890:e=>{e.exports=require("better-sqlite3")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},84770:e=>{e.exports=require("crypto")},92048:e=>{e.exports=require("fs")},20629:e=>{e.exports=require("fs/promises")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},36658:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>y,patchFetch:()=>x,requestAsyncStorage:()=>f,routeModule:()=>p,serverHooks:()=>m,staticGenerationAsyncStorage:()=>h});var o={};r.r(o),r.d(o,{GET:()=>l});var
|
|
1
|
+
"use strict";(()=>{var e={};e.id=6392,e.ids=[6392],e.modules={85890:e=>{e.exports=require("better-sqlite3")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},84770:e=>{e.exports=require("crypto")},92048:e=>{e.exports=require("fs")},20629:e=>{e.exports=require("fs/promises")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},36658:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>y,patchFetch:()=>x,requestAsyncStorage:()=>f,routeModule:()=>p,serverHooks:()=>m,staticGenerationAsyncStorage:()=>h});var o={};r.r(o),r.d(o,{GET:()=>l});var i=r(49303),n=r(88716),s=r(60670),a=r(87070),u=r(97425),d=r(75748),c=r(18163);async function l(e,{params:t}){try{let e=(0,u.n)(),r=(0,d.gU)(e,t.id);if(!r){let e=(0,c.dq)(t.id);return a.NextResponse.json({error:e.error},{status:e.status})}let o=await (0,c.Lu)(r.path);return a.NextResponse.json(o)}catch(t){console.error("Error reading directory:",t);let e=(0,c.GT)(t);return a.NextResponse.json({error:e.error},{status:e.status})}}let p=new i.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/worktrees/[id]/tree/route",pathname:"/api/worktrees/[id]/tree",filename:"route",bundlePath:"app/api/worktrees/[id]/tree/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/worktrees/[id]/tree/route.ts",nextConfigOutput:"",userland:o}),{requestAsyncStorage:f,staticGenerationAsyncStorage:h,serverHooks:m}=p,y="/api/worktrees/[id]/tree/route";function x(){return(0,s.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:h})}},18163:(e,t,r)=>{r.d(t,{GT:()=>c,Lu:()=>d,W:()=>p,bB:()=>s,bS:()=>a,dq:()=>l});var o=r(20629),i=r(55315);let n=[".git",".env",".env.*","node_modules",".DS_Store","Thumbs.db","*.pem","*.key",".env.local",".env.development",".env.production",".env.test"],s={MAX_ITEMS_PER_DIR:500,MAX_DEPTH:10,MAX_FILE_SIZE_PREVIEW:1048576};function a(e){for(let t of n){if(t===e)return!0;if(t.startsWith("*.")){let r=t.slice(1);if(e.endsWith(r))return!0}if(t.endsWith(".*")){let r=t.slice(0,-2);if(e.startsWith(r+"."))return!0}}return!1}async function u(e){try{return(await (0,o.readdir)(e)).filter(e=>!a(e)).length}catch{return 0}}async function d(e,t=""){let r;let n=t?(0,i.join)(e,t):e;try{r=await (0,o.stat)(n)}catch{throw Error(`Directory not found: ${t||"(root)"}`)}if(!r.isDirectory())throw Error(`Path is not a directory: ${t}`);let d=await (0,o.readdir)(n),c=[];for(let e of d){if(a(e))continue;let t=(0,i.join)(n,e);try{let r=await (0,o.lstat)(t);if(r.isSymbolicLink())continue;if(r.isDirectory()){let r=await u(t);c.push({name:e,type:"directory",itemCount:r})}else if(r.isFile()){let t=(0,i.extname)(e),o={name:e,type:"file",size:r.size,birthtime:r.birthtime.toISOString()};t&&t.length>1&&(o.extension=t.slice(1)),c.push(o)}}catch{continue}if(c.length>=s.MAX_ITEMS_PER_DIR)break}let l=[...c].sort((e,t)=>e.type!==t.type?"directory"===e.type?-1:1:e.name.toLowerCase().localeCompare(t.name.toLowerCase())),p=null;if(t){let e=(0,i.dirname)(t);p="."===e?"":e}return{path:t,name:t?(0,i.basename)(t):"",items:l,parentPath:p}}function c(e){let t=e instanceof Error?e.message:"Unknown error";return t.includes("not found")?{error:"Directory not found",status:404}:t.includes("not a directory")?{error:"Path is not a directory",status:400}:{error:"Failed to read directory",status:500}}function l(e){return{error:`Worktree '${e}' not found`,status:404}}function p(e="Invalid path"){return{error:`Access denied: ${e}`,status:403}}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[8948,5972,7425],()=>r(36658));module.exports=o})();
|
package/.next/server/app/page.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(()=>{var e={};e.id=1931,e.ids=[1931],e.modules={72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},55315:e=>{"use strict";e.exports=require("path")},17360:e=>{"use strict";e.exports=require("url")},37906:(e,t,a)=>{"use strict";a.r(t),a.d(t,{GlobalError:()=>i.a,__next_app__:()=>m,originalPathname:()=>u,pages:()=>c,routeModule:()=>h,tree:()=>d}),a(35480),a(25086),a(35866);var r=a(23191),n=a(88716),s=a(37922),i=a.n(s),l=a(95231),o={};for(let e in l)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(o[e]=()=>l[e]);a.d(t,o);let d=["",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(a.bind(a,35480)),"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx"],metadata:{icon:[async e=>(await Promise.resolve().then(a.bind(a,71150))).default(e)],apple:[async e=>(await Promise.resolve().then(a.bind(a,63601))).default(e)],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(a.bind(a,25086)),"/home/runner/work/CommandMate/CommandMate/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(a.t.bind(a,35866,23)),"next/dist/client/components/not-found-error"],metadata:{icon:[async e=>(await Promise.resolve().then(a.bind(a,71150))).default(e)],apple:[async e=>(await Promise.resolve().then(a.bind(a,63601))).default(e)],openGraph:[],twitter:[],manifest:void 0}}],c=["/home/runner/work/CommandMate/CommandMate/src/app/page.tsx"],u="/page",m={require:a,loadChunk:()=>Promise.resolve()},h=new r.AppPageRouteModule({definition:{kind:n.x.APP_PAGE,page:"/page",pathname:"/",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},11518:(e,t,a)=>{Promise.resolve().then(a.bind(a,84792))},35047:(e,t,a)=>{"use strict";var r=a(77389);a.o(r,"useParams")&&a.d(t,{useParams:function(){return r.useParams}}),a.o(r,"useRouter")&&a.d(t,{useRouter:function(){return r.useRouter}})},84792:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>q});var r=a(10326),n=a(17577),s=a(2583),i=a(90434),l=a(77758),o=a(6162),d=a(34643);let c=Symbol.for("constructDateFrom");function u(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&c in e?e[c](t):e instanceof Date?new e.constructor(t):new Date(t)}let m={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function h(e){return (t={})=>{let a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}let p={date:h({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:h({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:h({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},x={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function g(e){return(t,a)=>{let r;if("formatting"===(a?.context?String(a.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,n=a?.width?String(a.width):t;r=e.formattingValues[n]||e.formattingValues[t]}else{let t=e.defaultWidth,n=a?.width?String(a.width):e.defaultWidth;r=e.values[n]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function f(e){return(t,a={})=>{let r;let n=a.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;let l=i[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(o)?function(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}(o,e=>e.test(l)):function(e,t){for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}(o,e=>e.test(l));return r=e.valueCallback?e.valueCallback(d):d,{value:r=a.valueCallback?a.valueCallback(r):r,rest:t.slice(l.length)}}}function y(e){return(t,a={})=>{let r=t.match(e.matchPattern);if(!r)return null;let n=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];return{value:i=a.valueCallback?a.valueCallback(i):i,rest:t.slice(n.length)}}}let b={code:"en-US",formatDistance:(e,t,a)=>{let r;let n=m[e];return(r="string"==typeof n?n:1===t?n.one:n.other.replace("{{count}}",t.toString()),a?.addSuffix)?a.comparison&&a.comparison>0?"in "+r:r+" ago":r},formatLong:p,formatRelative:(e,t,a,r)=>x[e],localize:{ordinalNumber:(e,t)=>{let a=Number(e),r=a%100;if(r>20||r<10)switch(r%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:g({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:g({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:g({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:g({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:g({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:y({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:f({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:f({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:f({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:f({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:f({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},v={};function j(e,t){return u(t||e,e)}function w(e){let t=j(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function N(e,...t){let a=u.bind(null,e||t.find(e=>"object"==typeof e));return t.map(a)}function k(e,t){let a=+j(e)-+j(t);return a<0?-1:a>0?1:a}let C={lessThanXSeconds:{one:"1秒未満",other:"{{count}}秒未満",oneWithSuffix:"約1秒",otherWithSuffix:"約{{count}}秒"},xSeconds:{one:"1秒",other:"{{count}}秒"},halfAMinute:"30秒",lessThanXMinutes:{one:"1分未満",other:"{{count}}分未満",oneWithSuffix:"約1分",otherWithSuffix:"約{{count}}分"},xMinutes:{one:"1分",other:"{{count}}分"},aboutXHours:{one:"約1時間",other:"約{{count}}時間"},xHours:{one:"1時間",other:"{{count}}時間"},xDays:{one:"1日",other:"{{count}}日"},aboutXWeeks:{one:"約1週間",other:"約{{count}}週間"},xWeeks:{one:"1週間",other:"{{count}}週間"},aboutXMonths:{one:"約1か月",other:"約{{count}}か月"},xMonths:{one:"1か月",other:"{{count}}か月"},aboutXYears:{one:"約1年",other:"約{{count}}年"},xYears:{one:"1年",other:"{{count}}年"},overXYears:{one:"1年以上",other:"{{count}}年以上"},almostXYears:{one:"1年近く",other:"{{count}}年近く"}},S={date:h({formats:{full:"y年M月d日EEEE",long:"y年M月d日",medium:"y/MM/dd",short:"y/MM/dd"},defaultWidth:"full"}),time:h({formats:{full:"H時mm分ss秒 zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:h({formats:{full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},defaultWidth:"full"})},P={lastWeek:"先週のeeeeのp",yesterday:"昨日のp",today:"今日のp",tomorrow:"明日のp",nextWeek:"翌週のeeeeのp",other:"P"},M={en:b,ja:{code:"ja",formatDistance:(e,t,a)=>{let r;a=a||{};let n=C[e];return(r="string"==typeof n?n:1===t?a.addSuffix&&n.oneWithSuffix?n.oneWithSuffix:n.one:a.addSuffix&&n.otherWithSuffix?n.otherWithSuffix.replace("{{count}}",String(t)):n.other.replace("{{count}}",String(t)),a.addSuffix)?a.comparison&&a.comparison>0?r+"後":r+"前":r},formatLong:S,formatRelative:(e,t,a,r)=>P[e],localize:{ordinalNumber:(e,t)=>{let a=Number(e);switch(String(t?.unit)){case"year":return`${a}年`;case"quarter":return`第${a}四半期`;case"month":return`${a}月`;case"week":return`第${a}週`;case"date":return`${a}日`;case"hour":return`${a}時`;case"minute":return`${a}分`;case"second":return`${a}秒`;default:return`${a}`}},era:g({values:{narrow:["BC","AC"],abbreviated:["紀元前","西暦"],wide:["紀元前","西暦"]},defaultWidth:"wide"}),quarter:g({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["第1四半期","第2四半期","第3四半期","第4四半期"]},defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:g({values:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},defaultWidth:"wide"}),day:g({values:{narrow:["日","月","火","水","木","金","土"],short:["日","月","火","水","木","金","土"],abbreviated:["日","月","火","水","木","金","土"],wide:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},defaultWidth:"wide"}),dayPeriod:g({values:{narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},defaultWidth:"wide",formattingValues:{narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:y({matchPattern:/^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:f({matchPatterns:{narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(紀元[前後]|西暦)/i,wide:/^(紀元[前後]|西暦)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^B/i,/^A/i],any:[/^(紀元前)/i,/^(西暦|紀元後)/i]},defaultParseWidth:"any"}),quarter:f({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^第[1234一二三四1234]四半期/i},defaultMatchWidth:"wide",parsePatterns:{any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:f({matchPatterns:{narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])月/i,wide:/^([123456789]|1[012])月/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},defaultParseWidth:"any"}),day:f({matchPatterns:{narrow:/^[日月火水木金土]/,short:/^[日月火水木金土]/,abbreviated:/^[日月火水木金土]/,wide:/^[日月火水木金土]曜日/},defaultMatchWidth:"wide",parsePatterns:{any:[/^日/,/^月/,/^火/,/^水/,/^木/,/^金/,/^土/]},defaultParseWidth:"any"}),dayPeriod:f({matchPatterns:{any:/^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^(A|午前)/i,pm:/^(P|午後)/i,midnight:/^深夜|真夜中/i,noon:/^正午/i,morning:/^朝/i,afternoon:/^午後/i,evening:/^夜/i,night:/^深夜/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}}};var W=a(73002);function z({worktree:e,onSessionKilled:t,onStatusChanged:a}){var s,c;let{id:m,name:h,description:p,updatedAt:x,isSessionRunning:g,isWaitingForResponse:f,favorite:y,status:C,link:S}=e,[P,z]=(0,n.useState)(!1),[D,A]=(0,n.useState)(y||!1),[T,$]=(0,n.useState)(!1),[L,E]=(0,n.useState)(C||null),[R,F]=(0,n.useState)(!1),O=(0,o.T)(),X=M[(0,d.bU)()]??b,I=x?(s=new Date(x),c={addSuffix:!0,locale:X},function(e,t,a){var r,n,s,i;let l;let o=a?.locale??v.locale??b,d=k(e,t);if(isNaN(d))throw RangeError("Invalid time value");let c=Object.assign({},a,{addSuffix:a?.addSuffix,comparison:d}),[u,m]=N(a?.in,...d>0?[t,e]:[e,t]),h=(r=m,n=u,(i=void 0,e=>{let t=(i?Math[i]:Math.trunc)(e);return 0===t?0:t})((+j(r)-+j(n))/1e3)),p=Math.round((h-(w(m)-w(u))/1e3)/60);if(p<2){if(a?.includeSeconds){if(h<5)return o.formatDistance("lessThanXSeconds",5,c);if(h<10)return o.formatDistance("lessThanXSeconds",10,c);if(h<20)return o.formatDistance("lessThanXSeconds",20,c);if(h<40)return o.formatDistance("halfAMinute",0,c);else if(h<60)return o.formatDistance("lessThanXMinutes",1,c);else return o.formatDistance("xMinutes",1,c)}return 0===p?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",p,c)}if(p<45)return o.formatDistance("xMinutes",p,c);if(p<90)return o.formatDistance("aboutXHours",1,c);if(p<1440)return o.formatDistance("aboutXHours",Math.round(p/60),c);if(p<2520)return o.formatDistance("xDays",1,c);if(p<43200)return o.formatDistance("xDays",Math.round(p/1440),c);if(p<86400)return l=Math.round(p/43200),o.formatDistance("aboutXMonths",l,c);if((l=function(e,t,a){let[r,n,s]=N(void 0,e,e,t),i=k(n,s),l=Math.abs(function(e,t,a){let[r,n]=N(void 0,e,t);return 12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth())}(n,s));if(l<1)return 0;1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*l);let o=k(n,s)===-i;(function(e,t){let a=j(e,void 0);return+function(e,t){let a=j(e,t?.in);return a.setHours(23,59,59,999),a}(a,void 0)==+function(e,t){let a=j(e,t?.in),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}(a,void 0)})(r)&&1===l&&1===k(r,s)&&(o=!1);let d=i*(l-+o);return 0===d?0:d}(m,u))<12)return o.formatDistance("xMonths",Math.round(p/43200),c);{let e=l%12,t=Math.trunc(l/12);return e<3?o.formatDistance("aboutXYears",t,c):e<9?o.formatDistance("overXYears",t,c):o.formatDistance("almostXYears",t+1,c)}}(s,u(s,Date.now()),c)):null,q="main"===h||"master"===h,_=async e=>{if(e.preventDefault(),e.stopPropagation(),confirm(O("worktree.session.confirmKill",{name:h})))try{z(!0),await W.Iv.killSession(m),t&&t()}catch(t){let e=(0,W.zG)(t);alert(`${O("worktree.session.failedToKill")}: ${e}`)}finally{z(!1)}},U=async e=>{e.preventDefault(),e.stopPropagation();try{$(!0);let e=!D;await W.Iv.toggleFavorite(m,e),A(e)}catch(t){let e=(0,W.zG)(t);alert(`${O("worktree.errors.failedToUpdateFavorite")}: ${e}`)}finally{$(!1)}},J=async(e,t)=>{t.preventDefault(),t.stopPropagation();try{F(!0),await W.Iv.updateStatus(m,e),E(e),a&&a()}catch(t){let e=(0,W.zG)(t);alert(`${O("worktree.errors.failedToUpdateStatus")}: ${e}`)}finally{F(!1)}};return r.jsx(i.default,{href:`/worktrees/${m}`,className:"block",children:(0,r.jsxs)(l.Zb,{hover:!0,padding:"lg",className:"h-full",children:[r.jsx(l.Ol,{children:(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsxs)(l.ll,{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("button",{onClick:U,disabled:T,className:"flex-shrink-0 transition-colors hover:scale-110",title:D?O("common.favorites.remove"):O("common.favorites.add"),children:r.jsx("svg",{className:`w-5 h-5 ${D?"fill-yellow-400 text-yellow-400":"fill-none text-gray-400"}`,stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})})}),r.jsx("span",{className:"truncate",children:h}),q&&r.jsx(l.Ct,{variant:"info",children:"Main"}),g&&f&&r.jsx(l.Ct,{variant:"warning",dot:!0,children:O("worktree.status.waitingForResponse")}),g&&!f&&r.jsx(l.Ct,{variant:"success",dot:!0,children:O("worktree.status.responseCompleted")})]}),g&&r.jsx(l.zx,{variant:"danger",size:"sm",onClick:_,disabled:P,className:"flex-shrink-0",children:P?O("common.ending"):O("common.end")})]})}),r.jsx(l.aY,{children:(0,r.jsxs)("div",{className:"space-y-3",children:[p&&(0,r.jsxs)("div",{children:[r.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Description"}),r.jsx("p",{className:"text-sm text-gray-700 line-clamp-2 whitespace-pre-wrap",children:p})]}),S&&(0,r.jsxs)("div",{children:[r.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Link"}),(0,r.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),S&&window.open(S,"_blank","noopener,noreferrer")},className:"flex items-center gap-1 text-sm text-blue-600 hover:text-blue-800 hover:underline transition-colors",title:"Open link in new tab",children:[r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),r.jsx("span",{className:"truncate",children:S})]})]}),(0,r.jsxs)("div",{children:[r.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Status"}),(0,r.jsxs)("div",{className:"flex gap-1 flex-wrap",children:[r.jsx("button",{onClick:e=>J(null,e),disabled:R,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${null===L?"bg-gray-100 text-gray-700 border-gray-400":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50"}`,children:"Not set"}),r.jsx("button",{onClick:e=>J("todo",e),disabled:R,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${"todo"===L?"bg-gray-100 text-gray-700 border-gray-400":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50"}`,children:"ToDo"}),r.jsx("button",{onClick:e=>J("doing",e),disabled:R,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${"doing"===L?"bg-blue-100 text-blue-700 border-blue-400":"bg-white text-gray-600 border-gray-200 hover:bg-blue-50"}`,children:"Doing"}),r.jsx("button",{onClick:e=>J("done",e),disabled:R,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${"done"===L?"bg-green-100 text-green-700 border-green-400":"bg-white text-gray-600 border-gray-200 hover:bg-green-50"}`,children:"Done"})]})]}),I&&(0,r.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[r.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsxs)("span",{children:["Updated ",I]})]})]})})]})})}function D({initialWorktrees:e=[]}){let[t,a]=(0,n.useState)(e),[s,i]=(0,n.useState)([]),[o,d]=(0,n.useState)(!e.length),[c,u]=(0,n.useState)(null),[m,h]=(0,n.useState)(""),[p,x]=(0,n.useState)("updated"),[g,f]=(0,n.useState)("desc"),[y,b]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)(null),[k,C]=(0,n.useState)([]),[S,P]=(0,n.useState)(!1),[M,D]=(0,n.useState)(null),A=(0,n.useCallback)(async()=>{try{let e=await W.J1.getExcluded();e.success&&C(e.repositories)}catch{}},[]),T=(0,n.useCallback)(async(e=!1)=>{try{e||d(!0),u(null);let t=await W.Iv.getAll();a(t.worktrees),i(t.repositories)}catch(e){u((0,W.zG)(e))}finally{e||d(!1)}},[]),$=e=>!!(e&&"session_status_changed"===e.type),{status:L}=function(e={}){let{worktreeIds:t=[],onMessage:a,onStatusChange:r,autoReconnect:s=!0,reconnectDelay:i=3e3}=e,[l,o]=(0,n.useState)("disconnected"),d=(0,n.useRef)(null),c=(0,n.useRef)(),u=(0,n.useRef)(new Set),m=(0,n.useCallback)(e=>{o(e),r?.(e)},[r]),h=(0,n.useCallback)(()=>{if(d.current?.readyState===WebSocket.OPEN)return;m("connecting");let e="https:"===window.location.protocol?"wss:":"ws:",t=new WebSocket(`${e}//${window.location.host}`);t.onopen=()=>{m("connected"),u.current.forEach(e=>{t.send(JSON.stringify({type:"subscribe",worktreeId:e}))})},t.onmessage=e=>{try{let t=JSON.parse(e.data);a?.(t)}catch(e){console.error("Failed to parse WebSocket message:",e)}},t.onerror=()=>{m("error")},t.onclose=()=>{m("disconnected"),d.current=null,s&&(c.current=setTimeout(()=>{h()},i))},d.current=t},[m,a,s,i]),p=(0,n.useCallback)(()=>{c.current&&clearTimeout(c.current),d.current&&(d.current.close(1e3,"Client disconnect"),d.current=null),m("disconnected")},[m]);return{status:l,subscribe:(0,n.useCallback)(e=>{d.current?.readyState===WebSocket.OPEN&&(d.current.send(JSON.stringify({type:"subscribe",worktreeId:e})),u.current.add(e))},[]),unsubscribe:(0,n.useCallback)(e=>{d.current?.readyState===WebSocket.OPEN&&(d.current.send(JSON.stringify({type:"unsubscribe",worktreeId:e})),u.current.delete(e))},[]),sendMessage:(0,n.useCallback)(e=>{d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify(e))},[]),connect:h,disconnect:p}}({onMessage:(0,n.useCallback)(e=>{if($(e.data)){let t=e.data;a(e=>e.map(e=>e.id===t.worktreeId?{...e,isSessionRunning:t.isRunning}:e))}"broadcast"===e.type&&T(!0)},[T])}),E=(0,n.useMemo)(()=>{let e=[...t];if(y&&(e=e.filter(e=>e.repositoryPath===y)),null!==v&&(e="unset"===v?e.filter(e=>!e.status):e.filter(e=>e.status===v)),m){let t=m.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)||e.repositoryName.toLowerCase().includes(t)||e.lastMessageSummary?.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t))}return e.sort((e,t)=>{let a=0;switch(p){case"name":a=e.name.localeCompare(t.name);break;case"updated":a=(e.updatedAt?new Date(e.updatedAt).getTime():0)-(t.updatedAt?new Date(t.updatedAt).getTime():0);break;case"favorite":a=(e.favorite?1:0)-(t.favorite?1:0)}return"asc"===g?a:-a}),e},[t,y,v,m,p,g]),R=(0,n.useMemo)(()=>{let e=new Map;for(let t of E){let a=t.repositoryPath||"unknown";e.has(a)||e.set(a,[]),e.get(a).push(t)}return e},[E]),F=e=>{p===e?f(e=>"asc"===e?"desc":"asc"):(x(e),f("asc"))},O=async e=>{D(e);try{let t=await W.J1.restore(e);t.warning&&u(t.warning),await T(),await A()}catch(e){u((0,W.zG)(e))}finally{D(null)}},X=async(e,t)=>{let a=s.find(t=>t.path===e)?.worktreeCount||0;if("delete"===prompt(`Delete repository "${t}"?
|
|
1
|
+
(()=>{var e={};e.id=1931,e.ids=[1931],e.modules={72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},55315:e=>{"use strict";e.exports=require("path")},17360:e=>{"use strict";e.exports=require("url")},37906:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalError:()=>n.a,__next_app__:()=>m,originalPathname:()=>x,pages:()=>c,routeModule:()=>p,tree:()=>d}),s(35480),s(25086),s(35866);var a=s(23191),r=s(88716),l=s(37922),n=s.n(l),i=s(95231),o={};for(let e in i)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(o[e]=()=>i[e]);s.d(t,o);let d=["",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,35480)),"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx"],metadata:{icon:[async e=>(await Promise.resolve().then(s.bind(s,71150))).default(e)],apple:[async e=>(await Promise.resolve().then(s.bind(s,63601))).default(e)],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(s.bind(s,25086)),"/home/runner/work/CommandMate/CommandMate/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(s.t.bind(s,35866,23)),"next/dist/client/components/not-found-error"],metadata:{icon:[async e=>(await Promise.resolve().then(s.bind(s,71150))).default(e)],apple:[async e=>(await Promise.resolve().then(s.bind(s,63601))).default(e)],openGraph:[],twitter:[],manifest:void 0}}],c=["/home/runner/work/CommandMate/CommandMate/src/app/page.tsx"],x="/page",m={require:s,loadChunk:()=>Promise.resolve()},p=new a.AppPageRouteModule({definition:{kind:r.x.APP_PAGE,page:"/page",pathname:"/",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},11518:(e,t,s)=>{Promise.resolve().then(s.bind(s,42106))},35047:(e,t,s)=>{"use strict";var a=s(77389);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}})},42106:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>C});var a=s(10326),r=s(17577),l=s(2583),n=s(90434),i=s(77758),o=s(6162),d=s(34643),c=s(352),x=s(41593),m=s(73002);function p({worktree:e,onSessionKilled:t,onStatusChanged:s}){let{id:l,name:p,description:u,updatedAt:h,isSessionRunning:g,isWaitingForResponse:y,favorite:b,status:j,link:f}=e,[v,N]=(0,r.useState)(!1),[w,k]=(0,r.useState)(b||!1),[C,S]=(0,r.useState)(!1),[P,z]=(0,r.useState)(j||null),[A,$]=(0,r.useState)(!1),T=(0,o.T)(),L=(0,d.bU)(),R=(0,x.G)(L),D=h?(0,c.Q)(new Date(h),{addSuffix:!0,locale:R}):null,M="main"===p||"master"===p,E=async e=>{if(e.preventDefault(),e.stopPropagation(),confirm(T("worktree.session.confirmKill",{name:p})))try{N(!0),await m.Iv.killSession(l),t&&t()}catch(t){let e=(0,m.zG)(t);alert(`${T("worktree.session.failedToKill")}: ${e}`)}finally{N(!1)}},I=async e=>{e.preventDefault(),e.stopPropagation();try{S(!0);let e=!w;await m.Iv.toggleFavorite(l,e),k(e)}catch(t){let e=(0,m.zG)(t);alert(`${T("worktree.errors.failedToUpdateFavorite")}: ${e}`)}finally{S(!1)}},_=async(e,t)=>{t.preventDefault(),t.stopPropagation();try{$(!0),await m.Iv.updateStatus(l,e),z(e),s&&s()}catch(t){let e=(0,m.zG)(t);alert(`${T("worktree.errors.failedToUpdateStatus")}: ${e}`)}finally{$(!1)}};return a.jsx(n.default,{href:`/worktrees/${l}`,className:"block",children:(0,a.jsxs)(i.Zb,{hover:!0,padding:"lg",className:"h-full",children:[a.jsx(i.Ol,{children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)(i.ll,{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("button",{onClick:I,disabled:C,className:"flex-shrink-0 transition-colors hover:scale-110",title:w?T("common.favorites.remove"):T("common.favorites.add"),children:a.jsx("svg",{className:`w-5 h-5 ${w?"fill-yellow-400 text-yellow-400":"fill-none text-gray-400"}`,stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})})}),a.jsx("span",{className:"truncate",children:p}),M&&a.jsx(i.Ct,{variant:"info",children:"Main"}),g&&y&&a.jsx(i.Ct,{variant:"warning",dot:!0,children:T("worktree.status.waitingForResponse")}),g&&!y&&a.jsx(i.Ct,{variant:"success",dot:!0,children:T("worktree.status.responseCompleted")})]}),g&&a.jsx(i.zx,{variant:"danger",size:"sm",onClick:E,disabled:v,className:"flex-shrink-0",children:v?T("common.ending"):T("common.end")})]})}),a.jsx(i.aY,{children:(0,a.jsxs)("div",{className:"space-y-3",children:[u&&(0,a.jsxs)("div",{children:[a.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Description"}),a.jsx("p",{className:"text-sm text-gray-700 line-clamp-2 whitespace-pre-wrap",children:u})]}),f&&(0,a.jsxs)("div",{children:[a.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Link"}),(0,a.jsxs)("button",{onClick:e=>{e.preventDefault(),e.stopPropagation(),f&&window.open(f,"_blank","noopener,noreferrer")},className:"flex items-center gap-1 text-sm text-blue-600 hover:text-blue-800 hover:underline transition-colors",title:"Open link in new tab",children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),a.jsx("span",{className:"truncate",children:f})]})]}),(0,a.jsxs)("div",{children:[a.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Status"}),(0,a.jsxs)("div",{className:"flex gap-1 flex-wrap",children:[a.jsx("button",{onClick:e=>_(null,e),disabled:A,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${null===P?"bg-gray-100 text-gray-700 border-gray-400":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50"}`,children:"Not set"}),a.jsx("button",{onClick:e=>_("todo",e),disabled:A,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${"todo"===P?"bg-gray-100 text-gray-700 border-gray-400":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50"}`,children:"ToDo"}),a.jsx("button",{onClick:e=>_("doing",e),disabled:A,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${"doing"===P?"bg-blue-100 text-blue-700 border-blue-400":"bg-white text-gray-600 border-gray-200 hover:bg-blue-50"}`,children:"Doing"}),a.jsx("button",{onClick:e=>_("done",e),disabled:A,className:`px-2 py-1 text-xs font-medium rounded border transition-colors disabled:opacity-50 ${"done"===P?"bg-green-100 text-green-700 border-green-400":"bg-white text-gray-600 border-gray-200 hover:bg-green-50"}`,children:"Done"})]})]}),D&&(0,a.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[a.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,a.jsxs)("span",{children:["Updated ",D]})]})]})})]})})}function u({initialWorktrees:e=[]}){let[t,s]=(0,r.useState)(e),[l,n]=(0,r.useState)([]),[o,d]=(0,r.useState)(!e.length),[c,x]=(0,r.useState)(null),[u,h]=(0,r.useState)(""),[g,y]=(0,r.useState)("updated"),[b,j]=(0,r.useState)("desc"),[f,v]=(0,r.useState)(null),[N,w]=(0,r.useState)(null),[k,C]=(0,r.useState)(null),[S,P]=(0,r.useState)([]),[z,A]=(0,r.useState)(!1),[$,T]=(0,r.useState)(null),L=(0,r.useCallback)(async()=>{try{let e=await m.J1.getExcluded();e.success&&P(e.repositories)}catch{}},[]),R=(0,r.useCallback)(async(e=!1)=>{try{e||d(!0),x(null);let t=await m.Iv.getAll();s(t.worktrees),n(t.repositories)}catch(e){x((0,m.zG)(e))}finally{e||d(!1)}},[]),D=e=>!!(e&&"session_status_changed"===e.type),{status:M}=function(e={}){let{worktreeIds:t=[],onMessage:s,onStatusChange:a,autoReconnect:l=!0,reconnectDelay:n=3e3}=e,[i,o]=(0,r.useState)("disconnected"),d=(0,r.useRef)(null),c=(0,r.useRef)(),x=(0,r.useRef)(new Set),m=(0,r.useCallback)(e=>{o(e),a?.(e)},[a]),p=(0,r.useCallback)(()=>{if(d.current?.readyState===WebSocket.OPEN)return;m("connecting");let e="https:"===window.location.protocol?"wss:":"ws:",t=new WebSocket(`${e}//${window.location.host}`);t.onopen=()=>{m("connected"),x.current.forEach(e=>{t.send(JSON.stringify({type:"subscribe",worktreeId:e}))})},t.onmessage=e=>{try{let t=JSON.parse(e.data);s?.(t)}catch(e){console.error("Failed to parse WebSocket message:",e)}},t.onerror=()=>{m("error")},t.onclose=()=>{m("disconnected"),d.current=null,l&&(c.current=setTimeout(()=>{p()},n))},d.current=t},[m,s,l,n]),u=(0,r.useCallback)(()=>{c.current&&clearTimeout(c.current),d.current&&(d.current.close(1e3,"Client disconnect"),d.current=null),m("disconnected")},[m]);return{status:i,subscribe:(0,r.useCallback)(e=>{d.current?.readyState===WebSocket.OPEN&&(d.current.send(JSON.stringify({type:"subscribe",worktreeId:e})),x.current.add(e))},[]),unsubscribe:(0,r.useCallback)(e=>{d.current?.readyState===WebSocket.OPEN&&(d.current.send(JSON.stringify({type:"unsubscribe",worktreeId:e})),x.current.delete(e))},[]),sendMessage:(0,r.useCallback)(e=>{d.current?.readyState===WebSocket.OPEN&&d.current.send(JSON.stringify(e))},[]),connect:p,disconnect:u}}({onMessage:(0,r.useCallback)(e=>{if(D(e.data)){let t=e.data;s(e=>e.map(e=>e.id===t.worktreeId?{...e,isSessionRunning:t.isRunning}:e))}"broadcast"===e.type&&R(!0)},[R])}),E=(0,r.useMemo)(()=>{let e=[...t];if(f&&(e=e.filter(e=>e.repositoryPath===f)),null!==N&&(e="unset"===N?e.filter(e=>!e.status):e.filter(e=>e.status===N)),u){let t=u.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)||e.repositoryName.toLowerCase().includes(t)||e.lastMessageSummary?.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t))}return e.sort((e,t)=>{let s=0;switch(g){case"name":s=e.name.localeCompare(t.name);break;case"updated":s=(e.updatedAt?new Date(e.updatedAt).getTime():0)-(t.updatedAt?new Date(t.updatedAt).getTime():0);break;case"favorite":s=(e.favorite?1:0)-(t.favorite?1:0)}return"asc"===b?s:-s}),e},[t,f,N,u,g,b]),I=(0,r.useMemo)(()=>{let e=new Map;for(let t of E){let s=t.repositoryPath||"unknown";e.has(s)||e.set(s,[]),e.get(s).push(t)}return e},[E]),_=e=>{g===e?j(e=>"asc"===e?"desc":"asc"):(y(e),j("asc"))},O=async e=>{T(e);try{let t=await m.J1.restore(e);t.warning&&x(t.warning),await R(),await L()}catch(e){x((0,m.zG)(e))}finally{T(null)}},F=async(e,t)=>{let s=l.find(t=>t.path===e)?.worktreeCount||0;if("delete"===prompt(`Delete repository "${t}"?
|
|
2
2
|
|
|
3
3
|
This will delete:
|
|
4
|
-
- ${
|
|
4
|
+
- ${s} worktree(s)
|
|
5
5
|
- Related chat history
|
|
6
6
|
- Related memos
|
|
7
7
|
|
|
@@ -11,4 +11,4 @@ This repository will be added to the exclusion list.
|
|
|
11
11
|
It will NOT be re-registered when you run "Sync All".
|
|
12
12
|
You can restore it from the excluded repositories list.
|
|
13
13
|
|
|
14
|
-
Type "delete" to confirm:`)){N(e);try{await W.J1.delete(e),y===e&&b(null),await T(),await A()}catch(e){u((0,W.zG)(e))}finally{N(null)}}};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsxs)(l.Ct,{variant:"gray",children:[t.length," branches"]}),s.length>0&&(0,r.jsxs)(l.Ct,{variant:"info",children:[s.length," ",1===s.length?"repository":"repositories"]}),"connected"===L&&r.jsx(l.Ct,{variant:"success",dot:!0,children:"Live"})]}),r.jsx("div",{className:"flex gap-2 w-full sm:w-auto",children:r.jsx(l.zx,{variant:"secondary",size:"sm",onClick:()=>T(),disabled:o,children:o?"Loading...":"Refresh"})})]}),r.jsx("div",{className:"flex flex-col sm:flex-row gap-3",children:r.jsx("input",{type:"text",placeholder:"Search worktrees...",value:m,onChange:e=>h(e.target.value),className:"input flex-1"})}),s.length>0&&(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap items-center",children:[(0,r.jsxs)(l.zx,{variant:null===y?"primary":"ghost",size:"sm",onClick:()=>b(null),children:["All (",t.length,")"]}),s.map(e=>(0,r.jsxs)("div",{className:"relative group inline-flex items-center",children:[(0,r.jsxs)(l.zx,{variant:y===e.path?"primary":"ghost",size:"sm",onClick:()=>b(e.path),className:"pr-6",children:[e.name," (",e.worktreeCount,")"]}),r.jsx("button",{className:"absolute right-1 opacity-0 group-hover:opacity-100 text-gray-400 hover:text-red-500 transition-opacity px-1",onClick:t=>{t.stopPropagation(),X(e.path,e.name)},disabled:w===e.path,title:"Delete repository",children:w===e.path?"...":"x"})]},e.path))]}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap items-center",children:[r.jsx(l.zx,{variant:null===v?"primary":"ghost",size:"sm",onClick:()=>j(null),children:"All"}),r.jsx(l.zx,{variant:"todo"===v?"primary":"ghost",size:"sm",onClick:()=>j("todo"),children:"\uD83D\uDCDD ToDo"}),r.jsx(l.zx,{variant:"doing"===v?"primary":"ghost",size:"sm",onClick:()=>j("doing"),children:"\uD83D\uDEA7 Doing"}),r.jsx(l.zx,{variant:"done"===v?"primary":"ghost",size:"sm",onClick:()=>j("done"),children:"✅ Done"}),r.jsx(l.zx,{variant:"unset"===v?"primary":"ghost",size:"sm",onClick:()=>j("unset"),children:"Not set"})]}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[r.jsx("span",{className:"text-sm text-gray-600 self-center",children:"Sort by:"}),(0,r.jsxs)(l.zx,{variant:"favorite"===p?"primary":"ghost",size:"sm",onClick:()=>F("favorite"),children:["⭐ Favorite ","favorite"===p&&("asc"===g?"↑":"↓")]}),(0,r.jsxs)(l.zx,{variant:"name"===p?"primary":"ghost",size:"sm",onClick:()=>F("name"),children:["Name ","name"===p&&("asc"===g?"↑":"↓")]}),(0,r.jsxs)(l.zx,{variant:"updated"===p?"primary":"ghost",size:"sm",onClick:()=>F("updated"),children:["Updated ","updated"===p&&("asc"===g?"↑":"↓")]})]}),c&&r.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:r.jsx("p",{className:"text-sm text-red-800",children:c})}),o&&!t.length&&(0,r.jsxs)("div",{className:"text-center py-12",children:[r.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"}),r.jsx("p",{className:"mt-4 text-gray-600",children:"Loading worktrees..."})]}),!o&&!c&&0===E.length&&(0,r.jsxs)("div",{className:"text-center py-12",children:[r.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),r.jsx("p",{className:"mt-4 text-gray-600",children:m?"No worktrees found matching your search":"No worktrees found"})]}),!o&&E.length>0&&r.jsx("div",{className:"space-y-8",children:Array.from(R.entries()).map(([e,t])=>{let a=s.find(t=>t.path===e),n=a?.name||"Unknown Repository";return(0,r.jsxs)("div",{className:"space-y-4",children:[(s.length>1||!y)&&(0,r.jsxs)("div",{className:"flex items-center gap-3 pb-2 border-b border-gray-200",children:[r.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:n}),r.jsx(l.Ct,{variant:"gray",children:t.length})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map(e=>r.jsx(z,{worktree:e,onSessionKilled:T,onStatusChanged:T},e.id))})]},e)})}),k.length>0&&(0,r.jsxs)("div",{className:"border border-gray-200 rounded-lg",children:[(0,r.jsxs)("button",{className:"w-full flex items-center justify-between p-4 text-left hover:bg-gray-50 transition-colors",onClick:()=>P(!S),children:[(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Excluded Repositories (",k.length,")"]}),r.jsx("span",{className:"text-gray-400 text-sm",children:S?"Hide":"Show"})]}),S&&r.jsx("div",{className:"border-t border-gray-200 divide-y divide-gray-100",children:k.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,r.jsxs)("div",{children:[r.jsx("span",{className:"text-sm font-medium text-gray-700",children:e.name}),r.jsx("span",{className:"text-xs text-gray-500 ml-2",children:e.path})]}),r.jsx(l.zx,{variant:"secondary",size:"sm",onClick:()=>O(e.path),disabled:M===e.path,children:M===e.path?"Restoring...":"Restore"})]},e.id))})]})]})}a(35047),a(43053),a(15470),a(11867);class A{constructor(){}static getInstance(){return A.instance||(A.instance=new A),A.instance}normalize(e){let t=e.match(/^ssh:\/\/git@([^:\/]+)(:\d+)?\/(.+?)(\.git)?$/);if(t)return`https://${t[1]}/${t[3]}`.toLowerCase().replace(/\/$/,"");let a=e.match(/^git@([^:]+):(.+?)(\.git)?$/);return a?`https://${a[1]}/${a[2]}`.toLowerCase().replace(/\/$/,""):e.replace(/\.git\/?$/,"").replace(/\/$/,"").toLowerCase()}isSameRepository(e,t){return this.normalize(e)===this.normalize(t)}extractRepoName(e){let t=e.match(/^ssh:\/\/git@[^\/]+\/(.+?)(\.git)?$/);if(t){let e=t[1].split("/");return e[e.length-1]}let a=e.match(/:(.+?)(\.git)?$/);if(a&&e.startsWith("git@")){let e=a[1].split("/");return e[e.length-1]}let r=e.match(/\/([^\/]+?)(\.git)?$/);return r?r[1]:""}getUrlType(e){return e.startsWith("https://")?"https":e.startsWith("git@")||e.startsWith("ssh://")?"ssh":null}validate(e){if(!e||"string"!=typeof e||""===e.trim())return{valid:!1,error:"EMPTY_URL"};let t=e.trim();return t.startsWith("https://")?/^https:\/\/[^\/]+\/[^\/]+\/[^\/]+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}:t.startsWith("git@")?/^git@[^:]+:.+\/.+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}:t.startsWith("ssh://")&&/^ssh:\/\/git@[^\/]+(:\d+)?\/[^\/]+\/.+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}}}function T({onRepositoryAdded:e}){let[t,a]=(0,n.useState)(!1),[s,i]=(0,n.useState)("local"),[o,d]=(0,n.useState)(""),[c,u]=(0,n.useState)(""),[m,h]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[g,f]=(0,n.useState)(!1),[y,b]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)(null),k=A.getInstance(),C=(0,n.useCallback)(async t=>{try{let r=await W.J1.getCloneStatus(t);"completed"===r.status?(N("Repository cloned successfully"),f(!1),b(null),u(""),a(!1),e&&e()):"failed"===r.status?(j(r.error?.message||"Clone failed"),f(!1),b(null)):("running"===r.status||"pending"===r.status)&&setTimeout(()=>C(t),2e3)}catch(e){j((0,W.zG)(e)),f(!1),b(null)}},[e]),S=async t=>{if(t.preventDefault(),!o.trim()){j("Repository path is required");return}j(null),N(null),h(!0);try{let t=await W.J1.scan(o);N(t.message),d(""),a(!1),e&&e()}catch(e){j((0,W.zG)(e))}finally{h(!1)}},P=async e=>{if(e.preventDefault(),!c.trim()){j("Clone URL is required");return}let t=k.validate(c.trim());if(!t.valid){"EMPTY_URL"===t.error?j("Clone URL is required"):j("Invalid URL format");return}j(null),N(null),f(!0);try{let e=await W.J1.clone(c.trim());b(e.jobId)}catch(e){j((0,W.zG)(e)),f(!1)}},M=async()=>{j(null),N(null),x(!0);try{let t=await W.J1.sync();N(t.message),e&&e()}catch(e){j((0,W.zG)(e))}finally{x(!1)}},z=()=>{a(!1),d(""),u(""),j(null),i("local")};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[!t&&r.jsx(l.zx,{variant:"primary",size:"sm",onClick:()=>a(!0),children:"+ Add Repository"}),r.jsx(l.zx,{variant:"secondary",size:"sm",onClick:M,disabled:p,children:p?"Syncing...":"Sync All"})]}),t&&r.jsx(l.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"space-y-4",children:[r.jsx("div",{children:r.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Add New Repository"})}),(0,r.jsxs)("div",{className:"flex border-b border-gray-200",role:"tablist",children:[r.jsx("button",{role:"tab","aria-selected":"local"===s,onClick:()=>i("local"),className:`px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ${"local"===s?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Local Path"}),r.jsx("button",{role:"tab","aria-selected":"url"===s,onClick:()=>i("url"),className:`px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ${"url"===s?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Clone URL"})]}),"local"===s&&(0,r.jsxs)("form",{onSubmit:S,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[r.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Enter the absolute path to a git repository containing worktrees."}),r.jsx("label",{htmlFor:"repositoryPath",className:"block text-sm font-medium text-gray-700 mb-2",children:"Repository Path"}),r.jsx("input",{id:"repositoryPath",type:"text",value:o,onChange:e=>d(e.target.value),placeholder:"/absolute/path/to/repository",className:"input w-full font-mono text-sm",disabled:m}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Example: /Users/username/projects/my-repo"})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[r.jsx(l.zx,{type:"submit",variant:"primary",disabled:m||!o.trim(),children:m?"Scanning...":"Scan & Add"}),r.jsx(l.zx,{type:"button",variant:"ghost",onClick:z,disabled:m,children:"Cancel"})]})]}),"url"===s&&(0,r.jsxs)("form",{onSubmit:P,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[r.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Enter a git clone URL to clone a remote repository."}),r.jsx("label",{htmlFor:"cloneUrl",className:"block text-sm font-medium text-gray-700 mb-2",children:"Clone URL"}),r.jsx("input",{id:"cloneUrl",type:"text",value:c,onChange:e=>u(e.target.value),placeholder:"https://github.com/user/repo.git",className:"input w-full font-mono text-sm",disabled:g}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Supports HTTPS and SSH URLs"})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[r.jsx(l.zx,{type:"submit",variant:"primary",disabled:g||!c.trim(),children:g?"Cloning...":"Clone"}),r.jsx(l.zx,{type:"button",variant:"ghost",onClick:z,disabled:g,children:"Cancel"})]})]})]})}),w&&r.jsx("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:r.jsx("p",{className:"text-sm text-green-800",children:w})}),v&&r.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:r.jsx("p",{className:"text-sm text-red-800",children:v})})]})}function $({appId:e,pollInterval:t=3e4,showResponseTime:a=!1,compact:s=!1}){let[i,l]=(0,n.useState)(null),[o,d]=(0,n.useState)(!0);if((0,n.useCallback)(async()=>{try{let t=await fetch(`/api/external-apps/${e}/health`);if(t.ok){let e=await t.json();l(e)}else l({id:e,healthy:!1,lastChecked:Date.now(),error:"Failed to check health"})}catch{l({id:e,healthy:!1,lastChecked:Date.now(),error:"Network error"})}finally{d(!1)}},[e]),o)return(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-gray-300 animate-pulse"}),!s&&r.jsx("span",{className:"text-xs text-gray-400",children:"Checking..."})]});let c=i?.healthy??!1,u=c?"bg-green-500":"bg-gray-400",m=c?"Running":"Stopped";return s?r.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full ${u}`,title:m}):(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[r.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full ${u}`}),r.jsx("span",{className:`text-xs ${c?"text-green-600":"text-gray-500"}`,children:m}),a&&i?.responseTime!==void 0&&(0,r.jsxs)("span",{className:"text-xs text-gray-400",children:["(",i.responseTime,"ms)"]})]})}function L({app:e,onEdit:t,onDelete:a}){var s;let[i,o]=(0,n.useState)(!1),[d,c]=(0,n.useState)(!1),u=async()=>{c(!0);try{await a(e.id)}finally{c(!1),o(!1)}},m=`/proxy/${e.pathPrefix}/`;return(0,r.jsxs)(l.Zb,{padding:"md",className:"relative",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[r.jsx("h4",{className:"text-base font-semibold text-gray-900 truncate",children:e.displayName}),r.jsx("p",{className:"text-xs text-gray-500 mt-0.5 font-mono truncate",children:e.name})]}),r.jsx(l.Ct,{variant:{sveltekit:"warning",streamlit:"error",nextjs:"info",other:"gray"}[e.appType]||"gray",children:{sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"}[s=e.appType]||s})]}),(0,r.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-gray-600",children:"Status"}),r.jsx($,{appId:e.id,pollInterval:3e4})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-gray-600",children:"Port"}),(0,r.jsxs)("span",{className:"text-sm font-mono text-gray-900",children:[":",e.targetPort]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-gray-600",children:"Path"}),(0,r.jsxs)("span",{className:"text-sm font-mono text-gray-900 truncate max-w-[150px]",children:["/proxy/",e.pathPrefix,"/"]})]}),e.websocketEnabled&&(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm text-gray-600",children:"WebSocket"}),r.jsx(l.Ct,{variant:"info",children:"Enabled"})]}),!e.enabled&&r.jsx("div",{className:"mt-2 py-1 px-2 bg-yellow-50 border border-yellow-200 rounded text-xs text-yellow-700",children:"This app is disabled"})]}),i?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:['Delete "',e.displayName,'"?']}),(0,r.jsxs)("div",{className:"flex gap-2",children:[r.jsx(l.zx,{variant:"danger",size:"sm",onClick:u,disabled:d,loading:d,children:"Delete"}),r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:()=>o(!1),disabled:d,children:"Cancel"})]})]}):(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[r.jsx(l.zx,{variant:"primary",size:"sm",onClick:()=>window.open(m,"_blank"),disabled:!e.enabled,children:"Open"}),r.jsx(l.zx,{variant:"secondary",size:"sm",onClick:()=>t(e),children:"Settings"}),r.jsx(l.zx,{variant:"ghost",size:"sm",onClick:()=>o(!0),className:"text-red-600 hover:bg-red-50",children:"Delete"})]})]})}let E={MIN:1024,MAX:65535},R=/^[a-zA-Z0-9-]+$/,F={sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"},O=["sveltekit","streamlit","nextjs","other"].map(e=>({value:e,label:F[e]}));function X({isOpen:e,onClose:t,editApp:a,onSave:s}){let i=!!a,[o,d]=(0,n.useState)(""),[c,u]=(0,n.useState)(""),[m,h]=(0,n.useState)(""),[p,x]=(0,n.useState)(""),[g,f]=(0,n.useState)(""),[y,b]=(0,n.useState)(!1),[v,j]=(0,n.useState)(""),[w,N]=(0,n.useState)(!0),[k,C]=(0,n.useState)({}),[S,P]=(0,n.useState)(!1),[M,W]=(0,n.useState)(null),z=async e=>{e.preventDefault(),W(null);let r=function(e,t){var a;let r={};return e.displayName?.trim()||(r.displayName="Display name is required"),t||(e.name?.trim()?R.test(e.name)||(r.name="Only alphanumeric characters and hyphens are allowed"):r.name="Identifier name is required",e.pathPrefix?.trim()?R.test(e.pathPrefix)||(r.pathPrefix="Only alphanumeric characters and hyphens are allowed"):r.pathPrefix="Path prefix is required"),e.targetPort?"number"!=typeof e.targetPort||Number.isInteger(a=e.targetPort)&&a>=E.MIN&&a<=E.MAX||(r.targetPort=`Port must be between ${E.MIN} and ${E.MAX}`):r.targetPort="Port number is required",t||e.appType||(r.appType="App type is required"),r}({displayName:o,name:c,pathPrefix:m,targetPort:p,appType:g},i);if(Object.keys(r).length>0){C(r);return}C({}),P(!0);try{if(i&&a){let e=await fetch(`/api/external-apps/${a.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:o,description:v||void 0,targetPort:p||void 0,websocketEnabled:y,enabled:w})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to update app")}}else{let e=await fetch("/api/external-apps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:o,name:c,pathPrefix:m,targetPort:p,appType:g,websocketEnabled:y,description:v||void 0})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to create app")}}s(),t()}catch(e){W(e instanceof Error?e.message:"An error occurred")}finally{P(!1)}};return r.jsx(l.u_,{isOpen:e,onClose:t,title:i?"Edit External App":"Add External App",size:"md",children:(0,r.jsxs)("form",{onSubmit:z,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"displayName",className:"block text-sm font-medium text-gray-700 mb-1",children:["Display Name ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{id:"displayName",type:"text",value:o,onChange:e=>d(e.target.value),className:`input w-full ${k.displayName?"border-red-500":""}`,placeholder:"My App",disabled:S}),k.displayName&&r.jsx("p",{className:"mt-1 text-xs text-red-500",children:k.displayName})]}),!i&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:["Identifier Name ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{id:"name",type:"text",value:c,onChange:e=>u(e.target.value),className:`input w-full font-mono ${k.name?"border-red-500":""}`,placeholder:"my-app",disabled:S}),r.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Alphanumeric and hyphens only. Cannot be changed later."}),k.name&&r.jsx("p",{className:"mt-1 text-xs text-red-500",children:k.name})]}),!i&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"pathPrefix",className:"block text-sm font-medium text-gray-700 mb-1",children:["Path Prefix ",r.jsx("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[r.jsx("span",{className:"text-sm text-gray-500 mr-1",children:"/proxy/"}),r.jsx("input",{id:"pathPrefix",type:"text",value:m,onChange:e=>h(e.target.value),className:`input flex-1 font-mono ${k.pathPrefix?"border-red-500":""}`,placeholder:"app-name",disabled:S}),r.jsx("span",{className:"text-sm text-gray-500 ml-1",children:"/"})]}),r.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"URL path for accessing this app. Cannot be changed later."}),k.pathPrefix&&r.jsx("p",{className:"mt-1 text-xs text-red-500",children:k.pathPrefix})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"targetPort",className:"block text-sm font-medium text-gray-700 mb-1",children:["Port Number ",r.jsx("span",{className:"text-red-500",children:"*"})]}),r.jsx("input",{id:"targetPort",type:"number",value:p,onChange:e=>x(e.target.value?parseInt(e.target.value,10):""),className:`input w-full font-mono ${k.targetPort?"border-red-500":""}`,placeholder:"5173",min:E.MIN,max:E.MAX,disabled:S}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["Target port (",E.MIN,"-",E.MAX,")"]}),k.targetPort&&r.jsx("p",{className:"mt-1 text-xs text-red-500",children:k.targetPort})]}),!i&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"appType",className:"block text-sm font-medium text-gray-700 mb-1",children:["App Type ",r.jsx("span",{className:"text-red-500",children:"*"})]}),(0,r.jsxs)("select",{id:"appType",value:g,onChange:e=>f(e.target.value),className:`input w-full ${k.appType?"border-red-500":""}`,disabled:S,children:[r.jsx("option",{value:"",children:"Select app type..."}),O.map(e=>r.jsx("option",{value:e.value,children:e.label},e.value))]}),k.appType&&r.jsx("p",{className:"mt-1 text-xs text-red-500",children:k.appType})]}),(0,r.jsxs)("div",{children:[r.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),r.jsx("textarea",{id:"description",value:v,onChange:e=>j(e.target.value),className:"input w-full",placeholder:"Optional description...",rows:2,disabled:S})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[r.jsx("input",{id:"websocketEnabled",type:"checkbox",checked:y,onChange:e=>b(e.target.checked),className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500",disabled:S}),r.jsx("label",{htmlFor:"websocketEnabled",className:"ml-2 text-sm text-gray-700",children:"Enable WebSocket support"})]}),i&&(0,r.jsxs)("div",{className:"flex items-center",children:[r.jsx("input",{id:"enabled",type:"checkbox",checked:w,onChange:e=>N(e.target.checked),className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500",disabled:S}),r.jsx("label",{htmlFor:"enabled",className:"ml-2 text-sm text-gray-700",children:"App is enabled"})]}),M&&r.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:M}),(0,r.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t border-gray-200",children:[r.jsx(l.zx,{type:"button",variant:"ghost",onClick:t,disabled:S,children:"Cancel"}),r.jsx(l.zx,{type:"submit",variant:"primary",loading:S,children:i?"Save Changes":"Add App"})]})]})})}function I(){let[e,t]=(0,n.useState)([]),[a,s]=(0,n.useState)(!0),[i,o]=(0,n.useState)(null),[d,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(null),h=(0,n.useCallback)(async()=>{try{o(null);let e=await fetch("/api/external-apps");if(!e.ok)throw Error("Failed to fetch external apps");let a=await e.json();t(a.apps||[])}catch(e){o(e instanceof Error?e.message:"An error occurred")}finally{s(!1)}},[]),p=(0,n.useCallback)(e=>{m(e),c(!0)},[]),x=(0,n.useCallback)(()=>{m(null),c(!0)},[]),g=(0,n.useCallback)(async e=>{try{let t=await fetch(`/api/external-apps/${e}`,{method:"DELETE"});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to delete app")}h()}catch(e){console.error("Failed to delete app:",e)}},[h]),f=(0,n.useCallback)(()=>{h()},[h]),y=(0,n.useCallback)(()=>{c(!1),m(null)},[]);return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[r.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"External Apps"}),r.jsx(l.zx,{variant:"primary",size:"sm",onClick:x,children:"+ Add App"})]}),a?r.jsx(l.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"flex items-center justify-center py-8",children:[r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),r.jsx("span",{className:"ml-3 text-gray-600",children:"Loading apps..."})]})}):i?r.jsx(l.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-8",children:[r.jsx("p",{className:"text-red-600 mb-4",children:"Failed to load external apps"}),r.jsx(l.zx,{variant:"secondary",size:"sm",onClick:h,children:"Retry"})]})}):0===e.length?r.jsx(l.Zb,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-8",children:[r.jsx("p",{className:"text-gray-500 mb-4",children:"No external apps registered yet."}),r.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Add an external app to proxy requests to other frontend applications."}),r.jsx(l.zx,{variant:"primary",size:"sm",onClick:x,children:"Add Your First App"})]})}):r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(e=>r.jsx(L,{app:e,onEdit:p,onDelete:g},e.id))}),r.jsx(X,{isOpen:d,onClose:y,editApp:u,onSave:f})]})}function q(){let[e,t]=(0,n.useState)(0),a=(0,n.useCallback)(()=>{t(e=>e+1)},[]);return r.jsx(s.Vw,{children:(0,r.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,r.jsxs)("div",{className:"mb-8",children:[r.jsx("h1",{className:"mb-2",children:"CommandMate"}),r.jsx("p",{className:"text-lg text-gray-600",children:"Git worktree management with Claude CLI and tmux sessions"})]}),r.jsx("div",{className:"mb-8",children:r.jsx(T,{onRepositoryAdded:a})}),r.jsx(D,{},e),r.jsx("div",{className:"mt-8",children:r.jsx(I,{})})]})})}},35480:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>r});let r=(0,a(68570).createProxy)(String.raw`/home/runner/work/CommandMate/CommandMate/src/app/page.tsx#default`)},6162:(e,t,a)=>{"use strict";a.d(t,{T:()=>s});var r=a(34643);function n(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let s=n(0,r.T_);n(0,r.Gb)}};var t=require("../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),r=t.X(0,[8948,1287,6621,8705,5781,3860,4704],()=>a(37906));module.exports=r})();
|
|
14
|
+
Type "delete" to confirm:`)){C(e);try{await m.J1.delete(e),f===e&&v(null),await R(),await L()}catch(e){x((0,m.zG)(e))}finally{C(null)}}};return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsxs)(i.Ct,{variant:"gray",children:[t.length," branches"]}),l.length>0&&(0,a.jsxs)(i.Ct,{variant:"info",children:[l.length," ",1===l.length?"repository":"repositories"]}),"connected"===M&&a.jsx(i.Ct,{variant:"success",dot:!0,children:"Live"})]}),a.jsx("div",{className:"flex gap-2 w-full sm:w-auto",children:a.jsx(i.zx,{variant:"secondary",size:"sm",onClick:()=>R(),disabled:o,children:o?"Loading...":"Refresh"})})]}),a.jsx("div",{className:"flex flex-col sm:flex-row gap-3",children:a.jsx("input",{type:"text",placeholder:"Search worktrees...",value:u,onChange:e=>h(e.target.value),className:"input flex-1"})}),l.length>0&&(0,a.jsxs)("div",{className:"flex gap-2 flex-wrap items-center",children:[(0,a.jsxs)(i.zx,{variant:null===f?"primary":"ghost",size:"sm",onClick:()=>v(null),children:["All (",t.length,")"]}),l.map(e=>(0,a.jsxs)("div",{className:"relative group inline-flex items-center",children:[(0,a.jsxs)(i.zx,{variant:f===e.path?"primary":"ghost",size:"sm",onClick:()=>v(e.path),className:"pr-6",children:[e.name," (",e.worktreeCount,")"]}),a.jsx("button",{className:"absolute right-1 opacity-0 group-hover:opacity-100 text-gray-400 hover:text-red-500 transition-opacity px-1",onClick:t=>{t.stopPropagation(),F(e.path,e.name)},disabled:k===e.path,title:"Delete repository",children:k===e.path?"...":"x"})]},e.path))]}),(0,a.jsxs)("div",{className:"flex gap-2 flex-wrap items-center",children:[a.jsx(i.zx,{variant:null===N?"primary":"ghost",size:"sm",onClick:()=>w(null),children:"All"}),a.jsx(i.zx,{variant:"todo"===N?"primary":"ghost",size:"sm",onClick:()=>w("todo"),children:"\uD83D\uDCDD ToDo"}),a.jsx(i.zx,{variant:"doing"===N?"primary":"ghost",size:"sm",onClick:()=>w("doing"),children:"\uD83D\uDEA7 Doing"}),a.jsx(i.zx,{variant:"done"===N?"primary":"ghost",size:"sm",onClick:()=>w("done"),children:"✅ Done"}),a.jsx(i.zx,{variant:"unset"===N?"primary":"ghost",size:"sm",onClick:()=>w("unset"),children:"Not set"})]}),(0,a.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[a.jsx("span",{className:"text-sm text-gray-600 self-center",children:"Sort by:"}),(0,a.jsxs)(i.zx,{variant:"favorite"===g?"primary":"ghost",size:"sm",onClick:()=>_("favorite"),children:["⭐ Favorite ","favorite"===g&&("asc"===b?"↑":"↓")]}),(0,a.jsxs)(i.zx,{variant:"name"===g?"primary":"ghost",size:"sm",onClick:()=>_("name"),children:["Name ","name"===g&&("asc"===b?"↑":"↓")]}),(0,a.jsxs)(i.zx,{variant:"updated"===g?"primary":"ghost",size:"sm",onClick:()=>_("updated"),children:["Updated ","updated"===g&&("asc"===b?"↑":"↓")]})]}),c&&a.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-red-800",children:c})}),o&&!t.length&&(0,a.jsxs)("div",{className:"text-center py-12",children:[a.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600"}),a.jsx("p",{className:"mt-4 text-gray-600",children:"Loading worktrees..."})]}),!o&&!c&&0===E.length&&(0,a.jsxs)("div",{className:"text-center py-12",children:[a.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),a.jsx("p",{className:"mt-4 text-gray-600",children:u?"No worktrees found matching your search":"No worktrees found"})]}),!o&&E.length>0&&a.jsx("div",{className:"space-y-8",children:Array.from(I.entries()).map(([e,t])=>{let s=l.find(t=>t.path===e),r=s?.name||"Unknown Repository";return(0,a.jsxs)("div",{className:"space-y-4",children:[(l.length>1||!f)&&(0,a.jsxs)("div",{className:"flex items-center gap-3 pb-2 border-b border-gray-200",children:[a.jsx("h3",{className:"text-xl font-semibold text-gray-900",children:r}),a.jsx(i.Ct,{variant:"gray",children:t.length})]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map(e=>a.jsx(p,{worktree:e,onSessionKilled:R,onStatusChanged:R},e.id))})]},e)})}),S.length>0&&(0,a.jsxs)("div",{className:"border border-gray-200 rounded-lg",children:[(0,a.jsxs)("button",{className:"w-full flex items-center justify-between p-4 text-left hover:bg-gray-50 transition-colors",onClick:()=>A(!z),children:[(0,a.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Excluded Repositories (",S.length,")"]}),a.jsx("span",{className:"text-gray-400 text-sm",children:z?"Hide":"Show"})]}),z&&a.jsx("div",{className:"border-t border-gray-200 divide-y divide-gray-100",children:S.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,a.jsxs)("div",{children:[a.jsx("span",{className:"text-sm font-medium text-gray-700",children:e.name}),a.jsx("span",{className:"text-xs text-gray-500 ml-2",children:e.path})]}),a.jsx(i.zx,{variant:"secondary",size:"sm",onClick:()=>O(e.path),disabled:$===e.path,children:$===e.path?"Restoring...":"Restore"})]},e.id))})]})]})}s(35047),s(43053),s(15470),s(11867);class h{constructor(){}static getInstance(){return h.instance||(h.instance=new h),h.instance}normalize(e){let t=e.match(/^ssh:\/\/git@([^:\/]+)(:\d+)?\/(.+?)(\.git)?$/);if(t)return`https://${t[1]}/${t[3]}`.toLowerCase().replace(/\/$/,"");let s=e.match(/^git@([^:]+):(.+?)(\.git)?$/);return s?`https://${s[1]}/${s[2]}`.toLowerCase().replace(/\/$/,""):e.replace(/\.git\/?$/,"").replace(/\/$/,"").toLowerCase()}isSameRepository(e,t){return this.normalize(e)===this.normalize(t)}extractRepoName(e){let t=e.match(/^ssh:\/\/git@[^\/]+\/(.+?)(\.git)?$/);if(t){let e=t[1].split("/");return e[e.length-1]}let s=e.match(/:(.+?)(\.git)?$/);if(s&&e.startsWith("git@")){let e=s[1].split("/");return e[e.length-1]}let a=e.match(/\/([^\/]+?)(\.git)?$/);return a?a[1]:""}getUrlType(e){return e.startsWith("https://")?"https":e.startsWith("git@")||e.startsWith("ssh://")?"ssh":null}validate(e){if(!e||"string"!=typeof e||""===e.trim())return{valid:!1,error:"EMPTY_URL"};let t=e.trim();return t.startsWith("https://")?/^https:\/\/[^\/]+\/[^\/]+\/[^\/]+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}:t.startsWith("git@")?/^git@[^:]+:.+\/.+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}:t.startsWith("ssh://")&&/^ssh:\/\/git@[^\/]+(:\d+)?\/[^\/]+\/.+(\.git)?$/.test(t)?{valid:!0}:{valid:!1,error:"INVALID_URL_FORMAT"}}}function g({onRepositoryAdded:e}){let[t,s]=(0,r.useState)(!1),[l,n]=(0,r.useState)("local"),[o,d]=(0,r.useState)(""),[c,x]=(0,r.useState)(""),[p,u]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[b,j]=(0,r.useState)(!1),[f,v]=(0,r.useState)(null),[N,w]=(0,r.useState)(null),[k,C]=(0,r.useState)(null),S=h.getInstance(),P=(0,r.useCallback)(async t=>{try{let a=await m.J1.getCloneStatus(t);"completed"===a.status?(C("Repository cloned successfully"),j(!1),v(null),x(""),s(!1),e&&e()):"failed"===a.status?(w(a.error?.message||"Clone failed"),j(!1),v(null)):("running"===a.status||"pending"===a.status)&&setTimeout(()=>P(t),2e3)}catch(e){w((0,m.zG)(e)),j(!1),v(null)}},[e]),z=async t=>{if(t.preventDefault(),!o.trim()){w("Repository path is required");return}w(null),C(null),u(!0);try{let t=await m.J1.scan(o);C(t.message),d(""),s(!1),e&&e()}catch(e){w((0,m.zG)(e))}finally{u(!1)}},A=async e=>{if(e.preventDefault(),!c.trim()){w("Clone URL is required");return}let t=S.validate(c.trim());if(!t.valid){"EMPTY_URL"===t.error?w("Clone URL is required"):w("Invalid URL format");return}w(null),C(null),j(!0);try{let e=await m.J1.clone(c.trim());v(e.jobId)}catch(e){w((0,m.zG)(e)),j(!1)}},$=async()=>{w(null),C(null),y(!0);try{let t=await m.J1.sync();C(t.message),e&&e()}catch(e){w((0,m.zG)(e))}finally{y(!1)}},T=()=>{s(!1),d(""),x(""),w(null),n("local")};return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[!t&&a.jsx(i.zx,{variant:"primary",size:"sm",onClick:()=>s(!0),children:"+ Add Repository"}),a.jsx(i.zx,{variant:"secondary",size:"sm",onClick:$,disabled:g,children:g?"Syncing...":"Sync All"})]}),t&&a.jsx(i.Zb,{padding:"lg",children:(0,a.jsxs)("div",{className:"space-y-4",children:[a.jsx("div",{children:a.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Add New Repository"})}),(0,a.jsxs)("div",{className:"flex border-b border-gray-200",role:"tablist",children:[a.jsx("button",{role:"tab","aria-selected":"local"===l,onClick:()=>n("local"),className:`px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ${"local"===l?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Local Path"}),a.jsx("button",{role:"tab","aria-selected":"url"===l,onClick:()=>n("url"),className:`px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ${"url"===l?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Clone URL"})]}),"local"===l&&(0,a.jsxs)("form",{onSubmit:z,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[a.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Enter the absolute path to a git repository containing worktrees."}),a.jsx("label",{htmlFor:"repositoryPath",className:"block text-sm font-medium text-gray-700 mb-2",children:"Repository Path"}),a.jsx("input",{id:"repositoryPath",type:"text",value:o,onChange:e=>d(e.target.value),placeholder:"/absolute/path/to/repository",className:"input w-full font-mono text-sm",disabled:p}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Example: /Users/username/projects/my-repo"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[a.jsx(i.zx,{type:"submit",variant:"primary",disabled:p||!o.trim(),children:p?"Scanning...":"Scan & Add"}),a.jsx(i.zx,{type:"button",variant:"ghost",onClick:T,disabled:p,children:"Cancel"})]})]}),"url"===l&&(0,a.jsxs)("form",{onSubmit:A,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[a.jsx("p",{className:"text-sm text-gray-600 mb-4",children:"Enter a git clone URL to clone a remote repository."}),a.jsx("label",{htmlFor:"cloneUrl",className:"block text-sm font-medium text-gray-700 mb-2",children:"Clone URL"}),a.jsx("input",{id:"cloneUrl",type:"text",value:c,onChange:e=>x(e.target.value),placeholder:"https://github.com/user/repo.git",className:"input w-full font-mono text-sm",disabled:b}),a.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Supports HTTPS and SSH URLs"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[a.jsx(i.zx,{type:"submit",variant:"primary",disabled:b||!c.trim(),children:b?"Cloning...":"Clone"}),a.jsx(i.zx,{type:"button",variant:"ghost",onClick:T,disabled:b,children:"Cancel"})]})]})]})}),k&&a.jsx("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-green-800",children:k})}),N&&a.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:a.jsx("p",{className:"text-sm text-red-800",children:N})})]})}function y({appId:e,pollInterval:t=3e4,showResponseTime:s=!1,compact:l=!1}){let[n,i]=(0,r.useState)(null),[o,d]=(0,r.useState)(!0);if((0,r.useCallback)(async()=>{try{let t=await fetch(`/api/external-apps/${e}/health`);if(t.ok){let e=await t.json();i(e)}else i({id:e,healthy:!1,lastChecked:Date.now(),error:"Failed to check health"})}catch{i({id:e,healthy:!1,lastChecked:Date.now(),error:"Network error"})}finally{d(!1)}},[e]),o)return(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-gray-300 animate-pulse"}),!l&&a.jsx("span",{className:"text-xs text-gray-400",children:"Checking..."})]});let c=n?.healthy??!1,x=c?"bg-green-500":"bg-gray-400",m=c?"Running":"Stopped";return l?a.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full ${x}`,title:m}):(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full ${x}`}),a.jsx("span",{className:`text-xs ${c?"text-green-600":"text-gray-500"}`,children:m}),s&&n?.responseTime!==void 0&&(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["(",n.responseTime,"ms)"]})]})}function b({app:e,onEdit:t,onDelete:s}){var l;let[n,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!1),x=async()=>{c(!0);try{await s(e.id)}finally{c(!1),o(!1)}},m=`/proxy/${e.pathPrefix}/`;return(0,a.jsxs)(i.Zb,{padding:"md",className:"relative",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"text-base font-semibold text-gray-900 truncate",children:e.displayName}),a.jsx("p",{className:"text-xs text-gray-500 mt-0.5 font-mono truncate",children:e.name})]}),a.jsx(i.Ct,{variant:{sveltekit:"warning",streamlit:"error",nextjs:"info",other:"gray"}[e.appType]||"gray",children:{sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"}[l=e.appType]||l})]}),(0,a.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm text-gray-600",children:"Status"}),a.jsx(y,{appId:e.id,pollInterval:3e4})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm text-gray-600",children:"Port"}),(0,a.jsxs)("span",{className:"text-sm font-mono text-gray-900",children:[":",e.targetPort]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm text-gray-600",children:"Path"}),(0,a.jsxs)("span",{className:"text-sm font-mono text-gray-900 truncate max-w-[150px]",children:["/proxy/",e.pathPrefix,"/"]})]}),e.websocketEnabled&&(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm text-gray-600",children:"WebSocket"}),a.jsx(i.Ct,{variant:"info",children:"Enabled"})]}),!e.enabled&&a.jsx("div",{className:"mt-2 py-1 px-2 bg-yellow-50 border border-yellow-200 rounded text-xs text-yellow-700",children:"This app is disabled"})]}),n?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-600",children:['Delete "',e.displayName,'"?']}),(0,a.jsxs)("div",{className:"flex gap-2",children:[a.jsx(i.zx,{variant:"danger",size:"sm",onClick:x,disabled:d,loading:d,children:"Delete"}),a.jsx(i.zx,{variant:"ghost",size:"sm",onClick:()=>o(!1),disabled:d,children:"Cancel"})]})]}):(0,a.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[a.jsx(i.zx,{variant:"primary",size:"sm",onClick:()=>window.open(m,"_blank"),disabled:!e.enabled,children:"Open"}),a.jsx(i.zx,{variant:"secondary",size:"sm",onClick:()=>t(e),children:"Settings"}),a.jsx(i.zx,{variant:"ghost",size:"sm",onClick:()=>o(!0),className:"text-red-600 hover:bg-red-50",children:"Delete"})]})]})}let j={MIN:1024,MAX:65535},f=/^[a-zA-Z0-9-]+$/,v={sveltekit:"SvelteKit",streamlit:"Streamlit",nextjs:"Next.js",other:"Other"},N=["sveltekit","streamlit","nextjs","other"].map(e=>({value:e,label:v[e]}));function w({isOpen:e,onClose:t,editApp:s,onSave:l}){let n=!!s,[o,d]=(0,r.useState)(""),[c,x]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),[u,h]=(0,r.useState)(""),[g,y]=(0,r.useState)(""),[b,v]=(0,r.useState)(!1),[w,k]=(0,r.useState)(""),[C,S]=(0,r.useState)(!0),[P,z]=(0,r.useState)({}),[A,$]=(0,r.useState)(!1),[T,L]=(0,r.useState)(null),R=async e=>{e.preventDefault(),L(null);let a=function(e,t){var s;let a={};return e.displayName?.trim()||(a.displayName="Display name is required"),t||(e.name?.trim()?f.test(e.name)||(a.name="Only alphanumeric characters and hyphens are allowed"):a.name="Identifier name is required",e.pathPrefix?.trim()?f.test(e.pathPrefix)||(a.pathPrefix="Only alphanumeric characters and hyphens are allowed"):a.pathPrefix="Path prefix is required"),e.targetPort?"number"!=typeof e.targetPort||Number.isInteger(s=e.targetPort)&&s>=j.MIN&&s<=j.MAX||(a.targetPort=`Port must be between ${j.MIN} and ${j.MAX}`):a.targetPort="Port number is required",t||e.appType||(a.appType="App type is required"),a}({displayName:o,name:c,pathPrefix:m,targetPort:u,appType:g},n);if(Object.keys(a).length>0){z(a);return}z({}),$(!0);try{if(n&&s){let e=await fetch(`/api/external-apps/${s.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:o,description:w||void 0,targetPort:u||void 0,websocketEnabled:b,enabled:C})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to update app")}}else{let e=await fetch("/api/external-apps",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({displayName:o,name:c,pathPrefix:m,targetPort:u,appType:g,websocketEnabled:b,description:w||void 0})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to create app")}}l(),t()}catch(e){L(e instanceof Error?e.message:"An error occurred")}finally{$(!1)}};return a.jsx(i.u_,{isOpen:e,onClose:t,title:n?"Edit External App":"Add External App",size:"md",children:(0,a.jsxs)("form",{onSubmit:R,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"displayName",className:"block text-sm font-medium text-gray-700 mb-1",children:["Display Name ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{id:"displayName",type:"text",value:o,onChange:e=>d(e.target.value),className:`input w-full ${P.displayName?"border-red-500":""}`,placeholder:"My App",disabled:A}),P.displayName&&a.jsx("p",{className:"mt-1 text-xs text-red-500",children:P.displayName})]}),!n&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:["Identifier Name ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{id:"name",type:"text",value:c,onChange:e=>x(e.target.value),className:`input w-full font-mono ${P.name?"border-red-500":""}`,placeholder:"my-app",disabled:A}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Alphanumeric and hyphens only. Cannot be changed later."}),P.name&&a.jsx("p",{className:"mt-1 text-xs text-red-500",children:P.name})]}),!n&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"pathPrefix",className:"block text-sm font-medium text-gray-700 mb-1",children:["Path Prefix ",a.jsx("span",{className:"text-red-500",children:"*"})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[a.jsx("span",{className:"text-sm text-gray-500 mr-1",children:"/proxy/"}),a.jsx("input",{id:"pathPrefix",type:"text",value:m,onChange:e=>p(e.target.value),className:`input flex-1 font-mono ${P.pathPrefix?"border-red-500":""}`,placeholder:"app-name",disabled:A}),a.jsx("span",{className:"text-sm text-gray-500 ml-1",children:"/"})]}),a.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"URL path for accessing this app. Cannot be changed later."}),P.pathPrefix&&a.jsx("p",{className:"mt-1 text-xs text-red-500",children:P.pathPrefix})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"targetPort",className:"block text-sm font-medium text-gray-700 mb-1",children:["Port Number ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{id:"targetPort",type:"number",value:u,onChange:e=>h(e.target.value?parseInt(e.target.value,10):""),className:`input w-full font-mono ${P.targetPort?"border-red-500":""}`,placeholder:"5173",min:j.MIN,max:j.MAX,disabled:A}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["Target port (",j.MIN,"-",j.MAX,")"]}),P.targetPort&&a.jsx("p",{className:"mt-1 text-xs text-red-500",children:P.targetPort})]}),!n&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"appType",className:"block text-sm font-medium text-gray-700 mb-1",children:["App Type ",a.jsx("span",{className:"text-red-500",children:"*"})]}),(0,a.jsxs)("select",{id:"appType",value:g,onChange:e=>y(e.target.value),className:`input w-full ${P.appType?"border-red-500":""}`,disabled:A,children:[a.jsx("option",{value:"",children:"Select app type..."}),N.map(e=>a.jsx("option",{value:e.value,children:e.label},e.value))]}),P.appType&&a.jsx("p",{className:"mt-1 text-xs text-red-500",children:P.appType})]}),(0,a.jsxs)("div",{children:[a.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),a.jsx("textarea",{id:"description",value:w,onChange:e=>k(e.target.value),className:"input w-full",placeholder:"Optional description...",rows:2,disabled:A})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[a.jsx("input",{id:"websocketEnabled",type:"checkbox",checked:b,onChange:e=>v(e.target.checked),className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500",disabled:A}),a.jsx("label",{htmlFor:"websocketEnabled",className:"ml-2 text-sm text-gray-700",children:"Enable WebSocket support"})]}),n&&(0,a.jsxs)("div",{className:"flex items-center",children:[a.jsx("input",{id:"enabled",type:"checkbox",checked:C,onChange:e=>S(e.target.checked),className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500",disabled:A}),a.jsx("label",{htmlFor:"enabled",className:"ml-2 text-sm text-gray-700",children:"App is enabled"})]}),T&&a.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded text-sm text-red-700",children:T}),(0,a.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t border-gray-200",children:[a.jsx(i.zx,{type:"button",variant:"ghost",onClick:t,disabled:A,children:"Cancel"}),a.jsx(i.zx,{type:"submit",variant:"primary",loading:A,children:n?"Save Changes":"Add App"})]})]})})}function k(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[n,o]=(0,r.useState)(null),[d,c]=(0,r.useState)(!1),[x,m]=(0,r.useState)(null),p=(0,r.useCallback)(async()=>{try{o(null);let e=await fetch("/api/external-apps");if(!e.ok)throw Error("Failed to fetch external apps");let s=await e.json();t(s.apps||[])}catch(e){o(e instanceof Error?e.message:"An error occurred")}finally{l(!1)}},[]),u=(0,r.useCallback)(e=>{m(e),c(!0)},[]),h=(0,r.useCallback)(()=>{m(null),c(!0)},[]),g=(0,r.useCallback)(async e=>{try{let t=await fetch(`/api/external-apps/${e}`,{method:"DELETE"});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to delete app")}p()}catch(e){console.error("Failed to delete app:",e)}},[p]),y=(0,r.useCallback)(()=>{p()},[p]),j=(0,r.useCallback)(()=>{c(!1),m(null)},[]);return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"External Apps"}),a.jsx(i.zx,{variant:"primary",size:"sm",onClick:h,children:"+ Add App"})]}),s?a.jsx(i.Zb,{padding:"lg",children:(0,a.jsxs)("div",{className:"flex items-center justify-center py-8",children:[a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),a.jsx("span",{className:"ml-3 text-gray-600",children:"Loading apps..."})]})}):n?a.jsx(i.Zb,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-8",children:[a.jsx("p",{className:"text-red-600 mb-4",children:"Failed to load external apps"}),a.jsx(i.zx,{variant:"secondary",size:"sm",onClick:p,children:"Retry"})]})}):0===e.length?a.jsx(i.Zb,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-8",children:[a.jsx("p",{className:"text-gray-500 mb-4",children:"No external apps registered yet."}),a.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Add an external app to proxy requests to other frontend applications."}),a.jsx(i.zx,{variant:"primary",size:"sm",onClick:h,children:"Add Your First App"})]})}):a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(e=>a.jsx(b,{app:e,onEdit:u,onDelete:g},e.id))}),a.jsx(w,{isOpen:d,onClose:j,editApp:x,onSave:y})]})}function C(){let[e,t]=(0,r.useState)(0),s=(0,r.useCallback)(()=>{t(e=>e+1)},[]);return a.jsx(l.Vw,{children:(0,a.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,a.jsxs)("div",{className:"mb-8",children:[a.jsx("h1",{className:"mb-2",children:"CommandMate"}),a.jsx("p",{className:"text-lg text-gray-600",children:"Git worktree management with Claude CLI and tmux sessions"})]}),a.jsx("div",{className:"mb-8",children:a.jsx(g,{onRepositoryAdded:s})}),a.jsx(u,{},e),a.jsx("div",{className:"mt-8",children:a.jsx(k,{})})]})})}},35480:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});let a=(0,s(68570).createProxy)(String.raw`/home/runner/work/CommandMate/CommandMate/src/app/page.tsx#default`)},6162:(e,t,s)=>{"use strict";s.d(t,{T:()=>l});var a=s(34643);function r(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let l=r(0,a.T_);r(0,a.Gb)}};var t=require("../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),a=t.X(0,[8948,1287,6621,8705,7808,3860,9238],()=>s(37906));module.exports=a})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../node_modules/next/dist/client/components/async-local-storage.js","../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/package.json","../../../package.json","../../package.json","../chunks/1287.js","../chunks/2683.js","../chunks/3348.js","../chunks/369.js","../chunks/3860.js","../chunks/4559.js","../chunks/
|
|
1
|
+
{"version":1,"files":["../../../node_modules/next/dist/client/components/action-async-storage-instance.js","../../../node_modules/next/dist/client/components/action-async-storage.external.js","../../../node_modules/next/dist/client/components/async-local-storage.js","../../../node_modules/next/dist/client/components/request-async-storage-instance.js","../../../node_modules/next/dist/client/components/request-async-storage.external.js","../../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/package.json","../../../package.json","../../package.json","../chunks/1287.js","../chunks/2683.js","../chunks/3348.js","../chunks/369.js","../chunks/3860.js","../chunks/4559.js","../chunks/5823.js","../chunks/5853.js","../chunks/6621.js","../chunks/6837.js","../chunks/7266.js","../chunks/7808.js","../chunks/8705.js","../chunks/8744.js","../chunks/8948.js","../chunks/9238.js","../chunks/9582.js","../webpack-runtime.js","page_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"43095":{"*":{"id":"94881","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"66677":{"*":{"id":"42106","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/globals.css":{"id":2778,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","816","static/chunks/816-af44cb865b0c980e.js","3185","static/chunks/app/layout-07755491d5d57242.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/components/providers/AppProviders.tsx":{"id":18828,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","816","static/chunks/816-af44cb865b0c980e.js","3185","static/chunks/app/layout-07755491d5d57242.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":66677,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","816","static/chunks/816-af44cb865b0c980e.js","5970","static/chunks/5970-9e999084275f2995.js","1931","static/chunks/app/page-a6593b9640df66a6.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/files/[...path]/page.tsx":{"id":50653,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page.tsx":{"id":43095,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/terminal/page.tsx":{"id":41845,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/home/runner/work/CommandMate/CommandMate/src/":[],"/home/runner/work/CommandMate/CommandMate/src/app/layout":["static/css/a69d9c70fce558b4.css"],"/home/runner/work/CommandMate/CommandMate/src/app/page":[]}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/files/[...path]/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/files/[...path]/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"80":{"*":{"id":"41868","name":"*","chunks":[],"async":false}},"4707":{"*":{"id":"79671","name":"*","chunks":[],"async":false}},"12846":{"*":{"id":"12994","name":"*","chunks":[],"async":false}},"18828":{"*":{"id":"2108","name":"*","chunks":[],"async":false}},"19107":{"*":{"id":"96114","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"43095":{"*":{"id":"94881","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","name":"*","chunks":[],"async":false}},"66677":{"*":{"id":"42106","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/app-router.js":{"id":12846,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/client-page.js":{"id":19107,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":61060,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/layout-router.js":{"id":4707,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":80,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":36423,"name":"*","chunks":[],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/globals.css":{"id":2778,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","816","static/chunks/816-af44cb865b0c980e.js","3185","static/chunks/app/layout-07755491d5d57242.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/components/providers/AppProviders.tsx":{"id":18828,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","816","static/chunks/816-af44cb865b0c980e.js","3185","static/chunks/app/layout-07755491d5d57242.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":66677,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","816","static/chunks/816-af44cb865b0c980e.js","5970","static/chunks/5970-9e999084275f2995.js","1931","static/chunks/app/page-a6593b9640df66a6.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/files/[...path]/page.tsx":{"id":50653,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","1038","static/chunks/1038-3509435b68c0967e.js","5441","static/chunks/app/worktrees/%5Bid%5D/files/%5B...path%5D/page-ce9ac3658f2b7d91.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page.tsx":{"id":43095,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1038","static/chunks/1038-3509435b68c0967e.js","2335","static/chunks/2335-98a211e00b94c7ac.js","8864","static/chunks/8864-2f60eadc8404fdd0.js","816","static/chunks/816-af44cb865b0c980e.js","5970","static/chunks/5970-9e999084275f2995.js","130","static/chunks/app/worktrees/%5Bid%5D/page-5abc1e9b59430db1.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/terminal/page.tsx":{"id":41845,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/home/runner/work/CommandMate/CommandMate/src/":[],"/home/runner/work/CommandMate/CommandMate/src/app/layout":["static/css/a69d9c70fce558b4.css"],"/home/runner/work/CommandMate/CommandMate/src/app/page":[],"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page":["static/css/5eacd01f773eed7f.css"],"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/files/[...path]/page":[]}}
|