commandmate 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +158 -158
- package/.next/app-path-routes-manifest.json +28 -28
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/app/update-check/route.js +1 -1
- package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/more/page_client-reference-manifest.js +1 -1
- package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +2 -2
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +28 -28
- package/.next/server/chunks/2119.js +1 -1
- package/.next/server/chunks/2404.js +1 -1
- package/.next/server/chunks/2445.js +1 -1
- package/.next/server/chunks/5959.js +1 -1
- package/.next/server/chunks/6130.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{6488-87bc158682ce8c24.js → 6488-1a37ccee1d444c10.js} +1 -1
- package/.next/static/chunks/app/page-a34d26812f085b6c.js +1 -0
- package/.next/static/chunks/app/worktrees/[id]/page-f2801662a721faab.js +1 -0
- package/.next/trace +11 -11
- package/package.json +3 -2
- package/.next/static/chunks/app/page-af457ca5876ed616.js +0 -1
- package/.next/static/chunks/app/worktrees/[id]/page-d9a6cb166c73746e.js +0 -1
- /package/.next/static/{qeQn6_9VTrYHitt3mqIG8 → Etea8LidpB8eWOTac-R8b}/_buildManifest.js +0 -0
- /package/.next/static/{qeQn6_9VTrYHitt3mqIG8 → Etea8LidpB8eWOTac-R8b}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commandmate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "A local control plane for agent CLIs — orchestration and visibility for Claude Code, Codex, Gemini CLI, and more across Git worktrees",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"test:e2e": "playwright test",
|
|
52
52
|
"test:watch": "NODE_ENV=test vitest --watch",
|
|
53
53
|
"db:init": "tsx scripts/init-db.ts",
|
|
54
|
-
"db:reset": "rm -f db.sqlite && npm run db:init"
|
|
54
|
+
"db:reset": "rm -f db.sqlite && npm run db:init",
|
|
55
|
+
"catalog:refresh": "tsx scripts/refresh-slash-command-catalog.ts"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{6473:(e,t,s)=>{"use strict";s.d(t,{Lc:()=>n,qz:()=>a});let a="animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-backwards duration-300";function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(Number.isFinite(e)&&!(e<=0)&&!(e>=s))return"".concat(e*t,"ms")}},53292:(e,t,s)=>{"use strict";s.d(t,{Ll:()=>a,bu:()=>n});let a=2e3,n=4e3},54799:(e,t,s)=>{Promise.resolve().then(s.bind(s,75590))},75590:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var a=s(95155),n=s(4560),o=s(66966),i=s(12115),r=s(18955);function d(e){let{worktrees:t}=e,s=(0,r.c)("home"),{runningCount:n,waitingCount:o}=(0,i.useMemo)(()=>{let e=0,s=0;for(let a of t)a.isSessionRunning&&(e++,a.isWaitingForResponse&&s++);return{runningCount:e,waitingCount:s}},[t]);return(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:s("title")}),(0,a.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":"home-subline",children:[(0,a.jsx)("span",{className:"tabular-nums","data-testid":"subline-running",children:n})," ",s("running"),(0,a.jsx)("span",{"aria-hidden":"true",children:" \xb7 "}),(0,a.jsx)("span",{className:"tabular-nums","data-testid":"subline-waiting",children:o})," ",s("waiting")]})]})}var l=s(52619),c=s.n(l),m=s(65229),u=s(61362),h=s(99051),x=s(744),g=s(2317);function f(e){return"boolean"==typeof e}let p=[{key:"registerRepository",href:"/repositories"},{key:"sendFirstMessage",href:"/sessions"}];function j(e){let{worktrees:t,repositories:s,isLoading:n=!1,error:o=null}=e,d=(0,r.c)("home"),{value:l,setValue:j}=(0,g.V)({key:"commandmate:onboarding-dismissed",defaultValue:!1,validate:f}),[b,y]=(0,i.useState)(!1);(0,i.useEffect)(()=>y(!0),[]);let v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{hasRepository:(null!=t?t:[]).length>0,hasSentMessage:(null!=e?e:[]).some(e=>!!e.lastUserMessageAt)}}(t,s),N=v.hasRepository&&v.hasSentMessage,w=b&&!n&&null===o;return((0,i.useEffect)(()=>{w&&N&&!l&&j(!0)},[w,N,l,j]),!w||N||l)?null:(0,a.jsx)("div",{className:"mb-8",children:(0,a.jsxs)(x.Zp,{variant:"elevated","data-testid":"onboarding-checklist",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:d("onboarding.title")}),(0,a.jsx)(x.$n,{variant:"ghost",size:"sm","aria-label":d("onboarding.dismiss"),"data-testid":"onboarding-dismiss",onClick:()=>j(!0),children:(0,a.jsx)(m.A,{size:16,"aria-hidden":"true"})})]}),(0,a.jsx)("ol",{className:"mt-3 space-y-3",children:p.map(e=>{let{key:t,href:s}=e,n="registerRepository"===t?v.hasRepository:v.hasSentMessage;return(0,a.jsxs)("li",{className:"flex items-center gap-3","data-testid":"onboarding-step-".concat(t),"data-complete":n,children:[n?(0,a.jsx)(u.A,{size:20,className:"shrink-0 text-success-foreground","aria-hidden":"true"}):(0,a.jsx)(h.A,{size:20,className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,a.jsx)("span",{className:"min-w-0 flex-1 text-sm ".concat(n?"text-muted-foreground line-through":"text-foreground"),children:d("onboarding.steps.".concat(t))}),!n&&(0,a.jsx)(c(),{href:s,"data-testid":"onboarding-action-".concat(t),className:"shrink-0 rounded-md bg-accent-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:bg-accent-500 dark:hover:bg-accent-600",children:d("onboarding.actions.".concat(t))})]},t)})})]})})}var b=s(87531);function y(e){let{worktrees:t,isLoading:s=!1}=e,n=(0,r.c)("home"),{runningCount:o,waitingCount:d}=(0,i.useMemo)(()=>{let e=0,s=0;for(let a of t)a.isSessionRunning&&(e++,a.isWaitingForResponse&&s++);return{runningCount:e,waitingCount:s}},[t]);return s?(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3","data-testid":"home-session-summary-loading",role:"status","aria-label":n("sessionSummary.loading"),children:[0,1].map(e=>(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2",children:[(0,a.jsx)("div",{className:"flex h-4 items-center",children:(0,a.jsx)(x.EA,{className:"h-3 w-16"})}),(0,a.jsx)("div",{className:"flex h-9 items-center",children:(0,a.jsx)(x.EA,{className:"h-7 w-10"})})]},e))}):(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3","data-testid":"home-session-summary",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,a.jsx)(x.md,{status:o>0?"running":"idle",size:"sm",label:n("sessionSummary.running")}),n("sessionSummary.running")]}),(0,a.jsx)("div",{className:(0,b.cn)("text-3xl font-bold tabular-nums",o>0?"text-foreground":"text-muted-foreground"),"data-testid":"running-count",children:o})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,a.jsx)(x.md,{status:d>0?"waiting":"idle",size:"sm",label:n("sessionSummary.waiting")}),n("sessionSummary.waiting")]}),(0,a.jsx)("div",{className:(0,b.cn)("text-3xl font-bold tabular-nums",d>0?"text-foreground":"text-muted-foreground"),"data-testid":"waiting-count",children:d})]})]})}var v=s(7636),N=s(83012);function w(e){var t;return null!=(t=e.lastUserMessageAt)?t:e.updatedAt}function k(e){let{worktrees:t,limit:s=5,isLoading:n=!1}=e,o=(0,r.c)("home"),d=(0,i.useMemo)(()=>[...t].sort((e,t)=>(0,v.nO)(w(e),w(t))).slice(0,s),[t,s]);return n?(0,a.jsx)("ul",{className:"space-y-1","data-testid":"recent-sessions-loading",role:"status","aria-label":o("recentSessions.loading"),children:Array.from({length:s},(e,t)=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",children:[(0,a.jsx)(x.EA,{className:"h-2 w-2 shrink-0 rounded-full"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,a.jsx)(x.EA,{className:"h-4 w-2/5"}),(0,a.jsx)(x.EA,{className:"h-3 w-3/5"})]}),(0,a.jsx)(x.EA,{className:"h-3 w-8 shrink-0"})]},t))}):0===d.length?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"recent-sessions-empty",children:o("recentSessions.empty")}),(0,a.jsx)(c(),{href:"/repositories","data-testid":"recent-sessions-cta",className:"inline-block text-sm font-medium text-accent-600 transition-colors hover:text-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:text-accent-400 dark:hover:text-accent-300",children:o("recentSessions.cta")})]}):(0,a.jsx)("ul",{className:"space-y-1","data-testid":"recent-sessions",children:d.map(e=>{var t;let s=w(e),n=s?(0,N.Fx)(String(s)):"";return(0,a.jsx)("li",{children:(0,a.jsxs)(c(),{href:"/worktrees/".concat(e.id),"data-testid":"recent-session-".concat(e.id),className:"flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full ".concat(e.isWaitingForResponse?"bg-warning":e.isSessionRunning?"bg-success":"bg-muted-foreground"),"aria-hidden":"true"}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate text-sm font-medium text-foreground",children:null!=(t=e.repositoryDisplayName)?t:e.repositoryName}),(0,a.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.name})]}),n&&(0,a.jsx)("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:n})]})},e.id)})})}function C(e){let{worktrees:t,isLoading:s=!1}=e,n=(0,r.c)("home");return(0,a.jsxs)(x.Zp,{variant:"elevated",className:"h-full","data-testid":"session-overview-tile",children:[(0,a.jsx)("h2",{className:"mb-3 text-lg font-semibold text-foreground",children:n("sessionOverview.title")}),(0,a.jsx)(y,{worktrees:t,isLoading:s}),(0,a.jsxs)("div",{className:"mt-4 flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:n("sessionOverview.recentSessions")}),(0,a.jsx)(c(),{href:"/sessions",className:"text-xs text-accent-600 hover:underline dark:text-accent-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","data-testid":"session-overview-view-all",children:n("sessionOverview.viewAll")})]}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(k,{worktrees:t,isLoading:s})})]})}var S=s(85872),A=s(53292);let E="commandmate-home-todo-repo";function R(e){var t;return(null==(t=e.repositoryDisplayName)?void 0:t.trim())||e.repositoryName||""}function F(){let e=(0,r.c)("home"),[t,s]=(0,i.useState)([]),[n,o]=(0,i.useState)(""),[d,l]=(0,i.useState)([]),[c,m]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(!1),[p,j]=(0,i.useState)(null),b=(0,i.useRef)(!1),y=(0,i.useMemo)(()=>d.filter(e=>!e.done).length,[d]);(0,i.useEffect)(()=>{!async function(){try{var e;let t=await fetch("/api/worktrees");if(!t.ok)return;let a=(null!=(e=(await t.json()).repositories)?e:[]).map(e=>({id:e.id,path:e.path,name:e.name,displayName:e.displayName}));if(s(a),a.length>0){let e=localStorage.getItem(E),t=e&&a.some(t=>t.id===e)?e:a[0].id;o(t)}}catch(e){}finally{b.current=!0}}()},[]);let v=(0,i.useCallback)(async()=>{h(!0),j(null);try{let e=await S.$C.listAll();l(e)}catch(t){j(t instanceof Error?t.message:e("todo.errors.load")),l([])}finally{h(!1)}},[e]);(0,i.useEffect)(()=>{v()},[v]),(0,i.useEffect)(()=>{n&&localStorage.setItem(E,n)},[n]);let N=(0,i.useCallback)(async()=>{let t=c.trim();if(t&&n&&!g){f(!0),j(null);try{await S.$C.create(n,t),m(""),await v()}catch(t){j(t instanceof Error?t.message:e("todo.errors.add"))}finally{f(!1)}}},[c,n,g,v,e]),w=(0,i.useCallback)(async t=>{l(e=>e.map(e=>e.id===t.id?{...e,done:!e.done}:e)),j(null);try{await S.$C.update(t.repositoryId,t.id,{done:!t.done})}catch(t){j(t instanceof Error?t.message:e("todo.errors.update")),v()}},[v,e]),k=(0,i.useCallback)(async t=>{j(null);try{await S.$C.remove(t.repositoryId,t.id),l(e=>e.filter(e=>e.id!==t.id))}catch(t){j(t instanceof Error?t.message:e("todo.errors.delete"))}},[e]),C=(0,i.useCallback)(e=>{"Enter"!==e.key||e.nativeEvent.isComposing||(e.preventDefault(),N())},[N]),F=t.length>0;return(0,a.jsxs)(x.Zp,{className:"h-full","data-testid":"home-todo-widget",children:[(0,a.jsx)("h2",{className:"mb-3 text-lg font-semibold text-foreground",children:e("todo.title")}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 mb-3 sm:flex-row sm:items-center sm:justify-between sm:gap-3","data-testid":"todo-selector-row",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-muted-foreground min-w-0",children:[(0,a.jsx)("span",{className:"shrink-0",children:e("todo.repository")}),(0,a.jsx)("select",{value:n,onChange:e=>o(e.target.value),disabled:!F,"data-testid":"todo-repo-select",className:"min-w-0 flex-1 truncate rounded-md border border-input bg-surface dark:bg-surface-2 px-2 py-1 text-sm text-surface-foreground disabled:opacity-50 sm:flex-initial sm:max-w-[16rem]",children:t.map(e=>{var t;return(0,a.jsx)("option",{value:e.id,children:(null==(t=e.displayName)?void 0:t.trim())||e.name},e.id)})})]}),F&&(0,a.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground","data-testid":"todo-remaining",children:e("todo.open",{count:y})})]}),F?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)(x.pd,{type:"text",value:c,onChange:e=>m(e.target.value),onKeyDown:C,maxLength:A.Ll,placeholder:e("todo.inputPlaceholder"),"data-testid":"todo-input",className:"w-auto flex-1 min-w-0"}),(0,a.jsx)(x.$n,{type:"button",variant:"primary",size:"sm",onClick:N,disabled:g||0===c.trim().length,"data-testid":"todo-add-button",className:"shrink-0",children:e("todo.add")})]}),p&&(0,a.jsx)("p",{className:"mb-2 text-xs text-danger-foreground","data-testid":"todo-error",children:p}),u&&0===d.length?(0,a.jsx)("ul",{className:"space-y-1","data-testid":"todo-loading",role:"status","aria-label":e("todo.loading"),children:[0,1,2].map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-1 py-1",children:[(0,a.jsx)(x.EA,{className:"h-4 w-4 shrink-0 rounded"}),(0,a.jsx)(x.EA,{className:"h-4 ".concat(1===e?"w-2/3":"w-5/6")})]},e))}):0===d.length?(0,a.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"todo-empty",children:e("todo.empty")}):(0,a.jsx)("ul",{className:"space-y-1","data-testid":"todo-list",children:d.map(t=>(0,a.jsxs)("li",{className:"flex flex-col gap-1 rounded-md px-1 py-1 hover:bg-muted group sm:flex-row sm:items-center sm:gap-2","data-testid":"todo-item",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,a.jsx)("label",{className:"shrink-0 inline-flex min-h-[44px] min-w-[44px] cursor-pointer items-center justify-center sm:min-h-0 sm:min-w-0",children:(0,a.jsx)(x.Sc,{checked:t.done,onCheckedChange:()=>w(t),"data-testid":"todo-checkbox","aria-label":t.done?e("todo.markAsNotDone"):e("todo.markAsDone")})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 break-words text-sm ".concat(t.done?"line-through text-muted-foreground":"text-foreground"),children:t.content})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[R(t)&&(0,a.jsx)("span",{className:"shrink-0 max-w-[8rem] truncate rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground","data-testid":"todo-repo-badge",title:R(t),children:R(t)}),(0,a.jsx)("button",{type:"button",onClick:()=>k(t),"aria-label":e("todo.delete"),"data-testid":"todo-delete",className:"inline-flex min-h-[44px] min-w-[44px] shrink-0 items-center justify-center text-muted-foreground opacity-100 transition-opacity hover:text-danger-foreground sm:min-h-0 sm:min-w-0 sm:opacity-0 sm:group-hover:opacity-100",children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]},t.id))})]}):(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:e("todo.noRepositories")})]})}var M=s(37586),I=s(66685),T=s(24533),U=s(37772),z=s(6473);let L=[{key:"chat",href:"/chat",icon:(0,a.jsx)(M.A,{size:20,"aria-hidden":"true"})},{key:"sessions",href:"/sessions",icon:(0,a.jsx)(I.A,{size:20,"aria-hidden":"true"})},{key:"repositories",href:"/repositories",icon:(0,a.jsx)(T.A,{size:20,"aria-hidden":"true"})},{key:"review",href:"/review",icon:(0,a.jsx)(u.A,{size:20,"aria-hidden":"true"})},{key:"more",href:"/more",icon:(0,a.jsx)(U.A,{size:20,"aria-hidden":"true"})}];function D(){let e=(0,r.c)("common");return(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-5","data-testid":"home-quick-actions",children:L.map((t,s)=>{let n=e("nav.".concat(t.key));return(0,a.jsx)(c(),{href:t.href,"aria-label":n,className:"group block rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","data-testid":"quick-action-".concat(t.key),children:(0,a.jsxs)(x.Zp,{interactive:!0,padding:"sm",style:{animationDelay:(0,z.Lc)(s)},className:"flex h-full flex-col items-center justify-center gap-1.5 py-3 text-center hover:border-accent-300 dark:hover:border-accent-700 ".concat(z.qz),children:[(0,a.jsx)("span",{className:"text-muted-foreground group-hover:text-accent-600 dark:group-hover:text-accent-400 transition-colors",children:t.icon}),(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:n})]})},t.href)})})}function O(){let{worktrees:e,repositories:t,isLoading:s,error:i}=(0,o.Fn)(),r=s&&0===e.length;return(0,a.jsx)(n.GV,{children:(0,a.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,a.jsx)(d,{worktrees:e}),(0,a.jsx)(j,{worktrees:e,repositories:t,isLoading:r,error:i}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-12","data-testid":"home-bento-grid",children:[(0,a.jsx)("div",{className:"md:col-span-8",children:(0,a.jsx)(C,{worktrees:e,isLoading:r})}),(0,a.jsx)("div",{className:"md:col-span-4",children:(0,a.jsx)(F,{})}),(0,a.jsx)("div",{className:"md:col-span-12",children:(0,a.jsx)(D,{})})]})]})})}},83012:(e,t,s)=>{"use strict";s.d(t,{Fx:()=>i,bg:()=>r,fw:()=>o});var a=s(53298),n=s(73683);function o(e,t){let s=new Date(e);return isNaN(s.getTime())?"":(0,a.m)(s,{addSuffix:!0,...t?{locale:t}:{}})}function i(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let s=Math.round((Date.now()-t.getTime())/1e3);if(s<45)return"now";let a=Math.round(s/60);if(a<60)return"".concat(a,"m ago");let n=Math.round(a/60);if(n<24)return"".concat(n,"h ago");let o=Math.round(n/24);return o<7?"".concat(o,"d ago"):o<30?"".concat(Math.round(o/7),"w ago"):o<365?"".concat(Math.round(o/30),"mo ago"):"".concat(Math.round(o/365),"y ago")}function r(e,t){return!(e instanceof Date)||isNaN(e.getTime())?"":(0,n.GP)(e,"PPp",t?{locale:t}:void 0)}},85872:(e,t,s)=>{"use strict";async function a(e,t){throw Error((await e.json().catch(()=>({}))).error||"".concat(t," (").concat(e.status,")"))}s.d(t,{$C:()=>n,Ar:()=>i,KG:()=>o});let n={async list(e){var t;let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos"));return s.ok?null!=(t=(await s.json()).todos)?t:[]:a(s,"Failed to load todos")},async listAll(){var e;let t=await fetch("/api/todos");return t.ok?null!=(e=(await t.json()).todos)?e:[]:a(t,"Failed to load todos")},async create(e,t){let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});return s.ok?(await s.json()).todo:a(s,"Failed to create todo")},async update(e,t,s){let n=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return n.ok?(await n.json()).todo:a(n,"Failed to update todo")},async remove(e,t){let s=await fetch("/api/repositories/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"DELETE"});s.ok||await a(s,"Failed to delete todo")}},o=["todo","doing","done"],i={async list(e){var t;let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"));return s.ok?null!=(t=(await s.json()).todos)?t:[]:a(s,"Failed to load todos")},async create(e,t,s){let n=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(void 0!==s?{content:t,detail:s}:{content:t})});return n.ok?(await n.json()).todo:a(n,"Failed to create todo")},async update(e,t,s){let n=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return n.ok?(await n.json()).todo:a(n,"Failed to update todo")},async remove(e,t){let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos/").concat(encodeURIComponent(t)),{method:"DELETE"});s.ok||await a(s,"Failed to delete todo")},async reorder(e,t){let s=await fetch("/api/worktrees/".concat(encodeURIComponent(e),"/todos"),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({todoIds:t})});s.ok||await a(s,"Failed to reorder todos")}}}},e=>{e.O(0,[6809,4909,2770,790,4974,9948,6402,744,6488,4560,8441,1255,7358],()=>e(e.s=54799)),_N_E=e.O()}]);
|