3:I[5613,[],""] 4:I[1778,[],""] 5:I[4840,["250","static/chunks/250-be60d4fb2ff03a8a.js","699","static/chunks/699-887279039e16d761.js","185","static/chunks/app/layout-c3213eefb1e63851.js"],"Providers"] 6:I[7495,["250","static/chunks/250-be60d4fb2ff03a8a.js","699","static/chunks/699-887279039e16d761.js","185","static/chunks/app/layout-c3213eefb1e63851.js"],"Layout"] 7:I[5250,["250","static/chunks/250-be60d4fb2ff03a8a.js","67","static/chunks/67-2d4bb96cb6e2f43b.js","705","static/chunks/app/docs/code-assistant/page-ff210f057856080b.js"],""] 0:["Q81e8mFBx_fzIjHu7wdJj",[[["",{"children":["docs",{"children":["code-assistant",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["docs",{"children":["code-assistant",{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","code-assistant","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","html",null,{"lang":"en","className":"h-full antialiased __variable_aaf875 __variable_b436a8","suppressHydrationWarning":true,"children":["$","body",null,{"className":"flex min-h-full bg-white dark:bg-slate-900","children":["$","$L5",null,{"children":["$","$L6",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","div",null,{"className":"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16","children":["$","div",null,{"className":"flex h-full flex-col items-center justify-center text-center","children":[["$","p",null,{"className":"font-display text-sm font-medium text-slate-900 dark:text-white","children":"404"}],["$","h1",null,{"className":"mt-3 font-display text-3xl tracking-tight text-slate-900 dark:text-white","children":"Page not found"}],["$","p",null,{"className":"mt-2 text-sm text-slate-500 dark:text-slate-400","children":"Sorry, we couldn’t find the page you’re looking for."}],["$","$L7",null,{"href":"/","className":"mt-8 text-sm font-medium text-slate-900 dark:text-white","children":"Go back home"}]]}]}],"notFoundStyles":[],"styles":null}]}]}]}]}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7d2966c6703556cd.css","precedence":"next","crossOrigin":""}]],"$L8"]]]] 9:I[4693,["250","static/chunks/250-be60d4fb2ff03a8a.js","67","static/chunks/67-2d4bb96cb6e2f43b.js","705","static/chunks/app/docs/code-assistant/page-ff210f057856080b.js"],"DocsHeader"] a:I[3902,["250","static/chunks/250-be60d4fb2ff03a8a.js","67","static/chunks/67-2d4bb96cb6e2f43b.js","705","static/chunks/app/docs/code-assistant/page-ff210f057856080b.js"],"Fence"] b:I[4069,["250","static/chunks/250-be60d4fb2ff03a8a.js","67","static/chunks/67-2d4bb96cb6e2f43b.js","705","static/chunks/app/docs/code-assistant/page-ff210f057856080b.js"],"PrevNextLinks"] c:I[5638,["250","static/chunks/250-be60d4fb2ff03a8a.js","67","static/chunks/67-2d4bb96cb6e2f43b.js","705","static/chunks/app/docs/code-assistant/page-ff210f057856080b.js"],"TableOfContents"] 2:[["$","div",null,{"className":"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16","children":[["$","article",null,{"children":[["$","$L9",null,{"title":"The Code Assistant"}],["$","div",null,{"className":"prose prose-slate max-w-none dark:prose-invert dark:text-slate-400 prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-lead:text-slate-500 dark:prose-lead:text-slate-400 prose-a:font-semibold dark:prose-a:text-blue-400 prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))] hover:prose-a:[--tw-prose-underline-size:6px] dark:[--tw-prose-background:theme(colors.slate.900)] dark:prose-a:shadow-[inset_0_calc(-1*var(--tw-prose-underline-size,2px))_0_0_var(--tw-prose-underline,theme(colors.sky.800))] dark:hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 dark:prose-hr:border-slate-800","children":[["$","p",null,{"children":"The DocDriven Code Assistant is a tool designed to help developers generate code automatically based on the examples provided in a repository, adhering to custom code conventions."}],["$","p",null,{"children":"This guide will walk you through the steps to set up and use the Code Assistant to generate code for your API designs."}],["$","h2",null,{"id":"starting-the-code-assistant","children":"Starting the Code Assistant"}],["$","p",null,{"children":"To get started, open the Assistant by navigating to the “Code Assistant\" tab from the Project Details interface. You will find an introductory screen with a button labeled \"Start the assistant\". Click on this button to begin the setup process."}],["$","h2",null,{"id":"select-a-repository-with-code-examples","children":"Select a Repository with Code Examples"}],["$","p",null,{"children":"In the \"Select a repository with the code examples to follow\" section, you need to select the repository that contains the code examples you want the Code Assistant to follow. First, select the name of the GitHub repository. Then, select the branch that contains the code examples."}],["$","h2",null,{"id":"valid-docdriven-config-json-documentation","children":"Valid docdriven.config.json Documentation"}],["$","p",null,{"children":["In order for the Code Assistant to work, it requires a valid ",["$","code",null,{"children":"docdriven.config.json"}]," file at the root of the repository. This file contains a set of instructions (templates) that the assistant follows when generating code. Below is a detailed description of what a valid ",["$","code",null,{"children":"docdriven.config.json"}]," should look like and the properties it must include."]}],["$","h3",null,{"id":"required-properties","children":"Required Properties"}],["$","p",null,{"children":["Each template in the ",["$","code",null,{"children":"docdriven.config.json"}]," file must include the following properties:"]}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","strong",null,{"children":"name"}],": A human-readable name for the template. This can be anything and is used for display purposes only."]}],["$","li",null,{"children":[["$","strong",null,{"children":"example"}],": A relative path to an example file that the Code Assistant should reference when generating the new file. The example file should be similar in design to the file that the Assistant will generate."]}],["$","li",null,{"children":[["$","strong",null,{"children":"outputDirectory"}],": The path where the generated file should be placed. This path is relative to the root of the repository."]}],["$","li",null,{"children":[["$","strong",null,{"children":"target"}],": The type of data the Code Assistant will work with to generate the file. This can be either \"Endpoints\" or \"Schemas\". If the Assistant is generating a file that contains API endpoints, the target should be \"Endpoints\". If the Assistant is generating a file that contains data models, the target should be \"Schemas\"."]}]]}],["$","h3",null,{"id":"example","children":"Example"}],["$","p",null,{"children":["Here is an example of what a valid ",["$","code",null,{"children":"docdriven.config.json"}]," file looks like. This example is from a .NET repository that codes Controllers for an API project:"]}],["$","$La",null,{"language":"json","children":"{\n \"templates\": [\n {\n \"name\": \".NET Controller\",\n \"example\": \"examples/dotnet/PetController.cs\",\n \"outputDirectory\": \"API/Controllers\",\n \"target\": \"Endpoints\"\n }\n ]\n}\n"}],["$","h2",null,{"id":"properties-breakdown","children":"Properties Breakdown"}],["$","ol",null,{"children":[["$","li",null,{"children":[["$","strong",null,{"children":"name"}],": The template has a name \".NET Controller\"."]}],["$","li",null,{"children":[["$","strong",null,{"children":"example"}],": The Code Assistant will reference the example file located at ",["$","code",null,{"children":"examples/dotnet/PetController.cs"}]," when generating new files."]}],["$","li",null,{"children":[["$","strong",null,{"children":"outputDirectory"}],": The generated file will be placed in the ",["$","code",null,{"children":"API/Controllers"}]," directory."]}],["$","li",null,{"children":[["$","strong",null,{"children":"target"}],": The target type is \"Endpoints\" because this template is for generating API endpoints."]}]]}],["$","p",null,{"children":["Now that you know what a valid ",["$","code",null,{"children":"docdriven.config.json"}]," file should look like, you can create one in the root of your repository. After creating and adding this file, you can refresh the Code Assistant interface and continue with the code generation process."]}],["$","h2",null,{"id":"assign-work-to-the-code-assistant","children":"Assign Work to the Code Assistant"}],["$","p",null,{"children":["In the \"Assign work to the code assistant\" section, you will specify the type of work you want the assistant to perform. The tool will look for a valid ",["$","code",null,{"children":"docdriven.config.json"}]," file in your repository. For each task, select the type of work from the dropdown menu. Then, specify the groups or areas within your codebase where the work should be focused. If you have additional tasks, click on the \"+ Add additional work\" button to add more items and specify their details."]}],["$","h2",null,{"id":"output-settings","children":"Output Settings"}],["$","p",null,{"children":"In the \"Output\" section, decide what you want to do with the generated code. You can choose to create a pull request, which is suggested as it allows you to review changes before merging, commit to the same branch you selected initially, or commit the generated code to a different branch or repository. After making your selection, click the \"Run code assistant\" button to initiate the code generation process."}],["$","h2",null,{"id":"monitoring-progress","children":"Monitoring Progress"}],["$","p",null,{"children":"To monitor the progress and check logs of the code generation process for any issues or confirmations of completion, navigate to the \"Log\" tab."}],["$","p",null,{"children":"The DocDriven Code Assistant simplifies the process of generating code by following your specific code conventions and examples. By following the steps outlined in this guide, you can efficiently set up and use the tool to accelerate your development process."}]]}]]}],["$","$Lb",null,{}]]}],["$","$Lc",null,{"tableOfContents":[{"level":2,"id":"starting-the-code-assistant","title":"Starting the Code Assistant","children":[]},{"level":2,"id":"select-a-repository-with-code-examples","title":"Select a Repository with Code Examples","children":[]},{"level":2,"id":"valid-docdriven-config-json-documentation","title":"Valid docdriven.config.json Documentation","children":[{"level":3,"id":"required-properties","title":"Required Properties"},{"level":3,"id":"example","title":"Example"}]},{"level":2,"id":"properties-breakdown","title":"Properties Breakdown","children":[]},{"level":2,"id":"assign-work-to-the-code-assistant","title":"Assign Work to the Code Assistant","children":[]},{"level":2,"id":"output-settings","title":"Output Settings","children":[]},{"level":2,"id":"monitoring-progress","title":"Monitoring Progress","children":[]}]}]] 8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"The Code Assistant - Docs"}],["$","meta","3",{"name":"description","content":"Learn how to use the Code Assistant in DocDriven."}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"32x32"}],["$","meta","5",{"name":"next-size-adjust"}]] 1:null