@wix/ditto-codegen-public 1.0.190 → 1.0.191
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.
- package/dist/out.js +26 -0
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -71547,8 +71547,13 @@ To modify a file, you can either use the 'edit' operation to replace a specific
|
|
|
71547
71547
|
var require_DashboardPageAgent2 = __commonJS({
|
|
71548
71548
|
"dist/agents/DashboardPageAgent.js"(exports2) {
|
|
71549
71549
|
"use strict";
|
|
71550
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
|
|
71551
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
71552
|
+
};
|
|
71550
71553
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
71551
71554
|
exports2.DashboardPageAgent = void 0;
|
|
71555
|
+
var fs_1 = __importDefault2(require("fs"));
|
|
71556
|
+
var path_1 = __importDefault2(require("path"));
|
|
71552
71557
|
var dashboard_page_prompt_1 = require_dashboard_page_prompt();
|
|
71553
71558
|
var api_1 = require_api2();
|
|
71554
71559
|
var prompt_selectors_1 = require_prompt_selectors();
|
|
@@ -71591,6 +71596,24 @@ var require_DashboardPageAgent2 = __commonJS({
|
|
|
71591
71596
|
const result = await autoPatternsDocSelector.generate(userRequestSummary);
|
|
71592
71597
|
return result.selectedSectionIds;
|
|
71593
71598
|
}
|
|
71599
|
+
// temporary fix to add all files in the auto patterns directory as relevant files
|
|
71600
|
+
addAutoPatternsRelevantFiles(params) {
|
|
71601
|
+
const relevantFilePaths = params.relevantFilePaths ?? [];
|
|
71602
|
+
const patternsJsonPath = relevantFilePaths.find((p) => p.endsWith("patterns.json"));
|
|
71603
|
+
if (patternsJsonPath) {
|
|
71604
|
+
const patternsDir = path_1.default.dirname(patternsJsonPath);
|
|
71605
|
+
const absoluteDir = path_1.default.join(params.basePath, patternsDir);
|
|
71606
|
+
try {
|
|
71607
|
+
const filesInDir = fs_1.default.readdirSync(absoluteDir).filter((file) => fs_1.default.statSync(path_1.default.join(absoluteDir, file)).isFile()).map((file) => path_1.default.join(patternsDir, file));
|
|
71608
|
+
const newPaths = filesInDir.filter((filePath) => !relevantFilePaths.includes(filePath));
|
|
71609
|
+
if (newPaths.length > 0) {
|
|
71610
|
+
params.relevantFilePaths = [...relevantFilePaths, ...newPaths];
|
|
71611
|
+
}
|
|
71612
|
+
} catch {
|
|
71613
|
+
console.error(`Error reading auto patterns directory: ${absoluteDir}`);
|
|
71614
|
+
}
|
|
71615
|
+
}
|
|
71616
|
+
}
|
|
71594
71617
|
async generate(params) {
|
|
71595
71618
|
const { blueprint, plan, userRequestSummary } = params;
|
|
71596
71619
|
const useData = (0, prompt_selectors_1.shouldUseDataPrompt)(params);
|
|
@@ -71598,6 +71621,9 @@ var require_DashboardPageAgent2 = __commonJS({
|
|
|
71598
71621
|
const useApiSpec = Boolean(plan?.apiSpec);
|
|
71599
71622
|
const useDynamicParameters = (0, prompt_selectors_1.shouldUseDynamicParametersPrompt)(params);
|
|
71600
71623
|
const autoPatternsSectionIds = await this.getAutoPatternsSectionIds(useAutoPatterns, userRequestSummary);
|
|
71624
|
+
if (useAutoPatterns) {
|
|
71625
|
+
this.addAutoPatternsRelevantFiles(params);
|
|
71626
|
+
}
|
|
71601
71627
|
const apiNames = (0, api_1.extractApiNames)(params.extension);
|
|
71602
71628
|
const systemPrompt = await this.buildSystemPrompt(useData, useAutoPatterns, useApiSpec, useDynamicParameters, apiNames, autoPatternsSectionIds);
|
|
71603
71629
|
const appName = blueprint?.appName ? `'${blueprint.appName}'` : "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.191",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@wix/ditto-codegen": "1.0.0",
|
|
25
25
|
"esbuild": "^0.25.9"
|
|
26
26
|
},
|
|
27
|
-
"falconPackageHash": "
|
|
27
|
+
"falconPackageHash": "5b67b19500c5227d223ef15b69d91c8c965fbd2aa2cabee9f5ac410a"
|
|
28
28
|
}
|