UNPKG

@jjdenhertog/ai-driven-development

Version:

AI-driven development workflow with learning capabilities for Claude

1 lines 10.7 kB
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2112],{64:(t,e,n)=>{"use strict";n.d(e,{B:()=>d});var a=n(5155),c=n(2115),o=n(5028),s=n(7491),r=n.n(s);let i=t=>{let{value:e,onChange:n,language:o="plaintext",readOnly:s=!1,height:i="100%"}=t,l=(0,c.useCallback)(t=>{n(t.target.value)},[n]);return(0,a.jsxs)("div",{className:r().container,style:{height:i},children:[(0,a.jsx)("div",{className:r().header,children:(0,a.jsx)("span",{className:r().language,children:o})}),(0,a.jsx)("textarea",{value:e,onChange:l,readOnly:s,className:r().editor,spellCheck:!1})]})},l=(0,o.default)(()=>n.e(1364).then(n.bind(n,1364)).then(t=>t).catch(t=>({default:i})),{loadableGenerated:{webpack:()=>[1364]},ssr:!1,loading:()=>(0,a.jsx)("div",{style:{padding:"1rem"},children:"Loading editor..."})}),d=t=>{let{value:e,onChange:n,language:o="plaintext",readOnly:s=!1,height:r="100%",minHeight:d=200,maxHeight:u=800,fontSize:p=14}=t,h=(0,c.useRef)(null),[m,_]=(0,c.useState)(d),g="auto"===r,f=(0,c.useCallback)(t=>{if(h.current=t,g){let e=()=>{_(Math.max(d,Math.min(u,t.getContentHeight()+40)))};e(),t.onDidContentSizeChange(e)}},[g,d,u]),b=(0,c.useMemo)(()=>({readOnly:s,minimap:{enabled:!1},fontSize:p,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,tabSize:2,insertSpaces:!0,formatOnPaste:!0,formatOnType:!0,renderWhitespace:"selection",scrollbar:{vertical:g?"hidden":"visible",horizontal:"auto",verticalScrollbarSize:10,horizontalScrollbarSize:10,alwaysConsumeMouseWheel:!1}}),[s,g,p]),x=(t=>{var e;switch(null==(e=t.split(".").pop())?void 0:e.toLowerCase()){case"ts":case"tsx":return"typescript";case"js":case"jsx":return"javascript";case"json":return"json";case"md":return"markdown";case"css":case"scss":return"css";case"html":return"html";case"yaml":case"yml":return"yaml";default:return o}})(o),v=g?"".concat(m,"px"):r,j=(0,c.useCallback)(t=>{null==n||n(t||"")},[n]);return(0,a.jsx)("div",{style:{height:v,width:"100%",border:"1px solid var(--border-color)",borderRadius:"0.5rem",overflow:"hidden"},children:(0,a.jsx)(c.Suspense,{fallback:(0,a.jsx)(i,{value:e,onChange:n||(()=>{}),language:o,readOnly:s,height:v}),children:(0,a.jsx)(l,{value:e,onChange:n?j:void 0,language:x,theme:"vs-dark",height:v,options:b,onMount:f})})})}},1241:(t,e,n)=>{"use strict";async function a(t){let e=await fetch(t);if(!e.ok)throw Error("Failed to fetch: ".concat(e.statusText));return e.json()}n.d(e,{FH:()=>s});let c="/api";var o=n(4380);let s={getTasks:function(){return a("".concat(c,"/tasks"))},getTask:function(t){return a("".concat(c,"/tasks/").concat(t))},updateTask:function(t,e){return(0,o.putJson)("".concat(c,"/tasks/").concat(t),e)},deleteTask:async function t(t){let e=await fetch("".concat(c,"/tasks/").concat(t),{method:"DELETE"});if(!e.ok)throw Error("Failed to delete: ".concat(e.statusText));return e.json()},getTaskSpecification:function(t){return a("".concat(c,"/tasks/").concat(t,"/specification"))},updateTaskSpecification:function(t,e){return(0,o.putJson)("".concat(c,"/tasks/").concat(t,"/specification"),{content:e})},getTaskSessions:function(t){return a("".concat(c,"/tasks/").concat(t,"/sessions"))},getTaskSession:function(t,e){return a("".concat(c,"/tasks/").concat(t,"/sessions/").concat(e))},getTaskOutput:function(t,e){return a("".concat(c,"/tasks/").concat(t,"/output/").concat(encodeURIComponent(e)))},getConcepts:()=>a("".concat(c,"/concepts")),getConcept:t=>a("".concat(c,"/concepts/").concat(t)),createConcept:(t,e)=>n.e(7313).then(n.bind(n,7313)).then(n=>{let{postJson:a}=n;return a("".concat(c,"/concepts"),{name:t,content:e})}),updateConcept:(t,e)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(c,"/concepts/").concat(t),{content:e})}),deleteConcept:async t=>{let e=await fetch("".concat(c,"/concepts/").concat(t),{method:"DELETE"});if(!e.ok)throw Error("Failed to delete concept: ".concat(e.statusText));return e.json()},getPreferences:()=>a("".concat(c,"/preferences")),getPreference:t=>a("".concat(c,"/preferences/").concat(t)),updatePreference:(t,e)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(c,"/preferences/").concat(t),{content:e})}),getExamples:()=>a("".concat(c,"/examples")),getExample:t=>a("".concat(c,"/examples/").concat(t)),updateExample:(t,e)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(c,"/examples/").concat(t),{content:e})}),getTemplates:()=>a("".concat(c,"/templates")),getTemplate:t=>a("".concat(c,"/templates/").concat(t)),updateTemplate:(t,e)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(c,"/templates/").concat(t),{content:e})}),getPrompts:()=>a("".concat(c,"/prompts")),getPrompt:t=>a("".concat(c,"/prompts/").concat(t)),updatePrompt:(t,e)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(c,"/prompts/").concat(t),{content:e})}),getSettings:()=>a("".concat(c,"/settings")),updateSettings:t=>Promise.resolve().then(n.bind(n,4380)).then(e=>{let{putJson:n}=e;return n("".concat(c,"/settings"),t)}),getContainers:()=>a("".concat(c,"/containers")),getContainerCapabilities:()=>a("".concat(c,"/containers/capabilities")),containerAction:async(t,e,n,a)=>{let o=await fetch("".concat(c,"/containers/").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,type:n,...a})});if(!o.ok)throw Error((await o.json().catch(()=>({error:o.statusText}))).error||"Failed to ".concat(e," container: ").concat(o.statusText));return o.json()},getContainerLogs:function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,a=new URLSearchParams({stream:e.toString(),tail:n.toString()});return fetch("".concat(c,"/containers/").concat(t,"/logs?").concat(a.toString()))},getConceptFeatures:()=>a("".concat(c,"/concept-features")),getConceptFeature:t=>a("".concat(c,"/concept-features/").concat(t)),createConceptFeature:t=>n.e(7313).then(n.bind(n,7313)).then(e=>{let{postJson:n}=e;return n("".concat(c,"/concept-features"),t)}),updateConceptFeature:(t,e)=>Promise.resolve().then(n.bind(n,4380)).then(n=>{let{putJson:a}=n;return a("".concat(c,"/concept-features/").concat(t),e)}),assessConceptFeature:t=>n.e(7313).then(n.bind(n,7313)).then(e=>{let{postJson:n}=e;return n("".concat(c,"/concept-features/").concat(t,"/assess"),{})}),deleteConceptFeature:async t=>{let e=await fetch("".concat(c,"/concept-features/").concat(t),{method:"DELETE"});if(!e.ok)throw Error("Failed to delete concept feature: ".concat(e.statusText));return e.json()},getTaskPhases:t=>a("".concat(c,"/tasks/").concat(t,"/phases")),getTaskPhase:(t,e)=>a("".concat(c,"/tasks/").concat(t,"/phases/").concat(e))}},2841:t=>{t.exports={tabs:"TabNavigation_tabs__Z9wJ3",tab:"TabNavigation_tab___eQB7",active:"TabNavigation_active__gvfW5"}},3330:(t,e,n)=>{"use strict";n.d(e,{$:()=>s});var a=n(5155);n(2115);var c=n(7260),o=n.n(c);let s=t=>{let{variant:e="primary",size:n="medium",fullWidth:c=!1,iconOnly:s=!1,className:r="",children:i,...l}=t,d=[o().button,o()[e],o()[n],c?o().fullWidth:"",s?o().iconOnly:"",r].filter(Boolean).join(" ");return(0,a.jsx)("button",{type:"button",className:d,...l,children:i})}},4380:(t,e,n)=>{"use strict";async function a(t,e){let n=await fetch(t,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw Error("Failed to put: ".concat(n.statusText));return n.json()}n.r(e),n.d(e,{putJson:()=>a})},4653:(t,e,n)=>{"use strict";n.d(e,{M:()=>s});var a=n(5155);n(2115);var c=n(9209),o=n.n(c);let s=t=>{let{children:e,title:n,subtitle:c,variant:s="default",sidebarContent:r,sidebarHeader:i,sidebarWidth:l=400}=t,d=()=>n||c?(0,a.jsx)("div",{}):null;return"sidebar"===s?(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:[i?(0,a.jsx)("div",{className:"sidebar-header",children:i}):null,r]}),(0,a.jsx)("main",{className:o().mainContent,children:e})]})]}):"grid"===s?(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:[i?(0,a.jsx)("div",{className:"sidebar-header",children:i}):null,r]}),(0,a.jsx)("main",{className:o().gridMain,children:e})]})]}):(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:e})})]})}},7260:t=>{t.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"}},7491:t=>{t.exports={container:"SimpleEditor_container__LmH4_",header:"SimpleEditor_header__lR43V",language:"SimpleEditor_language__4pI2b",editor:"SimpleEditor_editor__EXn9P"}},7565:(t,e,n)=>{"use strict";n.d(e,{a:()=>i,o:()=>l});var a=n(5155);n(2115);var c=n(6874),o=n.n(c),s=n(2841),r=n.n(s);function i(t){let{children:e,className:n}=t;return(0,a.jsx)("div",{className:"".concat(r().tabs," ").concat(n||""),children:e})}function l(t){let{children:e,active:n=!1,onClick:c,href:s,className:i}=t,l="".concat(r().tab," ").concat(n?r().active:""," ").concat(i||"");return s?(0,a.jsx)(o(),{href:s,className:l,children:e}):(0,a.jsx)("button",{type:"button",onClick:c,className:l,children:e})}},8720:(t,e,n)=>{"use strict";n.d(e,{H:()=>r});var a=n(5155);n(2115);var c=n(7489),o=n(8830),s=n.n(o);function r(t){let{icon:e,title:n,description:o,selected:r=!1,onClick:i,className:l="",children:d}=t;return(0,a.jsxs)("button",{type:"button",onClick:i,className:"".concat(s().fileButton," ").concat(r?s().selected:""," ").concat(l),children:[(0,a.jsx)(c.g,{icon:e,className:s().icon}),(0,a.jsxs)("div",{className:s().content,children:[(0,a.jsx)("div",{className:s().title,children:n}),!!o&&(0,a.jsx)("div",{className:s().description,children:o}),d]})]})}},8830:t=>{t.exports={fileButton:"FileButton_fileButton__kTT3K",selected:"FileButton_selected___mDUt",icon:"FileButton_icon__CrF0d",content:"FileButton_content__Bp_Mt",title:"FileButton_title__TDjuR",description:"FileButton_description__ZT_ko"}},9209:t=>{t.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_"}}}]);