UNPKG

@jjdenhertog/ai-driven-development

Version:

AI-driven development workflow with learning capabilities for Claude

1 lines 6.91 kB
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2727],{1241:(e,t,n)=>{"use strict";async function c(e){let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch: ".concat(t.statusText));return t.json()}n.d(t,{FH:()=>r});let a="/api";var o=n(4380);let r={getTasks:function(){return c("".concat(a,"/tasks"))},getTask:function(e){return c("".concat(a,"/tasks/").concat(e))},updateTask:function(e,t){return(0,o.putJson)("".concat(a,"/tasks/").concat(e),t)},deleteTask:async function e(e){let t=await fetch("".concat(a,"/tasks/").concat(e),{method:"DELETE"});if(!t.ok)throw Error("Failed to delete: ".concat(t.statusText));return t.json()},getTaskSpecification:function(e){return c("".concat(a,"/tasks/").concat(e,"/specification"))},updateTaskSpecification:function(e,t){return(0,o.putJson)("".concat(a,"/tasks/").concat(e,"/specification"),{content:t})},getTaskSessions:function(e){return c("".concat(a,"/tasks/").concat(e,"/sessions"))},getTaskSession:function(e,t){return c("".concat(a,"/tasks/").concat(e,"/sessions/").concat(t))},getTaskOutput:function(e,t){return c("".concat(a,"/tasks/").concat(e,"/output/").concat(encodeURIComponent(t)))},getConcepts:()=>c("".concat(a,"/concepts")),getConcept:e=>c("".concat(a,"/concepts/").concat(e)),createConcept:(e,t)=>n.e(7313).then(n.bind(n,7313)).then(n=>{let{postJson:c}=n;return c("".concat(a,"/concepts"),{name:e,content:t})}),updateConcept:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:c}=n;return c("".concat(a,"/concepts/").concat(e),{content:t})}),deleteConcept:async e=>{let t=await fetch("".concat(a,"/concepts/").concat(e),{method:"DELETE"});if(!t.ok)throw Error("Failed to delete concept: ".concat(t.statusText));return t.json()},getPreferences:()=>c("".concat(a,"/preferences")),getPreference:e=>c("".concat(a,"/preferences/").concat(e)),updatePreference:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:c}=n;return c("".concat(a,"/preferences/").concat(e),{content:t})}),getExamples:()=>c("".concat(a,"/examples")),getExample:e=>c("".concat(a,"/examples/").concat(e)),updateExample:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:c}=n;return c("".concat(a,"/examples/").concat(e),{content:t})}),getTemplates:()=>c("".concat(a,"/templates")),getTemplate:e=>c("".concat(a,"/templates/").concat(e)),updateTemplate:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:c}=n;return c("".concat(a,"/templates/").concat(e),{content:t})}),getPrompts:()=>c("".concat(a,"/prompts")),getPrompt:e=>c("".concat(a,"/prompts/").concat(e)),updatePrompt:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:c}=n;return c("".concat(a,"/prompts/").concat(e),{content:t})}),getSettings:()=>c("".concat(a,"/settings")),updateSettings:e=>Promise.resolve().then(n.bind(n,4380)).then(t=>{let{putJson:n}=t;return n("".concat(a,"/settings"),e)}),getContainers:()=>c("".concat(a,"/containers")),getContainerCapabilities:()=>c("".concat(a,"/containers/capabilities")),containerAction:async(e,t,n,c)=>{let o=await fetch("".concat(a,"/containers/").concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,type:n,...c})});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,c=new URLSearchParams({stream:t.toString(),tail:n.toString()});return fetch("".concat(a,"/containers/").concat(e,"/logs?").concat(c.toString()))},getConceptFeatures:()=>c("".concat(a,"/concept-features")),getConceptFeature:e=>c("".concat(a,"/concept-features/").concat(e)),createConceptFeature:e=>n.e(7313).then(n.bind(n,7313)).then(t=>{let{postJson:n}=t;return n("".concat(a,"/concept-features"),e)}),updateConceptFeature:(e,t)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:c}=n;return c("".concat(a,"/concept-features/").concat(e),t)}),assessConceptFeature:e=>n.e(7313).then(n.bind(n,7313)).then(t=>{let{postJson:n}=t;return n("".concat(a,"/concept-features/").concat(e,"/assess"),{})}),deleteConceptFeature:async e=>{let t=await fetch("".concat(a,"/concept-features/").concat(e),{method:"DELETE"});if(!t.ok)throw Error("Failed to delete concept feature: ".concat(t.statusText));return t.json()},getTaskPhases:e=>c("".concat(a,"/tasks/").concat(e,"/phases")),getTaskPhase:(e,t)=>c("".concat(a,"/tasks/").concat(e,"/phases/").concat(t))}},4380:(e,t,n)=>{"use strict";async function c(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:()=>c})},5695:(e,t,n)=>{"use strict";var c=n(8999);n.o(c,"useParams")&&n.d(t,{useParams:function(){return c.useParams}}),n.o(c,"usePathname")&&n.d(t,{usePathname:function(){return c.usePathname}}),n.o(c,"useRouter")&&n.d(t,{useRouter:function(){return c.useRouter}}),n.o(c,"useSearchParams")&&n.d(t,{useSearchParams:function(){return c.useSearchParams}})},7085:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var c=n(5155),a=n(2115),o=n(5695),r=n(838),s=n(1241),i=n(8427),u=n.n(i);function l(){let e=(0,o.useRouter)(),{data:t,isLoading:n}=(0,r.Ay)("container-capabilities",s.FH.getContainerCapabilities,{revalidateOnFocus:!1}),{data:i}=(0,r.Ay)((null==t?void 0:t.canManageContainers)?"containers":null,s.FH.getContainers);return((0,a.useEffect)(()=>{i&&i.length>0&&e.replace("/containers/".concat(i[0].name))},[i,e]),n||!t)?(0,c.jsx)("div",{className:u().placeholder,children:(0,c.jsx)("p",{children:"Loading container capabilities..."})}):t.canManageContainers?i?0===i.length?(0,c.jsx)("div",{className:u().empty,children:(0,c.jsx)("p",{children:"No containers found"})}):(0,c.jsx)("div",{className:u().placeholder,children:(0,c.jsx)("p",{children:"Redirecting to container..."})}):(0,c.jsx)("div",{className:u().placeholder,children:(0,c.jsx)("p",{children:"Loading containers..."})}):(0,c.jsx)("div",{className:u().empty,children:(0,c.jsxs)("div",{className:u().error,children:[(0,c.jsx)("h3",{children:"Container Management Unavailable"}),(0,c.jsx)("p",{children:t.message||"Container management requires proxy. Start web with --enable-container-proxy."})]})})}},8398:(e,t,n)=>{Promise.resolve().then(n.bind(n,7085))},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"}}},e=>{e.O(0,[2403,838,8441,5964,7358],()=>e(e.s=8398)),_N_E=e.O()}]);