"use strict";(()=>{var e={};e.id=1049,e.ids=[1049],e.modules={20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},78893:e=>{e.exports=require("buffer")},92048:e=>{e.exports=require("fs")},55315:e=>{e.exports=require("path")},68223:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>f,patchFetch:()=>g,requestAsyncStorage:()=>u,routeModule:()=>c,serverHooks:()=>p,staticGenerationAsyncStorage:()=>m});var n={};r.r(n),r.d(n,{GET:()=>l});var o=r(49303),a=r(88716),s=r(60670),i=r(87070),d=r(53013);async function l(e){try{let e=await (0,d.HL)();return i.NextResponse.json({groups:e})}catch(e){return console.error("Error loading slash commands:",e),i.NextResponse.json({error:"Failed to load slash commands"},{status:500})}}let c=new o.AppRouteRouteModule({definition:{kind:a.x.APP_ROUTE,page:"/api/slash-commands/route",pathname:"/api/slash-commands",filename:"route",bundlePath:"app/api/slash-commands/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/slash-commands/route.ts",nextConfigOutput:"",userland:n}),{requestAsyncStorage:u,staticGenerationAsyncStorage:m,serverHooks:p}=c,f="/api/slash-commands/route";function g(){return(0,s.patchFetch)({serverHooks:p,staticGenerationAsyncStorage:m})}},38056:(e,t,r)=>{r.d(t,{Nw:()=>s,SU:()=>i,Xr:()=>a});var n=r(35835);let o=["planning","development","review","documentation","workflow","standard-session","standard-config","standard-monitor","standard-git","standard-util"];function a(e){if(0===e.length)return[];let t=new Map;for(let r of e){let e=t.get(r.category)||[];e.push(r),t.set(r.category,e)}let r=[];for(let e of o){let o=t.get(e);o&&o.length>0&&r.push({category:e,label:n.H[e],commands:o})}for(let[e,a]of t)!o.includes(e)&&a.length>0&&r.push({category:e,label:n.H[e]||e,commands:a});return r}function s(e,t){let r=new Map;for(let t of e)for(let e of t.commands)r.set(e.name,{...e,source:e.source||"standard"});for(let e of t)for(let t of e.commands)r.set(t.name,{...t,source:t.source||"worktree"});return a(Array.from(r.values()))}function i(e){return e.reduce((e,t)=>e+t.commands.length,0)}},53013:(e,t,r)=>{r.d(t,{HL:()=>u});var n=r(92048),o=r(55315),a=r(3673),s=r.n(a),i=r(35835),d=r(38056);let l=null;async function c(e){let t=function(e){let t=e||process.cwd();return o.join(t,".claude","commands")}(e);if(!n.existsSync(t))return console.warn(`Commands directory not found: ${t}`),[];let r=n.readdirSync(t).filter(e=>e.endsWith(".md")),a=[];for(let e of r){let r=function(e){try{let t=n.readFileSync(e,"utf-8"),{data:r}=s()(t),a=o.basename(e,".md"),d=i.c[a]||"workflow";return{name:a,description:r.description||"",category:d,model:r.model,filePath:o.relative(process.cwd(),e)}}catch(t){return console.error(`Error parsing command file ${e}:`,t),null}}(o.join(t,e));r&&a.push(r)}return a.sort((e,t)=>e.name.localeCompare(t.name)),l=a,a}async function u(e){let t=e?await c(e):l||await c();return(0,d.Xr)(t)}},35835:(e,t,r)=>{r.d(t,{H:()=>n,c:()=>o});let n={planning:"Planning",development:"Development",review:"Review",documentation:"Documentation",workflow:"Workflow","standard-session":"Standard (Session)","standard-config":"Standard (Config)","standard-monitor":"Standard (Monitor)","standard-git":"Standard (Git)","standard-util":"Standard (Utility)"},o={"work-plan":"planning","issue-create":"planning","issue-split":"planning","design-policy":"planning","tdd-impl":"development","bug-fix":"development",refactoring:"development","architecture-review":"review","acceptance-test":"review","progress-report":"documentation","create-pr":"workflow","pm-auto-dev":"workflow"}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[8948,5972,3673],()=>r(68223));module.exports=n})();