@wix/ditto-codegen-public 1.0.174 → 1.0.176
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 +34 -34
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -36558,19 +36558,16 @@ var require_CodegenAIProxyService = __commonJS({
|
|
|
36558
36558
|
authorization: `Bearer ${process.env.WIX_ACCESS_TOKEN}`
|
|
36559
36559
|
}
|
|
36560
36560
|
});
|
|
36561
|
-
if (!aiGenerationResult.ok) {
|
|
36562
|
-
bail(new ditto_codegen_types_12.GenerateObjectError(`Fatal error HTTP ${aiGenerationResult.status} ${aiGenerationResult.statusText}`, {
|
|
36563
|
-
status: aiGenerationResult.status,
|
|
36564
|
-
statusText: aiGenerationResult.statusText,
|
|
36565
|
-
url
|
|
36566
|
-
}));
|
|
36567
|
-
}
|
|
36568
36561
|
const { generationRequest } = await aiGenerationResult.json();
|
|
36569
36562
|
if (generationRequest.status === ditto_codegen_types_12.GenerationRequestStatus.COMPLETED) {
|
|
36570
36563
|
return JSON.parse(generationRequest.response);
|
|
36571
36564
|
}
|
|
36572
36565
|
if (generationRequest.status === ditto_codegen_types_12.GenerationRequestStatus.FAILED) {
|
|
36573
|
-
|
|
36566
|
+
bail(new ditto_codegen_types_12.GenerateObjectError(`Error occured during generate: ${JSON.stringify(generationRequest.error)}`, {
|
|
36567
|
+
status: aiGenerationResult.status,
|
|
36568
|
+
statusText: aiGenerationResult.statusText,
|
|
36569
|
+
url
|
|
36570
|
+
}));
|
|
36574
36571
|
}
|
|
36575
36572
|
throw new Error(`Polling status is ${generationRequest.status}`);
|
|
36576
36573
|
}, { retries: 30, factor: 1, minTimeout: 5e3 });
|
|
@@ -64386,7 +64383,7 @@ var require_dashboard_page_instructions = __commonJS({
|
|
|
64386
64383
|
"dist/system-prompts/dashboardPage/dashboard-page-instructions.js"(exports2) {
|
|
64387
64384
|
"use strict";
|
|
64388
64385
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
64389
|
-
exports2.dashboardPageInstructions = void 0;
|
|
64386
|
+
exports2.dashboardPageInstructions = exports2.supportedWDSComponents = void 0;
|
|
64390
64387
|
var apiSpec_1 = require_apiSpec();
|
|
64391
64388
|
var typescript_quality_guidelines_1 = require_typescript_quality_guidelines();
|
|
64392
64389
|
var dashboardPackage_1 = require_dashboardPackage();
|
|
@@ -64394,7 +64391,7 @@ var require_dashboard_page_instructions = __commonJS({
|
|
|
64394
64391
|
var dynamicParameters_1 = require_dynamicParameters();
|
|
64395
64392
|
var ecomPackage_1 = require_ecomPackage();
|
|
64396
64393
|
var wdsPackage_1 = require_wdsPackage();
|
|
64397
|
-
|
|
64394
|
+
exports2.supportedWDSComponents = /* @__PURE__ */ new Set([
|
|
64398
64395
|
"AutoComplete",
|
|
64399
64396
|
"Badge",
|
|
64400
64397
|
"Box",
|
|
@@ -64493,7 +64490,7 @@ export default function () {
|
|
|
64493
64490
|
filesAndCode: dashboardPageFilesAndCode,
|
|
64494
64491
|
wdsProviderUsage: dashboardPageWdsProviderUsage,
|
|
64495
64492
|
hardConstraints: dashboardPageHardConstraints,
|
|
64496
|
-
wdsReference: () => (0, wdsPackage_1.buildWdsSystemPrompt)(supportedWDSComponents),
|
|
64493
|
+
wdsReference: () => (0, wdsPackage_1.buildWdsSystemPrompt)(exports2.supportedWDSComponents),
|
|
64497
64494
|
apiReferences: `${dashboardPackage_1.dashboardPackage}
|
|
64498
64495
|
${ecomPackage_1.ecomPackage}`,
|
|
64499
64496
|
typescriptQualityGuidelines: typescript_quality_guidelines_1.typescriptQualityGuidelines,
|
|
@@ -65605,31 +65602,34 @@ var require_file_operations = __commonJS({
|
|
|
65605
65602
|
"dist/agents/utils/file-operations.js"(exports2) {
|
|
65606
65603
|
"use strict";
|
|
65607
65604
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
65608
|
-
exports2.FilesSchema = exports2.FileItemSchema = void 0;
|
|
65605
|
+
exports2.FilesSchema = exports2.FileItemSchema = exports2.FileCreateOrUpdateSchema = void 0;
|
|
65609
65606
|
var zod_1 = require_zod();
|
|
65610
65607
|
var ditto_codegen_types_12 = require_dist();
|
|
65608
|
+
exports2.FileCreateOrUpdateSchema = zod_1.z.object({
|
|
65609
|
+
operation: zod_1.z.union([
|
|
65610
|
+
zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT),
|
|
65611
|
+
zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.UPDATE)
|
|
65612
|
+
]).describe("File operation: insert (new file), update (modify existing)").default(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT),
|
|
65613
|
+
path: zod_1.z.string().describe("Relative file path from project root"),
|
|
65614
|
+
content: zod_1.z.string().describe("Complete file content as a string (for JSON files, stringify the object). Required for insert and update operations.")
|
|
65615
|
+
});
|
|
65616
|
+
var FileEditSchema = zod_1.z.object({
|
|
65617
|
+
operation: zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.EDIT),
|
|
65618
|
+
path: zod_1.z.string().describe("Relative file path from project root"),
|
|
65619
|
+
replacements: zod_1.z.array(zod_1.z.object({
|
|
65620
|
+
oldString: zod_1.z.string().describe("The text to replace (must match the file contents exactly, including all whitespace and indentation)"),
|
|
65621
|
+
newString: zod_1.z.string().describe("The edited text to replace the oldString"),
|
|
65622
|
+
replaceAll: zod_1.z.boolean().optional().describe("Replace all occurrences of oldString (default false)")
|
|
65623
|
+
})).min(1).describe("List of string replacements to apply")
|
|
65624
|
+
});
|
|
65625
|
+
var FileDeleteSchema = zod_1.z.object({
|
|
65626
|
+
operation: zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.DELETE),
|
|
65627
|
+
path: zod_1.z.string().describe("Relative file path from project root")
|
|
65628
|
+
});
|
|
65611
65629
|
exports2.FileItemSchema = zod_1.z.discriminatedUnion("operation", [
|
|
65612
|
-
|
|
65613
|
-
|
|
65614
|
-
|
|
65615
|
-
zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.UPDATE)
|
|
65616
|
-
]).describe("File operation: insert (new file), update (modify existing)").default(ditto_codegen_types_12.ExtensionGenerationOperation.INSERT),
|
|
65617
|
-
path: zod_1.z.string().describe("Relative file path from project root"),
|
|
65618
|
-
content: zod_1.z.string().describe("Complete file content as a string (for JSON files, stringify the object). Required for insert and update operations.")
|
|
65619
|
-
}),
|
|
65620
|
-
zod_1.z.object({
|
|
65621
|
-
operation: zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.DELETE),
|
|
65622
|
-
path: zod_1.z.string().describe("Relative file path from project root")
|
|
65623
|
-
}),
|
|
65624
|
-
zod_1.z.object({
|
|
65625
|
-
operation: zod_1.z.literal(ditto_codegen_types_12.ExtensionGenerationOperation.EDIT),
|
|
65626
|
-
path: zod_1.z.string().describe("Relative file path from project root"),
|
|
65627
|
-
replacements: zod_1.z.array(zod_1.z.object({
|
|
65628
|
-
oldString: zod_1.z.string().describe("The text to replace (must match the file contents exactly, including all whitespace and indentation)"),
|
|
65629
|
-
newString: zod_1.z.string().describe("The edited text to replace the oldString"),
|
|
65630
|
-
replaceAll: zod_1.z.boolean().optional().describe("Replace all occurrences of oldString (default false)")
|
|
65631
|
-
})).min(1).describe("List of string replacements to apply")
|
|
65632
|
-
})
|
|
65630
|
+
exports2.FileCreateOrUpdateSchema,
|
|
65631
|
+
FileDeleteSchema,
|
|
65632
|
+
FileEditSchema
|
|
65633
65633
|
]).describe(`Representation of an operation that modifies a file on the local file system.
|
|
65634
65634
|
Use the 'insert' operation to create a new file.
|
|
65635
65635
|
Use the 'delete' operation to remove a file.
|
|
@@ -79394,7 +79394,7 @@ var require_orchestrator = __commonJS({
|
|
|
79394
79394
|
this.emitEvent("planner:start", {});
|
|
79395
79395
|
const planner = this.agentsFactory.getAgent({ type: "PLANNER" });
|
|
79396
79396
|
const plan = await planner.generate(blueprint);
|
|
79397
|
-
console.log("Plan", JSON.stringify(plan));
|
|
79397
|
+
console.log("Plan", JSON.stringify(plan, null, 2));
|
|
79398
79398
|
this.emitEvent("planner:done", {});
|
|
79399
79399
|
return plan;
|
|
79400
79400
|
}
|
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.176",
|
|
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": "011d7b1d789274753bb72c420afe5c8d8ac71af7d15471b76b7ce6e6"
|
|
28
28
|
}
|