@wix/ditto-codegen-public 1.0.522 → 1.0.523
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 +45 -0
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -120683,6 +120683,9 @@ var require_config = __commonJS({
|
|
|
120683
120683
|
permission,
|
|
120684
120684
|
instructions: instructionPaths,
|
|
120685
120685
|
lsp: false,
|
|
120686
|
+
// Undo/revert snapshots `git add` the whole worktree before and after every
|
|
120687
|
+
// model step; codegen never reverts through opencode.
|
|
120688
|
+
snapshot: false,
|
|
120686
120689
|
mcp: exports2.WIX_MCP_CONFIG,
|
|
120687
120690
|
watcher: { ignore: WATCHER_IGNORE_PATTERNS },
|
|
120688
120691
|
...isCodeWritingFlow ? { autoupdate: false, share: "disabled" } : {},
|
|
@@ -129492,6 +129495,46 @@ export const GeneratedFilesGuard = async () => ({
|
|
|
129492
129495
|
}
|
|
129493
129496
|
});
|
|
129494
129497
|
|
|
129498
|
+
// dist/opencode-integration/plugins/prompt-cache-key.js
|
|
129499
|
+
var require_prompt_cache_key = __commonJS({
|
|
129500
|
+
"dist/opencode-integration/plugins/prompt-cache-key.js"(exports2) {
|
|
129501
|
+
"use strict";
|
|
129502
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
129503
|
+
exports2.PROMPT_CACHE_KEY_FILENAME = exports2.PROMPT_CACHE_KEY_PREFIX = exports2.PROMPT_CACHE_KEY_BUCKETS = void 0;
|
|
129504
|
+
exports2.buildPromptCacheKeySource = buildPromptCacheKeySource;
|
|
129505
|
+
exports2.writePromptCacheKeyPlugin = writePromptCacheKeyPlugin;
|
|
129506
|
+
var write_plugin_1 = require_write_plugin();
|
|
129507
|
+
exports2.PROMPT_CACHE_KEY_BUCKETS = 8;
|
|
129508
|
+
exports2.PROMPT_CACHE_KEY_PREFIX = "ditto-codegen-";
|
|
129509
|
+
exports2.PROMPT_CACHE_KEY_FILENAME = "prompt-cache-key.ts";
|
|
129510
|
+
function buildPromptCacheKeySource() {
|
|
129511
|
+
return `// Generated by @wix/ditto-codegen (prompt-cache-key). Do not edit.
|
|
129512
|
+
const BUCKETS = ${exports2.PROMPT_CACHE_KEY_BUCKETS};
|
|
129513
|
+
const PREFIX = ${JSON.stringify(exports2.PROMPT_CACHE_KEY_PREFIX)};
|
|
129514
|
+
|
|
129515
|
+
function bucketOf(sessionID) {
|
|
129516
|
+
let hash = 2166136261;
|
|
129517
|
+
for (let i = 0; i < sessionID.length; i++) {
|
|
129518
|
+
hash ^= sessionID.charCodeAt(i);
|
|
129519
|
+
hash = Math.imul(hash, 16777619);
|
|
129520
|
+
}
|
|
129521
|
+
return (hash >>> 0) % BUCKETS;
|
|
129522
|
+
}
|
|
129523
|
+
|
|
129524
|
+
export const PromptCacheKey = async () => ({
|
|
129525
|
+
"chat.params": async (input, output) => {
|
|
129526
|
+
if (typeof output.options?.promptCacheKey !== "string") return;
|
|
129527
|
+
output.options.promptCacheKey = PREFIX + bucketOf(input.sessionID);
|
|
129528
|
+
},
|
|
129529
|
+
});
|
|
129530
|
+
`;
|
|
129531
|
+
}
|
|
129532
|
+
async function writePromptCacheKeyPlugin() {
|
|
129533
|
+
await (0, write_plugin_1.writeGeneratedPlugin)(exports2.PROMPT_CACHE_KEY_FILENAME, buildPromptCacheKeySource());
|
|
129534
|
+
}
|
|
129535
|
+
}
|
|
129536
|
+
});
|
|
129537
|
+
|
|
129495
129538
|
// dist/opencode-integration/plugins/tool-policies.js
|
|
129496
129539
|
var require_tool_policies3 = __commonJS({
|
|
129497
129540
|
"dist/opencode-integration/plugins/tool-policies.js"(exports2) {
|
|
@@ -129828,6 +129871,7 @@ var require_plugins3 = __commonJS({
|
|
|
129828
129871
|
exports2.writeGeneratedPlugins = writeGeneratedPlugins;
|
|
129829
129872
|
var docs_feedback_nudge_1 = require_docs_feedback_nudge();
|
|
129830
129873
|
var generated_files_guard_1 = require_generated_files_guard();
|
|
129874
|
+
var prompt_cache_key_1 = require_prompt_cache_key();
|
|
129831
129875
|
var subagent_tool_logger_1 = require_subagent_tool_logger();
|
|
129832
129876
|
var tool_policies_1 = require_tool_policies3();
|
|
129833
129877
|
var validation_state_1 = require_validation_state();
|
|
@@ -129839,6 +129883,7 @@ var require_plugins3 = __commonJS({
|
|
|
129839
129883
|
await Promise.all([
|
|
129840
129884
|
(0, docs_feedback_nudge_1.writeDocsFeedbackNudgePlugin)(),
|
|
129841
129885
|
(0, generated_files_guard_1.writeGeneratedFilesGuardPlugin)(),
|
|
129886
|
+
(0, prompt_cache_key_1.writePromptCacheKeyPlugin)(),
|
|
129842
129887
|
(0, subagent_tool_logger_1.writeSubagentToolLoggerPlugin)(),
|
|
129843
129888
|
(0, tool_policies_1.writeToolPoliciesPlugin)(toolPolicies),
|
|
129844
129889
|
(0, validation_state_1.writeValidationStatePlugin)()
|
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.523",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"esbuild": "^0.27.2",
|
|
30
30
|
"vitest": "^4.0.16"
|
|
31
31
|
},
|
|
32
|
-
"falconPackageHash": "
|
|
32
|
+
"falconPackageHash": "445a3b5d1d62a5852420e590592faf6f13b2bf8c98d0382371bc0a64"
|
|
33
33
|
}
|