@vedangiitb/qwintly-core 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.prompt.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/codegen.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"codegen.prompt.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/codegen.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAY,MAAM,uBAAuB,CAAC;AAQjF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,uBAAuB,WA8E5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.prompt.js","sourceRoot":"","sources":["../../../src/ai/prompts/codegen.prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AASzC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAA+B,EAAE,EAAE;IAC/D,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAEtE,MAAM,YAAY,GAAG;EACrB,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAC;KACtC,CAAC;IAEJ,MAAM,OAAO,GAAG,SAAS,CACvB,yBAAyB,EACzB;QACE,SAAS,CACP,yCAAyC,EACzC,gBAAgB,IAAI,EAAE,CACvB;KACF,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,oBAAoB,GAAG,SAAS,CACpC,uBAAuB,EACvB;QACE,SAAS,CACP,kBAAkB,EAClB,YAAY,CAAC,cAAc,CAAC,eAAe,CAC5C;QACD,SAAS,CAAC,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QACtE,SAAS,CACP,yBAAyB,EACzB,YAAY,CAAC,cAAc,CAAC,eAAe,CAC5C;KACF,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,SAAS,GAAG,SAAS,CACzB,YAAY,EAEZ;;;;;;;;;;;;;;;;;;;;;;;;GAwBD,CACA,CAAC;IAEF,MAAM,QAAQ,GAAG,SAAS,CACxB,sBAAsB,EACtB,SAAS,CAAC,8BAA8B,EAAE,IAAI,IAAI,IAAI,CAAC,CACxD,CAAC;IAEF,MAAM,QAAQ,GAAG,eAAe,CAAC;IAEjC,MAAM,QAAQ,GAAG;QACf,YAAY;QACZ,OAAO;QACP,oBAAoB;QACpB,SAAS;QACT,QAAQ;QACR,QAAQ;KACT,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACtC,CAAC,CAAC","sourcesContent":["import { CodegenIndex, CollectedContext } from \"../../types/public.js\";\r\nimport { codegenExamples } from \"./examples/codegen.examples.js\";\r\nimport {\r\n jsonBlock,\r\n mdSection,\r\n projectStateNote,\r\n} from \"./helpers/promptParts.helper.js\";\r\n\r\nexport type CodegenNodePromptParams = {\r\n task:
|
|
1
|
+
{"version":3,"file":"codegen.prompt.js","sourceRoot":"","sources":["../../../src/ai/prompts/codegen.prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AASzC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAA+B,EAAE,EAAE;IAC/D,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAEtE,MAAM,YAAY,GAAG;EACrB,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAC;KACtC,CAAC;IAEJ,MAAM,OAAO,GAAG,SAAS,CACvB,yBAAyB,EACzB;QACE,SAAS,CACP,yCAAyC,EACzC,gBAAgB,IAAI,EAAE,CACvB;KACF,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,oBAAoB,GAAG,SAAS,CACpC,uBAAuB,EACvB;QACE,SAAS,CACP,kBAAkB,EAClB,YAAY,CAAC,cAAc,CAAC,eAAe,CAC5C;QACD,SAAS,CAAC,gBAAgB,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QACtE,SAAS,CACP,yBAAyB,EACzB,YAAY,CAAC,cAAc,CAAC,eAAe,CAC5C;KACF,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,SAAS,GAAG,SAAS,CACzB,YAAY,EAEZ;;;;;;;;;;;;;;;;;;;;;;;;GAwBD,CACA,CAAC;IAEF,MAAM,QAAQ,GAAG,SAAS,CACxB,sBAAsB,EACtB,SAAS,CAAC,8BAA8B,EAAE,IAAI,IAAI,IAAI,CAAC,CACxD,CAAC;IAEF,MAAM,QAAQ,GAAG,eAAe,CAAC;IAEjC,MAAM,QAAQ,GAAG;QACf,YAAY;QACZ,OAAO;QACP,oBAAoB;QACpB,SAAS;QACT,QAAQ;QACR,QAAQ;KACT,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACtC,CAAC,CAAC","sourcesContent":["import { CodegenIndex, CollectedContext, PlanTask } from \"../../types/public.js\";\r\nimport { codegenExamples } from \"./examples/codegen.examples.js\";\r\nimport {\r\n jsonBlock,\r\n mdSection,\r\n projectStateNote,\r\n} from \"./helpers/promptParts.helper.js\";\r\n\r\nexport type CodegenNodePromptParams = {\r\n task: any;\r\n codegenIndex: CodegenIndex;\r\n collectedContext: CollectedContext;\r\n isNewProject: boolean;\r\n};\r\n\r\nexport const codegenPrompt = (params: CodegenNodePromptParams) => {\r\n const { task, codegenIndex, collectedContext, isNewProject } = params;\r\n\r\n const intialPrompt = `You are a senior software engineer responsible for implementing ONE coding task precisely and safely within an existing codebase.\r\n${projectStateNote(isNewProject, \"codegen\")}\r\n `;\r\n\r\n const context = mdSection(\r\n \"Context (Authoritative)\",\r\n [\r\n jsonBlock(\r\n \"Project Context (User preferences etc.)\",\r\n collectedContext ?? {},\r\n ),\r\n ].join(\"\\n\"),\r\n );\r\n\r\n const projectConfiguration = mdSection(\r\n \"Project Configuration\",\r\n [\r\n jsonBlock(\r\n \"FRAMEWORK CONFIG\",\r\n codegenIndex.projectConfigs.frameworkConfig,\r\n ),\r\n jsonBlock(\"RUNTIME CONFIG\", codegenIndex.projectConfigs.runtimeConfig),\r\n jsonBlock(\r\n \"RENDERING CONFIGURATION\",\r\n codegenIndex.projectConfigs.renderingConfig,\r\n ),\r\n ].join(\"\\n\"),\r\n );\r\n\r\n const toolsInfo = mdSection(\r\n \"Tool Usage\",\r\n\r\n `\r\n You are provided access to the following tools and use them to implement coding tasks.\r\n\r\n read_file: Use when you want to read a file from the codebase.\r\n\r\n list_dir: Use when you want to list the directory structure of a given path.\r\n\r\n create_new_route: Use when you want to create a new route. It will create a new route with a page.tsx and pageConfig.json (initial contents) file.\r\n \r\n insert_element: Use when you want to insert a new element in the config\r\n \r\n delete_element: Use when you want to delete an element from the config.\r\n\r\n update_classname: Use when you want to update the className of an element.\r\n \r\n update_props: Use when you want to update the props of an element.\r\n\r\n submit_codegen_done: Use when you are done with the task and want to submit the codegen to the backend for validation.\r\n\r\n Important things to note:\r\n 1. If a route doesn't exists, please create it using the create_new_route tool.\r\n 2. When you are adding an image, just give the alt, which should be clear description of the image. The src of the image will be taken care by us.\r\n 3. For icons use only lucide-react icons.\r\n\r\n `,\r\n );\r\n\r\n const taskInfo = mdSection(\r\n \"Task (Authoritative)\",\r\n jsonBlock(\"TASK (You need to implement)\", task ?? null),\r\n );\r\n\r\n const examples = codegenExamples;\r\n\r\n const sections = [\r\n intialPrompt,\r\n context,\r\n projectConfiguration,\r\n toolsInfo,\r\n examples,\r\n taskInfo,\r\n ];\r\n return sections.join(\"\\n\\n---\\n\\n\");\r\n};\r\n"]}
|