File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 getConfigFromWorkDir ,
55} from "../../middlewares/napiConfig.ts" ;
66import { join , normalize , relative , SEPARATOR } from "@std/path" ;
7- import type z from "zod" ;
7+ import z from "zod" ;
88import type { localConfigSchema } from "../../middlewares/napiConfig.ts" ;
99import pythonStdlibList from "../../../scripts/generate_python_stdlib_list/output.json" with {
1010 type : "json" ,
@@ -668,12 +668,25 @@ async function createNewProject(apiService: ApiService): Promise<number> {
668668 } ,
669669 } ) ;
670670
671+ const projectRepoUrl = await input ( {
672+ message : "Enter the URL of your project repository:" ,
673+ validate : ( value ) => {
674+ if ( ! value . trim ( ) ) return "Project repository URL cannot be empty" ;
675+ const result = z . string ( ) . url ( ) . safeParse ( value ) ;
676+ if ( ! result . success ) {
677+ return result . error . message ;
678+ }
679+ return true ;
680+ } ,
681+ } ) ;
682+
671683 try {
672684 const createProjectResponse = await apiService . performRequest (
673685 "POST" ,
674686 "/projects" ,
675687 {
676688 name : projectName ,
689+ repoUrl : projectRepoUrl ,
677690 workspaceId : selectedWorkspaceId ,
678691 maxCodeCharPerSymbol : 100 ,
679692 maxCodeCharPerFile : 1000 ,
You can’t perform that action at this time.
0 commit comments