@wix/ditto-codegen-public 1.0.65 → 1.0.66
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 +36 -15
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -121101,15 +121101,20 @@ Use dynamic parameters when:
|
|
|
121101
121101
|
- Different instances or configurations are needed for different sites
|
|
121102
121102
|
- Content, styling, or functionality needs to be adjusted through a UI
|
|
121103
121103
|
|
|
121104
|
-
|
|
121105
|
-
|
|
121106
|
-
|
|
121104
|
+
IMPORTANT: If an embedded script extension exists but doesn't need specific dynamic parameters, you should ALWAYS add at least one dynamic parameter: an enable/disable toggle. This allows site owners to control whether the embedded script is active without removing it entirely.
|
|
121105
|
+
|
|
121106
|
+
Example of minimum enable/disable parameter:
|
|
121107
|
+
{
|
|
121108
|
+
"key": "enabled",
|
|
121109
|
+
"displayName": "Enable",
|
|
121110
|
+
"type": "BOOLEAN",
|
|
121111
|
+
"description": "Enable or disable this feature",
|
|
121112
|
+
"required": true,
|
|
121113
|
+
"defaultValue": "true"
|
|
121114
|
+
}
|
|
121107
121115
|
</when_to_use_dynamic_parameters>
|
|
121108
121116
|
|
|
121109
121117
|
<output_structure>
|
|
121110
|
-
Your output must include an array of embeddedScriptParameters. This array can be:
|
|
121111
|
-
- Empty array [] if there are no EMBEDDED_SCRIPT extensions in the blueprint or no dynamic parameters are needed
|
|
121112
|
-
- Array of embedded script parameter objects if there are EMBEDDED_SCRIPT extensions
|
|
121113
121118
|
|
|
121114
121119
|
Each embedded script parameter object contains:
|
|
121115
121120
|
- extensionId (string): The name of the embedded script extension these parameters belong to (use the extension.name field)
|
|
@@ -121126,8 +121131,6 @@ Each dynamic parameter must include:
|
|
|
121126
121131
|
|
|
121127
121132
|
Example output structures:
|
|
121128
121133
|
|
|
121129
|
-
No embedded script extensions:
|
|
121130
|
-
[]
|
|
121131
121134
|
|
|
121132
121135
|
With embedded script extensions:
|
|
121133
121136
|
[
|
|
@@ -121219,18 +121222,26 @@ Output:
|
|
|
121219
121222
|
}
|
|
121220
121223
|
]
|
|
121221
121224
|
|
|
121222
|
-
Example 2 - Static Pixel (
|
|
121225
|
+
Example 2 - Static Pixel (minimal dynamic parameters):
|
|
121223
121226
|
Blueprint: Add a Facebook Pixel with a hardcoded pixel ID
|
|
121224
121227
|
Extension Name: "facebook-pixel"
|
|
121225
|
-
Output:
|
|
121228
|
+
Output:
|
|
121229
|
+
{
|
|
121230
|
+
"key": "enabled",
|
|
121231
|
+
"displayName": "Enable",
|
|
121232
|
+
"type": "BOOLEAN",
|
|
121233
|
+
"description": "Enable or disable this feature",
|
|
121234
|
+
"required": true,
|
|
121235
|
+
"defaultValue": "true"
|
|
121236
|
+
}
|
|
121226
121237
|
|
|
121227
121238
|
</examples>
|
|
121228
121239
|
|
|
121229
121240
|
<guidelines>
|
|
121230
|
-
- If there are
|
|
121231
|
-
-
|
|
121241
|
+
- If there are EMBEDDED_SCRIPT extensions, you MUST always include at least one parameter per extension
|
|
121242
|
+
- At minimum, every embedded script should have an enable/disable parameter to allow site owners to control activation
|
|
121232
121243
|
- The extensionId MUST match the exact name of the embedded script extension from the blueprint
|
|
121233
|
-
-
|
|
121244
|
+
- Define additional parameters only if they truly need to be configurable by the site owner
|
|
121234
121245
|
- Keep parameter keys descriptive and in lowerCamelCase
|
|
121235
121246
|
- Provide clear displayName and description for each parameter
|
|
121236
121247
|
- Set appropriate required flags based on functionality needs
|
|
@@ -127513,6 +127524,7 @@ var require_DashboardDecisionAgent = __commonJS({
|
|
|
127513
127524
|
var zod_1 = require_zod();
|
|
127514
127525
|
var autoPatternPrompt_1 = require_autoPatternPrompt();
|
|
127515
127526
|
var utils_1 = require_utils14();
|
|
127527
|
+
var types_1 = require_types_impl();
|
|
127516
127528
|
var autoPatternsLlmConfig = zod_1.z.object({
|
|
127517
127529
|
useAutoPatterns: zod_1.z.boolean(),
|
|
127518
127530
|
schema: zod_1.z.object({
|
|
@@ -127570,9 +127582,18 @@ var require_DashboardDecisionAgent = __commonJS({
|
|
|
127570
127582
|
buildSystemPrompt() {
|
|
127571
127583
|
return (0, autoPatternPrompt_1.autoPatternDecisionPrompt)();
|
|
127572
127584
|
}
|
|
127585
|
+
shouldNotUseAutoPatterns(params) {
|
|
127586
|
+
const { blueprint, planAndResources } = params;
|
|
127587
|
+
const hasEmbeddedScriptExtension = blueprint?.extensions?.some((ext) => ext.type === types_1.ExtensionType.EMBEDDED_SCRIPT) ?? false;
|
|
127588
|
+
const hasOneDashboardPageExtension = blueprint?.extensions?.filter((ext) => ext.type === types_1.ExtensionType.DASHBOARD_PAGE).length === 1;
|
|
127589
|
+
const shouldImplementEmbeddedScriptParameters = hasOneDashboardPageExtension && hasEmbeddedScriptExtension;
|
|
127590
|
+
if (!planAndResources?.createdCollections?.length || shouldImplementEmbeddedScriptParameters) {
|
|
127591
|
+
return true;
|
|
127592
|
+
}
|
|
127593
|
+
return false;
|
|
127594
|
+
}
|
|
127573
127595
|
async generate(params) {
|
|
127574
|
-
|
|
127575
|
-
if (!planAndResources?.createdCollections?.length) {
|
|
127596
|
+
if (this.shouldNotUseAutoPatterns(params)) {
|
|
127576
127597
|
return {
|
|
127577
127598
|
useAutoPatterns: false
|
|
127578
127599
|
};
|
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.66",
|
|
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": "ccdf783fad507eccb98247f2632438eb41c1753aec8f47dabb8001c0"
|
|
28
28
|
}
|