"use strict";(()=>{var e={};e.id=3096,e.ids=[3096],e.modules={85890:e=>{e.exports=require("better-sqlite3")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},84770:e=>{e.exports=require("crypto")},92048:e=>{e.exports=require("fs")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},37514:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>I,patchFetch:()=>h,requestAsyncStorage:()=>c,routeModule:()=>p,serverHooks:()=>m,staticGenerationAsyncStorage:()=>x});var o={};t.r(o),t.d(o,{PATCH:()=>d});var s=t(49303),i=t(88716),n=t(60670),a=t(87070),u=t(97425),l=t(75748);async function d(e,{params:r}){try{let t=(0,u.n)(),o=(0,l.gU)(t,r.id);if(!o)return a.NextResponse.json({error:`Worktree '${r.id}' not found`},{status:404});let s=await e.json();if(!s.cliToolId)return a.NextResponse.json({error:"CLI tool ID is required"},{status:400});let i=["claude","codex","gemini"];if(!i.includes(s.cliToolId))return a.NextResponse.json({error:`Invalid CLI tool ID: ${s.cliToolId}. Valid values are: ${i.join(", ")}`},{status:400});let n={...o,cliToolId:s.cliToolId,updatedAt:new Date};return(0,l.ly)(t,n),a.NextResponse.json(n,{status:200})}catch(e){return console.error("Error updating CLI tool:",e),a.NextResponse.json({error:"Failed to update CLI tool"},{status:500})}}let p=new s.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/worktrees/[id]/cli-tool/route",pathname:"/api/worktrees/[id]/cli-tool",filename:"route",bundlePath:"app/api/worktrees/[id]/cli-tool/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/worktrees/[id]/cli-tool/route.ts",nextConfigOutput:"",userland:o}),{requestAsyncStorage:c,staticGenerationAsyncStorage:x,serverHooks:m}=p,I="/api/worktrees/[id]/cli-tool/route";function h(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:x})}}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8948,5972,7425],()=>t(37514));module.exports=o})();