commandmate 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +14 -14
  3. package/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/cache/config.json +3 -3
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/1.pack +0 -0
  9. package/.next/cache/webpack/client-production/2.pack +0 -0
  10. package/.next/cache/webpack/client-production/index.pack +0 -0
  11. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  12. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  13. package/.next/cache/webpack/server-production/0.pack +0 -0
  14. package/.next/cache/webpack/server-production/index.pack +0 -0
  15. package/.next/next-server.js.nft.json +1 -1
  16. package/.next/prerender-manifest.json +1 -1
  17. package/.next/required-server-files.json +1 -1
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/app/update-check/route.js +1 -1
  20. package/.next/server/app/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/worktrees/[id]/page.js +1 -1
  23. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  24. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app-paths-manifest.json +8 -8
  26. package/.next/server/functions-config-manifest.json +1 -1
  27. package/.next/server/pages/500.html +1 -1
  28. package/.next/server/server-reference-manifest.json +1 -1
  29. package/.next/static/chunks/app/worktrees/[id]/{page-66b59fb8c9ee90f4.js → page-c050d6ec20487340.js} +1 -1
  30. package/.next/trace +5 -5
  31. package/package.json +1 -1
  32. package/.next/cache/fetch-cache/e7a5282a8c6f6e86940328b91498c8c8abc4b300cf449cb16e8ecd707767c12b +0 -1
  33. package/.next/server/app/api/app/update-check.body +0 -1
  34. package/.next/server/app/api/app/update-check.meta +0 -1
  35. /package/.next/static/{zoVKZmyy2snskN1roYhHr → SO7fkeggQuqHqumZAt_QA}/_buildManifest.js +0 -0
  36. /package/.next/static/{zoVKZmyy2snskN1roYhHr → SO7fkeggQuqHqumZAt_QA}/_ssgManifest.js +0 -0
@@ -6,4 +6,4 @@
6
6
  flex items-center gap-2 px-4 py-2 rounded-lg border-2 border-dashed
7
7
  transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500
8
8
  ${l?"border-gray-200 text-gray-400 cursor-not-allowed opacity-50":"border-gray-300 text-gray-600 hover:border-blue-400 hover:text-blue-600 hover:bg-blue-50"}
9
- `,children:[s?a.jsx("span",{"data-testid":"loading-indicator",className:"w-5 h-5 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"}):a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),a.jsx("span",{className:"text-sm font-medium",children:"Add Memo"})]}),(0,a.jsxs)("span",{className:"text-xs text-gray-500",children:[Math.max(0,t-e)," remaining"]})]})}),tA=(0,l.memo)(function({worktreeId:e,className:t=""}){let[r,s]=(0,l.useState)([]),[n,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(!1),[d,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(null),h=(0,l.useCallback)(async()=>{i(!0),u(null);try{let t=await tS.nE.getAll(e);s(t.sort((e,t)=>e.position-t.position))}catch(e){u((0,tS.zG)(e))}finally{i(!1)}},[e]);(0,l.useEffect)(()=>{h()},[h]);let x=(0,l.useCallback)(async()=>{c(!0),p(null);try{let t=await tS.nE.create(e,{title:"Memo",content:""});s(e=>[...e,t])}catch(e){p((0,tS.zG)(e))}finally{c(!1)}},[e]),f=(0,l.useCallback)(async(t,r)=>{await tS.nE.update(e,t,r),s(e=>e.map(e=>e.id===t?{...e,...r}:e))},[e]),g=(0,l.useCallback)(async t=>{try{await tS.nE.delete(e,t),s(e=>e.filter(e=>e.id!==t))}catch(e){console.error("Failed to delete memo:",e)}},[e]),b=(0,l.useCallback)(()=>{h()},[h]);return n?a.jsx("div",{"data-testid":"memo-pane",className:`flex flex-col items-center justify-center h-full p-4 ${t}`,children:(0,a.jsxs)("div",{"data-testid":"memo-loading",className:"flex flex-col items-center gap-3",children:[a.jsx("div",{className:"w-8 h-8 border-4 border-gray-200 border-t-blue-500 rounded-full animate-spin"}),a.jsx("span",{className:"text-sm text-gray-500",children:"Loading memos..."})]})}):d?a.jsx("div",{"data-testid":"memo-pane",className:`flex flex-col items-center justify-center h-full p-4 ${t}`,children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[a.jsx("svg",{className:"w-12 h-12 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a.jsx("span",{className:"text-sm text-red-600",children:d}),a.jsx("button",{type:"button",onClick:b,"aria-label":"Retry",className:"px-4 py-2 text-sm font-medium text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors",children:"Retry"})]})}):(0,a.jsxs)("div",{"data-testid":"memo-pane",className:`flex flex-col gap-4 p-4 overflow-y-auto ${t}`,children:[0===r.length&&!m&&(0,a.jsxs)("div",{className:"text-center py-8 text-gray-500",children:[a.jsx("p",{children:"No memos yet."}),a.jsx("p",{className:"text-sm",children:"Click the button below to add one."})]}),r.map(e=>a.jsx(tE,{memo:e,onUpdate:f,onDelete:g},e.id)),m&&a.jsx("div",{className:"text-center py-2 text-sm text-red-500",children:m}),a.jsx(tM,{currentCount:r.length,maxCount:5,onAdd:x,isLoading:o,className:"mt-2"})]})});var tR=r(11867);function t_({hasUpdate:e,latestVersion:t,releaseUrl:r,updateCommand:s,installType:n}){let l=(0,f.T)("worktree");return e?(0,a.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-2",role:"status","aria-label":l("update.available"),"data-testid":"update-notification-banner",children:[a.jsx("p",{className:"text-sm font-medium text-blue-800 mb-1",children:l("update.available")}),t&&a.jsx("p",{className:"text-sm text-blue-700 mb-2",children:l("update.latestVersion",{version:t})}),s&&"global"===n&&(0,a.jsxs)("div",{className:"mb-2",children:[a.jsx("p",{className:"text-xs text-blue-600 mb-1",children:l("update.updateCommand")}),a.jsx("code",{className:"block bg-blue-100 rounded px-2 py-1 text-xs text-blue-900 font-mono",children:s})]}),r&&(0,a.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm text-blue-600 hover:text-blue-800 underline",children:[l("update.viewRelease"),a.jsx("span",{className:"ml-1","aria-hidden":"true",children:"→"})]}),a.jsx("p",{className:"text-xs text-blue-500 mt-2",children:l("update.dataPreserved")})]}):null}function tL({version:e,className:t}){let r=(0,f.T)("worktree"),{data:s,loading:n}=function(){let[e,t]=(0,l.useState)(null),[r,a]=(0,l.useState)(!0),[s,n]=(0,l.useState)(null);return{data:e,loading:r,error:s}}(),i=(0,l.useMemo)(()=>s&&s.hasUpdate?{hasUpdate:s.hasUpdate,latestVersion:s.latestVersion,releaseUrl:s.releaseUrl,updateCommand:s.updateCommand,installType:s.installType}:null,[s]);return(0,a.jsxs)("div",{className:t,"data-testid":"version-section",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:r("update.version")}),a.jsx("p",{className:"text-sm text-gray-700",children:e}),n&&a.jsx("p",{className:"text-xs text-gray-400 mt-1","data-testid":"version-loading",children:"..."}),i&&a.jsx(t_,{...i})]})}let tD="https://github.com/Kewton/CommandMate",tP=`${tD}/issues`,tO=`${tD}/issues/new`,tI=`${tO}?template=bug_report.md`,tF=`${tO}?template=feature_request.md`,t$=`${tO}?template=question.md`;function tz({className:e}){let t=(0,f.T)("worktree"),r=[{href:tI,label:t("feedback.bugReport")},{href:tF,label:t("feedback.featureRequest")},{href:t$,label:t("feedback.question")},{href:tP,label:t("feedback.viewIssues")}];return(0,a.jsxs)("div",{className:e,"data-testid":"feedback-section",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-2",children:t("feedback.title")}),a.jsx("div",{className:"flex flex-col gap-1",children:r.map(({href:e,label:t})=>(0,a.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm text-blue-600 hover:text-blue-800 underline",children:[t,a.jsx("span",{className:"ml-1","aria-hidden":"true",children:"→"})]},e))})]})}var tW=r(28676);let tB=[36e5,108e5,288e5],tU={36e5:"autoYes.durations.1h",108e5:"autoYes.durations.3h",288e5:"autoYes.durations.8h"};function tH({isOpen:e,onConfirm:t,onCancel:r,cliToolName:s}){let n=(0,f.T)("autoYes"),i=(0,f.T)("common"),[o,c]=(0,l.useState)(36e5),d=e=>n(tU[e].replace("autoYes.",""));return a.jsx(tW.u,{isOpen:e,onClose:r,title:s?n("enableTitleWithTool",{toolName:s}):n("enableTitle"),size:"sm",showCloseButton:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"text-sm text-gray-700",children:[a.jsx("p",{className:"font-medium mb-2",children:n("featureDescription")}),(0,a.jsxs)("ul",{className:"list-disc list-inside space-y-1",children:[a.jsx("li",{children:n("yesNoAutoResponse")}),a.jsx("li",{children:n("multipleChoiceAutoSelect")})]}),a.jsx("p",{className:"mt-1",children:n("autoDisableAfter",{duration:d(o)})}),s&&a.jsx("p",{className:"mt-2 text-gray-500",children:n("appliesOnlyToCurrent",{toolName:s})})]}),(0,a.jsxs)("div",{className:"text-sm text-gray-700",children:[a.jsx("p",{className:"font-medium mb-2",children:n("duration")}),a.jsx("div",{className:"flex gap-2",children:tB.map(e=>a.jsx("button",{type:"button",onClick:()=>c(e),className:`flex-1 py-2 px-3 text-sm font-medium rounded-md border-2 transition-colors ${o===e?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"}`,style:{minHeight:"44px"},children:d(e)},e))})]}),(0,a.jsxs)("div",{className:"text-sm text-gray-700",children:[a.jsx("p",{className:"font-medium mb-2",children:n("aboutRisks")}),a.jsx("p",{children:n("riskWarning")})]}),a.jsx("div",{className:"bg-yellow-50 border-l-4 border-yellow-400 p-3",children:(0,a.jsxs)("p",{className:"text-sm text-yellow-800",children:[a.jsx("span",{className:"font-medium",children:n("disclaimer")}),n("disclaimerText")]})}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm font-medium rounded-md bg-gray-200 hover:bg-gray-300 text-gray-700",children:i("cancel")}),a.jsx("button",{type:"button",onClick:()=>t(o),className:"px-4 py-2 text-sm font-medium rounded-md bg-yellow-600 hover:bg-yellow-700 text-white",children:n("agreeAndEnable")})]})]})})}function tq(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}let tG=(0,l.memo)(function({enabled:e,expiresAt:t,onToggle:r,lastAutoResponse:s,cliToolName:n,inline:i=!1}){let[o,c]=(0,l.useState)(""),[d,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(!1),[h,x]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!e||!t){c("");return}let r=()=>{c(function(e){let t=Math.max(0,e-Date.now()),r=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4),s=Math.floor(t%6e4/1e3);return r>0?`${r}:${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`:`${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}(t))};r();let a=setInterval(r,1e3);return()=>clearInterval(a)},[e,t]),(0,l.useEffect)(()=>{if(!s)return;u(`Auto responded: "${s}"`);let e=setTimeout(()=>u(null),2e3);return()=>clearTimeout(e)},[s]);let f=(0,l.useCallback)(()=>{e?(p(!0),r(!1).finally(()=>p(!1))):x(!0)},[e,r]),g=(0,l.useCallback)(e=>{x(!1),p(!0),r(!0,e).finally(()=>p(!1))},[r]),b=(0,l.useCallback)(()=>{x(!1)},[]);return(0,a.jsxs)("div",{className:i?"flex items-center gap-2":"flex items-center gap-3 px-4 py-2 bg-gray-50 border-b border-gray-200",children:[a.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":"Auto Yes mode",disabled:m,onClick:f,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ${e?"bg-blue-600":"bg-gray-300"} ${m?"opacity-50":""}`,children:a.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${e?"translate-x-6":"translate-x-1"}`})}),a.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Auto Yes"}),e&&n&&(0,a.jsxs)("span",{className:"text-xs text-blue-600 font-medium","aria-label":"Auto Yes target",children:["(",tq(n),")"]}),e&&o&&a.jsx("span",{className:"text-sm text-gray-500","aria-label":"Time remaining",children:o}),d&&a.jsx("span",{className:"text-sm text-green-600 animate-pulse",children:d}),a.jsx(tH,{isOpen:h,onConfirm:g,onCancel:b,cliToolName:tq(n)})]})}),tV=(0,l.memo)(function({isBranchMismatch:e,currentBranch:t,initialBranch:r}){let[s,n]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{n(!1)},[t]),!e||s||null===r)?null:(0,a.jsxs)("div",{"data-testid":"branch-mismatch-alert",role:"alert",className:"flex items-center gap-3 px-4 py-2 bg-amber-50 border border-amber-200 text-amber-800 rounded-lg",children:[a.jsx(e7,{className:"w-5 h-5 text-amber-500 flex-shrink-0"}),a.jsx("div",{className:"flex-1 min-w-0",children:(0,a.jsxs)("span",{className:"text-sm",children:["Branch changed from"," ",a.jsx("span",{className:"font-medium",children:r})," ","to"," ",a.jsx("span",{className:"font-medium",children:t})]})}),a.jsx("button",{type:"button",onClick:()=>n(!0),className:"p-1 rounded hover:bg-amber-100 transition-colors","aria-label":"Dismiss alert",children:a.jsx(tn.Z,{className:"w-4 h-4"})})]})});var tY=r(18421);let tZ="v0.2.5",tK=(0,l.memo)(function({worktreeName:e,repositoryName:t,description:r,status:s,gitStatus:n,onBackClick:l,onInfoClick:i,onMenuClick:o}){let c=el.Ie[s],d=r?(0,ei.aS)(r,50):null;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 bg-white border-b border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",onClick:o,className:"p-2 -ml-2 rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-100 transition-colors","aria-label":"Toggle sidebar",children:a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),a.jsx("div",{className:"w-px h-6 bg-gray-300","aria-hidden":"true"}),(0,a.jsxs)("button",{type:"button",onClick:l,className:"flex items-center gap-1 text-gray-600 hover:text-gray-900 transition-colors","aria-label":"Go back to worktree list",children:[a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),a.jsx("span",{className:"text-sm font-medium",children:"Back"})]}),a.jsx("div",{className:"w-px h-6 bg-gray-300","aria-hidden":"true"}),"spinner"===c.type?a.jsx("span",{"data-testid":"desktop-status-indicator",title:c.label,"aria-label":c.label,className:`w-3 h-3 rounded-full flex-shrink-0 border-2 border-t-transparent animate-spin ${c.className}`}):a.jsx("span",{"data-testid":"desktop-status-indicator",title:c.label,"aria-label":c.label,className:`w-3 h-3 rounded-full flex-shrink-0 ${c.className}`}),(0,a.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[a.jsx("h1",{className:"text-lg font-semibold text-gray-900 truncate max-w-[200px] leading-tight",children:e}),d&&a.jsx("span",{className:"text-sm text-gray-500 truncate max-w-md",title:r,children:d})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[a.jsx("span",{className:"truncate max-w-[200px]",children:t}),n&&"(unknown)"!==n.currentBranch&&(0,a.jsxs)(a.Fragment,{children:[a.jsx("span",{className:"text-gray-300",children:"/"}),a.jsx("span",{className:"truncate max-w-[150px] font-mono",title:n.currentBranch,"data-testid":"desktop-branch-name",children:(0,ei.aS)(n.currentBranch,30)}),n.isDirty&&a.jsx("span",{className:"text-amber-500",title:"Uncommitted changes",children:"*"})]})]})]})]}),(0,a.jsxs)("button",{type:"button",onClick:i,className:"flex items-center gap-1.5 px-3 py-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"View worktree information",children:[a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a.jsx("span",{className:"text-sm font-medium",children:"Info"})]})]})}),tX=(0,l.memo)(function({worktreeId:e,worktree:t,isOpen:r,onClose:s,onWorktreeUpdate:n}){let[i,o]=(0,l.useState)(!1),[c,d]=(0,l.useState)(""),[u,m]=(0,l.useState)(!1),[p,h]=(0,l.useState)(!1),x=(0,l.useRef)(r);(0,l.useEffect)(()=>{let e=r&&!x.current;x.current=r,e&&t&&(d(t.description||""),o(!1))},[t,r]);let f=(0,l.useCallback)(async()=>{if(t){m(!0);try{let e=await tS.Iv.updateDescription(t.id,c);n(e),o(!1)}catch(e){console.error("Failed to save description:",e)}finally{m(!1)}}},[t,c,n]),g=(0,l.useCallback)(()=>{d(t?.description||""),o(!1)},[t]);return t?a.jsx(tW.u,{isOpen:r,onClose:s,title:"Worktree Information",size:"md",children:(0,a.jsxs)("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Worktree"}),a.jsx("p",{className:"text-lg font-semibold text-gray-900",children:t.name})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Repository"}),a.jsx("p",{className:"text-base text-gray-900",children:t.repositoryName}),a.jsx("p",{className:"text-xs text-gray-500 mt-1 break-all",children:t.repositoryPath})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Path"}),a.jsx("p",{className:"text-sm text-gray-700 break-all font-mono",children:t.path})]}),t.status&&(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Status"}),a.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${"done"===t.status?"bg-green-100 text-green-800":"doing"===t.status?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:t.status.toUpperCase()})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Description"}),!i&&a.jsx("button",{type:"button",onClick:()=>o(!0),className:"text-sm text-blue-600 hover:text-blue-800",children:"Edit"})]}),i?(0,a.jsxs)("div",{className:"space-y-3",children:[a.jsx("textarea",{value:c,onChange:e=>d(e.target.value),placeholder:"Add notes about this branch...",className:"w-full min-h-[150px] p-3 border border-gray-300 rounded-lg resize-y focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",autoFocus:!0}),(0,a.jsxs)("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",onClick:f,disabled:u,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 text-sm font-medium",children:u?"Saving...":"Save"}),a.jsx("button",{type:"button",onClick:g,disabled:u,className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 disabled:opacity-50 text-sm font-medium",children:"Cancel"})]})]}):a.jsx("div",{className:"min-h-[50px]",children:t.description?a.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:t.description}):a.jsx("p",{className:"text-sm text-gray-400 italic",children:"No description added yet"})})]}),t.link&&(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Link"}),a.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline break-all",children:t.link})]}),t.updatedAt&&(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Last Updated"}),a.jsx("p",{className:"text-sm text-gray-700",children:new Date(t.updatedAt).toLocaleString()})]}),a.jsx(tL,{version:tZ,className:"bg-gray-50 rounded-lg p-4"}),a.jsx(tz,{className:"bg-gray-50 rounded-lg p-4"}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Logs"}),a.jsx("button",{type:"button",onClick:()=>h(!p),className:"text-sm text-blue-600 hover:text-blue-800",children:p?"Hide":"Show"})]}),p&&a.jsx(tR.n,{worktreeId:e})]})]})}):null}),tJ=(0,l.memo)(function(){return a.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",role:"status","aria-live":"polite",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600","aria-hidden":"true"}),a.jsx("p",{className:"text-gray-600",children:"Loading worktree..."})]})})}),tQ=(0,l.memo)(function({message:e,onRetry:t}){return a.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",role:"alert","aria-live":"assertive",children:(0,a.jsxs)("div",{className:"text-center p-6 bg-red-50 rounded-lg border border-red-200 max-w-md",children:[a.jsx("svg",{className:"mx-auto h-12 w-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a.jsx("p",{className:"text-red-600 font-medium",children:"Error loading worktree"}),a.jsx("p",{className:"text-red-500 text-sm mt-2",children:e}),t&&a.jsx("button",{type:"button",onClick:t,className:"mt-4 px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2",children:"Retry"})]})})}),t0=(0,l.memo)(function({worktreeId:e,worktree:t,onWorktreeUpdate:r}){let[s,n]=(0,l.useState)(!1),[i,o]=(0,l.useState)(""),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),p=(0,l.useRef)(t?.id);(0,l.useEffect)(()=>{let e=t?.id!==p.current;p.current=t?.id,e&&t&&!s&&o(t.description||"")},[t,s]);let h=(0,l.useCallback)(async()=>{if(t){d(!0);try{let e=await tS.Iv.updateDescription(t.id,i);r(e),n(!1)}catch(e){console.error("Failed to save description:",e)}finally{d(!1)}}},[t,i,r]),x=(0,l.useCallback)(()=>{o(t?.description||""),n(!1)},[t]);return t?(0,a.jsxs)("div",{className:"p-4 space-y-4 overflow-y-auto h-full",children:[(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Worktree"}),a.jsx("p",{className:"text-lg font-semibold text-gray-900",children:t.name})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Repository"}),a.jsx("p",{className:"text-base text-gray-900",children:t.repositoryName}),a.jsx("p",{className:"text-xs text-gray-500 mt-1 break-all",children:t.repositoryPath})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Path"}),a.jsx("p",{className:"text-sm text-gray-700 break-all font-mono",children:t.path})]}),t.status&&(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Status"}),a.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${"done"===t.status?"bg-green-100 text-green-800":"doing"===t.status?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:t.status.toUpperCase()})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Description"}),!s&&a.jsx("button",{type:"button",onClick:()=>n(!0),className:"text-sm text-blue-600 hover:text-blue-800",children:"Edit"})]}),s?(0,a.jsxs)("div",{className:"space-y-3",children:[a.jsx("textarea",{value:i,onChange:e=>o(e.target.value),placeholder:"Add notes about this branch...",className:"w-full min-h-[150px] p-3 border border-gray-300 rounded-lg resize-y focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",autoFocus:!0}),(0,a.jsxs)("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",onClick:h,disabled:c,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 text-sm font-medium",children:c?"Saving...":"Save"}),a.jsx("button",{type:"button",onClick:x,disabled:c,className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 disabled:opacity-50 text-sm font-medium",children:"Cancel"})]})]}):a.jsx("div",{className:"min-h-[50px]",children:t.description?a.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:t.description}):a.jsx("p",{className:"text-sm text-gray-400 italic",children:"No description added yet"})})]}),t.link&&(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Link"}),a.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline break-all",children:t.link})]}),t.updatedAt&&(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Last Updated"}),a.jsx("p",{className:"text-sm text-gray-700",children:new Date(t.updatedAt).toLocaleString()})]}),a.jsx(tL,{version:tZ,className:"bg-white rounded-lg border border-gray-200 p-4"}),a.jsx(tz,{className:"bg-white rounded-lg border border-gray-200 p-4"}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Logs"}),a.jsx("button",{type:"button",onClick:()=>m(!u),className:"text-sm text-blue-600 hover:text-blue-800",children:u?"Hide":"Show"})]}),u&&a.jsx(tR.n,{worktreeId:e})]})]}):a.jsx("div",{className:"text-gray-500 text-center py-8",children:"Loading worktree info..."})}),t1=(0,l.memo)(function({activeTab:e,worktreeId:t,worktree:r,messages:s,terminalOutput:n,isTerminalActive:l,isThinking:i,onFilePathClick:o,onFileSelect:c,onWorktreeUpdate:d,onNewFile:u,onNewDirectory:m,onRename:p,onDelete:h,onUpload:x,refreshTrigger:f,fileSearch:b,showToast:y}){switch(e){case"terminal":return a.jsx(g,{componentName:"TerminalDisplay",children:a.jsx(P,{output:n,isActive:l,isThinking:i,className:"h-full"})});case"history":return a.jsx(g,{componentName:"HistoryPane",children:a.jsx(X,{messages:s,worktreeId:t,onFilePathClick:o,className:"h-full",showToast:y})});case"files":return a.jsx(g,{componentName:"FileTreeView",children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(eI,{query:b.query,mode:b.mode,isSearching:b.isSearching,error:b.error,onQueryChange:b.setQuery,onModeChange:b.setMode,onClear:b.clearSearch}),a.jsx(eL,{worktreeId:t,onFileSelect:c,onNewFile:u,onNewDirectory:m,onRename:p,onDelete:h,onUpload:x,refreshTrigger:f,searchQuery:b.query,searchMode:b.mode,searchResults:b.results?.results,className:"flex-1 min-h-0"})]})});case"memo":return a.jsx(g,{componentName:"MemoPane",children:a.jsx(tA,{worktreeId:t,className:"h-full"})});case"info":return a.jsx(t0,{worktreeId:t,worktree:r,onWorktreeUpdate:d});default:return null}}),t2=(0,l.memo)(function({worktreeId:e}){let t=(0,s.useRouter)(),r=(0,h.d)(),{toggle:n,openMobileDrawer:i}=(0,x.Sz)(),{state:o,actions:c}=function(){let[e,t]=(0,l.useReducer)(p,void 0,m),r=(0,l.useMemo)(()=>({setPhase:e=>t({type:"SET_PHASE",phase:e}),setTerminalOutput:(e,r)=>t({type:"SET_TERMINAL_OUTPUT",output:e,realtimeSnippet:r}),setTerminalActive:e=>t({type:"SET_TERMINAL_ACTIVE",isActive:e}),setTerminalThinking:e=>t({type:"SET_TERMINAL_THINKING",isThinking:e}),showPrompt:(e,r)=>t({type:"SHOW_PROMPT",data:e,messageId:r}),clearPrompt:()=>t({type:"CLEAR_PROMPT"}),setPromptAnswering:e=>t({type:"SET_PROMPT_ANSWERING",answering:e}),setError:e=>t({type:"SET_ERROR",error:e}),clearError:()=>t({type:"CLEAR_ERROR"}),setMessages:e=>t({type:"SET_MESSAGES",messages:e}),addMessage:e=>t({type:"ADD_MESSAGE",message:e}),updateMessage:(e,r)=>t({type:"UPDATE_MESSAGE",id:e,updates:r}),clearMessages:()=>t({type:"CLEAR_MESSAGES"}),startWaitingForResponse:e=>t({type:"START_WAITING_FOR_RESPONSE",cliToolId:e}),responseReceived:e=>t({type:"RESPONSE_RECEIVED",message:e}),sessionEnded:()=>t({type:"SESSION_ENDED"}),setAutoScroll:e=>t({type:"SET_AUTO_SCROLL",enabled:e}),setMobileActivePane:e=>t({type:"SET_MOBILE_ACTIVE_PANE",pane:e}),setLeftPaneTab:e=>t({type:"SET_LEFT_PANE_TAB",tab:e}),setLayoutMode:e=>t({type:"SET_LAYOUT_MODE",mode:e}),setSplitRatio:e=>t({type:"SET_SPLIT_RATIO",ratio:e}),setWsConnected:e=>t({type:"SET_WS_CONNECTED",connected:e})}),[]);return{state:e,dispatch:t,actions:r}}(),d=(0,f.T)("worktree"),u=(0,f.T)("error"),b=(0,f.T)("common"),[y,w]=(0,l.useState)(null),[v,j]=(0,l.useState)(!0),[N,k]=(0,l.useState)(null),[C,S]=(0,l.useState)(!1),[T,E]=(0,l.useState)(null),[A,R]=(0,l.useState)(null),[_,L]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),[I,F]=(0,l.useState)(null),[$,z]=(0,l.useState)("claude"),W=(0,l.useRef)($);W.current=$;let[B,U]=(0,l.useState)(0),H=function(e){let{worktreeId:t,initialMode:r="name",debounceMs:a=300}=e,[s,n]=(0,l.useState)(""),[i,o]=(0,l.useState)(""),[c,d]=(0,l.useState)(r),[u,m]=(0,l.useState)(!1),[p,h]=(0,l.useState)(null),[x,f]=(0,l.useState)(null),g=(0,l.useRef)(null),b=(0,l.useMemo)(()=>(0,ei.Ds)(e=>{o(e)},a),[a]),y=(0,l.useCallback)(e=>{n(e),b(e),f(null)},[b]),w=(0,l.useCallback)(()=>{n(""),o(""),h(null),f(null),m(!1),g.current&&(g.current.abort(),g.current=null)},[]),v=(0,l.useCallback)(e=>{if(!i.trim())return e;let t=i.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t))},[i]),j=(0,l.useCallback)(()=>p&&0!==p.results.length?(0,ei.Ps)(p.results.map(e=>e.filePath)):new Set,[p]);return{query:s,mode:c,isSearching:u,results:p,error:x,setQuery:y,setMode:d,clearSearch:w,filterByName:v,getMatchedPaths:j}}({worktreeId:e}),q=(0,l.useRef)(!1),G=(0,l.useRef)(e);(0,l.useEffect)(()=>{G.current!==e&&(c.clearMessages(),q.current=!1,c.setTerminalOutput("",""),G.current=e)},[e,c]);let V=(0,l.useCallback)(async()=>{try{let t=await fetch(`/api/worktrees/${e}`);if(!t.ok)throw Error(`Failed to fetch worktree: ${t.status}`);let r=await t.json();return w(r),r}catch(e){return k(e instanceof Error?e.message:"Unknown error"),null}},[e]),Y=(0,l.useCallback)(async()=>{try{let t=await fetch(`/api/worktrees/${e}/messages?cliTool=${W.current}`);if(!t.ok)throw Error(`Failed to fetch messages: ${t.status}`);let r=await t.json();c.setMessages(r.map(e=>({...e,timestamp:new Date(e.timestamp)})))}catch(e){console.error("[WorktreeDetailRefactored] Error fetching messages:",e)}},[e,c]),Z=(0,l.useCallback)(async()=>{try{let t=await fetch(`/api/worktrees/${e}/current-output?cliTool=${W.current}`);if(!t.ok)return;let r=await t.json(),a=r.fullOutput??r.realtimeSnippet??"";(a||r.isRunning)&&c.setTerminalOutput(a,r.realtimeSnippet??""),c.setTerminalActive(r.isRunning??!1),c.setTerminalThinking(r.thinking??!1),r.isPromptWaiting&&r.promptData?c.showPrompt(r.promptData,`prompt-${Date.now()}`):!r.isPromptWaiting&&o.prompt.visible&&c.clearPrompt(),r.autoYes&&(O(r.autoYes.enabled),F(r.autoYes.expiresAt))}catch(e){console.error("[WorktreeDetailRefactored] Error fetching current output:",e)}},[e,c,o.prompt.visible]),K=(0,l.useRef)($);(0,l.useEffect)(()=>{K.current!==$&&(K.current=$,c.clearMessages(),c.setTerminalOutput("",""),Y(),Z())},[$,c,Y,Z]);let J=(0,l.useCallback)(e=>{E(e)},[]),Q=(0,l.useCallback)(e=>{let t=e.split(".").pop()?.toLowerCase(),r=t?`.${t}`:"";tN.includes(r)?R(e):E(e)},[]),ee=(0,l.useCallback)(()=>{E(null)},[]),et=(0,l.useCallback)(()=>{R(null)},[]),er=(0,l.useCallback)(e=>{console.log("[WorktreeDetailRefactored] File saved:",e)},[]),ea=(0,l.useCallback)(e=>{c.setLeftPaneTab(e)},[c]),es=(0,l.useCallback)(()=>{t.push("/")},[t]),eo=(0,l.useCallback)(()=>{S(!0)},[]),ec=(0,l.useCallback)(()=>{S(!1)},[]),eu=(0,l.useCallback)(async t=>{c.setPromptAnswering(!0);try{let r=await fetch(`/api/worktrees/${e}/prompt-response`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answer:t,cliTool:$})});if(!r.ok)throw Error(`Failed to send prompt response: ${r.status}`);c.clearPrompt(),await Z()}catch(e){console.error("[WorktreeDetailRefactored] Error sending prompt response:",e)}finally{c.setPromptAnswering(!1)}},[e,c,Z,$]),em=(0,l.useCallback)(()=>{c.clearPrompt()},[c]),ep=(0,l.useCallback)(e=>{c.setMobileActivePane(e)},[c]),ex=(0,l.useCallback)(e=>{c.setAutoScroll(e)},[c]),eg=(0,l.useCallback)(()=>{Y(),Z()},[Y,Z]),eb=(0,l.useCallback)(async(t,r)=>{try{let a=await fetch(`/api/worktrees/${e}/auto-yes`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t,cliToolId:$,duration:r})});if(a.ok){let e=await a.json();O(e.enabled),F(e.expiresAt)}}catch(e){console.error("[WorktreeDetailRefactored] Error toggling auto-yes:",e)}},[e,$]),[ey,ev]=(0,l.useState)(!1),ej=(0,l.useCallback)(()=>{ev(!0)},[]),eN=(0,l.useCallback)(async()=>{ev(!1);try{if(!(await fetch(`/api/worktrees/${e}/kill-session?cliTool=${$}`,{method:"POST"})).ok)return;c.clearMessages(),c.setTerminalOutput("",""),c.setTerminalActive(!1),c.setTerminalThinking(!1),c.clearPrompt(),await V()}catch(e){console.error("[WorktreeDetailRefactored] Error killing session:",e)}},[e,$,c,V]),ek=(0,l.useCallback)(()=>{ev(!1)},[]),eC=(0,l.useCallback)(async t=>{let r=window.prompt("Enter file name (e.g., document.md):");if(!r)return;let a=r.endsWith(".md")?r:`${r}.md`,s=t?`${t}/${a}`:a;try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(s)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"file",content:""})})).ok)throw Error("Failed to create file");U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to create file:",e),window.alert(u("fileOps.failedToCreateFile"))}},[e,u]),eS=(0,l.useCallback)(async t=>{let r=window.prompt("Enter directory name:");if(!r)return;let a=t?`${t}/${r}`:r;try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(a)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"directory"})})).ok)throw Error("Failed to create directory");U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to create directory:",e),window.alert(u("fileOps.failedToCreateDirectory"))}},[e,u]),eT=(0,l.useCallback)(async t=>{let r=t.split("/").pop()||"",a=window.prompt("Enter new name:",r);if(a&&a!==r)try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",newName:a})})).ok)throw Error("Failed to rename");U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to rename:",e),window.alert(u("fileOps.failedToRename"))}},[e,u]),eE=(0,l.useCallback)(async t=>{let r=t.split("/").pop()||t;if(window.confirm(b("confirmDelete",{name:r})))try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(t)}?recursive=true`,{method:"DELETE"})).ok)throw Error("Failed to delete");(A===t||A?.startsWith(`${t}/`))&&R(null),U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to delete:",e),window.alert(u("fileOps.failedToDelete"))}},[e,A,b,u]),{toasts:eM,showToast:eA,removeToast:eR}=(0,tl.pm)(),e_=(0,l.useRef)(null),eD=(0,l.useRef)(""),eP=(0,l.useCallback)(e=>{eD.current=e,e_.current?.click()},[]),eO=(0,l.useCallback)(async t=>{let r=t.target.files?.[0];if(!r)return;t.target.value="";let a=eD.current,s=`.${r.name.split(".").pop()?.toLowerCase()}`;if(!function(e){if(!e)return!1;let t=e.toLowerCase();return tC.includes(t)}(s)){eA(`Unsupported file type: ${s}. Allowed: ${tC.join(", ")}`,"error");return}let n=function(e){let t=function(e){let t=e.toLowerCase();return tk.find(e=>e.extension===t)}(e);return t?.maxFileSize??5242880}(s);if(r.size>n){eA(`File too large. Maximum size: ${(n/1024/1024).toFixed(1)}MB`,"error");return}let l=new FormData;l.append("file",r);try{let t=await fetch(`/api/worktrees/${e}/upload/${encodeURIComponent(a||".")}`,{method:"POST",body:l});if(!t.ok){let e=await t.json().catch(()=>({})),r=e?.error?.message||"Failed to upload file";eA(r,"error");return}let r=await t.json();eA(`Uploaded: ${r.filename}`,"success"),U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to upload:",e),eA("Upload failed. Please try again.","error")}},[e,eA]),{lastAutoResponse:eF}=function({worktreeId:e,cliTool:t,isPromptWaiting:r,promptData:a,autoYesEnabled:s,lastServerResponseTimestamp:n}){(0,l.useRef)(null);let[i,o]=(0,l.useState)(null);return{lastAutoResponse:i}}({worktreeId:e,cliTool:$,isPromptWaiting:o.prompt.visible,promptData:o.prompt.data,autoYesEnabled:D}),e$=(0,l.useCallback)(async()=>{k(null),j(!0),await V()&&await Promise.all([Y(),Z()]),j(!1)},[V,Y,Z]),ez=(0,l.useRef)(0),eW=(0,l.useCallback)(()=>{if("visible"!==document.visibilityState)return;let e=Date.now();e-ez.current<5e3||(ez.current=e,e$())},[e$]);(0,l.useEffect)(()=>{if(q.current)return;let e=!0;return(async()=>{j(!0);let t=await V();e&&(t&&await Promise.all([Y(),Z()]),e&&(j(!1),q.current=!0))})(),()=>{e=!1}},[V,Y,Z]),(0,l.useEffect)(()=>(document.addEventListener("visibilitychange",eW),()=>{document.removeEventListener("visibilitychange",eW)}),[eW]),(0,l.useEffect)(()=>{if(v||N)return;let e=setInterval(async()=>{await Promise.all([Z(),V(),Y()])},o.terminal.isActive?2e3:5e3);return()=>clearInterval(e)},[v,N,Z,V,Y,o.terminal.isActive]),(0,l.useEffect)(()=>{c.setLayoutMode(r?"tabs":"split")},[r,c]);let eU=(0,l.useMemo)(()=>(function(e,t,r="claude"){if(t)return"error";if(!e)return"idle";let a=e.sessionStatusByCli?.[r];if(a){if(a.isWaitingForResponse)return"waiting";if(a.isProcessing)return"running";if(a.isRunning)return"ready"}if("claude"===r){if(e.isWaitingForResponse)return"waiting";if(e.isProcessing)return"running";if(e.isSessionRunning)return"ready"}return"idle"})(y,null!==o.error.type,$),[y,o.error.type,$]),eH=(0,l.useMemo)(()=>o.layout.mobileActivePane,[o.layout.mobileActivePane]),eG=(0,l.useMemo)(()=>o.layout.leftPaneTab,[o.layout.leftPaneTab]),eV=y?.name??"Unknown";return v?a.jsx(tJ,{}):N?a.jsx(tQ,{message:N,onRetry:e$}):r?a.jsx(g,{componentName:"WorktreeDetailRefactored",children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(ed,{worktreeName:eV,repositoryName:y?.repositoryName,status:eU,gitStatus:y?.gitStatus,onBackClick:es,onMenuClick:i}),y?.gitStatus&&y.gitStatus.isBranchMismatch&&a.jsx("div",{className:"fixed top-14 inset-x-0 z-35",children:a.jsx(tV,{isBranchMismatch:y.gitStatus.isBranchMismatch,currentBranch:y.gitStatus.currentBranch,initialBranch:y.gitStatus.initialBranch})}),(0,a.jsxs)("div",{className:"fixed top-14 inset-x-0 z-30 flex items-center justify-between px-3 py-1.5 bg-gray-50 border-b border-gray-200",children:[a.jsx(tG,{enabled:D,expiresAt:I,onToggle:eb,lastAutoResponse:eF,cliToolName:$,inline:!0}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[a.jsx("nav",{className:"flex gap-2","aria-label":"CLI Tool Selection",children:["claude","codex"].map(e=>{let t=(0,tY.He)(y?.sessionStatusByCli?.[e]),r=el.F4[t];return(0,a.jsxs)("button",{onClick:()=>z(e),className:`px-1.5 py-0.5 rounded font-medium text-xs transition-colors flex items-center gap-1 ${$===e?"bg-blue-100 text-blue-700":"text-gray-500 hover:text-gray-700"}`,"aria-current":$===e?"page":void 0,children:["spinner"===r.type?a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 border-2 border-t-transparent animate-spin ${r.className}`,title:r.label}):a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${r.className}`,title:r.label}),e.charAt(0).toUpperCase()+e.slice(1)]},e)})}),(0,a.jsxs)("button",{onClick:ej,disabled:!y?.sessionStatusByCli?.[$]?.isRunning,className:`flex items-center gap-0.5 px-1.5 py-0.5 text-xs font-medium rounded transition-colors ${y?.sessionStatusByCli?.[$]?.isRunning?"text-red-600 hover:bg-red-50":"invisible"}`,"aria-label":`End ${$} session`,children:[a.jsx("span",{"aria-hidden":"true",children:"✕"}),"End"]})]})]}),a.jsx("main",{className:"flex-1 pt-[6.25rem] pb-32 overflow-hidden",style:{paddingBottom:"calc(8rem + env(safe-area-inset-bottom, 0px))"},children:a.jsx(t1,{activeTab:eH,worktreeId:e,worktree:y,messages:o.messages,terminalOutput:o.terminal.output,isTerminalActive:o.terminal.isActive,isThinking:o.terminal.isThinking,onFilePathClick:J,onFileSelect:Q,onWorktreeUpdate:w,onNewFile:eC,onNewDirectory:eS,onRename:eT,onDelete:eE,onUpload:eP,refreshTrigger:B,fileSearch:H,showToast:eA})}),a.jsx("div",{className:"fixed left-0 right-0 border-t border-gray-200 bg-white p-2 z-30",style:{bottom:"calc(4rem + env(safe-area-inset-bottom, 0px))"},children:a.jsx(ew.R,{worktreeId:e,onMessageSent:eg,cliToolId:$,isSessionRunning:o.terminal.isActive})}),a.jsx(eh,{activeTab:eH,onTabChange:ep,hasNewOutput:!1,hasPrompt:o.prompt.visible}),!D&&a.jsx(ef,{promptData:o.prompt.data,visible:o.prompt.visible,answering:o.prompt.answering,onRespond:eu,onDismiss:em}),a.jsx(eq,{isOpen:null!==T,onClose:ee,worktreeId:e,filePath:T??""}),A&&a.jsx(tW.u,{isOpen:!0,onClose:et,title:A.split("/").pop()||"Editor",size:"full",disableClose:_,children:a.jsx("div",{className:"h-[80vh]",children:a.jsx(tj,{worktreeId:e,filePath:A,onClose:et,onSave:er,onMaximizedChange:L})})}),a.jsx("input",{ref:e_,type:"file",accept:tC.join(","),onChange:eO,className:"hidden","aria-label":"Upload file"}),a.jsx(tW.u,{isOpen:ey,onClose:ek,title:d("session.confirmEnd",{tool:$.charAt(0).toUpperCase()+$.slice(1)}),size:"sm",showCloseButton:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-700",children:d("session.endWarning")}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:ek,className:"px-4 py-2 text-sm font-medium rounded-md bg-gray-200 hover:bg-gray-300 text-gray-700",children:b("cancel")}),a.jsx("button",{type:"button",onClick:eN,className:"px-4 py-2 text-sm font-medium rounded-md bg-red-600 hover:bg-red-700 text-white",children:b("end")})]})]})}),a.jsx(tl.Ix,{toasts:eM,onClose:eR})]})}):a.jsx(g,{componentName:"WorktreeDetailRefactored",children:(0,a.jsxs)("div",{className:"h-full flex flex-col relative",children:[a.jsx(tK,{worktreeName:eV,repositoryName:y?.repositoryName??"Unknown",description:y?.description,status:eU,gitStatus:y?.gitStatus,onBackClick:es,onInfoClick:eo,onMenuClick:n}),(0,a.jsxs)("div",{className:"px-4 py-2 bg-white border-b border-gray-200 flex items-center justify-between",children:[a.jsx("nav",{className:"flex gap-4","aria-label":"CLI Tool Selection",children:["claude","codex"].map(e=>{let t=(0,tY.He)(y?.sessionStatusByCli?.[e]),r=el.F4[t];return(0,a.jsxs)("button",{onClick:()=>z(e),className:`pb-2 px-2 border-b-2 font-medium text-sm transition-colors flex items-center gap-1.5 ${$===e?"border-blue-600 text-blue-600":"border-transparent text-gray-600 hover:text-gray-900"}`,"aria-current":$===e?"page":void 0,children:["spinner"===r.type?a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 border-2 border-t-transparent animate-spin ${r.className}`,title:r.label,"aria-label":`${e} status: ${r.label}`}):a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${r.className}`,title:r.label,"aria-label":`${e} status: ${r.label}`}),e.charAt(0).toUpperCase()+e.slice(1)]},e)})}),y?.sessionStatusByCli?.[$]?.isRunning&&(0,a.jsxs)("button",{onClick:ej,className:"flex items-center gap-1 px-2 py-1 text-xs font-medium text-red-600 hover:text-red-800 hover:bg-red-50 rounded transition-colors","aria-label":`End ${$} session`,children:[a.jsx("span",{"aria-hidden":"true",children:"✕"}),"End Session"]})]}),y?.gitStatus&&a.jsx(tV,{isBranchMismatch:y.gitStatus.isBranchMismatch,currentBranch:y.gitStatus.currentBranch,initialBranch:y.gitStatus.initialBranch}),a.jsx("div",{className:"flex-1 min-h-0",children:a.jsx(M,{leftPane:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(eB,{activeTab:eG,onTabChange:ea}),(0,a.jsxs)("div",{className:"flex-1 min-h-0 overflow-hidden",children:["history"===eG&&a.jsx(X,{messages:o.messages,worktreeId:e,onFilePathClick:J,className:"h-full",showToast:eA}),"files"===eG&&a.jsx(g,{componentName:"FileTreeView",children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(eI,{query:H.query,mode:H.mode,isSearching:H.isSearching,error:H.error,onQueryChange:H.setQuery,onModeChange:H.setMode,onClear:H.clearSearch}),a.jsx(eL,{worktreeId:e,onFileSelect:Q,onNewFile:eC,onNewDirectory:eS,onRename:eT,onDelete:eE,onUpload:eP,refreshTrigger:B,searchQuery:H.query,searchMode:H.mode,searchResults:H.results?.results,className:"flex-1 min-h-0"})]})}),"memo"===eG&&a.jsx(g,{componentName:"MemoPane",children:a.jsx(tA,{worktreeId:e,className:"h-full"})})]})]}),rightPane:a.jsx(P,{output:o.terminal.output,isActive:o.terminal.isActive,isThinking:o.terminal.isThinking,autoScroll:o.terminal.autoScroll,onScrollChange:ex}),initialLeftWidth:40,minLeftWidth:20,maxLeftWidth:60})}),a.jsx("div",{className:"flex-shrink-0 border-t border-gray-200 p-4 bg-gray-50",children:a.jsx(ew.R,{worktreeId:e,onMessageSent:eg,cliToolId:$,isSessionRunning:o.terminal.isActive})}),a.jsx(tG,{enabled:D,expiresAt:I,onToggle:eb,lastAutoResponse:eF,cliToolName:$}),o.prompt.visible&&!D&&a.jsx("div",{className:"fixed bottom-20 left-1/2 transform -translate-x-1/2 z-50 w-full max-w-2xl px-4",children:a.jsx(en,{promptData:o.prompt.data,messageId:o.prompt.messageId,visible:o.prompt.visible,answering:o.prompt.answering,onRespond:eu,onDismiss:em})}),a.jsx(tX,{worktreeId:e,worktree:y,isOpen:C,onClose:ec,onWorktreeUpdate:w}),a.jsx(eq,{isOpen:null!==T,onClose:ee,worktreeId:e,filePath:T??""}),A&&a.jsx(tW.u,{isOpen:!0,onClose:et,title:A.split("/").pop()||"Editor",size:"full",disableClose:_,children:a.jsx("div",{className:"h-[80vh]",children:a.jsx(tj,{worktreeId:e,filePath:A,onClose:et,onSave:er,onMaximizedChange:L})})}),a.jsx("input",{ref:e_,type:"file",accept:tC.join(","),onChange:eO,className:"hidden","aria-label":"Upload file"}),a.jsx(tW.u,{isOpen:ey,onClose:ek,title:d("session.confirmEnd",{tool:$.charAt(0).toUpperCase()+$.slice(1)}),size:"sm",showCloseButton:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-700",children:d("session.endWarning")}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:ek,className:"px-4 py-2 text-sm font-medium rounded-md bg-gray-200 hover:bg-gray-300 text-gray-700",children:b("cancel")}),a.jsx("button",{type:"button",onClick:eN,className:"px-4 py-2 text-sm font-medium rounded-md bg-red-600 hover:bg-red-700 text-white",children:b("end")})]})]})}),a.jsx(tl.Ix,{toasts:eM,onClose:eR})]})})});function t4(){let e=(0,s.useParams)().id;return a.jsx(n.Vw,{children:a.jsx(t2,{worktreeId:e})})}},22570:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});let a=(0,r(68570).createProxy)(String.raw`/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page.tsx#default`)},4803:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8948,1287,6621,8705,7458,5781,3860,4704],()=>r(80205));module.exports=a})();
9
+ `,children:[s?a.jsx("span",{"data-testid":"loading-indicator",className:"w-5 h-5 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin"}):a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),a.jsx("span",{className:"text-sm font-medium",children:"Add Memo"})]}),(0,a.jsxs)("span",{className:"text-xs text-gray-500",children:[Math.max(0,t-e)," remaining"]})]})}),tA=(0,l.memo)(function({worktreeId:e,className:t=""}){let[r,s]=(0,l.useState)([]),[n,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(!1),[d,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(null),h=(0,l.useCallback)(async()=>{i(!0),u(null);try{let t=await tS.nE.getAll(e);s(t.sort((e,t)=>e.position-t.position))}catch(e){u((0,tS.zG)(e))}finally{i(!1)}},[e]);(0,l.useEffect)(()=>{h()},[h]);let x=(0,l.useCallback)(async()=>{c(!0),p(null);try{let t=await tS.nE.create(e,{title:"Memo",content:""});s(e=>[...e,t])}catch(e){p((0,tS.zG)(e))}finally{c(!1)}},[e]),f=(0,l.useCallback)(async(t,r)=>{await tS.nE.update(e,t,r),s(e=>e.map(e=>e.id===t?{...e,...r}:e))},[e]),g=(0,l.useCallback)(async t=>{try{await tS.nE.delete(e,t),s(e=>e.filter(e=>e.id!==t))}catch(e){console.error("Failed to delete memo:",e)}},[e]),b=(0,l.useCallback)(()=>{h()},[h]);return n?a.jsx("div",{"data-testid":"memo-pane",className:`flex flex-col items-center justify-center h-full p-4 ${t}`,children:(0,a.jsxs)("div",{"data-testid":"memo-loading",className:"flex flex-col items-center gap-3",children:[a.jsx("div",{className:"w-8 h-8 border-4 border-gray-200 border-t-blue-500 rounded-full animate-spin"}),a.jsx("span",{className:"text-sm text-gray-500",children:"Loading memos..."})]})}):d?a.jsx("div",{"data-testid":"memo-pane",className:`flex flex-col items-center justify-center h-full p-4 ${t}`,children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[a.jsx("svg",{className:"w-12 h-12 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a.jsx("span",{className:"text-sm text-red-600",children:d}),a.jsx("button",{type:"button",onClick:b,"aria-label":"Retry",className:"px-4 py-2 text-sm font-medium text-white bg-blue-500 rounded-lg hover:bg-blue-600 transition-colors",children:"Retry"})]})}):(0,a.jsxs)("div",{"data-testid":"memo-pane",className:`flex flex-col gap-4 p-4 overflow-y-auto ${t}`,children:[0===r.length&&!m&&(0,a.jsxs)("div",{className:"text-center py-8 text-gray-500",children:[a.jsx("p",{children:"No memos yet."}),a.jsx("p",{className:"text-sm",children:"Click the button below to add one."})]}),r.map(e=>a.jsx(tE,{memo:e,onUpdate:f,onDelete:g},e.id)),m&&a.jsx("div",{className:"text-center py-2 text-sm text-red-500",children:m}),a.jsx(tM,{currentCount:r.length,maxCount:5,onAdd:x,isLoading:o,className:"mt-2"})]})});var tR=r(11867);function t_({hasUpdate:e,latestVersion:t,releaseUrl:r,updateCommand:s,installType:n}){let l=(0,f.T)("worktree");return e?(0,a.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-2",role:"status","aria-label":l("update.available"),"data-testid":"update-notification-banner",children:[a.jsx("p",{className:"text-sm font-medium text-blue-800 mb-1",children:l("update.available")}),t&&a.jsx("p",{className:"text-sm text-blue-700 mb-2",children:l("update.latestVersion",{version:t})}),s&&"global"===n&&(0,a.jsxs)("div",{className:"mb-2",children:[a.jsx("p",{className:"text-xs text-blue-600 mb-1",children:l("update.updateCommand")}),a.jsx("code",{className:"block bg-blue-100 rounded px-2 py-1 text-xs text-blue-900 font-mono",children:s})]}),r&&(0,a.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm text-blue-600 hover:text-blue-800 underline",children:[l("update.viewRelease"),a.jsx("span",{className:"ml-1","aria-hidden":"true",children:"→"})]}),a.jsx("p",{className:"text-xs text-blue-500 mt-2",children:l("update.dataPreserved")})]}):null}function tL({version:e,className:t}){let r=(0,f.T)("worktree"),{data:s,loading:n}=function(){let[e,t]=(0,l.useState)(null),[r,a]=(0,l.useState)(!0),[s,n]=(0,l.useState)(null);return{data:e,loading:r,error:s}}(),i=(0,l.useMemo)(()=>s&&s.hasUpdate?{hasUpdate:s.hasUpdate,latestVersion:s.latestVersion,releaseUrl:s.releaseUrl,updateCommand:s.updateCommand,installType:s.installType}:null,[s]);return(0,a.jsxs)("div",{className:t,"data-testid":"version-section",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:r("update.version")}),a.jsx("p",{className:"text-sm text-gray-700",children:e}),n&&a.jsx("p",{className:"text-xs text-gray-400 mt-1","data-testid":"version-loading",children:"..."}),i&&a.jsx(t_,{...i})]})}let tD="https://github.com/Kewton/CommandMate",tP=`${tD}/issues`,tO=`${tD}/issues/new`,tI=`${tO}?template=bug_report.md`,tF=`${tO}?template=feature_request.md`,t$=`${tO}?template=question.md`;function tz({className:e}){let t=(0,f.T)("worktree"),r=[{href:tI,label:t("feedback.bugReport")},{href:tF,label:t("feedback.featureRequest")},{href:t$,label:t("feedback.question")},{href:tP,label:t("feedback.viewIssues")}];return(0,a.jsxs)("div",{className:e,"data-testid":"feedback-section",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-2",children:t("feedback.title")}),a.jsx("div",{className:"flex flex-col gap-1",children:r.map(({href:e,label:t})=>(0,a.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center text-sm text-blue-600 hover:text-blue-800 underline",children:[t,a.jsx("span",{className:"ml-1","aria-hidden":"true",children:"→"})]},e))})]})}var tW=r(28676);let tB=[36e5,108e5,288e5],tU={36e5:"autoYes.durations.1h",108e5:"autoYes.durations.3h",288e5:"autoYes.durations.8h"};function tH({isOpen:e,onConfirm:t,onCancel:r,cliToolName:s}){let n=(0,f.T)("autoYes"),i=(0,f.T)("common"),[o,c]=(0,l.useState)(36e5),d=e=>n(tU[e].replace("autoYes.",""));return a.jsx(tW.u,{isOpen:e,onClose:r,title:s?n("enableTitleWithTool",{toolName:s}):n("enableTitle"),size:"sm",showCloseButton:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"text-sm text-gray-700",children:[a.jsx("p",{className:"font-medium mb-2",children:n("featureDescription")}),(0,a.jsxs)("ul",{className:"list-disc list-inside space-y-1",children:[a.jsx("li",{children:n("yesNoAutoResponse")}),a.jsx("li",{children:n("multipleChoiceAutoSelect")})]}),a.jsx("p",{className:"mt-1",children:n("autoDisableAfter",{duration:d(o)})}),s&&a.jsx("p",{className:"mt-2 text-gray-500",children:n("appliesOnlyToCurrent",{toolName:s})})]}),(0,a.jsxs)("div",{className:"text-sm text-gray-700",children:[a.jsx("p",{className:"font-medium mb-2",children:n("duration")}),a.jsx("div",{className:"flex gap-2",children:tB.map(e=>a.jsx("button",{type:"button",onClick:()=>c(e),className:`flex-1 py-2 px-3 text-sm font-medium rounded-md border-2 transition-colors ${o===e?"border-blue-600 bg-blue-50 text-blue-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"}`,style:{minHeight:"44px"},children:d(e)},e))})]}),(0,a.jsxs)("div",{className:"text-sm text-gray-700",children:[a.jsx("p",{className:"font-medium mb-2",children:n("aboutRisks")}),a.jsx("p",{children:n("riskWarning")})]}),a.jsx("div",{className:"bg-yellow-50 border-l-4 border-yellow-400 p-3",children:(0,a.jsxs)("p",{className:"text-sm text-yellow-800",children:[a.jsx("span",{className:"font-medium",children:n("disclaimer")}),n("disclaimerText")]})}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm font-medium rounded-md bg-gray-200 hover:bg-gray-300 text-gray-700",children:i("cancel")}),a.jsx("button",{type:"button",onClick:()=>t(o),className:"px-4 py-2 text-sm font-medium rounded-md bg-yellow-600 hover:bg-yellow-700 text-white",children:n("agreeAndEnable")})]})]})})}function tq(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}let tG=(0,l.memo)(function({enabled:e,expiresAt:t,onToggle:r,lastAutoResponse:s,cliToolName:n,inline:i=!1}){let[o,c]=(0,l.useState)(""),[d,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(!1),[h,x]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!e||!t){c("");return}let r=()=>{c(function(e){let t=Math.max(0,e-Date.now()),r=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4),s=Math.floor(t%6e4/1e3);return r>0?`${r}:${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`:`${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}(t))};r();let a=setInterval(r,1e3);return()=>clearInterval(a)},[e,t]),(0,l.useEffect)(()=>{if(!s)return;u(`Auto responded: "${s}"`);let e=setTimeout(()=>u(null),2e3);return()=>clearTimeout(e)},[s]);let f=(0,l.useCallback)(()=>{e?(p(!0),r(!1).finally(()=>p(!1))):x(!0)},[e,r]),g=(0,l.useCallback)(e=>{x(!1),p(!0),r(!0,e).finally(()=>p(!1))},[r]),b=(0,l.useCallback)(()=>{x(!1)},[]);return(0,a.jsxs)("div",{className:i?"flex items-center gap-2":"flex items-center gap-3 px-4 py-2 bg-gray-50 border-b border-gray-200",children:[a.jsx("button",{type:"button",role:"switch","aria-checked":e,"aria-label":"Auto Yes mode",disabled:m,onClick:f,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ${e?"bg-blue-600":"bg-gray-300"} ${m?"opacity-50":""}`,children:a.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${e?"translate-x-6":"translate-x-1"}`})}),a.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Auto Yes"}),e&&n&&(0,a.jsxs)("span",{className:"text-xs text-blue-600 font-medium","aria-label":"Auto Yes target",children:["(",tq(n),")"]}),e&&o&&a.jsx("span",{className:"text-sm text-gray-500","aria-label":"Time remaining",children:o}),d&&a.jsx("span",{className:"text-sm text-green-600 animate-pulse",children:d}),a.jsx(tH,{isOpen:h,onConfirm:g,onCancel:b,cliToolName:tq(n)})]})}),tV=(0,l.memo)(function({isBranchMismatch:e,currentBranch:t,initialBranch:r}){let[s,n]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{n(!1)},[t]),!e||s||null===r)?null:(0,a.jsxs)("div",{"data-testid":"branch-mismatch-alert",role:"alert",className:"flex items-center gap-3 px-4 py-2 bg-amber-50 border border-amber-200 text-amber-800 rounded-lg",children:[a.jsx(e7,{className:"w-5 h-5 text-amber-500 flex-shrink-0"}),a.jsx("div",{className:"flex-1 min-w-0",children:(0,a.jsxs)("span",{className:"text-sm",children:["Branch changed from"," ",a.jsx("span",{className:"font-medium",children:r})," ","to"," ",a.jsx("span",{className:"font-medium",children:t})]})}),a.jsx("button",{type:"button",onClick:()=>n(!0),className:"p-1 rounded hover:bg-amber-100 transition-colors","aria-label":"Dismiss alert",children:a.jsx(tn.Z,{className:"w-4 h-4"})})]})});var tY=r(18421);let tZ="v0.2.6",tK=(0,l.memo)(function({worktreeName:e,repositoryName:t,description:r,status:s,gitStatus:n,onBackClick:l,onInfoClick:i,onMenuClick:o}){let c=el.Ie[s],d=r?(0,ei.aS)(r,50):null;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 bg-white border-b border-gray-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",onClick:o,className:"p-2 -ml-2 rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-100 transition-colors","aria-label":"Toggle sidebar",children:a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),a.jsx("div",{className:"w-px h-6 bg-gray-300","aria-hidden":"true"}),(0,a.jsxs)("button",{type:"button",onClick:l,className:"flex items-center gap-1 text-gray-600 hover:text-gray-900 transition-colors","aria-label":"Go back to worktree list",children:[a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),a.jsx("span",{className:"text-sm font-medium",children:"Back"})]}),a.jsx("div",{className:"w-px h-6 bg-gray-300","aria-hidden":"true"}),"spinner"===c.type?a.jsx("span",{"data-testid":"desktop-status-indicator",title:c.label,"aria-label":c.label,className:`w-3 h-3 rounded-full flex-shrink-0 border-2 border-t-transparent animate-spin ${c.className}`}):a.jsx("span",{"data-testid":"desktop-status-indicator",title:c.label,"aria-label":c.label,className:`w-3 h-3 rounded-full flex-shrink-0 ${c.className}`}),(0,a.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[a.jsx("h1",{className:"text-lg font-semibold text-gray-900 truncate max-w-[200px] leading-tight",children:e}),d&&a.jsx("span",{className:"text-sm text-gray-500 truncate max-w-md",title:r,children:d})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[a.jsx("span",{className:"truncate max-w-[200px]",children:t}),n&&"(unknown)"!==n.currentBranch&&(0,a.jsxs)(a.Fragment,{children:[a.jsx("span",{className:"text-gray-300",children:"/"}),a.jsx("span",{className:"truncate max-w-[150px] font-mono",title:n.currentBranch,"data-testid":"desktop-branch-name",children:(0,ei.aS)(n.currentBranch,30)}),n.isDirty&&a.jsx("span",{className:"text-amber-500",title:"Uncommitted changes",children:"*"})]})]})]})]}),(0,a.jsxs)("button",{type:"button",onClick:i,className:"flex items-center gap-1.5 px-3 py-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"View worktree information",children:[a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a.jsx("span",{className:"text-sm font-medium",children:"Info"})]})]})}),tX=(0,l.memo)(function({worktreeId:e,worktree:t,isOpen:r,onClose:s,onWorktreeUpdate:n}){let[i,o]=(0,l.useState)(!1),[c,d]=(0,l.useState)(""),[u,m]=(0,l.useState)(!1),[p,h]=(0,l.useState)(!1),x=(0,l.useRef)(r);(0,l.useEffect)(()=>{let e=r&&!x.current;x.current=r,e&&t&&(d(t.description||""),o(!1))},[t,r]);let f=(0,l.useCallback)(async()=>{if(t){m(!0);try{let e=await tS.Iv.updateDescription(t.id,c);n(e),o(!1)}catch(e){console.error("Failed to save description:",e)}finally{m(!1)}}},[t,c,n]),g=(0,l.useCallback)(()=>{d(t?.description||""),o(!1)},[t]);return t?a.jsx(tW.u,{isOpen:r,onClose:s,title:"Worktree Information",size:"md",children:(0,a.jsxs)("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto",children:[(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Worktree"}),a.jsx("p",{className:"text-lg font-semibold text-gray-900",children:t.name})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Repository"}),a.jsx("p",{className:"text-base text-gray-900",children:t.repositoryName}),a.jsx("p",{className:"text-xs text-gray-500 mt-1 break-all",children:t.repositoryPath})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Path"}),a.jsx("p",{className:"text-sm text-gray-700 break-all font-mono",children:t.path})]}),t.status&&(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Status"}),a.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${"done"===t.status?"bg-green-100 text-green-800":"doing"===t.status?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:t.status.toUpperCase()})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Description"}),!i&&a.jsx("button",{type:"button",onClick:()=>o(!0),className:"text-sm text-blue-600 hover:text-blue-800",children:"Edit"})]}),i?(0,a.jsxs)("div",{className:"space-y-3",children:[a.jsx("textarea",{value:c,onChange:e=>d(e.target.value),placeholder:"Add notes about this branch...",className:"w-full min-h-[150px] p-3 border border-gray-300 rounded-lg resize-y focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",autoFocus:!0}),(0,a.jsxs)("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",onClick:f,disabled:u,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 text-sm font-medium",children:u?"Saving...":"Save"}),a.jsx("button",{type:"button",onClick:g,disabled:u,className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 disabled:opacity-50 text-sm font-medium",children:"Cancel"})]})]}):a.jsx("div",{className:"min-h-[50px]",children:t.description?a.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:t.description}):a.jsx("p",{className:"text-sm text-gray-400 italic",children:"No description added yet"})})]}),t.link&&(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Link"}),a.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline break-all",children:t.link})]}),t.updatedAt&&(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Last Updated"}),a.jsx("p",{className:"text-sm text-gray-700",children:new Date(t.updatedAt).toLocaleString()})]}),a.jsx(tL,{version:tZ,className:"bg-gray-50 rounded-lg p-4"}),a.jsx(tz,{className:"bg-gray-50 rounded-lg p-4"}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Logs"}),a.jsx("button",{type:"button",onClick:()=>h(!p),className:"text-sm text-blue-600 hover:text-blue-800",children:p?"Hide":"Show"})]}),p&&a.jsx(tR.n,{worktreeId:e})]})]})}):null}),tJ=(0,l.memo)(function(){return a.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",role:"status","aria-live":"polite",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-4 border-gray-300 border-t-blue-600","aria-hidden":"true"}),a.jsx("p",{className:"text-gray-600",children:"Loading worktree..."})]})})}),tQ=(0,l.memo)(function({message:e,onRetry:t}){return a.jsx("div",{className:"flex items-center justify-center h-full min-h-[200px]",role:"alert","aria-live":"assertive",children:(0,a.jsxs)("div",{className:"text-center p-6 bg-red-50 rounded-lg border border-red-200 max-w-md",children:[a.jsx("svg",{className:"mx-auto h-12 w-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),a.jsx("p",{className:"text-red-600 font-medium",children:"Error loading worktree"}),a.jsx("p",{className:"text-red-500 text-sm mt-2",children:e}),t&&a.jsx("button",{type:"button",onClick:t,className:"mt-4 px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2",children:"Retry"})]})})}),t0=(0,l.memo)(function({worktreeId:e,worktree:t,onWorktreeUpdate:r}){let[s,n]=(0,l.useState)(!1),[i,o]=(0,l.useState)(""),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(!1),p=(0,l.useRef)(t?.id);(0,l.useEffect)(()=>{let e=t?.id!==p.current;p.current=t?.id,e&&t&&!s&&o(t.description||"")},[t,s]);let h=(0,l.useCallback)(async()=>{if(t){d(!0);try{let e=await tS.Iv.updateDescription(t.id,i);r(e),n(!1)}catch(e){console.error("Failed to save description:",e)}finally{d(!1)}}},[t,i,r]),x=(0,l.useCallback)(()=>{o(t?.description||""),n(!1)},[t]);return t?(0,a.jsxs)("div",{className:"p-4 space-y-4 overflow-y-auto h-full",children:[(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Worktree"}),a.jsx("p",{className:"text-lg font-semibold text-gray-900",children:t.name})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Repository"}),a.jsx("p",{className:"text-base text-gray-900",children:t.repositoryName}),a.jsx("p",{className:"text-xs text-gray-500 mt-1 break-all",children:t.repositoryPath})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Path"}),a.jsx("p",{className:"text-sm text-gray-700 break-all font-mono",children:t.path})]}),t.status&&(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Status"}),a.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${"done"===t.status?"bg-green-100 text-green-800":"doing"===t.status?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:t.status.toUpperCase()})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Description"}),!s&&a.jsx("button",{type:"button",onClick:()=>n(!0),className:"text-sm text-blue-600 hover:text-blue-800",children:"Edit"})]}),s?(0,a.jsxs)("div",{className:"space-y-3",children:[a.jsx("textarea",{value:i,onChange:e=>o(e.target.value),placeholder:"Add notes about this branch...",className:"w-full min-h-[150px] p-3 border border-gray-300 rounded-lg resize-y focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",autoFocus:!0}),(0,a.jsxs)("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",onClick:h,disabled:c,className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 text-sm font-medium",children:c?"Saving...":"Save"}),a.jsx("button",{type:"button",onClick:x,disabled:c,className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 disabled:opacity-50 text-sm font-medium",children:"Cancel"})]})]}):a.jsx("div",{className:"min-h-[50px]",children:t.description?a.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-wrap",children:t.description}):a.jsx("p",{className:"text-sm text-gray-400 italic",children:"No description added yet"})})]}),t.link&&(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Link"}),a.jsx("a",{href:t.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline break-all",children:t.link})]}),t.updatedAt&&(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500 mb-1",children:"Last Updated"}),a.jsx("p",{className:"text-sm text-gray-700",children:new Date(t.updatedAt).toLocaleString()})]}),a.jsx(tL,{version:tZ,className:"bg-white rounded-lg border border-gray-200 p-4"}),a.jsx(tz,{className:"bg-white rounded-lg border border-gray-200 p-4"}),(0,a.jsxs)("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h2",{className:"text-sm font-medium text-gray-500",children:"Logs"}),a.jsx("button",{type:"button",onClick:()=>m(!u),className:"text-sm text-blue-600 hover:text-blue-800",children:u?"Hide":"Show"})]}),u&&a.jsx(tR.n,{worktreeId:e})]})]}):a.jsx("div",{className:"text-gray-500 text-center py-8",children:"Loading worktree info..."})}),t1=(0,l.memo)(function({activeTab:e,worktreeId:t,worktree:r,messages:s,terminalOutput:n,isTerminalActive:l,isThinking:i,onFilePathClick:o,onFileSelect:c,onWorktreeUpdate:d,onNewFile:u,onNewDirectory:m,onRename:p,onDelete:h,onUpload:x,refreshTrigger:f,fileSearch:b,showToast:y}){switch(e){case"terminal":return a.jsx(g,{componentName:"TerminalDisplay",children:a.jsx(P,{output:n,isActive:l,isThinking:i,className:"h-full"})});case"history":return a.jsx(g,{componentName:"HistoryPane",children:a.jsx(X,{messages:s,worktreeId:t,onFilePathClick:o,className:"h-full",showToast:y})});case"files":return a.jsx(g,{componentName:"FileTreeView",children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(eI,{query:b.query,mode:b.mode,isSearching:b.isSearching,error:b.error,onQueryChange:b.setQuery,onModeChange:b.setMode,onClear:b.clearSearch}),a.jsx(eL,{worktreeId:t,onFileSelect:c,onNewFile:u,onNewDirectory:m,onRename:p,onDelete:h,onUpload:x,refreshTrigger:f,searchQuery:b.query,searchMode:b.mode,searchResults:b.results?.results,className:"flex-1 min-h-0"})]})});case"memo":return a.jsx(g,{componentName:"MemoPane",children:a.jsx(tA,{worktreeId:t,className:"h-full"})});case"info":return a.jsx(t0,{worktreeId:t,worktree:r,onWorktreeUpdate:d});default:return null}}),t2=(0,l.memo)(function({worktreeId:e}){let t=(0,s.useRouter)(),r=(0,h.d)(),{toggle:n,openMobileDrawer:i}=(0,x.Sz)(),{state:o,actions:c}=function(){let[e,t]=(0,l.useReducer)(p,void 0,m),r=(0,l.useMemo)(()=>({setPhase:e=>t({type:"SET_PHASE",phase:e}),setTerminalOutput:(e,r)=>t({type:"SET_TERMINAL_OUTPUT",output:e,realtimeSnippet:r}),setTerminalActive:e=>t({type:"SET_TERMINAL_ACTIVE",isActive:e}),setTerminalThinking:e=>t({type:"SET_TERMINAL_THINKING",isThinking:e}),showPrompt:(e,r)=>t({type:"SHOW_PROMPT",data:e,messageId:r}),clearPrompt:()=>t({type:"CLEAR_PROMPT"}),setPromptAnswering:e=>t({type:"SET_PROMPT_ANSWERING",answering:e}),setError:e=>t({type:"SET_ERROR",error:e}),clearError:()=>t({type:"CLEAR_ERROR"}),setMessages:e=>t({type:"SET_MESSAGES",messages:e}),addMessage:e=>t({type:"ADD_MESSAGE",message:e}),updateMessage:(e,r)=>t({type:"UPDATE_MESSAGE",id:e,updates:r}),clearMessages:()=>t({type:"CLEAR_MESSAGES"}),startWaitingForResponse:e=>t({type:"START_WAITING_FOR_RESPONSE",cliToolId:e}),responseReceived:e=>t({type:"RESPONSE_RECEIVED",message:e}),sessionEnded:()=>t({type:"SESSION_ENDED"}),setAutoScroll:e=>t({type:"SET_AUTO_SCROLL",enabled:e}),setMobileActivePane:e=>t({type:"SET_MOBILE_ACTIVE_PANE",pane:e}),setLeftPaneTab:e=>t({type:"SET_LEFT_PANE_TAB",tab:e}),setLayoutMode:e=>t({type:"SET_LAYOUT_MODE",mode:e}),setSplitRatio:e=>t({type:"SET_SPLIT_RATIO",ratio:e}),setWsConnected:e=>t({type:"SET_WS_CONNECTED",connected:e})}),[]);return{state:e,dispatch:t,actions:r}}(),d=(0,f.T)("worktree"),u=(0,f.T)("error"),b=(0,f.T)("common"),[y,w]=(0,l.useState)(null),[v,j]=(0,l.useState)(!0),[N,k]=(0,l.useState)(null),[C,S]=(0,l.useState)(!1),[T,E]=(0,l.useState)(null),[A,R]=(0,l.useState)(null),[_,L]=(0,l.useState)(!1),[D,O]=(0,l.useState)(!1),[I,F]=(0,l.useState)(null),[$,z]=(0,l.useState)("claude"),W=(0,l.useRef)($);W.current=$;let[B,U]=(0,l.useState)(0),H=function(e){let{worktreeId:t,initialMode:r="name",debounceMs:a=300}=e,[s,n]=(0,l.useState)(""),[i,o]=(0,l.useState)(""),[c,d]=(0,l.useState)(r),[u,m]=(0,l.useState)(!1),[p,h]=(0,l.useState)(null),[x,f]=(0,l.useState)(null),g=(0,l.useRef)(null),b=(0,l.useMemo)(()=>(0,ei.Ds)(e=>{o(e)},a),[a]),y=(0,l.useCallback)(e=>{n(e),b(e),f(null)},[b]),w=(0,l.useCallback)(()=>{n(""),o(""),h(null),f(null),m(!1),g.current&&(g.current.abort(),g.current=null)},[]),v=(0,l.useCallback)(e=>{if(!i.trim())return e;let t=i.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t))},[i]),j=(0,l.useCallback)(()=>p&&0!==p.results.length?(0,ei.Ps)(p.results.map(e=>e.filePath)):new Set,[p]);return{query:s,mode:c,isSearching:u,results:p,error:x,setQuery:y,setMode:d,clearSearch:w,filterByName:v,getMatchedPaths:j}}({worktreeId:e}),q=(0,l.useRef)(!1),G=(0,l.useRef)(e);(0,l.useEffect)(()=>{G.current!==e&&(c.clearMessages(),q.current=!1,c.setTerminalOutput("",""),G.current=e)},[e,c]);let V=(0,l.useCallback)(async()=>{try{let t=await fetch(`/api/worktrees/${e}`);if(!t.ok)throw Error(`Failed to fetch worktree: ${t.status}`);let r=await t.json();return w(r),r}catch(e){return k(e instanceof Error?e.message:"Unknown error"),null}},[e]),Y=(0,l.useCallback)(async()=>{try{let t=await fetch(`/api/worktrees/${e}/messages?cliTool=${W.current}`);if(!t.ok)throw Error(`Failed to fetch messages: ${t.status}`);let r=await t.json();c.setMessages(r.map(e=>({...e,timestamp:new Date(e.timestamp)})))}catch(e){console.error("[WorktreeDetailRefactored] Error fetching messages:",e)}},[e,c]),Z=(0,l.useCallback)(async()=>{try{let t=await fetch(`/api/worktrees/${e}/current-output?cliTool=${W.current}`);if(!t.ok)return;let r=await t.json(),a=r.fullOutput??r.realtimeSnippet??"";(a||r.isRunning)&&c.setTerminalOutput(a,r.realtimeSnippet??""),c.setTerminalActive(r.isRunning??!1),c.setTerminalThinking(r.thinking??!1),r.isPromptWaiting&&r.promptData?c.showPrompt(r.promptData,`prompt-${Date.now()}`):!r.isPromptWaiting&&o.prompt.visible&&c.clearPrompt(),r.autoYes&&(O(r.autoYes.enabled),F(r.autoYes.expiresAt))}catch(e){console.error("[WorktreeDetailRefactored] Error fetching current output:",e)}},[e,c,o.prompt.visible]),K=(0,l.useRef)($);(0,l.useEffect)(()=>{K.current!==$&&(K.current=$,c.clearMessages(),c.setTerminalOutput("",""),Y(),Z())},[$,c,Y,Z]);let J=(0,l.useCallback)(e=>{E(e)},[]),Q=(0,l.useCallback)(e=>{let t=e.split(".").pop()?.toLowerCase(),r=t?`.${t}`:"";tN.includes(r)?R(e):E(e)},[]),ee=(0,l.useCallback)(()=>{E(null)},[]),et=(0,l.useCallback)(()=>{R(null)},[]),er=(0,l.useCallback)(e=>{console.log("[WorktreeDetailRefactored] File saved:",e)},[]),ea=(0,l.useCallback)(e=>{c.setLeftPaneTab(e)},[c]),es=(0,l.useCallback)(()=>{t.push("/")},[t]),eo=(0,l.useCallback)(()=>{S(!0)},[]),ec=(0,l.useCallback)(()=>{S(!1)},[]),eu=(0,l.useCallback)(async t=>{c.setPromptAnswering(!0);try{let r=await fetch(`/api/worktrees/${e}/prompt-response`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answer:t,cliTool:$})});if(!r.ok)throw Error(`Failed to send prompt response: ${r.status}`);c.clearPrompt(),await Z()}catch(e){console.error("[WorktreeDetailRefactored] Error sending prompt response:",e)}finally{c.setPromptAnswering(!1)}},[e,c,Z,$]),em=(0,l.useCallback)(()=>{c.clearPrompt()},[c]),ep=(0,l.useCallback)(e=>{c.setMobileActivePane(e)},[c]),ex=(0,l.useCallback)(e=>{c.setAutoScroll(e)},[c]),eg=(0,l.useCallback)(()=>{Y(),Z()},[Y,Z]),eb=(0,l.useCallback)(async(t,r)=>{try{let a=await fetch(`/api/worktrees/${e}/auto-yes`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:t,cliToolId:$,duration:r})});if(a.ok){let e=await a.json();O(e.enabled),F(e.expiresAt)}}catch(e){console.error("[WorktreeDetailRefactored] Error toggling auto-yes:",e)}},[e,$]),[ey,ev]=(0,l.useState)(!1),ej=(0,l.useCallback)(()=>{ev(!0)},[]),eN=(0,l.useCallback)(async()=>{ev(!1);try{if(!(await fetch(`/api/worktrees/${e}/kill-session?cliTool=${$}`,{method:"POST"})).ok)return;c.clearMessages(),c.setTerminalOutput("",""),c.setTerminalActive(!1),c.setTerminalThinking(!1),c.clearPrompt(),await V()}catch(e){console.error("[WorktreeDetailRefactored] Error killing session:",e)}},[e,$,c,V]),ek=(0,l.useCallback)(()=>{ev(!1)},[]),eC=(0,l.useCallback)(async t=>{let r=window.prompt("Enter file name (e.g., document.md):");if(!r)return;let a=r.endsWith(".md")?r:`${r}.md`,s=t?`${t}/${a}`:a;try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(s)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"file",content:""})})).ok)throw Error("Failed to create file");U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to create file:",e),window.alert(u("fileOps.failedToCreateFile"))}},[e,u]),eS=(0,l.useCallback)(async t=>{let r=window.prompt("Enter directory name:");if(!r)return;let a=t?`${t}/${r}`:r;try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(a)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"directory"})})).ok)throw Error("Failed to create directory");U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to create directory:",e),window.alert(u("fileOps.failedToCreateDirectory"))}},[e,u]),eT=(0,l.useCallback)(async t=>{let r=t.split("/").pop()||"",a=window.prompt("Enter new name:",r);if(a&&a!==r)try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",newName:a})})).ok)throw Error("Failed to rename");U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to rename:",e),window.alert(u("fileOps.failedToRename"))}},[e,u]),eE=(0,l.useCallback)(async t=>{let r=t.split("/").pop()||t;if(window.confirm(b("confirmDelete",{name:r})))try{if(!(await fetch(`/api/worktrees/${e}/files/${encodeURIComponent(t)}?recursive=true`,{method:"DELETE"})).ok)throw Error("Failed to delete");(A===t||A?.startsWith(`${t}/`))&&R(null),U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to delete:",e),window.alert(u("fileOps.failedToDelete"))}},[e,A,b,u]),{toasts:eM,showToast:eA,removeToast:eR}=(0,tl.pm)(),e_=(0,l.useRef)(null),eD=(0,l.useRef)(""),eP=(0,l.useCallback)(e=>{eD.current=e,e_.current?.click()},[]),eO=(0,l.useCallback)(async t=>{let r=t.target.files?.[0];if(!r)return;t.target.value="";let a=eD.current,s=`.${r.name.split(".").pop()?.toLowerCase()}`;if(!function(e){if(!e)return!1;let t=e.toLowerCase();return tC.includes(t)}(s)){eA(`Unsupported file type: ${s}. Allowed: ${tC.join(", ")}`,"error");return}let n=function(e){let t=function(e){let t=e.toLowerCase();return tk.find(e=>e.extension===t)}(e);return t?.maxFileSize??5242880}(s);if(r.size>n){eA(`File too large. Maximum size: ${(n/1024/1024).toFixed(1)}MB`,"error");return}let l=new FormData;l.append("file",r);try{let t=await fetch(`/api/worktrees/${e}/upload/${encodeURIComponent(a||".")}`,{method:"POST",body:l});if(!t.ok){let e=await t.json().catch(()=>({})),r=e?.error?.message||"Failed to upload file";eA(r,"error");return}let r=await t.json();eA(`Uploaded: ${r.filename}`,"success"),U(e=>e+1)}catch(e){console.error("[WorktreeDetailRefactored] Failed to upload:",e),eA("Upload failed. Please try again.","error")}},[e,eA]),{lastAutoResponse:eF}=function({worktreeId:e,cliTool:t,isPromptWaiting:r,promptData:a,autoYesEnabled:s,lastServerResponseTimestamp:n}){(0,l.useRef)(null);let[i,o]=(0,l.useState)(null);return{lastAutoResponse:i}}({worktreeId:e,cliTool:$,isPromptWaiting:o.prompt.visible,promptData:o.prompt.data,autoYesEnabled:D}),e$=(0,l.useCallback)(async()=>{k(null),j(!0),await V()&&await Promise.all([Y(),Z()]),j(!1)},[V,Y,Z]),ez=(0,l.useRef)(0),eW=(0,l.useCallback)(()=>{if("visible"!==document.visibilityState)return;let e=Date.now();e-ez.current<5e3||(ez.current=e,e$())},[e$]);(0,l.useEffect)(()=>{if(q.current)return;let e=!0;return(async()=>{j(!0);let t=await V();e&&(t&&await Promise.all([Y(),Z()]),e&&(j(!1),q.current=!0))})(),()=>{e=!1}},[V,Y,Z]),(0,l.useEffect)(()=>(document.addEventListener("visibilitychange",eW),()=>{document.removeEventListener("visibilitychange",eW)}),[eW]),(0,l.useEffect)(()=>{if(v||N)return;let e=setInterval(async()=>{await Promise.all([Z(),V(),Y()])},o.terminal.isActive?2e3:5e3);return()=>clearInterval(e)},[v,N,Z,V,Y,o.terminal.isActive]),(0,l.useEffect)(()=>{c.setLayoutMode(r?"tabs":"split")},[r,c]);let eU=(0,l.useMemo)(()=>(function(e,t,r="claude"){if(t)return"error";if(!e)return"idle";let a=e.sessionStatusByCli?.[r];if(a){if(a.isWaitingForResponse)return"waiting";if(a.isProcessing)return"running";if(a.isRunning)return"ready"}if("claude"===r){if(e.isWaitingForResponse)return"waiting";if(e.isProcessing)return"running";if(e.isSessionRunning)return"ready"}return"idle"})(y,null!==o.error.type,$),[y,o.error.type,$]),eH=(0,l.useMemo)(()=>o.layout.mobileActivePane,[o.layout.mobileActivePane]),eG=(0,l.useMemo)(()=>o.layout.leftPaneTab,[o.layout.leftPaneTab]),eV=y?.name??"Unknown";return v?a.jsx(tJ,{}):N?a.jsx(tQ,{message:N,onRetry:e$}):r?a.jsx(g,{componentName:"WorktreeDetailRefactored",children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(ed,{worktreeName:eV,repositoryName:y?.repositoryName,status:eU,gitStatus:y?.gitStatus,onBackClick:es,onMenuClick:i}),y?.gitStatus&&y.gitStatus.isBranchMismatch&&a.jsx("div",{className:"fixed top-14 inset-x-0 z-35",children:a.jsx(tV,{isBranchMismatch:y.gitStatus.isBranchMismatch,currentBranch:y.gitStatus.currentBranch,initialBranch:y.gitStatus.initialBranch})}),(0,a.jsxs)("div",{className:"fixed top-14 inset-x-0 z-30 flex items-center justify-between px-3 py-1.5 bg-gray-50 border-b border-gray-200",children:[a.jsx(tG,{enabled:D,expiresAt:I,onToggle:eb,lastAutoResponse:eF,cliToolName:$,inline:!0}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[a.jsx("nav",{className:"flex gap-2","aria-label":"CLI Tool Selection",children:["claude","codex"].map(e=>{let t=(0,tY.He)(y?.sessionStatusByCli?.[e]),r=el.F4[t];return(0,a.jsxs)("button",{onClick:()=>z(e),className:`px-1.5 py-0.5 rounded font-medium text-xs transition-colors flex items-center gap-1 ${$===e?"bg-blue-100 text-blue-700":"text-gray-500 hover:text-gray-700"}`,"aria-current":$===e?"page":void 0,children:["spinner"===r.type?a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 border-2 border-t-transparent animate-spin ${r.className}`,title:r.label}):a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${r.className}`,title:r.label}),e.charAt(0).toUpperCase()+e.slice(1)]},e)})}),(0,a.jsxs)("button",{onClick:ej,disabled:!y?.sessionStatusByCli?.[$]?.isRunning,className:`flex items-center gap-0.5 px-1.5 py-0.5 text-xs font-medium rounded transition-colors ${y?.sessionStatusByCli?.[$]?.isRunning?"text-red-600 hover:bg-red-50":"invisible"}`,"aria-label":`End ${$} session`,children:[a.jsx("span",{"aria-hidden":"true",children:"✕"}),"End"]})]})]}),a.jsx("main",{className:"flex-1 pt-[6.25rem] pb-32 overflow-hidden",style:{paddingBottom:"calc(8rem + env(safe-area-inset-bottom, 0px))"},children:a.jsx(t1,{activeTab:eH,worktreeId:e,worktree:y,messages:o.messages,terminalOutput:o.terminal.output,isTerminalActive:o.terminal.isActive,isThinking:o.terminal.isThinking,onFilePathClick:J,onFileSelect:Q,onWorktreeUpdate:w,onNewFile:eC,onNewDirectory:eS,onRename:eT,onDelete:eE,onUpload:eP,refreshTrigger:B,fileSearch:H,showToast:eA})}),a.jsx("div",{className:"fixed left-0 right-0 border-t border-gray-200 bg-white p-2 z-30",style:{bottom:"calc(4rem + env(safe-area-inset-bottom, 0px))"},children:a.jsx(ew.R,{worktreeId:e,onMessageSent:eg,cliToolId:$,isSessionRunning:o.terminal.isActive})}),a.jsx(eh,{activeTab:eH,onTabChange:ep,hasNewOutput:!1,hasPrompt:o.prompt.visible}),!D&&a.jsx(ef,{promptData:o.prompt.data,visible:o.prompt.visible,answering:o.prompt.answering,onRespond:eu,onDismiss:em}),a.jsx(eq,{isOpen:null!==T,onClose:ee,worktreeId:e,filePath:T??""}),A&&a.jsx(tW.u,{isOpen:!0,onClose:et,title:A.split("/").pop()||"Editor",size:"full",disableClose:_,children:a.jsx("div",{className:"h-[80vh]",children:a.jsx(tj,{worktreeId:e,filePath:A,onClose:et,onSave:er,onMaximizedChange:L})})}),a.jsx("input",{ref:e_,type:"file",accept:tC.join(","),onChange:eO,className:"hidden","aria-label":"Upload file"}),a.jsx(tW.u,{isOpen:ey,onClose:ek,title:d("session.confirmEnd",{tool:$.charAt(0).toUpperCase()+$.slice(1)}),size:"sm",showCloseButton:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-700",children:d("session.endWarning")}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:ek,className:"px-4 py-2 text-sm font-medium rounded-md bg-gray-200 hover:bg-gray-300 text-gray-700",children:b("cancel")}),a.jsx("button",{type:"button",onClick:eN,className:"px-4 py-2 text-sm font-medium rounded-md bg-red-600 hover:bg-red-700 text-white",children:b("end")})]})]})}),a.jsx(tl.Ix,{toasts:eM,onClose:eR})]})}):a.jsx(g,{componentName:"WorktreeDetailRefactored",children:(0,a.jsxs)("div",{className:"h-full flex flex-col relative",children:[a.jsx(tK,{worktreeName:eV,repositoryName:y?.repositoryName??"Unknown",description:y?.description,status:eU,gitStatus:y?.gitStatus,onBackClick:es,onInfoClick:eo,onMenuClick:n}),(0,a.jsxs)("div",{className:"px-4 py-2 bg-white border-b border-gray-200 flex items-center justify-between",children:[a.jsx("nav",{className:"flex gap-4","aria-label":"CLI Tool Selection",children:["claude","codex"].map(e=>{let t=(0,tY.He)(y?.sessionStatusByCli?.[e]),r=el.F4[t];return(0,a.jsxs)("button",{onClick:()=>z(e),className:`pb-2 px-2 border-b-2 font-medium text-sm transition-colors flex items-center gap-1.5 ${$===e?"border-blue-600 text-blue-600":"border-transparent text-gray-600 hover:text-gray-900"}`,"aria-current":$===e?"page":void 0,children:["spinner"===r.type?a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 border-2 border-t-transparent animate-spin ${r.className}`,title:r.label,"aria-label":`${e} status: ${r.label}`}):a.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${r.className}`,title:r.label,"aria-label":`${e} status: ${r.label}`}),e.charAt(0).toUpperCase()+e.slice(1)]},e)})}),y?.sessionStatusByCli?.[$]?.isRunning&&(0,a.jsxs)("button",{onClick:ej,className:"flex items-center gap-1 px-2 py-1 text-xs font-medium text-red-600 hover:text-red-800 hover:bg-red-50 rounded transition-colors","aria-label":`End ${$} session`,children:[a.jsx("span",{"aria-hidden":"true",children:"✕"}),"End Session"]})]}),y?.gitStatus&&a.jsx(tV,{isBranchMismatch:y.gitStatus.isBranchMismatch,currentBranch:y.gitStatus.currentBranch,initialBranch:y.gitStatus.initialBranch}),a.jsx("div",{className:"flex-1 min-h-0",children:a.jsx(M,{leftPane:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(eB,{activeTab:eG,onTabChange:ea}),(0,a.jsxs)("div",{className:"flex-1 min-h-0 overflow-hidden",children:["history"===eG&&a.jsx(X,{messages:o.messages,worktreeId:e,onFilePathClick:J,className:"h-full",showToast:eA}),"files"===eG&&a.jsx(g,{componentName:"FileTreeView",children:(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[a.jsx(eI,{query:H.query,mode:H.mode,isSearching:H.isSearching,error:H.error,onQueryChange:H.setQuery,onModeChange:H.setMode,onClear:H.clearSearch}),a.jsx(eL,{worktreeId:e,onFileSelect:Q,onNewFile:eC,onNewDirectory:eS,onRename:eT,onDelete:eE,onUpload:eP,refreshTrigger:B,searchQuery:H.query,searchMode:H.mode,searchResults:H.results?.results,className:"flex-1 min-h-0"})]})}),"memo"===eG&&a.jsx(g,{componentName:"MemoPane",children:a.jsx(tA,{worktreeId:e,className:"h-full"})})]})]}),rightPane:a.jsx(P,{output:o.terminal.output,isActive:o.terminal.isActive,isThinking:o.terminal.isThinking,autoScroll:o.terminal.autoScroll,onScrollChange:ex}),initialLeftWidth:40,minLeftWidth:20,maxLeftWidth:60})}),a.jsx("div",{className:"flex-shrink-0 border-t border-gray-200 p-4 bg-gray-50",children:a.jsx(ew.R,{worktreeId:e,onMessageSent:eg,cliToolId:$,isSessionRunning:o.terminal.isActive})}),a.jsx(tG,{enabled:D,expiresAt:I,onToggle:eb,lastAutoResponse:eF,cliToolName:$}),o.prompt.visible&&!D&&a.jsx("div",{className:"fixed bottom-20 left-1/2 transform -translate-x-1/2 z-50 w-full max-w-2xl px-4",children:a.jsx(en,{promptData:o.prompt.data,messageId:o.prompt.messageId,visible:o.prompt.visible,answering:o.prompt.answering,onRespond:eu,onDismiss:em})}),a.jsx(tX,{worktreeId:e,worktree:y,isOpen:C,onClose:ec,onWorktreeUpdate:w}),a.jsx(eq,{isOpen:null!==T,onClose:ee,worktreeId:e,filePath:T??""}),A&&a.jsx(tW.u,{isOpen:!0,onClose:et,title:A.split("/").pop()||"Editor",size:"full",disableClose:_,children:a.jsx("div",{className:"h-[80vh]",children:a.jsx(tj,{worktreeId:e,filePath:A,onClose:et,onSave:er,onMaximizedChange:L})})}),a.jsx("input",{ref:e_,type:"file",accept:tC.join(","),onChange:eO,className:"hidden","aria-label":"Upload file"}),a.jsx(tW.u,{isOpen:ey,onClose:ek,title:d("session.confirmEnd",{tool:$.charAt(0).toUpperCase()+$.slice(1)}),size:"sm",showCloseButton:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-700",children:d("session.endWarning")}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[a.jsx("button",{type:"button",onClick:ek,className:"px-4 py-2 text-sm font-medium rounded-md bg-gray-200 hover:bg-gray-300 text-gray-700",children:b("cancel")}),a.jsx("button",{type:"button",onClick:eN,className:"px-4 py-2 text-sm font-medium rounded-md bg-red-600 hover:bg-red-700 text-white",children:b("end")})]})]})}),a.jsx(tl.Ix,{toasts:eM,onClose:eR})]})})});function t4(){let e=(0,s.useParams)().id;return a.jsx(n.Vw,{children:a.jsx(t2,{worktreeId:e})})}},22570:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});let a=(0,r(68570).createProxy)(String.raw`/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page.tsx#default`)},4803:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8948,1287,6621,8705,7458,5781,3860,4704],()=>r(80205));module.exports=a})();
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/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}},"23327":{"*":{"id":"84792","name":"*","chunks":[],"async":false}},"27311":{"*":{"id":"47272","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","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/worktrees/[id]/page.tsx":{"id":27311,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1038","static/chunks/1038-3509435b68c0967e.js","8216","static/chunks/8216-00e20326f32abd12.js","6140","static/chunks/6140-389f1951062dcf4f.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","130","static/chunks/app/worktrees/%5Bid%5D/page-66b59fb8c9ee90f4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":23327,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","8216","static/chunks/8216-00e20326f32abd12.js","2330","static/chunks/2330-0299b9879f4977d2.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","1931","static/chunks/app/page-43b5de1a0a788b1f.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]/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/6a92c8ad3c94d15a.css"],"/home/runner/work/CommandMate/CommandMate/src/app/page":[],"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page":["static/css/5eacd01f773eed7f.css"]}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/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}},"23327":{"*":{"id":"84792","name":"*","chunks":[],"async":false}},"27311":{"*":{"id":"47272","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","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":23327,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","8216","static/chunks/8216-00e20326f32abd12.js","2330","static/chunks/2330-0299b9879f4977d2.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","1931","static/chunks/app/page-43b5de1a0a788b1f.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":27311,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1038","static/chunks/1038-3509435b68c0967e.js","8216","static/chunks/8216-00e20326f32abd12.js","6140","static/chunks/6140-389f1951062dcf4f.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","130","static/chunks/app/worktrees/%5Bid%5D/page-c050d6ec20487340.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/6a92c8ad3c94d15a.css"],"/home/runner/work/CommandMate/CommandMate/src/app/page":[],"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/page":["static/css/5eacd01f773eed7f.css"]}}
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/terminal/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}},"23327":{"*":{"id":"84792","name":"*","chunks":[],"async":false}},"27311":{"*":{"id":"47272","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","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/worktrees/[id]/page.tsx":{"id":27311,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1038","static/chunks/1038-3509435b68c0967e.js","8216","static/chunks/8216-00e20326f32abd12.js","6140","static/chunks/6140-389f1951062dcf4f.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","130","static/chunks/app/worktrees/%5Bid%5D/page-66b59fb8c9ee90f4.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/page.tsx":{"id":23327,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","8216","static/chunks/8216-00e20326f32abd12.js","2330","static/chunks/2330-0299b9879f4977d2.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","1931","static/chunks/app/page-43b5de1a0a788b1f.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]/terminal/page.tsx":{"id":41845,"name":"*","chunks":["9838","static/chunks/30d07d85-393352a92199f695.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1224","static/chunks/app/worktrees/%5Bid%5D/terminal/page-5d85a7e508ce36d3.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/CommandMate/CommandMate/src/":[],"/home/runner/work/CommandMate/CommandMate/src/app/layout":["static/css/6a92c8ad3c94d15a.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]/terminal/page":["static/css/85fa6dafca566008.css"]}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/worktrees/[id]/terminal/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}},"23327":{"*":{"id":"84792","name":"*","chunks":[],"async":false}},"27311":{"*":{"id":"47272","name":"*","chunks":[],"async":false}},"36423":{"*":{"id":"84759","name":"*","chunks":[],"async":false}},"41845":{"*":{"id":"37398","name":"*","chunks":[],"async":false}},"50653":{"*":{"id":"84442","name":"*","chunks":[],"async":false}},"61060":{"*":{"id":"9727","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":23327,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","8216","static/chunks/8216-00e20326f32abd12.js","2330","static/chunks/2330-0299b9879f4977d2.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","1931","static/chunks/app/page-43b5de1a0a788b1f.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":27311,"name":"*","chunks":["9234","static/chunks/9234-b0304101384ca079.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1038","static/chunks/1038-3509435b68c0967e.js","8216","static/chunks/8216-00e20326f32abd12.js","6140","static/chunks/6140-389f1951062dcf4f.js","816","static/chunks/816-af44cb865b0c980e.js","4733","static/chunks/4733-50bdfc169adb4881.js","130","static/chunks/app/worktrees/%5Bid%5D/page-c050d6ec20487340.js"],"async":false},"/home/runner/work/CommandMate/CommandMate/src/app/worktrees/[id]/terminal/page.tsx":{"id":41845,"name":"*","chunks":["9838","static/chunks/30d07d85-393352a92199f695.js","216","static/chunks/216-f18f4a9d8b04a91e.js","1224","static/chunks/app/worktrees/%5Bid%5D/terminal/page-5d85a7e508ce36d3.js"],"async":false}},"entryCSSFiles":{"/home/runner/work/CommandMate/CommandMate/src/":[],"/home/runner/work/CommandMate/CommandMate/src/app/layout":["static/css/6a92c8ad3c94d15a.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]/terminal/page":["static/css/85fa6dafca566008.css"]}}
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "/_not-found/page": "app/_not-found/page.js",
3
- "/api/app/update-check/route": "app/api/app/update-check/route.js",
4
3
  "/api/hooks/claude-done/route": "app/api/hooks/claude-done/route.js",
5
4
  "/api/repositories/clone/[jobId]/route": "app/api/repositories/clone/[jobId]/route.js",
6
- "/api/repositories/excluded/route": "app/api/repositories/excluded/route.js",
7
5
  "/api/repositories/clone/route": "app/api/repositories/clone/route.js",
8
- "/api/repositories/route": "app/api/repositories/route.js",
6
+ "/api/repositories/excluded/route": "app/api/repositories/excluded/route.js",
9
7
  "/api/repositories/restore/route": "app/api/repositories/restore/route.js",
8
+ "/api/repositories/route": "app/api/repositories/route.js",
9
+ "/api/slash-commands/route": "app/api/slash-commands/route.js",
10
10
  "/api/repositories/scan/route": "app/api/repositories/scan/route.js",
11
+ "/api/worktrees/[id]/capture/route": "app/api/worktrees/[id]/capture/route.js",
11
12
  "/api/repositories/sync/route": "app/api/repositories/sync/route.js",
12
- "/api/slash-commands/route": "app/api/slash-commands/route.js",
13
13
  "/api/worktrees/[id]/auto-yes/route": "app/api/worktrees/[id]/auto-yes/route.js",
14
- "/api/worktrees/[id]/capture/route": "app/api/worktrees/[id]/capture/route.js",
15
14
  "/api/worktrees/[id]/cli-tool/route": "app/api/worktrees/[id]/cli-tool/route.js",
16
15
  "/api/worktrees/[id]/current-output/route": "app/api/worktrees/[id]/current-output/route.js",
17
16
  "/api/worktrees/[id]/files/[...path]/route": "app/api/worktrees/[id]/files/[...path]/route.js",
@@ -20,24 +19,25 @@
20
19
  "/api/worktrees/[id]/memos/[memoId]/route": "app/api/worktrees/[id]/memos/[memoId]/route.js",
21
20
  "/api/worktrees/[id]/memos/route": "app/api/worktrees/[id]/memos/route.js",
22
21
  "/api/worktrees/[id]/messages/route": "app/api/worktrees/[id]/messages/route.js",
22
+ "/api/worktrees/[id]/respond/route": "app/api/worktrees/[id]/respond/route.js",
23
23
  "/api/worktrees/[id]/prompt-response/route": "app/api/worktrees/[id]/prompt-response/route.js",
24
24
  "/api/worktrees/[id]/route": "app/api/worktrees/[id]/route.js",
25
25
  "/api/worktrees/[id]/search/route": "app/api/worktrees/[id]/search/route.js",
26
- "/api/worktrees/[id]/respond/route": "app/api/worktrees/[id]/respond/route.js",
27
26
  "/api/worktrees/[id]/send/route": "app/api/worktrees/[id]/send/route.js",
28
- "/api/worktrees/[id]/terminal/route": "app/api/worktrees/[id]/terminal/route.js",
29
27
  "/api/worktrees/[id]/slash-commands/route": "app/api/worktrees/[id]/slash-commands/route.js",
28
+ "/api/worktrees/[id]/terminal/route": "app/api/worktrees/[id]/terminal/route.js",
30
29
  "/api/worktrees/[id]/start-polling/route": "app/api/worktrees/[id]/start-polling/route.js",
31
30
  "/api/worktrees/[id]/tree/[...path]/route": "app/api/worktrees/[id]/tree/[...path]/route.js",
32
31
  "/api/worktrees/[id]/tree/route": "app/api/worktrees/[id]/tree/route.js",
33
32
  "/api/worktrees/[id]/upload/[...path]/route": "app/api/worktrees/[id]/upload/[...path]/route.js",
34
33
  "/api/worktrees/[id]/viewed/route": "app/api/worktrees/[id]/viewed/route.js",
35
34
  "/apple-icon.png/route": "app/apple-icon.png/route.js",
36
- "/worktrees/[id]/page": "app/worktrees/[id]/page.js",
37
35
  "/icon.png/route": "app/icon.png/route.js",
38
36
  "/page": "app/page.js",
39
37
  "/worktrees/[id]/files/[...path]/page": "app/worktrees/[id]/files/[...path]/page.js",
38
+ "/worktrees/[id]/page": "app/worktrees/[id]/page.js",
40
39
  "/worktrees/[id]/terminal/page": "app/worktrees/[id]/terminal/page.js",
40
+ "/api/app/update-check/route": "app/api/app/update-check/route.js",
41
41
  "/api/external-apps/[id]/health/route": "app/api/external-apps/[id]/health/route.js",
42
42
  "/api/external-apps/route": "app/api/external-apps/route.js",
43
43
  "/api/external-apps/[id]/route": "app/api/external-apps/[id]/route.js",
@@ -1 +1 @@
1
- {"version":1,"functions":{"/api/external-apps/[id]/health":{},"/api/external-apps/[id]":{},"/api/external-apps":{},"/api/worktrees/[id]/logs/[filename]":{},"/api/worktrees/[id]/logs":{},"/api/worktrees":{},"/proxy/[...path]":{}}}
1
+ {"version":1,"functions":{"/api/app/update-check":{},"/api/external-apps/[id]/health":{},"/api/external-apps/[id]":{},"/api/external-apps":{},"/api/worktrees/[id]/logs/[filename]":{},"/api/worktrees/[id]/logs":{},"/api/worktrees":{},"/proxy/[...path]":{}}}
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-af8567a485ade35a.js" defer=""></script><script src="/_next/static/chunks/framework-8e0e0f4a6b83a956.js" defer=""></script><script src="/_next/static/chunks/main-f00f82f1cf18dd99.js" defer=""></script><script src="/_next/static/chunks/pages/_app-3c9ca398d360b709.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js" defer=""></script><script src="/_next/static/zoVKZmyy2snskN1roYhHr/_buildManifest.js" defer=""></script><script src="/_next/static/zoVKZmyy2snskN1roYhHr/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"zoVKZmyy2snskN1roYhHr","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-af8567a485ade35a.js" defer=""></script><script src="/_next/static/chunks/framework-8e0e0f4a6b83a956.js" defer=""></script><script src="/_next/static/chunks/main-f00f82f1cf18dd99.js" defer=""></script><script src="/_next/static/chunks/pages/_app-3c9ca398d360b709.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js" defer=""></script><script src="/_next/static/SO7fkeggQuqHqumZAt_QA/_buildManifest.js" defer=""></script><script src="/_next/static/SO7fkeggQuqHqumZAt_QA/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"SO7fkeggQuqHqumZAt_QA","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"1uCa8Kzjf4ZYbqVtSlZ7qTT8eo7Okx8YaIWOwAKxBXg="}
1
+ {"node":{},"edge":{},"encryptionKey":"AuowLPKqmPCrrmLz5uz+4zPh8x+xWbCY+RTWmIs4aeU="}