"use strict";(()=>{var e={};e.id=2469,e.ids=[2469],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")},78893:e=>{e.exports=require("buffer")},61282:e=>{e.exports=require("child_process")},84770:e=>{e.exports=require("crypto")},17702:e=>{e.exports=require("events")},92048:e=>{e.exports=require("fs")},20629:e=>{e.exports=require("fs/promises")},32615:e=>{e.exports=require("http")},35240:e=>{e.exports=require("https")},98216:e=>{e.exports=require("net")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},76162:e=>{e.exports=require("stream")},82452:e=>{e.exports=require("tls")},17360:e=>{e.exports=require("url")},21764:e=>{e.exports=require("util")},71568:e=>{e.exports=require("zlib")},33731:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>m,patchFetch:()=>h,requestAsyncStorage:()=>g,routeModule:()=>c,serverHooks:()=>q,staticGenerationAsyncStorage:()=>f});var o={};t.r(o),t.d(o,{GET:()=>l});var s=t(49303),i=t(88716),n=t(60670),u=t(87070),a=t(97425),p=t(75748),d=t(38693),x=t(95614);async function l(e,{params:r}){try{if(!(0,d.m$)(r.id))return u.NextResponse.json({error:"Invalid worktree ID format"},{status:400});if(!(0,x.wx)(r.logId))return u.NextResponse.json({error:"Invalid log ID format"},{status:400});let e=(0,a.getDbInstance)();if(!(0,p.gU)(e,r.id))return u.NextResponse.json({error:`Worktree '${r.id}' not found`},{status:404});let t=e.prepare("SELECT * FROM execution_logs WHERE id = ? AND worktree_id = ?").get(r.logId,r.id);if(!t)return u.NextResponse.json({error:"Execution log not found"},{status:404});return u.NextResponse.json({log:t},{status:200})}catch(e){return console.error("Error fetching execution log:",e),u.NextResponse.json({error:"Failed to fetch execution log"},{status:500})}}let c=new s.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/worktrees/[id]/execution-logs/[logId]/route",pathname:"/api/worktrees/[id]/execution-logs/[logId]",filename:"route",bundlePath:"app/api/worktrees/[id]/execution-logs/[logId]/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/worktrees/[id]/execution-logs/[logId]/route.ts",nextConfigOutput:"",userland:o}),{requestAsyncStorage:g,staticGenerationAsyncStorage:f,serverHooks:q}=c,m="/api/worktrees/[id]/execution-logs/[logId]/route";function h(){return(0,n.patchFetch)({serverHooks:q,staticGenerationAsyncStorage:f})}},95614:(e,r,t)=>{t.d(r,{ME:()=>o,wx:()=>n,xT:()=>s});let o=100,s=1e4,i=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function n(e){return i.test(e)}}};var r=require("../../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8948,5972,3853,4893,2509,7425,7566,4952,8693],()=>t(33731));module.exports=o})();