@vedangiitb/qwintly-core 1.3.29 → 1.4.0

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,EAAE,MAAM,uBAAuB,CAAC;AAQvE,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,WA2E5D,CAAC"}
1
+ {"version":3,"file":"codegen.prompt.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/codegen.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAQvE,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,WA6E5D,CAAC"}
@@ -32,12 +32,14 @@ export const codegenPrompt = (params) => {
32
32
  - Create missing routes with create_new_route.
33
33
  - For any tool arg named route, always use URL paths with forward slashes (e.g. '/', '/pricing'); never use '\\' or filesystem paths like 'app/pricing'.
34
34
  - insert_element supports optional before_id to insert before an existing sibling; if omitted or not found, it appends to the end.
35
- - image src auto-generated from alt
35
+ - Include images whenever mentoned to be included. Just use alt tag for images. image src auto-generated from alt
36
36
  - lucide-react icons only
37
- - Prefer semantic Tailwind tokens (bg-background, text-foreground, border-border, ring-ring, etc.) over hardcoded colors (e.g. slate-*, bg-white). If you need different global colors/radius, call update_global_styles first, then use token-based classes.
37
+ - Prefer semantic Tailwind tokens (bg-background, text-foreground, border-border, ring-ring, etc.) over hardcoded colors (e.g. slate-*, bg-white) for global styles. If you need different global colors/radius, call update_global_styles first, then use token-based classes.
38
38
  - update_global_styles args MUST be a flat JSON object with token keys as optional params. Include at least 1 key.
39
- - Never call update_global_styles with {} (empty object). If you don't need to change tokens, do not call this tool.
39
+ - While updating global styles make sure that the styles updating (ex. background, foreground) are used in the right places (using bg-background, text-foreground, etc.). If not include them by updating the classname using update_classname tool
40
+ - Never call update_global_styles with {} (empty object). If you don't need to change styles, do not call this tool.
40
41
  - Example: {"radius":"0.75rem","background":"oklch(0.98 0.01 80)"}.
42
+
41
43
  `.trim());
42
44
  const projectConfiguration = mdSection("Project Config", [
43
45
  jsonBlock("framework", codegenIndex.projectConfigs.frameworkConfig),
@@ -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,MAAM,GAAG;;;;;;;;;MASX,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAC;GAC5C,CAAC,IAAI,EAAE,CAAC;IAET,MAAM,QAAQ,GAAG,SAAS,CACxB,mBAAmB,EACnB,SAAS,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC,CAChC,CAAC;IAEF,MAAM,SAAS,GAAG,SAAS,CACzB,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;MAwBE,CAAC,IAAI,EAAE,CACT,CAAC;IAEH,MAAM,oBAAoB,GAAG,SAAS,CACpC,gBAAgB,EAChB;QACE,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;QAEnE,SAAS,CAAC,SAAS,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QAE/D,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;KACpE,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,OAAO,GAAG,SAAS,CACvB,kBAAkB,EAClB,SAAS,CAAC,SAAS,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAC7C,CAAC;IAEF,MAAM,QAAQ,GAAG;QACf,MAAM;QACN,QAAQ;QACR,SAAS;QACT,oBAAoB;QACpB,OAAO;QACP,eAAe;KAChB,CAAC;IAEF,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: 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 system = `\r\n You are a senior software engineer implementing tasks in an existing codebase.\r\n\r\n Rules:\r\n - Implement ONLY the requested task.\r\n - Prefer incremental edits over rewrites.\r\n - Be concise and deterministic.\r\n - Do not output code directly; use tools.\r\n\r\n ${projectStateNote(isNewProject, \"codegen\")}\r\n `.trim();\r\n\r\n const taskInfo = mdSection(\r\n \"Task to implement\",\r\n jsonBlock(\"task\", task ?? null),\r\n );\r\n\r\n const toolsInfo = mdSection(\r\n \"Tools\",\r\n `\r\n Available tools:\r\n\r\n - read_file: Read file\r\n - update_global_styles: Update app/styleConfig.json global design tokens\r\n - list_dir: List directory\r\n - create_new_route: Create route with page.tsx + pageConfig.json\r\n - insert_element: Insert element tree\r\n - delete_element: Delete element\r\n - update_classname: Update className\r\n - update_props: Update props\r\n - submit_codegen_done: Finish task\r\n\r\n Rules:\r\n - One insert_element per tree (include children inline) unless depth blocks it.\r\n - Create missing routes with create_new_route.\r\n - For any tool arg named route, always use URL paths with forward slashes (e.g. '/', '/pricing'); never use '\\\\' or filesystem paths like 'app/pricing'.\r\n - insert_element supports optional before_id to insert before an existing sibling; if omitted or not found, it appends to the end.\r\n - image src auto-generated from alt\r\n - lucide-react icons only\r\n - Prefer semantic Tailwind tokens (bg-background, text-foreground, border-border, ring-ring, etc.) over hardcoded colors (e.g. slate-*, bg-white). If you need different global colors/radius, call update_global_styles first, then use token-based classes.\r\n - update_global_styles args MUST be a flat JSON object with token keys as optional params. Include at least 1 key.\r\n - Never call update_global_styles with {} (empty object). If you don't need to change tokens, do not call this tool.\r\n - Example: {\"radius\":\"0.75rem\",\"background\":\"oklch(0.98 0.01 80)\"}.\r\n `.trim(),\r\n );\r\n\r\n const projectConfiguration = mdSection(\r\n \"Project Config\",\r\n [\r\n jsonBlock(\"framework\", codegenIndex.projectConfigs.frameworkConfig),\r\n\r\n jsonBlock(\"runtime\", codegenIndex.projectConfigs.runtimeConfig),\r\n\r\n jsonBlock(\"rendering\", codegenIndex.projectConfigs.renderingConfig),\r\n ].join(\"\\n\"),\r\n );\r\n\r\n const context = mdSection(\r\n \"Relevant Context\",\r\n jsonBlock(\"context\", collectedContext ?? {}),\r\n );\r\n\r\n const sections = [\r\n system,\r\n taskInfo,\r\n toolsInfo,\r\n projectConfiguration,\r\n context,\r\n codegenExamples,\r\n ];\r\n\r\n return sections.join(\"\\n\\n---\\n\\n\");\r\n};\r\n"]}
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,MAAM,GAAG;;;;;;;;;MASX,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAC;GAC5C,CAAC,IAAI,EAAE,CAAC;IAET,MAAM,QAAQ,GAAG,SAAS,CACxB,mBAAmB,EACnB,SAAS,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC,CAChC,CAAC;IAEF,MAAM,SAAS,GAAG,SAAS,CACzB,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BE,CAAC,IAAI,EAAE,CACT,CAAC;IAEH,MAAM,oBAAoB,GAAG,SAAS,CACpC,gBAAgB,EAChB;QACE,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;QAEnE,SAAS,CAAC,SAAS,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QAE/D,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;KACpE,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,OAAO,GAAG,SAAS,CACvB,kBAAkB,EAClB,SAAS,CAAC,SAAS,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAC7C,CAAC;IAEF,MAAM,QAAQ,GAAG;QACf,MAAM;QACN,QAAQ;QACR,SAAS;QACT,oBAAoB;QACpB,OAAO;QACP,eAAe;KAChB,CAAC;IAEF,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: 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 system = `\r\n You are a senior software engineer implementing tasks in an existing codebase.\r\n\r\n Rules:\r\n - Implement ONLY the requested task.\r\n - Prefer incremental edits over rewrites.\r\n - Be concise and deterministic.\r\n - Do not output code directly; use tools.\r\n\r\n ${projectStateNote(isNewProject, \"codegen\")}\r\n `.trim();\r\n\r\n const taskInfo = mdSection(\r\n \"Task to implement\",\r\n jsonBlock(\"task\", task ?? null),\r\n );\r\n\r\n const toolsInfo = mdSection(\r\n \"Tools\",\r\n `\r\n Available tools:\r\n\r\n - read_file: Read file\r\n - update_global_styles: Update app/styleConfig.json global design tokens\r\n - list_dir: List directory\r\n - create_new_route: Create route with page.tsx + pageConfig.json\r\n - insert_element: Insert element tree\r\n - delete_element: Delete element\r\n - update_classname: Update className\r\n - update_props: Update props\r\n - submit_codegen_done: Finish task\r\n\r\n Rules:\r\n - One insert_element per tree (include children inline) unless depth blocks it.\r\n - Create missing routes with create_new_route.\r\n - For any tool arg named route, always use URL paths with forward slashes (e.g. '/', '/pricing'); never use '\\\\' or filesystem paths like 'app/pricing'.\r\n - insert_element supports optional before_id to insert before an existing sibling; if omitted or not found, it appends to the end.\r\n - Include images whenever mentoned to be included. Just use alt tag for images. image src auto-generated from alt\r\n - lucide-react icons only\r\n - Prefer semantic Tailwind tokens (bg-background, text-foreground, border-border, ring-ring, etc.) over hardcoded colors (e.g. slate-*, bg-white) for global styles. If you need different global colors/radius, call update_global_styles first, then use token-based classes.\r\n - update_global_styles args MUST be a flat JSON object with token keys as optional params. Include at least 1 key.\r\n - While updating global styles make sure that the styles updating (ex. background, foreground) are used in the right places (using bg-background, text-foreground, etc.). If not include them by updating the classname using update_classname tool\r\n - Never call update_global_styles with {} (empty object). If you don't need to change styles, do not call this tool.\r\n - Example: {\"radius\":\"0.75rem\",\"background\":\"oklch(0.98 0.01 80)\"}.\r\n\r\n `.trim(),\r\n );\r\n\r\n const projectConfiguration = mdSection(\r\n \"Project Config\",\r\n [\r\n jsonBlock(\"framework\", codegenIndex.projectConfigs.frameworkConfig),\r\n\r\n jsonBlock(\"runtime\", codegenIndex.projectConfigs.runtimeConfig),\r\n\r\n jsonBlock(\"rendering\", codegenIndex.projectConfigs.renderingConfig),\r\n ].join(\"\\n\"),\r\n );\r\n\r\n const context = mdSection(\r\n \"Relevant Context\",\r\n jsonBlock(\"context\", collectedContext ?? {}),\r\n );\r\n\r\n const sections = [\r\n system,\r\n taskInfo,\r\n toolsInfo,\r\n projectConfiguration,\r\n context,\r\n codegenExamples,\r\n ];\r\n\r\n return sections.join(\"\\n\\n---\\n\\n\");\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"planner.prompt.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/planner.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AASrD,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,OAAO,EAAE,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,oBAAoB,WAoEzD,CAAC"}
1
+ {"version":3,"file":"planner.prompt.d.ts","sourceRoot":"","sources":["../../../src/ai/prompts/planner.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AASrD,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,OAAO,EAAE,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,oBAAoB,WAsEzD,CAAC"}
@@ -17,16 +17,18 @@ export const plannerPrompt = (params) => {
17
17
  ${projectStateNote(isNewProject, "planner")}
18
18
  `.trim();
19
19
  const planTasksInfo = mdSection("PM Tasks", jsonBlock("Tasks", planTasks ?? []));
20
- const toolsInfo = mdSection("Tools", `
21
- - read_file: read file
22
- - search: search codebase
23
- - list_dir: list dirs
24
- - submit_planner_tasks: Finalize planner output
25
-
26
- Styling guidance:
27
- - Codegen can call update_global_styles to modify app/styleConfig.json (global design tokens).
28
- - Prefer semantic Tailwind token classes (bg-background, text-foreground, border-border, ring-ring, etc.) so global styles are utilized.
29
- - If a task requires changing theme tokens, specify exact update_global_styles args as a flat object: {"<tokenKey>":"<cssString>"} (never {}).
20
+ const toolsInfo = mdSection("Tools", `
21
+ - read_file: read file
22
+ - search: search codebase
23
+ - list_dir: list dirs
24
+ - submit_planner_tasks: Finalize planner output
25
+
26
+ Styling guidance:
27
+ - Codegen can call update_global_styles to modify app/styleConfig.json (global design tokens).
28
+ - Prefer semantic Tailwind token classes (bg-background, text-foreground, border-border, ring-ring, etc.) so global styles are utilized.
29
+ - While updating global styles make sure that the styles updating (ex. background, foreground) are used in the right places. If not try including them by updating the classname
30
+ - If a task requires changing theme tokens, specify exact update_global_styles args as a flat object: {"<tokenKey>":"<cssString>"} (never {}).
31
+ - Try including images whereever needed in the task description. Also tell what the image should be.
30
32
  `);
31
33
  const rendering = renderPlannerTaskFormatSection();
32
34
  const projectConfiguration = mdSection("Project Config", [
@@ -1 +1 @@
1
- {"version":3,"file":"planner.prompt.js","sourceRoot":"","sources":["../../../src/ai/prompts/planner.prompt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC;AASzC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAA4B,EAAE,EAAE;IAC5D,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAE3E,MAAM,MAAM,GAAG;;;;;;;;;;;;MAYX,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAC;GAC5C,CAAC,IAAI,EAAE,CAAC;IACT,MAAM,aAAa,GAAG,SAAS,CAC7B,UAAU,EACV,SAAS,CAAC,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC,CACpC,CAAC;IAEF,MAAM,SAAS,GAAG,SAAS,CACzB,OAAO,EACP;;;;;;;;;;KAUC,CACF,CAAC;IAEF,MAAM,SAAS,GAAG,8BAA8B,EAAE,CAAC;IAEnD,MAAM,oBAAoB,GAAG,SAAS,CACpC,gBAAgB,EAChB;QACE,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;QAEnE,SAAS,CAAC,SAAS,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QAE/D,SAAS,CAAC,SAAS,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QAE/D,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;KACpE,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,OAAO,GAAG,SAAS,CACvB,kBAAkB,EAClB,SAAS,CAAC,SAAS,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAC7C,CAAC;IAEF,MAAM,QAAQ,GAAG;QACf,MAAM;QACN,aAAa;QACb,SAAS;QACT,SAAS;QACT,oBAAoB;QACpB,OAAO;QACP,eAAe;KAChB,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACtC,CAAC,CAAC","sourcesContent":["import { CollectedContext } from \"../../types/context.types.js\";\r\nimport { PlannerIndex } from \"../../types/public.js\";\r\nimport { plannerExamples } from \"./examples/planner.examples.js\";\r\nimport {\r\n jsonBlock,\r\n mdSection,\r\n projectStateNote,\r\n renderPlannerTaskFormatSection,\r\n} from \"./helpers/promptParts.helper.js\";\r\n\r\nexport type PlanNodePromptParams = {\r\n planTasks: unknown[];\r\n collectedContext: CollectedContext;\r\n plannerIndex: PlannerIndex;\r\n isNewProject: boolean;\r\n};\r\n\r\nexport const plannerPrompt = (params: PlanNodePromptParams) => {\r\n const { planTasks, collectedContext, plannerIndex, isNewProject } = params;\r\n\r\n const system = `\r\n You are a senior software architect creating implementation tasks.\r\n\r\n Rules:\r\n - Create atomic, deterministic tasks.\r\n - Include exact file paths to create/modify.\r\n - Prefer incremental edits over rewrites.\r\n - Reuse existing code/patterns.\r\n - Be concise but complete.\r\n - Do not write code.\r\n - Tasks must be directly executable by codegen agents.\r\n\r\n ${projectStateNote(isNewProject, \"planner\")}\r\n `.trim();\r\n const planTasksInfo = mdSection(\r\n \"PM Tasks\",\r\n jsonBlock(\"Tasks\", planTasks ?? []),\r\n );\r\n\r\n const toolsInfo = mdSection(\n \"Tools\",\n `\n - read_file: read file\n - search: search codebase\n - list_dir: list dirs\n - submit_planner_tasks: Finalize planner output\n\n Styling guidance:\n - Codegen can call update_global_styles to modify app/styleConfig.json (global design tokens).\n - Prefer semantic Tailwind token classes (bg-background, text-foreground, border-border, ring-ring, etc.) so global styles are utilized.\n - If a task requires changing theme tokens, specify exact update_global_styles args as a flat object: {\"<tokenKey>\":\"<cssString>\"} (never {}).\n `,\n );\n\r\n const rendering = renderPlannerTaskFormatSection();\r\n\r\n const projectConfiguration = mdSection(\r\n \"Project Config\",\r\n [\r\n jsonBlock(\"framework\", plannerIndex.projectConfigs.frameworkConfig),\r\n\r\n jsonBlock(\"runtime\", plannerIndex.projectConfigs.runtimeConfig),\r\n\r\n jsonBlock(\"tooling\", plannerIndex.projectConfigs.toolingConfig),\r\n\r\n jsonBlock(\"rendering\", plannerIndex.projectConfigs.renderingConfig),\r\n ].join(\"\\n\"),\r\n );\r\n\r\n const context = mdSection(\r\n \"Relevant Context\",\r\n jsonBlock(\"context\", collectedContext ?? {}),\r\n );\r\n\r\n const sections = [\r\n system,\r\n planTasksInfo,\r\n toolsInfo,\r\n rendering,\r\n projectConfiguration,\r\n context,\r\n plannerExamples,\r\n ];\r\n\r\n return sections.join(\"\\n\\n---\\n\\n\");\r\n};\r\n"]}
1
+ {"version":3,"file":"planner.prompt.js","sourceRoot":"","sources":["../../../src/ai/prompts/planner.prompt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC;AASzC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAA4B,EAAE,EAAE;IAC5D,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAE3E,MAAM,MAAM,GAAG;;;;;;;;;;;;MAYX,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAC;GAC5C,CAAC,IAAI,EAAE,CAAC;IACT,MAAM,aAAa,GAAG,SAAS,CAC7B,UAAU,EACV,SAAS,CAAC,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC,CACpC,CAAC;IAEF,MAAM,SAAS,GAAG,SAAS,CACzB,OAAO,EACP;;;;;;;;;;;;KAYC,CACF,CAAC;IAEF,MAAM,SAAS,GAAG,8BAA8B,EAAE,CAAC;IAEnD,MAAM,oBAAoB,GAAG,SAAS,CACpC,gBAAgB,EAChB;QACE,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;QAEnE,SAAS,CAAC,SAAS,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QAE/D,SAAS,CAAC,SAAS,EAAE,YAAY,CAAC,cAAc,CAAC,aAAa,CAAC;QAE/D,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,eAAe,CAAC;KACpE,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IAEF,MAAM,OAAO,GAAG,SAAS,CACvB,kBAAkB,EAClB,SAAS,CAAC,SAAS,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAC7C,CAAC;IAEF,MAAM,QAAQ,GAAG;QACf,MAAM;QACN,aAAa;QACb,SAAS;QACT,SAAS;QACT,oBAAoB;QACpB,OAAO;QACP,eAAe;KAChB,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACtC,CAAC,CAAC","sourcesContent":["import { CollectedContext } from \"../../types/context.types.js\";\r\nimport { PlannerIndex } from \"../../types/public.js\";\r\nimport { plannerExamples } from \"./examples/planner.examples.js\";\r\nimport {\r\n jsonBlock,\r\n mdSection,\r\n projectStateNote,\r\n renderPlannerTaskFormatSection,\r\n} from \"./helpers/promptParts.helper.js\";\r\n\r\nexport type PlanNodePromptParams = {\r\n planTasks: unknown[];\r\n collectedContext: CollectedContext;\r\n plannerIndex: PlannerIndex;\r\n isNewProject: boolean;\r\n};\r\n\r\nexport const plannerPrompt = (params: PlanNodePromptParams) => {\r\n const { planTasks, collectedContext, plannerIndex, isNewProject } = params;\r\n\r\n const system = `\r\n You are a senior software architect creating implementation tasks.\r\n\r\n Rules:\r\n - Create atomic, deterministic tasks.\r\n - Include exact file paths to create/modify.\r\n - Prefer incremental edits over rewrites.\r\n - Reuse existing code/patterns.\r\n - Be concise but complete.\r\n - Do not write code.\r\n - Tasks must be directly executable by codegen agents.\r\n\r\n ${projectStateNote(isNewProject, \"planner\")}\r\n `.trim();\r\n const planTasksInfo = mdSection(\r\n \"PM Tasks\",\r\n jsonBlock(\"Tasks\", planTasks ?? []),\r\n );\r\n\r\n const toolsInfo = mdSection(\r\n \"Tools\",\r\n `\r\n - read_file: read file\r\n - search: search codebase\r\n - list_dir: list dirs\r\n - submit_planner_tasks: Finalize planner output\r\n\r\n Styling guidance:\r\n - Codegen can call update_global_styles to modify app/styleConfig.json (global design tokens).\r\n - Prefer semantic Tailwind token classes (bg-background, text-foreground, border-border, ring-ring, etc.) so global styles are utilized.\r\n - While updating global styles make sure that the styles updating (ex. background, foreground) are used in the right places. If not try including them by updating the classname\r\n - If a task requires changing theme tokens, specify exact update_global_styles args as a flat object: {\"<tokenKey>\":\"<cssString>\"} (never {}).\r\n - Try including images whereever needed in the task description. Also tell what the image should be.\r\n `,\r\n );\r\n\r\n const rendering = renderPlannerTaskFormatSection();\r\n\r\n const projectConfiguration = mdSection(\r\n \"Project Config\",\r\n [\r\n jsonBlock(\"framework\", plannerIndex.projectConfigs.frameworkConfig),\r\n\r\n jsonBlock(\"runtime\", plannerIndex.projectConfigs.runtimeConfig),\r\n\r\n jsonBlock(\"tooling\", plannerIndex.projectConfigs.toolingConfig),\r\n\r\n jsonBlock(\"rendering\", plannerIndex.projectConfigs.renderingConfig),\r\n ].join(\"\\n\"),\r\n );\r\n\r\n const context = mdSection(\r\n \"Relevant Context\",\r\n jsonBlock(\"context\", collectedContext ?? {}),\r\n );\r\n\r\n const sections = [\r\n system,\r\n planTasksInfo,\r\n toolsInfo,\r\n rendering,\r\n projectConfiguration,\r\n context,\r\n plannerExamples,\r\n ];\r\n\r\n return sections.join(\"\\n\\n---\\n\\n\");\r\n};\r\n"]}
@@ -14,7 +14,7 @@ export const UpdateGlobalStylesSchema = {
14
14
  },
15
15
  ])),
16
16
  },
17
- description: `Args are a flat object where each key is an optional token name; include at least 1 key. ` +
17
+ description: `Args are a flat object where each key is an optional token name; include at least 1 key. Use background for background color and foreground for text color, radius for border radius, etc.` +
18
18
  `Allowed keys: ${STYLE_TOKEN_KEYS.join(", ")}.`,
19
19
  },
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"updateGlobalStyles.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/updateGlobalStyles.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,wKAAwK;IAC1K,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,GAAG,MAAM,CAAC,WAAW,CACnB,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBAC1B,CAAC;gBACD;oBACE,IAAI,EAAE,IAAI,CAAC,MAAM;oBACjB,WAAW,EACT,mHAAmH;iBACtH;aACF,CAAC,CACH;SACF;QACD,WAAW,EACT,2FAA2F;YAC3F,iBAAiB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;KAClD;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\nimport { STYLE_TOKEN_KEYS } from \"../../../types/styleConfig.js\";\n\nexport const UpdateGlobalStylesSchema = {\n name: \"update_global_styles\",\n description:\n \"Updates global design tokens in app/styleConfig.json. Use this to change theme colors/radius used by semantic Tailwind classes like bg-background and text-foreground.\",\n parameters: {\n type: Type.OBJECT,\n properties: {\n ...Object.fromEntries(\n STYLE_TOKEN_KEYS.map((k) => [\n k,\n {\n type: Type.STRING,\n description:\n \"CSS value string for this token (e.g. '0.75rem' or 'oklch(0.62 0.16 199.4)'). Omit keys you don't want to change.\",\n },\n ]),\n ),\n },\n description:\n `Args are a flat object where each key is an optional token name; include at least 1 key. ` +\n `Allowed keys: ${STYLE_TOKEN_KEYS.join(\", \")}.`,\n },\n};\n"]}
1
+ {"version":3,"file":"updateGlobalStyles.schema.js","sourceRoot":"","sources":["../../../../src/ai/tools/schemas/updateGlobalStyles.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,wKAAwK;IAC1K,UAAU,EAAE;QACV,IAAI,EAAE,IAAI,CAAC,MAAM;QACjB,UAAU,EAAE;YACV,GAAG,MAAM,CAAC,WAAW,CACnB,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBAC1B,CAAC;gBACD;oBACE,IAAI,EAAE,IAAI,CAAC,MAAM;oBACjB,WAAW,EACT,mHAAmH;iBACtH;aACF,CAAC,CACH;SACF;QACD,WAAW,EACT,4LAA4L;YAC5L,iBAAiB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;KAClD;CACF,CAAC","sourcesContent":["import { Type } from \"@google/genai\";\nimport { STYLE_TOKEN_KEYS } from \"../../../types/styleConfig.js\";\n\nexport const UpdateGlobalStylesSchema = {\n name: \"update_global_styles\",\n description:\n \"Updates global design tokens in app/styleConfig.json. Use this to change theme colors/radius used by semantic Tailwind classes like bg-background and text-foreground.\",\n parameters: {\n type: Type.OBJECT,\n properties: {\n ...Object.fromEntries(\n STYLE_TOKEN_KEYS.map((k) => [\n k,\n {\n type: Type.STRING,\n description:\n \"CSS value string for this token (e.g. '0.75rem' or 'oklch(0.62 0.16 199.4)'). Omit keys you don't want to change.\",\n },\n ]),\n ),\n },\n description:\n `Args are a flat object where each key is an optional token name; include at least 1 key. Use background for background color and foreground for text color, radius for border radius, etc.` +\n `Allowed keys: ${STYLE_TOKEN_KEYS.join(\", \")}.`,\n },\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedangiitb/qwintly-core",
3
- "version": "1.3.29",
3
+ "version": "1.4.0",
4
4
  "description": "Qwintly Core",
5
5
  "homepage": "https://github.com/vedangiitb/qwintly-core#readme",
6
6
  "bugs": {