@jjdenhertog/ai-driven-development
Version:
AI-driven development workflow with learning capabilities for Claude
1 lines • 11.9 kB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3136],{19:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>j});var a=n(5155),s=n(2115),o=n(5695),c=n(838),i=n(1241),r=n(4653),l=n(7489),d=n(3578),u=n(3330),_=n(8484),p=n.n(_);let m=e=>{let{container:t,isSelected:n,onClick:o,disabled:c=!1}=e,i=(0,s.useCallback)(()=>{o(t.name)},[t.name,o]);return(0,a.jsxs)(u.$,{variant:"ghost",size:"medium",fullWidth:!0,className:"".concat(p().item," ").concat(n?p().selected:""," ").concat(c?p().disabled:""),onClick:i,disabled:c,children:[(0,a.jsx)("div",{className:p().status,children:(0,a.jsx)(l.g,{icon:d.GEE,className:"".concat(p().statusIcon," ").concat("running"===t.status?p().running:p().stopped)})}),(0,a.jsxs)("div",{className:p().info,children:[(0,a.jsxs)("div",{className:p().name,children:[t.name,"web"===t.name&&(0,a.jsx)(l.g,{icon:d.zpE,className:p().warningIcon,title:"This is the web interface container"})]}),(0,a.jsx)("div",{className:p().type,children:"running"===t.status?t.statusText||"Running":"stopped"===t.status?"Stopped":"Not created"})]})]})};m.displayName="ContainerItem";let h=s.memo(m);var g=n(4540),x=n.n(g);let f=e=>{let{variant:t="text",width:n,height:s,count:o=1}=e,c=Array.from({length:o},(e,t)=>t);return(0,a.jsx)(a.Fragment,{children:c.map(e=>(0,a.jsx)("div",{className:"".concat(x().skeleton," ").concat(x()[t]),style:{width:n?"number"==typeof n?"".concat(n,"px"):n:void 0,height:s?"number"==typeof s?"".concat(s,"px"):s:void 0}},e))})},C=e=>{let{containers:t,selectedContainer:n,onSelectContainer:o,loading:c,error:i,disabled:r=!1}=e,l=(0,s.useCallback)(e=>{r||o(e)},[o,r]);return c?(0,a.jsx)("div",{className:p().container,children:(0,a.jsx)("div",{className:p().list,children:(0,a.jsx)(f,{variant:"list-item",count:3})})}):i?(0,a.jsx)("div",{className:p().container,children:(0,a.jsx)("div",{className:p().error,children:(0,a.jsx)("p",{children:i})})}):(0,a.jsx)("div",{className:p().container,children:(0,a.jsx)("div",{className:p().list,children:t.map(e=>(0,a.jsx)(h,{container:e,isSelected:n===e.name,onClick:l,disabled:r},e.name))})})};var v=n(8427),b=n.n(v);function j(e){var t;let{children:n}=e,l=(0,o.useParams)(),d=(0,o.useRouter)(),u=null==l?void 0:l.name,{data:_}=(0,c.Ay)("container-capabilities",i.FH.getContainerCapabilities,{revalidateOnFocus:!1}),{data:p,error:m}=(0,c.Ay)((null==_?void 0:_.canManageContainers)?"containers":null,i.FH.getContainers,{refreshInterval:5e3,revalidateOnFocus:!0,onError:e=>{var t;null==e||null==(t=e.message)||t.includes("503")}}),h=(0,s.useCallback)(e=>{d.push("/containers/".concat(e))},[d]),g=(0,a.jsx)("div",{}),x=(0,a.jsx)("div",{className:b().taskList,children:(null==_?void 0:_.canManageContainers)?m?(0,a.jsx)("div",{className:"error-state",children:(0,a.jsx)("p",{children:(null==_?void 0:_.canManageContainers)?(null==m||null==(t=m.message)?void 0:t.includes("503"))?"Container management requires proxy. Start this proxy using: aidev proxy start.":"Failed to load containers":(null==_?void 0:_.message)||"Container management requires proxy. Start web with --enable-container-proxy."})}):void 0===p?(0,a.jsx)("div",{className:"loading-state",children:"Loading containers..."}):(0,a.jsx)(C,{containers:p,selectedContainer:u,onSelectContainer:h,loading:!1,disabled:!1}):(0,a.jsx)("div",{className:"error-state",children:(0,a.jsx)("p",{children:(null==_?void 0:_.message)||"Container management unavailable"})})});return(0,a.jsx)(r.M,{title:"Container Management",subtitle:"Manage and monitor your Docker containers",variant:"sidebar",sidebarHeader:g,sidebarContent:x,sidebarWidth:450,children:n})}},1241:(e,t,n)=>{"use strict";async function a(e){let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch: ".concat(t.statusText));return t.json()}n.d(t,{FH:()=>c});let s="/api";var o=n(4380);let c={getTasks:function(){return a("".concat(s,"/tasks"))},getTask:function(e){return a("".concat(s,"/tasks/").concat(e))},updateTask:function(e,t){return(0,o.putJson)("".concat(s,"/tasks/").concat(e),t)},deleteTask:async function e(e){let t=await fetch("".concat(s,"/tasks/").concat(e),{method:"DELETE"});if(!t.ok)throw Error("Failed to delete: ".concat(t.statusText));return t.json()},getTaskSpecification:function(e){return a("".concat(s,"/tasks/").concat(e,"/specification"))},updateTaskSpecification:function(e,t){return(0,o.putJson)("".concat(s,"/tasks/").concat(e,"/specification"),{content:t})},getTaskSessions:function(e){return a("".concat(s,"/tasks/").concat(e,"/sessions"))},getTaskSession:function(e,t){return a("".concat(s,"/tasks/").concat(e,"/sessions/").concat(t))},getTaskOutput:function(e,t){return a("".concat(s,"/tasks/").concat(e,"/output/").concat(encodeURIComponent(t)))},getConcepts:()=>a("".concat(s,"/concepts")),getConcept:e=>a("".concat(s,"/concepts/").concat(e)),createConcept:(e,t)=>n.e(7313).then(n.bind(n,7313)).then(n=>{let{postJson:a}=n;return a("".concat(s,"/concepts"),{name:e,content:t})}),updateConcept:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(s,"/concepts/").concat(e),{content:t})}),deleteConcept:async e=>{let t=await fetch("".concat(s,"/concepts/").concat(e),{method:"DELETE"});if(!t.ok)throw Error("Failed to delete concept: ".concat(t.statusText));return t.json()},getPreferences:()=>a("".concat(s,"/preferences")),getPreference:e=>a("".concat(s,"/preferences/").concat(e)),updatePreference:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(s,"/preferences/").concat(e),{content:t})}),getExamples:()=>a("".concat(s,"/examples")),getExample:e=>a("".concat(s,"/examples/").concat(e)),updateExample:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(s,"/examples/").concat(e),{content:t})}),getTemplates:()=>a("".concat(s,"/templates")),getTemplate:e=>a("".concat(s,"/templates/").concat(e)),updateTemplate:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(s,"/templates/").concat(e),{content:t})}),getPrompts:()=>a("".concat(s,"/prompts")),getPrompt:e=>a("".concat(s,"/prompts/").concat(e)),updatePrompt:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(s,"/prompts/").concat(e),{content:t})}),getSettings:()=>a("".concat(s,"/settings")),updateSettings:e=>Promise.resolve().then(n.bind(n,4380)).then(t=>{let{putJson:n}=t;return n("".concat(s,"/settings"),e)}),getContainers:()=>a("".concat(s,"/containers")),getContainerCapabilities:()=>a("".concat(s,"/containers/capabilities")),containerAction:async(e,t,n,a)=>{let o=await fetch("".concat(s,"/containers/").concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,type:n,...a})});if(!o.ok)throw Error((await o.json().catch(()=>({error:o.statusText}))).error||"Failed to ".concat(t," container: ").concat(o.statusText));return o.json()},getContainerLogs:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,a=new URLSearchParams({stream:t.toString(),tail:n.toString()});return fetch("".concat(s,"/containers/").concat(e,"/logs?").concat(a.toString()))},getConceptFeatures:()=>a("".concat(s,"/concept-features")),getConceptFeature:e=>a("".concat(s,"/concept-features/").concat(e)),createConceptFeature:e=>n.e(7313).then(n.bind(n,7313)).then(t=>{let{postJson:n}=t;return n("".concat(s,"/concept-features"),e)}),updateConceptFeature:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(s,"/concept-features/").concat(e),t)}),assessConceptFeature:e=>n.e(7313).then(n.bind(n,7313)).then(t=>{let{postJson:n}=t;return n("".concat(s,"/concept-features/").concat(e,"/assess"),{})}),deleteConceptFeature:async e=>{let t=await fetch("".concat(s,"/concept-features/").concat(e),{method:"DELETE"});if(!t.ok)throw Error("Failed to delete concept feature: ".concat(t.statusText));return t.json()},getTaskPhases:e=>a("".concat(s,"/tasks/").concat(e,"/phases")),getTaskPhase:(e,t)=>a("".concat(s,"/tasks/").concat(e,"/phases/").concat(t))}},1544:(e,t,n)=>{Promise.resolve().then(n.bind(n,19))},3330:(e,t,n)=>{"use strict";n.d(t,{$:()=>c});var a=n(5155);n(2115);var s=n(7260),o=n.n(s);let c=e=>{let{variant:t="primary",size:n="medium",fullWidth:s=!1,iconOnly:c=!1,className:i="",children:r,...l}=e,d=[o().button,o()[t],o()[n],s?o().fullWidth:"",c?o().iconOnly:"",i].filter(Boolean).join(" ");return(0,a.jsx)("button",{type:"button",className:d,...l,children:r})}},4380:(e,t,n)=>{"use strict";async function a(e,t){let n=await fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error("Failed to put: ".concat(n.statusText));return n.json()}n.r(t),n.d(t,{putJson:()=>a})},4540:e=>{e.exports={skeleton:"SkeletonLoader_skeleton__HMzx1",loading:"SkeletonLoader_loading__tv0Zl",text:"SkeletonLoader_text__BK3SQ",title:"SkeletonLoader_title__prWZy",card:"SkeletonLoader_card__Rp7eZ","list-item":"SkeletonLoader_list-item__nx9Aq"}},4653:(e,t,n)=>{"use strict";n.d(t,{M:()=>c});var a=n(5155);n(2115);var s=n(9209),o=n.n(s);let c=e=>{let{children:t,title:n,subtitle:s,variant:c="default",sidebarContent:i,sidebarHeader:r,sidebarWidth:l=400}=e,d=()=>n||s?(0,a.jsx)("div",{}):null;return"sidebar"===c?(0,a.jsxs)("div",{className:o().wrapper,children:[d(),(0,a.jsxs)("div",{className:"page-container with-sidebar",children:[(0,a.jsxs)("aside",{className:"sidebar",style:{width:"".concat(l,"px")},children:[r?(0,a.jsx)("div",{className:"sidebar-header",children:r}):null,i]}),(0,a.jsx)("main",{className:o().mainContent,children:t})]})]}):"grid"===c?(0,a.jsxs)("div",{className:o().wrapper,children:[d(),(0,a.jsxs)("div",{className:"page-container",children:[(0,a.jsxs)("aside",{className:o().gridSidebar,children:[r?(0,a.jsx)("div",{className:"sidebar-header",children:r}):null,i]}),(0,a.jsx)("main",{className:o().gridMain,children:t})]})]}):(0,a.jsxs)("div",{className:o().wrapper,children:[d(),(0,a.jsx)("div",{className:"page-container",children:(0,a.jsx)("main",{className:o().defaultContent,children:t})})]})}},7260:e=>{e.exports={button:"Button_button__y6cjA",small:"Button_small__zTEVQ",medium:"Button_medium__QfI0S",large:"Button_large__4HR_t",primary:"Button_primary___8S9W",secondary:"Button_secondary__NR6ak",ghost:"Button_ghost__iCa4P",danger:"Button_danger__Oa3fp",fullWidth:"Button_fullWidth__IomvO",iconOnly:"Button_iconOnly__zknJx"}},8427:e=>{e.exports={container:"ContainerSection_container__Mv3g_",sidebar:"ContainerSection_sidebar__m2bx7",main:"ContainerSection_main__xSYoX",empty:"ContainerSection_empty__vjXKP",error:"ContainerSection_error__zmtgr",info:"ContainerSection_info___FbRY",placeholder:"ContainerSection_placeholder__j2_45",sidebarActions:"ContainerSection_sidebarActions__SwXo0",taskList:"ContainerSection_taskList__zs_h0"}},8484:e=>{e.exports={container:"ContainerList_container__ujNhZ",list:"ContainerList_list__TXV9_",item:"ContainerList_item__XPoX2",selected:"ContainerList_selected__d_Jhm",disabled:"ContainerList_disabled__QA3Nx",status:"ContainerList_status__x8llp",statusIcon:"ContainerList_statusIcon__Hm370",pulse:"ContainerList_pulse__nfODq",running:"ContainerList_running__gdBI6","pulse-ring":"ContainerList_pulse-ring__50IDz",stopped:"ContainerList_stopped__EM9tI",info:"ContainerList_info__BP4cL",name:"ContainerList_name__Woa_e",warningIcon:"ContainerList_warningIcon__LMTht",type:"ContainerList_type__RFT_j",icon:"ContainerList_icon__MaIQv",actionIcon:"ContainerList_actionIcon__knyXV",loading:"ContainerList_loading__7f4UZ",error:"ContainerList_error___yneU"}},9209:e=>{e.exports={wrapper:"PageLayout_wrapper__fh_sR",sidebarWidth:"PageLayout_sidebarWidth__GEKiJ",mainContent:"PageLayout_mainContent__AHqyf",defaultContent:"PageLayout_defaultContent__IxtZ2",gridSidebar:"PageLayout_gridSidebar__N5k36",gridMain:"PageLayout_gridMain__fW_o_"}}},e=>{e.O(0,[6750,2403,2266,1919,838,8441,5964,7358],()=>e(e.s=1544)),_N_E=e.O()}]);