@wix/ditto-codegen-public 1.0.45 → 1.0.46
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 +15 -7
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -117398,7 +117398,7 @@ var require_utils14 = __commonJS({
|
|
|
117398
117398
|
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
117399
117399
|
};
|
|
117400
117400
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
117401
|
-
exports2.buildUserPromptForCodeGenerationAgent = exports2.getHttpClient = exports2.withCaching = exports2.FileSchema = void 0;
|
|
117401
|
+
exports2.getErrorMessage = exports2.buildUserPromptForCodeGenerationAgent = exports2.getHttpClient = exports2.withCaching = exports2.FileSchema = void 0;
|
|
117402
117402
|
exports2.loadRelevantFilesAsString = loadRelevantFilesAsString;
|
|
117403
117403
|
var zod_1 = require_zod();
|
|
117404
117404
|
var http_client_1 = require_index_node();
|
|
@@ -117507,6 +117507,16 @@ ${contextSections.join("\n")}`;
|
|
|
117507
117507
|
return userMessage;
|
|
117508
117508
|
};
|
|
117509
117509
|
exports2.buildUserPromptForCodeGenerationAgent = buildUserPromptForCodeGenerationAgent;
|
|
117510
|
+
var getErrorMessage = (error) => {
|
|
117511
|
+
if (error?.response?.data && error?.response?.data?.message.length > 0) {
|
|
117512
|
+
return JSON.stringify(error.response.data);
|
|
117513
|
+
} else if (error?.message && error?.message.length > 0) {
|
|
117514
|
+
return JSON.stringify(error.message);
|
|
117515
|
+
} else {
|
|
117516
|
+
return JSON.stringify(error);
|
|
117517
|
+
}
|
|
117518
|
+
};
|
|
117519
|
+
exports2.getErrorMessage = getErrorMessage;
|
|
117510
117520
|
}
|
|
117511
117521
|
});
|
|
117512
117522
|
|
|
@@ -119791,9 +119801,8 @@ var require_CMSAgent = __commonJS({
|
|
|
119791
119801
|
collection: this.currentCollectionSchema
|
|
119792
119802
|
});
|
|
119793
119803
|
} catch (err) {
|
|
119794
|
-
|
|
119795
|
-
|
|
119796
|
-
const fixedCollection = await this.proposeFixedCollection(errormessage, this.currentCollectionSchema, payload.blueprint.summary ?? "");
|
|
119804
|
+
lastError = (0, utils_1.getErrorMessage)(err);
|
|
119805
|
+
const fixedCollection = await this.proposeFixedCollection(lastError, this.currentCollectionSchema, payload.blueprint.summary ?? "");
|
|
119797
119806
|
this.currentCollectionSchema = fixedCollection;
|
|
119798
119807
|
continue;
|
|
119799
119808
|
}
|
|
@@ -121408,10 +121417,9 @@ Generate diverse, realistic sample data that would be appropriate for this type
|
|
|
121408
121417
|
});
|
|
121409
121418
|
success = true;
|
|
121410
121419
|
} catch (error) {
|
|
121411
|
-
|
|
121412
|
-
lastError = errorMessage;
|
|
121420
|
+
lastError = (0, utils_1.getErrorMessage)(error);
|
|
121413
121421
|
const systemPrompt = this.buildPrompt([collection], blueprint, {
|
|
121414
|
-
error:
|
|
121422
|
+
error: lastError,
|
|
121415
121423
|
originalItems: dataItems
|
|
121416
121424
|
});
|
|
121417
121425
|
const fixedData = await this.generateData(DataFixOutputSchema, (0, dataFixPrompt_1.dataFixPrompt)(), systemPrompt, `${this.name}_fix`);
|
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.46",
|
|
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": "7c7d2461323857981a78949ab4a5a9fdcafedf192742fa80e66bde4a"
|
|
28
28
|
}
|